Portal de desarrolladores

Get Token Transfer Details#

Query indexed transfers by chain and token contract address, with optional sender, recipient, time, and token amount filters. Each request queries one token on one chain. This endpoint supports EVM-compatible chains only.

Supported chains: see Get Transaction API Supported Chains. Match both apiName=token-transfer-detail and the target chainIndex.

Request URL#

GET
https://web3.okx.com/api/v6/explorer/transaction/token-transfer-detail

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique chain identifier, such as 1 for Ethereum or 56 for BSC. The chainShortName request parameter is not accepted.
tokenContractAddressStringYesToken contract address on the target chain.
fromStringNoExact sender address filter.
toStringNoExact recipient address filter.
beginStringNoInclusive start time as a Unix timestamp in milliseconds. Must satisfy begin <= end when both are provided.
endStringNoInclusive end time as a Unix timestamp in milliseconds.
minAmountStringNoInclusive minimum token amount in native token units. Must satisfy minAmount <= maxAmount when both are provided.
maxAmountStringNoInclusive maximum token amount in native token units, not USD.
cursorStringNoCursor returned by the previous response. Omit it for the first request. Pass it back unchanged; do not parse or construct it.
limitIntegerNoEntries per page. Default is 20; range is 1–50.

Omitted filters do not restrict the query. All supplied filters apply together. This endpoint uses cursor + limit pagination and has no state or protocol type filter parameter.

Response Parameters#

Successful responses use a code, msg, and data envelope. data is an array containing the pagination result object for the chain and token. The table below describes that object and its transfer fields.

ParameterTypeDescription
limitStringMaximum entries per page.
cursorStringCursor for the next batch; an empty string means no more records. Pass it back unchanged.
transactionListArrayTransfers in the current batch. Empty when no records match.
> txidStringTransaction hash. The field name is lowercase txid.
> blockHashStringBlock hash.
> heightStringBlock height.
> transactionTimeStringTransaction time as a Unix timestamp in milliseconds.
> fromStringSender address.
> toStringRecipient address.
> isFromContractBooleanWhether the sender is a contract; availability depends on the data source.
> isToContractBooleanWhether the recipient is a contract; availability depends on the data source.
> amountStringToken amount as a string.
> amountUsdStringOptional USD valuation; may be null or omitted when unavailable.
> transactionSymbolStringToken symbol.
> methodIdStringMethod identifier; an empty string when unavailable.
> tokenContractAddressStringToken contract address.
> protocolTypeStringToken protocol type supplied by the data source.
> stateStringTransfer state; available states depend on the target chain's data source.
> tokenIdStringNFT token ID; an empty string when not applicable.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/transaction/token-transfer-detail?chainIndex=1&tokenContractAddress=0xdac17f958d2ee523a2206206994597c13d831ec7&begin=1694908800000&end=1694995200000&minAmount=10&maxAmount=1000&limit=20' \
--header "OK-ACCESS-KEY: $OK_ACCESS_KEY" \
--header "OK-ACCESS-SIGN: $OK_ACCESS_SIGN" \
--header "OK-ACCESS-PASSPHRASE: $OK_ACCESS_PASSPHRASE" \
--header "OK-ACCESS-TIMESTAMP: $OK_ACCESS_TIMESTAMP"

Set authentication environment variables following the Usage Guide. Generate the signature for this request's path, full query string, and timestamp.

Response Example#

This example illustrates the response structure and is not a live query result.

json
{
  "code": "0",
  "msg": "",
  "data": [
    {
      "limit": "20",
      "cursor": "",
      "transactionList": [
        {
          "txid": "0x{TRANSACTION_HASH}",
          "blockHash": "0x{BLOCK_HASH}",
          "height": "18126486",
          "transactionTime": "1694991899000",
          "from": "0x{SENDER_ADDRESS}",
          "to": "0x{RECIPIENT_ADDRESS}",
          "isFromContract": false,
          "isToContract": true,
          "amount": "125.5",
          "transactionSymbol": "USDT",
          "methodId": "",
          "tokenContractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
          "protocolType": "token_20",
          "state": "success",
          "tokenId": ""
        }
      ]
    }
  ]
}