Trade Data - Dex trades
dex trades API
The DEX Trades API parses all Solana-indexed transactions and allows users to query and fetch decentralized exchange (DEX) trades between specified block slots. Users can filter results by program_id, start_block, and end_block to retrieve detailed trade data.
Base URL
POST https://graphql.astralane.io/api/v1/dataset/dex/dex-trades/graphql
Supported DEXes
Note: The maximum supported block range per request is 100 blocks (e.g., from block 317380000 to 317380100).
Data availability
Earliest block : 65304730 February 14, 2021
Latest block: Average delay of approximately 15 seconds from the latest block.
Graphql Query
query DexTradeResult {
dexTrades(
start_block: 317380000
end_block: 317380000
program: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"
) {
tx_id
block_time
block_slot
signer
pool_address
base_mint
quote_mint
base_vault
quote_vault
base_amount
quote_amount
is_inner_instruction
instruction_index
instruction_type
inner_instruction_index
outer_program
inner_program
txn_fee_lamports
}
}Sample Response
Response Fields
block_time: Timestamp of the block.block_slot: Slot number of the block.tx_id: Transaction ID.signer: Signer of the transaction.pool_address: Address of the pool.base_mint: Base token mint address.quote_mint: Quote token mint address.base_vault: Base token vault address.quote_vault: Quote token vault address.base_amount: Amount of the base token involved.quote_amount: Amount of the quote token involved.is_inner_instruction: Whether the instruction is an inner instruction.instruction_index: Index of the instruction in the transaction.instruction_type: Type of the instruction.outer_program: Outer program ID.inner_program: Inner program ID (if applicable).txn_fee_lamports: Transaction fee in lamports.signer_lamports_change: Change in lamports for the signer.partition_0: Date partition for the transaction.
Last updated