Pair last trades
Historical data This query already reads history - it uses the archive dataset, which needs the historical data add-on for this chain. Without the add-on it fails with 'access restricted: your plan only allows realtime'. Drop the dataset argument to fall back to the recent window. Datasets: https:/
What it returns
- chain ID
- block time
- block number
- sell buyer
- sell amount
- sell currency symbol
- sell currency name
- sell smart contract
- buy price
- buy amount
- buy currency symbol
- buy smart contract
- buy currency name
- protocol name
- smart contract
- protocol family
- protocol version
Filters
- sell currency smart contract is 0xff97…5cc8
- buy currency smart contract is 0x82af…bab1
- block date since 2023-09-07
- block date till 2023-09-07
The query
# Historical data
# This query already reads history - it uses the archive dataset, which
# needs the historical data add-on for this chain.
#
# Without the add-on it fails with 'access restricted: your plan only allows
# realtime'. Drop the dataset argument to fall back to the recent window.
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
query ($network: evm_network!, $baseCurrency: String!, $limit: Int, $quoteCurrency: String!, $from: String, $till: String) {
EVM(network: $network, dataset: archive) {
sell: DEXTrades(
where: {Trade: {Sell: {Currency: {SmartContract: {is: $baseCurrency}}}, Buy: {Currency: {SmartContract: {is: $quoteCurrency}}}}, Block: {Date: {since: $from, till: $till}}}
orderBy: {descending: Block_Date}
limit: {count: $limit}
) {
ChainId
Block {
Time
Number
}
Trade {
Sell {
Buyer
Amount
Currency {
Symbol
Name
SmartContract
}
}
Buy {
Price
Amount
Currency {
Symbol
SmartContract
Name
}
}
Dex {
ProtocolName
SmartContract
ProtocolFamily
ProtocolVersion
}
}
}
}
}
Variables
{
"network": "arbitrum",
"limit": 15,
"from": "2023-09-07",
"till": "2023-09-07",
"baseCurrency": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
"quoteCurrency": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
}
Similar queries
- trades · Ethereum · DEXTrades
- List of DEX supported · Arbitrum · DEXTrades
- Param - first 1000 · Arbitrum · DEXTrades
- top sellers of a token on uniswap v4 arbitrum · Arbitrum · DEXTrades
- top buyers of a currency on uniswap v4 arbitrum · Arbitrum · DEXTrades