profit&loss
Returns the latest DEX trades on Ethereum, where buy currency smart contract is 0xd412…4e39, transaction from is 0x0b1d…9bc7 and sell currency smart contract is 0xd412…4e39: block time, sender fee, buy amount, buy currency symbol, buy smart contract, buy price, sell amount and 5 more fields.
What it returns
- block time
- sender fee
- buy amount
- buy currency symbol
- buy smart contract
- buy price
- sell amount
- sell currency symbol
- sell smart contract
- sell price
- transaction hash
- from
Filters
- buy currency smart contract is 0xd412…4e39
- transaction from is 0x0b1d…9bc7
- sell currency smart contract is 0xd412…4e39
The query
query MyQuery($token: String!, $account: String!, $network: evm_network!, $since: DateTime!, $till: DateTime!) {
EVM(dataset: combined, network: $network) {
sellside: DEXTrades(
where: {Trade: {Buy: {Currency: {SmartContract: {is: $token}}}}, Block: {Time: {since: $since, till: $till}}, Transaction: {From: {is: $account}}}
orderBy: {descending: Block_Time}
) {
Block {
Time
}
Fee {
SenderFee
}
Trade {
Buy {
Amount
Currency {
Symbol
SmartContract
}
Price
}
Sell {
Amount
Currency {
Symbol
SmartContract
}
Price
}
}
Transaction {
Hash
From
}
}
buyside: DEXTrades(
where: {Trade: {Sell: {Currency: {SmartContract: {is: $token}}}}, Block: {Time: {since: $since, till: $till}}, Transaction: {From: {is: $account}}}
orderBy: {descending: Block_Time}
) {
Block {
Time
}
Fee {
SenderFee
}
Trade {
Buy {
Amount
Currency {
Symbol
SmartContract
}
Price
}
Sell {
Amount
Currency {
Symbol
SmartContract
}
Price
}
}
Transaction {
Hash
From
}
}
}
}
Variables
{
"token": "0xd4126f195a8de772eeffa61a4ab6dd43462f4e39",
"account": "0x0b1dd81b07b2b446973a8f6f2294653eb82d9bc7",
"network": "eth",
"since": "",
"till": ""
}
Similar queries
- Latest Curve DEX swaps on Ethereum · Ethereum · DEXTrades
- Top Curve liquidity pools by 24h volume on Ethereum · Ethereum · DEXTrades
- STRN_TOKEN_MULTIPLE_DECIMALS_DEX_TRADES · Ethereum · DEXTrades
- USDT DECIMAL SHOWING 0 · Ethereum · DEXTrades
- Trades - 0xEE61159E8A72A08371c52D62c19Efd0C7914f917 · Ethereum · DEXTrades