Skip to main content

Tron DEX Trades API

In this section we will see how to get Tron DEX trades information using our API.

This Tron API is part of our Early Access Program (EAP), which is intended for evaluation purposes. This program allows you to test the data and its integration into your applications before full-scale implementation. Read more here

Subscribe to Latest Tron Trades​

This subscription will return information about the most recent trades executed on Tron's DEX platforms. You can find the query here

subscription {
Tron {
DEXTrades {
Block {
Time
}
Trade {
Dex {
ProtocolName
ProtocolFamily
SmartContract
}
Buy {
Amount
Buyer
Seller
Currency {
Decimals
Fungible
HasURI
Name
ProtocolName
SmartContract
Symbol
}
OrderId
}
Sell {
Buyer
Seller
Currency {
Fungible
Decimals
Name
Native
SmartContract
Symbol
}
}
}
}
}
}


Subscribe to Latest Price of a Token in Real-time​

This query provides real-time updates on price of WIN TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7 in terms of USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t, including details about the DEX, market, and order specifics. Find the query here

subscription {
Tron {
DEXTrades(
where: {Trade: {Sell: {Currency: {SmartContract: {is: "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7"}}}, Buy: {Currency: {SmartContract: {is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}}}}}
) {
Block {
Time
}
Trade {
Buy {
Amount
Buyer
Seller
Price_in_terms_of_sell_currency: Price
Currency {
Name
Symbol
SmartContract
}
OrderId
}
Sell {
Amount
Buyer
Seller
Price_in_terms_of_buy_currency: Price
Currency {
Symbol
SmartContract
Name
}
OrderId
}
Dex {
ProtocolFamily
ProtocolName
SmartContract
ProtocolVersion
}
}
}
}
}