Skip to main content

Elysium Liquidity Pools API

Query liquidity pools 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. DEXPoolEvents has one row each time a liquidity pool changes, with reserves and prices. DEXPoolSlippages shows how much can be swapped at a given slippage. Pool creation and liquidity changes are in Events. 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 ➤


Latest liquidity pool reserves and prices​

Each row is one pool update with the reserves of both tokens and the pool price after the change.

Run this query in the IDE

{
EVM(network: elysium) {
DEXPoolEvents(limit: {count: 20}, orderBy: {descending: Block_Time}) {
Block { Time }
Transaction { Hash }
PoolEvent {
Dex { ProtocolName SmartContract }
Pool {
SmartContract
PoolId
CurrencyA { Symbol SmartContract }
CurrencyB { Symbol SmartContract }
}
Liquidity { AmountCurrencyA AmountCurrencyB }
AtoBPrice
BtoAPrice
}
}
}
}

Reserves of one liquidity pool​

On Uniswap v4 all pools live in one contract, so pick a liquidity pool by PoolId. This is a HYPE/USDC pool.

Run this query in the IDE

{
EVM(network: elysium) {
DEXPoolEvents(
where: {PoolEvent: {Pool: {PoolId: {is: "0xf3ac4f8eedc7d6f26e56d6d41955216fe2a2530891a565e53db50e4b6d186573"}}}}
orderBy: {descending: Block_Time}
limit: {count: 10}
) {
Block { Time }
Transaction { Hash }
PoolEvent {
Pool {
PoolId
CurrencyA { Symbol SmartContract }
CurrencyB { Symbol SmartContract }
}
Liquidity { AmountCurrencyA AmountCurrencyB }
AtoBPrice
BtoAPrice
}
}
}
}

AmountCurrencyA and AmountCurrencyB are the reserves. AtoBPrice is how much of token B one token A buys.


Most active liquidity pools of a token​

Count pool updates per liquidity pool to find where a token trades most. This lists pools with USDC as the second token.

Run this query in the IDE

{
EVM(network: elysium) {
DEXPoolEvents(
where: {PoolEvent: {Pool: {CurrencyB: {SmartContract: {is: "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65"}}}}, Block: {Time: {since_relative: {hours_ago: 6}}}}
orderBy: {descendingByField: "updates"}
limit: {count: 20}
) {
PoolEvent {
Dex { ProtocolName }
Pool {
SmartContract
PoolId
CurrencyA { Symbol SmartContract }
CurrencyB { Symbol SmartContract }
}
}
updates: count
}
}
}

Check CurrencyA as well if your token can be the first token of a pool.


New liquidity pools​

Uniswap v4 emits an Initialize event when a liquidity pool is created. This returns the newest pools with their two tokens (currency0, currency1), fee and pool id.

Run this query in the IDE

{
EVM(network: elysium) {
Events(
where: {Log: {Signature: {Name: {is: "Initialize"}}}}
orderBy: {descending: Block_Time}
limit: {count: 10}
) {
Block { Time }
Transaction { Hash From }
Log { SmartContract Signature { Name Signature } }
Arguments {
Name
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
... on EVM_ABI_Integer_Value_Arg { integer }
... on EVM_ABI_Bytes_Value_Arg { hex }
}
}
}
}
}

currency0 is 0x0000000000000000000000000000000000000000 when the pool trades against native HYPE. Run it as a subscription to catch new token launches as they happen.


Liquidity added and removed​

Uniswap v4 emits ModifyLiquidity when liquidity is added or removed. A positive liquidityDelta adds liquidity and a negative one removes it.

Run this query in the IDE

{
EVM(network: elysium) {
Events(
where: {Log: {Signature: {Name: {is: "ModifyLiquidity"}}}}
orderBy: {descending: Block_Time}
limit: {count: 10}
) {
Block { Time }
Transaction { Hash From }
Log { SmartContract }
Arguments {
Name
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
... on EVM_ABI_Integer_Value_Arg { integer }
... on EVM_ABI_String_Value_Arg { string }
... on EVM_ABI_Boolean_Value_Arg { bool }
... on EVM_ABI_Bytes_Value_Arg { hex }
}
}
}
}
}

Slippage and depth​

DEXPoolSlippages gives, for a slippage level in basis points, the largest amount you can swap in and the least you get out, in both directions.

Run this query in the IDE

{
EVM(network: elysium) {
DEXPoolSlippages(limit: {count: 10}, orderBy: {descending: Block_Time}) {
Block { Time }
Price {
Dex { ProtocolName }
Pool {
SmartContract
CurrencyA { Symbol SmartContract }
CurrencyB { Symbol SmartContract }
}
SlippageBasisPoints
AtoB { Price MaxAmountIn MinAmountOut }
BtoA { Price MaxAmountIn MinAmountOut }
}
}
}
}

FAQ​

How do I find the pool ID of a token pair? Run Most active liquidity pools of a token or Top trading pairs and read PoolId or the last part of Market.Id.

Is there a DEXPools cube on Elysium? No. Use DEXPoolEvents for reserves and prices, and DEXPoolSlippages for depth.

How do I detect a new token launch? Subscribe to the new liquidity pools query. Each Initialize event carries both token addresses.

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.