{
  "openapi": "3.0.1",
  "info": {
    "title": "DEX Trades API - Bitquery OHLCV, Transfers, Balances, Holders",
    "description": "Blockchain DEX trades API for Bitquery: token swaps, OHLCV candles, token transfers, wallet balances and token holders on Ethereum, BSC, Base, Arbitrum, Optimism, Polygon, Solana and Tron, with token, trader, pool, DEX and time filters. Bring your own Bitquery access token.",
    "version": "0.1",
    "x-build-id": "NtkfUTVTZLvJ1FyWS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~dex-trades-blockchain-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-dex-trades-blockchain-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~dex-trades-blockchain-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-dex-trades-blockchain-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~dex-trades-blockchain-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-dex-trades-blockchain-data-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to read",
            "enum": [
              "tokenTrades",
              "dexTrades",
              "ohlcv",
              "transfers",
              "balances",
              "tokenHolders"
            ],
            "type": "string",
            "description": "Token DEX trades reads swaps from one token's point of view (DEXTradeByTokens): amount, USD value, price, counter token, buyer, seller and DEX. DEX swaps reads raw swaps from the pool's point of view (DEXTrades), optionally filtered by token, DEX protocol or signer. OHLCV candles reads open, high, low, close, volume, rank and market cap for a token per interval (Trading cube, about the last 30 days). Token transfers reads transfers of a token or to and from wallets. Wallet balances reads what addresses hold now (EVM chains and Tron). Token holders ranks a token's holders on a date (EVM chains and Tron).",
            "default": "tokenTrades"
          },
          "chain": {
            "title": "Chain",
            "enum": [
              "eth",
              "bsc",
              "base",
              "arbitrum",
              "optimism",
              "matic",
              "solana",
              "tron"
            ],
            "type": "string",
            "description": "The blockchain to read. EVM chains, Solana and Tron are all served by the Bitquery V2 API. Balances and holders are not available on Solana.",
            "default": "eth"
          },
          "tokenAddress": {
            "title": "Token address",
            "type": "string",
            "description": "The token contract (EVM, Tron) or mint address (Solana). Required for token DEX trades, OHLCV candles and token holders; an optional filter for DEX swaps, transfers and balances. EVM addresses are lowercased, as the Trading cube requires. Examples: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 (WETH), So11111111111111111111111111111111111111112 (wrapped SOL), TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t (USDT on Tron)."
          },
          "sideTokenAddress": {
            "title": "Counter token address",
            "type": "string",
            "description": "Token DEX trades only: keep trades against this counter token, for example WETH or USDC, so you read one pair."
          },
          "traderAddress": {
            "title": "Trader address",
            "type": "string",
            "description": "Token DEX trades: trades where this address is the buyer or seller (EVM, Tron) or the transaction signer (Solana). DEX swaps: swaps signed by this address."
          },
          "poolAddress": {
            "title": "Pool address",
            "type": "string",
            "description": "Token DEX trades only: the pool (DEX pair contract on EVM and Tron, market address on Solana) to keep."
          },
          "dexProtocol": {
            "title": "DEX protocol",
            "type": "string",
            "description": "Token DEX trades and DEX swaps: a Bitquery protocol name such as uniswap_v2, uniswap_v3, uniswap_v4, pancake_swap_v3, pump, pump_amm or raydium_launchpad."
          },
          "senderAddress": {
            "title": "Sender address",
            "type": "string",
            "description": "Token transfers only: transfers sent by this address."
          },
          "receiverAddress": {
            "title": "Receiver address",
            "type": "string",
            "description": "Token transfers only: transfers received by this address."
          },
          "walletAddresses": {
            "title": "Wallet addresses",
            "type": "array",
            "description": "Wallet balances: the addresses to read (required, up to 100). Token transfers: transfers sent or received by any of these addresses. One per line.",
            "items": {
              "type": "string"
            }
          },
          "nativeOnly": {
            "title": "Native coin only",
            "type": "boolean",
            "description": "Wallet balances only: read the chain's native coin (ETH, BNB, POL, TRX) instead of every token. Ignored when a token address is set.",
            "default": false
          },
          "intervalSeconds": {
            "title": "Candle interval",
            "enum": [
              "1",
              "3",
              "5",
              "10",
              "30",
              "60",
              "300",
              "900",
              "1800",
              "3600"
            ],
            "type": "string",
            "description": "OHLCV candles only: the bar duration the Trading cube stores.",
            "default": "3600"
          },
          "topMarketOnly": {
            "title": "Top market only",
            "type": "boolean",
            "description": "OHLCV candles only: keep the token's rank 1 market (the pool carrying the most volume), which Bitquery recommends for the price of one token. Turn off to get one row per market and quote token.",
            "default": true
          },
          "quotedInUsd": {
            "title": "Prices in USD",
            "type": "boolean",
            "description": "OHLCV candles only: prices in USD. Turn off to get prices in quote token units.",
            "default": true
          },
          "holdersDate": {
            "title": "Holders snapshot date",
            "type": "string",
            "description": "Token holders only: the snapshot day as YYYY-MM-DD. Defaults to today (UTC)."
          },
          "minBalance": {
            "title": "Minimum holder balance",
            "type": "string",
            "description": "Token holders only: keep holders with at least this many tokens, for example 1000000. Needed on very large tokens, where an unbounded ranking times out."
          },
          "since": {
            "title": "Start time",
            "type": "string",
            "description": "Trades, swaps, candles and transfers: read from this UTC date or time, for example 2026-10-01 or 2026-10-01T12:00:00Z."
          },
          "until": {
            "title": "End time",
            "type": "string",
            "description": "Trades, swaps, candles and transfers: read up to this UTC date or time."
          },
          "dataset": {
            "title": "Dataset",
            "enum": [
              "auto",
              "realtime",
              "archive",
              "combined"
            ],
            "type": "string",
            "description": "Realtime keeps a recent window only (hours on Solana trades, days on EVM trades and transfers) and is on every plan. Archive is full history and combined is both; they need the historical data add-on, and combined does not work on Solana. Auto uses realtime, or combined for balances.",
            "default": "auto"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most rows to collect. You pay only for rows that carry a record.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing ceiling for GraphQL requests. Lower it if other jobs share the token.",
            "default": 30
          },
          "apiKey": {
            "title": "Bitquery access token",
            "type": "string",
            "description": "Your own Bitquery OAuth access token (it starts ory_at_), from an application at account.bitquery.io under Authorization, Tokens. You can instead paste your application's client_id:client_secret and the actor mints a token for the run. Falls back to the DATA_API_KEY secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}