Skip to main content

Elysium DEX Trades API & Streams

Query and stream DEX trades on Elysium with Bitquery GraphQL. Elysium (network: elysium, chain ID 99901) is Kinetiq's Layer 2 for the Hyperliquid ecosystem, with HYPE as the gas token. The Trading cubes carry every swap with USD values, the trader, the DEX protocol and the liquidity pool, in one schema shared with the other supported chains. Pair.Market.NetworkBid: "bid:elysium" keeps only Elysium, and a token is picked with Token.Id: bid:elysium: followed by the contract address, or just bid:elysium for native HYPE. Every query here also runs as a live stream: change query to subscription and drop limit and orderBy.

API Key Required

To query or stream data outside the Bitquery IDE, you need an API access token.

Follow the steps here: How to generate Bitquery API token ➤


Stream every trade on Elysium​

The Trading.Trades cube carries live swaps with USD values. Pair.Market.NetworkBid: "bid:elysium" keeps only Elysium trades.

Run this query in the IDE

subscription {
Trading {
Trades(where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}}}) {
Block { Time }
Trader { Address }
Pair {
Market { Protocol Program }
Token { Name Symbol Address Id }
QuoteToken { Name Symbol Address Id }
}
Amounts { Base Quote }
AmountsInUsd { Base }
Price
}
}
}

Price is the base token price in the quote token, and AmountsInUsd.Base is the trade size in USD. When the quote is native HYPE, QuoteToken.Id is bid:elysium and QuoteToken.Address is empty.


Trades of one token​

Set Pair.Token.Id to get the trades of one token against any quote token. This returns the latest WHYPE trades. Side is the direction for the base token, and PriceInUsd is its USD price in that trade.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}, Token: {Id: {is: "bid:elysium:0xba876237b0f021a6c6d852d6c26e107997cc5e81"}}}}
orderBy: {descending: Block_Time}
limit: {count: 20}
) {
Block { Time }
TransactionHeader { Hash }
Trader { Address }
Side
Pair {
Market { Protocol Program Address }
Token { Symbol Id }
QuoteToken { Symbol Id }
}
Amounts { Base Quote }
AmountsInUsd { Base }
Price
PriceInUsd
}
}
}

Token.Id contains the contract address, so it cannot match a look-alike token with the same symbol.


Trades of one token pair​

Add QuoteToken.Id to get one pair across every liquidity pool. This returns WHYPE/USDC trades; Price is WHYPE priced in USDC, and Market shows which liquidity pool handled each trade.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}, Token: {Id: {is: "bid:elysium:0xba876237b0f021a6c6d852d6c26e107997cc5e81"}}, QuoteToken: {Id: {is: "bid:elysium:0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65"}}}}
orderBy: {descending: Block_Time}
limit: {count: 20}
) {
Block { Time }
TransactionHeader { Hash }
Trader { Address }
Side
Pair { Market { Protocol Program Address } }
Amounts { Base Quote }
AmountsInUsd { Base }
Price
}
}
}

Volume, trades and traders of a token​

One row with the USD volume, trade count and unique traders of a token over the last 24 hours.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}, Token: {Id: {is: "bid:elysium:0xba876237b0f021a6c6d852d6c26e107997cc5e81"}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
) {
volumeUsd: sum(of: AmountsInUsd_Base)
trades: count
traders: uniq(of: Trader_Address)
}
}
}

since_relative keeps the window at the last 24 hours whenever you run it.


Trades of one wallet​

Set Trader.Address to follow one wallet. Side shows whether the wallet bought or sold the base token.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}}, Trader: {Address: {is: "0x785e295a4e716406e6ef45f7884039619c5c1bdb"}}}
orderBy: {descending: Block_Time}
limit: {count: 20}
) {
Block { Time }
TransactionHeader { Hash }
Side
Pair {
Market { Protocol }
Token { Symbol Id }
QuoteToken { Symbol Id }
}
Amounts { Base Quote }
AmountsInUsd { Base }
Price
}
}
}

