DEX Token Price Discovery
Returns 7 DEX trades on Ethereum and Polygon, where buy currency is 0x623a…3665 or 0xb763…43e5, sell currency is not 0x623a…3665 or 0xb763…43e5 and sell currency is 0x623a…3665 or 0xb763…43e5, sorted by date year date month date day of month, highest first: day of month, month, year, buy currency address, decimals, buy currency name, buy currency symbol and 19 more fields.
What it returns
- day of month
- month
- year
- buy currency address
- decimals
- buy currency name
- buy currency symbol
- token ID
- token type
- sell currency address
- sell currency name
- sell currency symbol
- base currency address
- base currency name
- base currency symbol
- quote currency address
- quote currency name
- quote currency symbol
- count
- price
- quote price
- buy amount
- sell amount
- base amount
- quote amount
- expression
Filters
- buy currency is 0x623a…3665 or 0xb763…43e5
- sell currency is not 0x623a…3665 or 0xb763…43e5
- sell currency is 0x623a…3665 or 0xb763…43e5
- buy currency is not 0x623a…3665 or 0xb763…43e5
The query
query MyQuery($tokenAddresses: [String!], $days: Int!) {
ethereum(network: matic) {
dexTradesBuy: dexTrades(
buyCurrency: {in: $tokenAddresses}
sellCurrency: {notIn: $tokenAddresses}
options: {limit: $days, desc: ["date.year", "date.month", "date.dayOfMonth"]}
) {
date {
dayOfMonth
month
year
}
buyCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
sellCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
baseCurrency {
address
name
symbol
decimals
tokenId
tokenType
}
quoteCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
count
price(calculate: average)
quotePrice(calculate: average)
buyAmount(calculate: sum)
sellAmount(calculate: sum)
baseAmount(calculate: sum)
quoteAmount(calculate: sum)
buyAmountUSD: buyAmount(calculate: sum, in: USD)
sellAmountUSD: sellAmount(calculate: sum, in: USD)
baseAmountUSD: baseAmount(calculate: sum, in: USD)
quoteAmountUSD: quoteAmount(calculate: sum, in: USD)
quote_rate: expression(get: "sellAmountUSD / buyAmount")
}
dexTradesSell: dexTrades(
sellCurrency: {in: $tokenAddresses}
buyCurrency: {notIn: $tokenAddresses}
options: {limit: $days, desc: ["date.year", "date.month", "date.dayOfMonth"]}
) {
date {
dayOfMonth
month
year
}
buyCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
sellCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
baseCurrency {
address
name
symbol
decimals
tokenId
tokenType
}
quoteCurrency {
address
decimals
name
symbol
tokenId
tokenType
}
count
price(calculate: average)
quotePrice(calculate: average)
buyAmount(calculate: sum)
sellAmount(calculate: sum)
baseAmount(calculate: sum)
quoteAmount(calculate: sum)
buyAmountUSD: buyAmount(calculate: sum, in: USD)
sellAmountUSD: sellAmount(calculate: sum, in: USD)
baseAmountUSD: baseAmount(calculate: sum, in: USD)
quoteAmountUSD: quoteAmount(calculate: sum, in: USD)
quote_rate: expression(get: "buyAmountUSD / sellAmount")
}
}
}
Variables
{
"tokenAddresses": [
"0x623a1350f6b749575f92ea54d0f745f9f07d3665",
"0xb763f1177e9b2fb66fbe0d50372e3e2575c043e5"
],
"days": 7
}
Similar queries
- trades · Ethereum · DEXTrades
- matic_DEXTrades · Polygon · DEXTrades
- prediction_dextrades · Polygon · DEXTrades
- matic MAPU trades · Polygon · DEXTrades
- List of DEX supported · Polygon · DEXTrades