Skip to main content

Stellar Liquidity Pools API

Track Stellar liquidity pool activity — deposits, withdrawals, and trades — using the Bitquery GraphQL API.

Get Latest Stellar Liquidity Pool Effects for One Pool

Pull the latest effects for a specific Stellar liquidity pool — operation type, transaction hash, share changes, and currency details. Run the query on the IDE.

Variations: Swap liquidityPoolId to watch a different pool, remove it to stream all pools, or add an operation filter (e.g., liquidity_pool_deposit) to isolate deposits, withdrawals, or trades.

query MyQuery {
stellar(network: stellar) {
liquidityPoolEffects(
options: {limit: 10, desc: "timestamp.time"}
date: {is: "2024-07-16"}
liquidityPoolId: {is: "59fa1dc57433dcfbd2db7319d26cb3da1f28f2d8095a3ec36ad4ef9cadb0013e"}
) {
amount
liquidityPoolId
liquidityPoolDetails
operation {
name
}
order
shares
transaction {
hash
}
timestamp {
time
}
currency {
name
}
}
}
}

Get Latest Stellar Liquidity Pool Deposit Effects

Get the most recent deposit effects across all Stellar liquidity pools, returning amount, pool details, transaction hash, and currency. Run the query on the IDE.

Variations: Switch the operation filter to liquidity_pool_withdrawal or liquidity_pool_trade for other effect types. Add a liquidityPoolId filter to narrow results to one pool.

query MyQuery {
stellar(network: stellar) {
liquidityPoolEffects(
options: {limit: 10, desc: "timestamp.time"}
date: {is: "2024-07-16"}
operation: {is: "liquidity_pool_deposit"}
) {
amount
liquidityPoolId
liquidityPoolDetails
operation {
name
}
order
shares
transaction {
hash
}
timestamp {
time
}
currency {
name
}
}
}
}