# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://870167019.gitbook.io/blockchainspider/transaction-spiders/collect-by-block-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
