Guides2 min read

Query and filter on-chain transaction history via API

Filter indexed on-chain transactions by address, value, token, and time with one authenticated REST call.

cryptoapi team
Guides
On this page

Building a wallet dashboard, an accounting export, or a balance-change monitor usually means running your own node, parsing logs, and stitching together history by hand. With CryptoAPI you skip all of that: one endpoint returns indexed, filterable transaction history across Ethereum, BNB Smart Chain, Bitcoin, and Tron.

Query indexed history

GET /api/blockchain/transactions reads from a ClickHouse-backed index, so you can filter and sort server-side instead of pulling raw blocks. network is required; everything else is an optional filter:

  • address, fromAddress, toAddress — match either side of a transfer, or pin one direction
  • txType, tokenSymbol — narrow to a transfer type or a specific asset
  • minValueDecimal, maxValueDecimal, minFeeDecimal, maxFeeDecimal — value and fee bounds
  • startDate, endDate — time-range window
  • sortBy, sortOrder, limit (max 1000), offset — ordering and pagination

Every /api/* call needs your API key, passed as a key header. Keys are created in your dashboard.

bash
curl -G "https://api.cryptoapi.so/api/blockchain/transactions" \
  -H "key: YOUR_API_KEY" \
  --data-urlencode "network=ethereum" \
  --data-urlencode "address=0xYourAddress" \
  --data-urlencode "tokenSymbol=USDT" \
  --data-urlencode "minValueDecimal=100" \
  --data-urlencode "sortBy=timestamp" \
  --data-urlencode "sortOrder=desc" \
  --data-urlencode "limit=50"

The response contains normalized transaction rows under data.

json
{
  "success": true,
  "data": [
    {
      "hash": "0xabc123...",
      "blockNumber": 21345678,
      "timestamp": 1716960000,
      "fromAddress": "0xYourAddress",
      "toAddress": "0xRecipient",
      "valueDecimal": "250.0",
      "feeDecimal": "0.0021",
      "status": "success",
      "tokenSymbol": "USDT"
    }
  ]
}

Paginate and watch the index window

Page through results by holding your filters constant and stepping offset by your limit (for example offset=0, offset=50, offset=100). One thing to plan for: this endpoint serves a rolling window of up to 30 days of live indexed data. It is built for recent activity, not deep archival lookups.

For a single known hash, or anything you just need to confirm on-chain, use GET /api/blockchain/transaction with network and transactionId. It returns one live transaction detail (hash, block number, timestamp, from/to, value, fee, status, token symbol) subject to provider coverage.

Monitor without webhooks

There is no public webhook or streaming feed, so near-real-time monitoring is a polling pattern: call GET /api/blockchain/transactions on an interval with startDate set to your last-seen time, and treat anything newer as fresh activity. The same query powers accounting exports (filter by tokenSymbol and a time range) and dashboards (sort by timestamp, paginate with limit and offset).

Ready to wire it up? Generate a key in your dashboard and check the API docs for the full filter and field reference.

Query available archive days

The live index covers up to 30 days. Use GET /api/blockchain/transactions/history for available archived days and follow nextCursor. The response reports coverage gaps in missingDays. Use GET /api/blockchain/transactions/download to find published daily Parquet files within the one-year retention.

Read it, then ship it

Copy the code above and run it today.

Every snippet in this guide works on the free plan. Grab a key and make your first call in a minute.