> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etherscan.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ERC20 Token Transfers Advanced Filter

> Retrieves ERC20 token transfers with advanced from and to address filtering.

<Badge icon="flask" color="yellow">Beta</Badge>

Explore and preview data from our [Advanced Filter](https://etherscan.io/advanced-filter) page.

<ResponseExample>
  ```json Example response theme={null}
  {
    "status": "1",
    "message": "OK",
    "result": [
      {
        "blockNumber": "4730207",
        "timeStamp": "1513240363",
        "hash": "0xe8c208398bd5ae8e4c237658580db56a2a94dfa0ca382c99b776fa6e7d31d5b4",
        "nonce": "406",
        "blockHash": "0x022c5e6a3d2487a8ccf8946a2ffb74938bf8e5c8a3f6d91b41c56378a96b5c37",
        "from": "0x642ae78fafbb8032da552d619ad43f1d81e4dd7c",
        "contractAddress": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
        "to": "0x4e83362442b8d1bec281594cea3050c8eb01311c",
        "value": "5901522149285533025181",
        "tokenName": "Maker",
        "tokenSymbol": "MKR",
        "tokenDecimal": "18",
        "transactionIndex": "81",
        "gas": "940000",
        "gasPrice": "32010000000",
        "gasUsed": "77759",
        "cumulativeGasUsed": "2523379",
        "input": "deprecated",
        "methodId": "0xbe040fb0",
        "functionName": "redeem()",
        "confirmations": "18737452"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi/api-reference/endpoint/advanced-filter-tokentx.json GET /v2/api
openapi: 3.1.0
info:
  title: ERC20 Token Transfers Advanced Filter
  version: 2.0.0
  description: Retrieves ERC20 token transfers with advanced from and to address filtering.
  license:
    name: Etherscan API Terms
    url: https://etherscan.io/terms
servers:
  - url: https://api.etherscan.io
    description: Etherscan API.
security:
  - apiKey: []
paths:
  /v2/api:
    get:
      summary: ERC20 Token Transfers Advanced Filter
      description: >-
        Retrieves ERC20 token transfers with advanced from and to address
        filtering.
      operationId: getAdvancedFilterTokentx
      parameters:
        - name: chainid
          in: query
          required: true
          description: >-
            Chain ID to query, such as 1 for Ethereum or 42161 for Arbitrum from
            our [supported chains](/supported-chains).
          schema:
            type: string
          example: '1'
        - name: module
          in: query
          required: true
          description: Set to account for this endpoint.
          schema:
            type: string
            default: account
          example: account
        - name: action
          in: query
          required: true
          description: Set to tokentx for this endpoint.
          schema:
            type: string
            default: tokentx
          example: tokentx
        - name: contractaddress
          in: query
          required: false
          description: >-
            The ERC20 token contract address to filter transfers by. Provide
            contractaddress, from, or to.
          schema:
            type: string
          example: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2'
        - name: from
          in: query
          required: false
          description: >-
            The sender address to filter transfers by. Provide from, to, or
            contractaddress.
          schema:
            type: string
          example: '0x73605779985A11B8Fe32E6eD5ae5F249FFD0D7f0'
        - name: to
          in: query
          required: false
          description: >-
            The recipient address to filter transfers by. Provide to, from, or
            contractaddress.
          schema:
            type: string
          example: '0x71c7656ec7ab88b098defb751b7401b5f6d8976f'
        - name: fromto_opr
          in: query
          required: false
          description: >-
            Required when from or to is provided. Use and when both addresses
            must match, or or when either address can match.
          schema:
            type: string
          example: or
        - name: startblock
          in: query
          required: false
          description: Starting block number to search from.
          schema:
            type: integer
          example: 0
        - name: endblock
          in: query
          required: false
          description: Ending block number to search to, or latest for the latest block.
          schema:
            type: string
          example: latest
        - name: sort
          in: query
          required: false
          description: >-
            Sort order, either `desc` for the latest transactions first or `asc`
            for the oldest transactions first.
          schema:
            type: string
          example: desc
        - name: page
          in: query
          required: false
          description: Page number for pagination.
          schema:
            type: integer
          example: 1
        - name: offset
          in: query
          required: false
          description: >-
            Number of records per page. Use the page parameter for subsequent
            records.
          schema:
            type: integer
          example: 10
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      1 if the request returned data, 0 otherwise. A status of 0
                      can indicate an error or a valid request that returned no
                      records.
                  message:
                    type: string
                    description: >-
                      OK on success, otherwise an error description such as
                      NOTOK. See [common error
                      messages](/common-error-messages).
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        blockNumber:
                          type: string
                          description: Block number in which the transaction was included.
                        timeStamp:
                          type: string
                          description: >-
                            Time the block was mined, as a UNIX timestamp in
                            seconds.
                        hash:
                          type: string
                          description: The transaction hash.
                        nonce:
                          type: string
                          description: >-
                            Number of transactions sent from the sending address
                            before this one.
                        blockHash:
                          type: string
                          description: Hash of the block containing the transaction.
                        from:
                          type: string
                          description: Address that sent the transaction.
                        contractAddress:
                          type: string
                          description: Contract address of the token being transferred.
                        to:
                          type: string
                          description: >-
                            Recipient address. Empty for contract-creation
                            transactions.
                        value:
                          type: string
                          description: >-
                            Amount of tokens transferred, in the token's
                            smallest unit. Divide by 10 raised to tokenDecimal
                            for the display value.
                        tokenName:
                          type: string
                          description: Name of the token.
                        tokenSymbol:
                          type: string
                          description: Symbol of the token.
                        tokenDecimal:
                          type: string
                          description: Number of decimals the token uses.
                        transactionIndex:
                          type: string
                          description: Index position of the transaction within the block.
                        gas:
                          type: string
                          description: >-
                            Maximum units of gas the sender allowed for the
                            transaction.
                        gasPrice:
                          type: string
                          description: Price paid per unit of gas, in wei.
                        gasUsed:
                          type: string
                          description: Units of gas actually consumed by the transaction.
                        cumulativeGasUsed:
                          type: string
                          description: >-
                            Total gas used by all transactions up to and
                            including this one in the block.
                        input:
                          type: string
                          description: >-
                            Input data sent with the transaction, as a hex
                            string.
                        methodId:
                          type: string
                          description: >-
                            First four bytes of the input data, identifying the
                            called function.
                        functionName:
                          type: string
                          description: >-
                            Decoded function signature, when the target contract
                            is verified.
                        confirmations:
                          type: string
                          description: >-
                            Number of blocks mined after the block containing
                            this transaction.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Enter your Etherscan API key, or [set one up](/set-up-your-api-key) if
        you don't have one.

````