Stream Solana Data with OHLCV
Streams DEX trades by token on Solana as they happen, where currency mint address is not EPjFWd…Dt1v, side amount is above 0 and trade price in USD is above 0, sorted by block time: block time, price in USD, side amount in USD, decimals, currency mint address, currency name, currency symbol and 3 more fields.
What it returns
- block time
- price in USD
- side amount in USD
- decimals
- currency mint address
- currency name
- currency symbol
- quantile of trade price in USD
- median of trade price in USD
- sum of trade side amount in USD
Filters
- currency mint address is not EPjFWd…Dt1v
- side amount is above 0
- trade price in USD is above 0
The subscription
subscription ($token: String, $base: String, $time_ago: DateTime) {
Solana(network: solana) {
DEXTradeByTokens(
orderBy: {ascendingByField: "Block_Time"}
where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Currency: {MintAddress: {is: $base, notIn: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}, Dex: {}, PriceInUSD: {gt: 0}}, Block: {Time: {after: $time_ago}, Hash: {}}}
) {
Block {
Time
}
Trade {
close: PriceInUSD(maximum: Transaction_Index)
Side {
AmountInUSD(selectWhere: {gt: "1"})
}
Currency {
Decimals
MintAddress
Name
Symbol
}
}
min: quantile(of: Trade_PriceInUSD, level: 0.05)
max: quantile(of: Trade_PriceInUSD, level: 0.95)
close: median(of: Trade_PriceInUSD)
open: median(of: Trade_PriceInUSD)
volume: sum(of: Trade_Side_AmountInUSD)
}
}
}
Similar queries
- token trades subscription · Solana · DEXTradeByTokens
- realtime trades solana · Solana · DEXTradeByTokens
- adsa · Solana · DEXTradeByTokens
- tkk raydium price · Solana · DEXTradeByTokens
- Live price of a token · Solana · DEXTradeByTokens