Skip to main content

Tron API Documentation

Overview

In this section we will see how to fetch data on different tokens, transactions, and DEXs like SunPump and Sunswap on Tron via APIs and Streams.

Create your account to get started. If you need help getting data on Tron, reach out to support.

What is Tron API?

Bitquery Tron APIs help you fetch onchain data like trades, transactions, balances, etc using graphQL query.

What are capabilities of Bitquery Tron API?

Bitquery Tron APIs are very flexible, you can fetch trade, transaction, and balance information for a period, for a specific wallet, and join with other information.

Difference between Tron RPC and Bitquery Tron API?

Tron RPCBitquery Tron API
JSON-RPC endpoint exposing raw Tron on-chain state and transactionsGraphQL endpoint over pre-indexed, parsed Tron data (token transfers, DEX trades, logs, calls, etc.)
No built-in history or analytics—any indexing/aggregation you build or outsourceHistorical data, joins, aggregations & real-time subscriptions
Ideal for submitting transactionsGreat for real-time data and historical backtesting without running your own indexer

To access Bitquery Tron API you would require your own Access Token after signup.

Does Bitquery support Tron Websocket and Webhooks?

Bitquery supports websocket and webhooks; you can convert most GraphQL APIs into GraphQL streams by changing the word query to subscription. You can monitor this data via a websocket. More docs and code samples are available here.

Quick start

Run this minimal GraphQL query on GraphQL IDE after signing up, to fetch the latest 5 DEX trades on Tron:

query LatestTronTrades {
Tron {
DEXTrades(limit: { count: 5 }, orderBy: { descending: Block_Time }) {
Block {
Time
}
Trade {
Dex {
ProtocolName
}
Buy {
AmountInUSD
Currency {
Symbol
}
}
Sell {
AmountInUSD
Currency {
Symbol
}
}
}
Transaction {
Hash
}
}
}
}

DEX APIs

Core Tron APIs

Does Bitquery support Tron?

Yes. Tron is a first-class network in Bitquery: use V2 GraphQL with the appropriate network for Tron (see examples on this site) for DEX trades (e.g. SunSwap, SunPump), transfers, balances, calls, and subscriptions over WebSocket. Historical depth and field availability follow the dataset you choose (combined, realtime, archive). Follow the quick start below and the topic pages in this section.

Videos

Video Tutorial | Comprehensive Guide to Real-Time Tron Data : Trades, NFTs, Mempool etc

Video Tutorial | How to get Total Fees paid by a Account on Tron Network

Video Tutorial | How to get Realtime Trades and Liquidity data on Sun Pump

Video Tutorial | How to track SunPump Token launches to SunSwap