Get Token Pair
Returns one DEX trade on Ethereum, where DEX protocol name is uniswap_v2: protocol name, owner address, smart contract, buy currency name, buy smart contract, sell currency name and sell smart contract.
What it returns
- protocol name
- owner address
- smart contract
- buy currency name
- buy smart contract
- sell currency name
- sell smart contract
Filters
- DEX protocol name is uniswap_v2
The query
query getPair($fromToken: String, $toToken: String) {
EVM(dataset: combined, network: eth) {
DEXTrades(
where: {Trade: {Buy: {Currency: {SmartContract: {is: $fromToken}}}, Sell: {Currency: {SmartContract: {is: $toToken}}}, Dex: {ProtocolName: {is: "uniswap_v2"}}}}
limit: {count: 1}
limitBy: {by: Trade_Sell_Currency_SmartContract, count: 1}
) {
Trade {
Dex {
ProtocolName
OwnerAddress
SmartContract
}
Buy {
Currency {
Name
SmartContract
}
}
Sell {
Currency {
Name
SmartContract
}
}
}
}
}
}
Variables
{
"fromToken": {
"eq": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"toToken": {
"eq": "0x50327c6c5a14dcade707abad2e27eb517df87ab5"
},
}
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