Skip to main content

Using the Transaction Search API

The Transaction Search API can be used to find details of indexed transactions.

Click here to view the list of endpoints for the Transaction Search API
note

The endpoints for Transaction Search-supported networks are:

Avalanche

  • https://avalanche--mainnet--indexer.datahub.figment.io/transactions

Cosmos

  • https://cosmos--search.datahub.figment.io/transactions_search

Kusama

  • https://polkadot-kusama--search.datahub.figment.io/transactions_search

NEAR Protocol

  • https://near--indexer.datahub.figment.io/transactions

Polkadot

  • https://polkadot--search.datahub.figment.io/transactions_search

Authentication

Read about the authentication HERE

Requests

You can send a POST request to the /transactions or /transactions_search endpoint, which must include a JSON request body containing the following parameters:

  • network: The protocol you're searching (ex. kusama, polkadot, cosmos, near, etc...)
  • chain_ids: Which network to search (ex. mainnet, cosmoshub-4, etc...)

Other protocol-dependent parameters may be included.

See the full Transaction Search API Reference for more details.

Example JSON payload for POST /transactions on Avalanche
{
"network": "avalanche",
"chain_ids": ["mainnet"],
"start_height": 1921984,
"address": [
"avax1pvkhyf0y9674p2ps40vmp0a8w427384lpr8zan",
"avax1rlu93pnalclt7h0dte3evua97lv4fp4qzax5wq"
]
}

Example Requests

info

In example requests, the text API-KEY must be replaced with your actual credentials for it to function. Similarly, you would replace the value of the constant API_KEY in any code examples.

Example curl request
curl -X GET https://avalanche--mainnet--indexer.datahub.figment.io/transactions \
-H 'Content-Type: application/json' \
-H 'Authorization: API-KEY' \
-d '{
"network": "avalanche",
"chain_ids": ["mainnet"],
"start_height": 1921984,
"address": [
"avax1pvkhyf0y9674p2ps40vmp0a8w427384lpr8zan",
"avax1rlu93pnalclt7h0dte3evua97lv4fp4qzax5wq"
]
}'
Click to view example response
JSON response for a Transaction Search on Avalanche
[
{
"id": "2a9qJQvitJd1Y5RiqLoMonxVEj76PzvusXgHD1GztYjJUXtJmL",
"chain": "11111111111111111111111111111111LpoYY",
"type": "p_add_delegator",
"block": "dcb81QQ2jx5SAr5BsWmgepEiWSy8RfSwupredqzZZke5w76Mu",
"block_height": 1932215,
"timestamp": "2022-07-28T13:25:56.159481Z",
"status": "accepted",
"memo": "",
"memo_text": "",
"fee": 0,
"metadata": {
"duration": 1209710,
"end_time": "2022-08-11T13:32:00Z",
"node_id": "NodeID-GW7CvXwkPFDsfFHrix1SA148NHF5ZnSXs",
"start_time": "2022-07-28T13:30:10Z",
"weight": 25000000000
},
"inputs": [
{
"id": "25cYWZAvGhepiJUMVVu97q3fx16MQx27Z8rbdgX97tfTdhmMxh",
"tx_id": "E82EwpekLxZ9DnKQquCEVR9KR6G3tF1ut3xhUjLcKjtVZQ4GE",
"chain": "",
"asset": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z",
"type": "transfer",
"index": 0,
"locktime": 0,
"threshold": 1,
"amount": 381000000,
"group": 0,
"addresses": ["avax1pvkhyf0y9674p2ps40vmp0a8w427384lpr8zan"],
"stake": false,
"reward": false,
"spent": true,
"spent_in_tx": "2a9qJQvitJd1Y5RiqLoMonxVEj76PzvusXgHD1GztYjJUXtJmL"
},
{
"id": "2GhcGygHpEKt5h4b9SqwtSbQYyfUAZq7Kbx5TEP72rzAmHcUh9",
"tx_id": "2uGfC7MdRC394CRKtWjAqp6dW2yh32xK3qJ3LD3EKjRFtSBoxt",
"chain": "",
"asset": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z",
"type": "transfer",
"index": 0,
"locktime": 0,
"threshold": 1,
"amount": 25000000000,
"group": 0,
"addresses": ["avax1nne34ukaqsgqxmjgsuup8ymt08lulj5546g7c6"],
"stake": false,
"reward": false,
"spent": true,
"spent_in_tx": "2a9qJQvitJd1Y5RiqLoMonxVEj76PzvusXgHD1GztYjJUXtJmL"
}
],
"input_amounts": {
"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z": 25381000000
},
"outputs": [
{
"id": "2A25iE3uPWo5BNDMZAfZGQz8CvyGkLtS4pQ7c5mvkFJiChQvay",
"tx_id": "2a9qJQvitJd1Y5RiqLoMonxVEj76PzvusXgHD1GztYjJUXtJmL",
"chain": "",
"asset": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z",
"type": "transfer",
"index": 1,
"locktime": 0,
"threshold": 1,
"amount": 25000000000,
"group": 0,
"addresses": ["avax1h05yc8gyz55020az2fz4z02nn78xlnducgy2mf"],
"stake": true,
"reward": false,
"spent": false,
"spent_in_tx": null
},
{
"id": "28tTGPuUSY7GCRbJS1qrWrWRvAnHo6QCXxiS4e9n3jUKXgCf5D",
"tx_id": "2a9qJQvitJd1Y5RiqLoMonxVEj76PzvusXgHD1GztYjJUXtJmL",
"chain": "",
"asset": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z",
"type": "transfer",
"index": 0,
"locktime": 0,
"threshold": 1,
"amount": 381000000,
"group": 0,
"addresses": ["avax1rlu93pnalclt7h0dte3evua97lv4fp4qzax5wq"],
"stake": false,
"reward": false,
"spent": true,
"spent_in_tx": "fr3Eq8FeKN1YGVAKr1DEc3hAbCSBqrVXrG2Pwf8nuCXySDUrw"
}
],
"output_amounts": {
"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z": 25381000000
}
}
]

API Reference

View the full Transaction Search API reference HERE