> For the complete documentation index, see [llms.txt](https://870167019.gitbook.io/blockchainspider/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://870167019.gitbook.io/blockchainspider/transaction-spiders/collect-by-block-order.md).

# Collect by block order

The following arguments for `trans.block.evm` can be set, including:

* **out**: the output directory; the default is `./data`.
* **start\_blk**: the start block for collecting transaction data; the default is 0.
* **end\_blk**: the end block for collecting transaction data; if not set, the spider will continue to monitor the latest block's transaction data.
* **providers**: the HTTP JSON RPC providers. If you have two or more providers, you can use `,` to join them.
* **enable**: Specify the transaction crawler middleware to be started. If multiple middlewares are enabled, please separate them with `,`. Middlewares determine which data will be collected. BlockchainSpider provides the following middlewares:
  * BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware
  * BlockchainSpider.middlewares.trans.TraceMiddleware
  * BlockchainSpider.middlewares.trans.TokenTransferMiddleware
  * BlockchainSpider.middlewares.trans.TokenPropertyMiddleware
  * BlockchainSpider.middlewares.trans.ContractMiddleware
  * BlockchainSpider.middlewares.trans.DCFGMiddleware

### Use case: collect receipt and token transfer in a block range

```bash
scrapy crawl trans.block.evm \
-a out=/path/to/output/data \
-a start_blk=19000000 \
-a end_blk=19001000 \
-a providers=https://freerpc.merkle.io \
-a enable=BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware,BlockchainSpider.middlewares.trans.TokenTransferMiddleware,BlockchainSpider.middlewares.trans.TokenPropertyMiddleware
```

### Use case: collect block, transaction, receipt, token transfer to the latest

```bash
scrapy crawl trans.block.evm \
-a out=/path/to/output/data \
-a start_blk=19000000 \
-a providers=https://freerpc.merkle.io \
-a enable=BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware,BlockchainSpider.middlewares.trans.TraceMiddleware,BlockchainSpider.middlewares.trans.TokenTransferMiddleware,BlockchainSpider.middlewares.trans.TokenPropertyMiddleware
```
