Returns a list of pairs based on a variety of filters.
Endpoint: filterPairs
Method: POST
Arguments
Name | Type | Description |
---|---|---|
filters | PairFilters | A set of filters to apply. |
limit | Int | The maximum number of pairs to return. |
matchTokens | PairFilterMatchTokens | A set of token contract addresses that make up a pair. Can be used in place of a pair contract address. |
offset | Int | Where in the list the server should start when returning items. Use |
pairs | [String] | A list of pair or token contract addresses or IDs ( |
phrase | String | A phrase to search for. Can match a token or pair contract address or ID ( |
rankings | [PairRanking] | A list of ranking attributes to apply. |
statsType | TokenPairStatisticsType | The type of statistics returned. Can be |
Response
Name | Type | Description |
---|---|---|
count | Int | The number of pairs returned. |
offset | Int | Where in the list the server started when returning items. |
results | [PairFilterResult] | The list of pairs matching the filter parameters. |
Name | Type | Description |
---|---|---|
buyCount1 | Int | The number of buys in the past hour. |
buyCount4 | Int | The number of buys in the past 4 hours. |
buyCount12 | Int | The number of buys in the past 12 hours. |
buyCount24 | Int | The number of buys in the past 24 hours. |
createdAt | Int | The unix timestamp for the creation of the pair. |
exchange | FilterExchange | Exchange metadata for the pair. |
highPrice1 | String | The highest price in USD in the past hour. |
highPrice4 | String | The highest price in USD in the past 4 hours. |
highPrice12 | String | The highest price in USD in the past 12 hours. |
highPrice24 | String | The highest price in USD in the past 24 hours. |
lastTransaction | Int | The unix timestamp for the last transaction to happen on the pair. |
liquidity | String | Amount of liquidity in the pair. |
liquidityToken | String | The token with higher liquidity in the pair. Can be token0 or token1 . |
lockedLiquidityPercentage | Float! | The locked liquidity percentage. |
lowPrice1 | String | The lowest price in USD in the past hour. |
lowPrice4 | String | The lowest price in USD in the past 4 hours. |
lowPrice12 | String | The lowest price in USD in the past 12 hours. |
lowPrice24 | String | The lowest price in USD in the past 24 hours. |
marketCap | String | The fully diluted market cap. |
pair | Pair | Metadata for the pair. |
price | String | The token price in USD. |
priceChange1 | String | The percent price change in the past hour. Decimal format. |
priceChange4 | String | The percent price change in the past 4 hours. Decimal format. |
priceChange12 | String | The percent price change in the past 12 hours. Decimal format. |
priceChange24 | String | The percent price change in the past 24 hours. Decimal format. |
priceScale | String | 10^n, where n is the number of decimal places the price has. Max 16. Used for TradingView settings. |
quoteToken | String | The token of interest. Can be token0 or token1 . |
sellCount1 | Int | The number of sells in the past hour. |
sellCount4 | Int | The number of sells in the past 4 hours. |
sellCount12 | Int | The number of sells in the past 12 hours. |
sellCount24 | Int | The number of sells in the past 24 hours. |
token0 | EnhancedToken | Metadata for the first token in the pair. |
token1 | EnhancedToken | Metadata for the second token in the pair. |
txnCount1 | Int | The number of transactions in the past hour. |
txnCount4 | Int | The number of transactions in the past 4 hours. |
txnCount12 | Int | The number of transactions in the past 12 hours. |
txnCount24 | Int | The number of transactions in the past 24 hours. |
uniqueBuys1 | Int | The unique number of buys in the past hour. |
uniqueBuys4 | Int | The unique number of buys in the past 4 hours. |
uniqueBuys12 | Int | The unique number of buys in the past 12 hours. |
uniqueBuys24 | Int | The unique number of buys in the past 24 hours. |
uniqueSells1 | Int | The unique number of sells in the past hour. |
uniqueSells4 | Int | The unique number of sells in the past 4 hours. |
uniqueSells12 | Int | The unique number of sells in the past 12 hours. |
uniqueSells24 | Int | The unique number of sells in the past 24 hours. |
uniqueTransactions1 | Int | The unique number of transactions in the past hour. |
uniqueTransactions4 | Int | The unique number of transactions in the past 4 hours. |
uniqueTransactions12 | Int | The unique number of transactions in the past 12 hours. |
uniqueTransactions24 | Int | The unique number of transactions in the past 24 hours. |
volumeUSD1 | String | The trade volume in USD in the past hour. |
volumeUSD4 | String | The trade volume in USD in the past 4 hours. |
volumeUSD12 | String | The trade volume in USD in the past 12 hours. |
volumeUSD24 | String | The trade volume in USD in the past 24 hours. |
Example
Filter for Most Recently Listed Pairs
Use this query to filter pairs by createdAt
query {
filterPairs(rankings: {attribute: createdAt, direction: DESC}) {
results {
createdAt
pair {
address
}
token0 {
name
}
token1 {
name
}
}
}
}
Explore
Ask questions, share what you're working on and request new features 👬👭