Trades - Token

API Endpoint: /defi/txs/token

Description: This endpoint returns transaction records of a specific token on any blockchains that Birdeye supports. It provides information about transactions related to the specified token, including trade details, ownership, source, and other relevant data.

Request Method: GET

Data Coverage: Multi-chain

Request URL:

https://public-api.birdeye.so/defi/txs/token?address=So11111111111111111111111111111111111111112&offset=0&limit=10

Request Headers:

accept: application/json
x-chain: any chains that Birdeye supports. Example: solana, ethereum
X-API-KEY: YOUR_API_KEY

Parameters:

KeyData TypeDetailsExample
addressstringThe token address to retrieve transaction records for.So11111111111111111111111111111111111111112
offsetintegerThe starting index for the list of transactions.0
limitintegerThe maximum number of transactions to retrieve.50
tx_typestringType of transactions to query. Select from the list of {swap, add, remove, all}.swap

Response: The response includes a list of transaction records, along with details such as trade information, ownership, source, and more.

Example Request:

curl -X 'GET' \
  'https://public-api.birdeye.so/defi/txs/token?address=So11111111111111111111111111111111111111112&offset=1&limit=2&tx_type=swap' \
  -H 'accept: application/json' \
  -H 'x-chain: solana' \
  -H 'X-API-KEY: YOUR_API_KEY'

Example Response:

{
  "data": {
    "items": [
      {
        "quote": {
          "symbol": "SOL",
          "decimals": 9,
          "address": "So11111111111111111111111111111111111111112",
          "amount": 3772000,
          "uiAmount": 0.003772,
          "price": null,
          ...
        },
        "base": {
          "symbol": "mSOL",
          "decimals": 9,
          "address": "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",
          ...
        },
        ...
      },
      ...
    ],
    "hasNext": true
  },
  "success": true
}

Note: Replace YOUR_API_KEY in the request headers with your actual API key. Adjust the address, offset, and limit parameters as needed to tailor the request to your requirements. The x-chain header specifies the blockchain network for the request.