Top traders on Elysium​

Wallets ranked by USD volume traded in the last 24 hours.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
orderBy: {descendingByField: "volumeUsd"}
limit: {count: 20}
) {
Trader { Address }
volumeUsd: sum(of: AmountsInUsd_Base)
trades: count
}
}
}

Top traders of one token​

Add Token.Id inside Pair to rank the traders of one token. Token.Id is bid:elysium: followed by the token address.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}, Token: {Id: {is: "bid:elysium:0xba876237b0f021a6c6d852d6c26e107997cc5e81"}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
orderBy: {descendingByField: "volumeUsd"}
limit: {count: 20}
) {
Trader { Address }
volumeUsd: sum(of: AmountsInUsd_Base)
trades: count
}
}
}

Top trading pairs by volume​

Trading.Pairs holds candles per token pair and liquidity pool. Summing Volume.Usd over the last 24 hours ranks the busiest pairs.

Run this query in the IDE

{
Trading {
Pairs(
where: {Market: {NetworkBid: {is: "bid:elysium"}}, Interval: {Time: {Duration: {eq: 3600}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
orderBy: {descendingByField: "volumeUsd"}
limit: {count: 20}
) {
Market { Protocol Address Id }
Token { Name Symbol Id }
QuoteToken { Name Symbol Id }
volumeUsd: sum(of: Volume_Usd)
}
}
}

Market.Id identifies the liquidity pool. On Uniswap v4 all pools share one contract, so Market.Address is empty and the pool ID is the last part of Market.Id.


Which DEXs trade on Elysium​

Most Elysium volume runs through Uniswap v4 and Uniswap v3 liquidity pools. To see the current set, count trades and USD volume per protocol and contract over the last 6 hours.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}}}, Block: {Time: {since_relative: {hours_ago: 6}}}}
orderBy: {descendingByField: "trades"}
limit: {count: 20}
) {
Pair { Market { Protocol Program } }
trades: count
volumeUsd: sum(of: AmountsInUsd_Base)
}
}
}

Trades on one DEX​

Use a Protocol from the result above in Pair.Market.Protocol to follow one DEX. Filter Market.Program instead to follow one contract.

Run this query in the IDE

{
Trading {
Trades(
where: {Pair: {Market: {NetworkBid: {is: "bid:elysium"}, Protocol: {is: "uniswap_v3"}}}}
orderBy: {descending: Block_Time}
limit: {count: 20}
) {
Block { Time }
TransactionHeader { Hash }
Trader { Address }
Side
Pair {
Market { Protocol Program Address }
Token { Symbol Id }
QuoteToken { Symbol Id }
}
Amounts { Base Quote }
AmountsInUsd { Base }
Price
}
}
}

Raw swap details with DEXTrades​

The queries above cover most needs. When you need both raw sides of a swap, with each token contract, amount and the DEX contract, use the chain-level DEXTrades cube.

Run this query in the IDE

{
EVM(network: elysium) {
DEXTrades(limit: {count: 20}, orderBy: {descending: Block_Time}) {
Block { Time Number }
Transaction { Hash From }
Trade {
Dex { ProtocolName ProtocolFamily SmartContract }
Buy { Amount AmountInUSD Buyer Currency { Symbol SmartContract } }
Sell { Amount AmountInUSD Seller Currency { Symbol SmartContract } }
}
}
}
}

In DEXTrades, native HYPE shows as SmartContract: "0x0000000000000000000000000000000000000000".



FAQ​

Which cube should I use for Elysium trades? Use Trading.Trades. It has USD values, the trader, the DEX protocol and the liquidity pool on every row. Use DEXTrades only when you need both raw sides of a swap, as in Raw swap details.

How do I stream trades of one token? Take the trades of one token query, change query to subscription and drop limit and orderBy.

How far back do Elysium trades go? Elysium is served on the realtime dataset, which holds the most recent days. See Data coverage and retention.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.