Get DEX exchange list of markets
Find markets on a specific DEX exchange. On Coinranking, we use this endpoint on our DEX exchange markets page.
https://api.coinranking.com/v2/dex/:uuid/markets
Preview access
Free, Basic and Startup plans can test this endpoint with five successful requests per account per UTC day. Use the documented endpoint URL with your existing API key. Preview access is applied automatically. The allowance resets at 00:00 UTC.
All API keys, resource IDs, query parameters and pagination requests share this endpoint's allowance for your account. Failed requests do not consume the preview allowance. Successful previews also count toward your normal API usage, and your plan's result, historical-window and rate limits still apply. See endpoint previews for limits, response headers and quota errors.
Path parameters
| Parameter | Description |
|---|---|
uuid String | UUID of the DEX exchange. |
Query parameters
| Parameter | Description |
|---|---|
referenceCurrencyUuid (optional) String | UUID of coin (either fiat or crypto), the price of the reference currency is used to calculate the volume. Defaults to US Dollar, but you can use any coin. You can find UUIDs for reference currencies in any coin endpoint, including a convenient dedicated reference currency endpoint Default value: yhjMzLPhuIDlExample:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?referenceCurrencyUuid=5k-_VTxqtCEI
|
limit (optional) Number | Limit. Used for pagination. The maximum amount of results you can fetch in one request is 100 for Free and 5000 for all paid plans, including previews where available. Default value: 50Size range: 0-5000 Example:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?limit=10
|
offset (optional) Number | Offset. Used for pagination Default value: 0Example:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?offset=50
|
orderBy (optional) String | Index to sort on. Default is 24h volume. Default value: 24hVolumeAllowed values: 24hVolume price Example:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?orderBy=price
|
orderDirection (optional) String | Order in ascending or descending order Default value: descAllowed values: desc asc Example:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?orderDirection=asc
|
search (optional) String | Value to search for within results, e.g. exchange names, currency names, or currency symbols Example:
https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?search=ethereum
|
Code examples
curl 'https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=price' \
-H 'x-access-token: your-api-key' \
-G const options = {
headers: {
'x-access-token': 'your-api-key',
},
};
fetch('https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=price', options)
.then((response) => response.json())
.then((result) => console.log(result)); <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-access-token: your-api-key"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response; import requests
headers = {
'x-access-token': 'your-api-key'
}
response = requests.request("GET", "https://api.coinranking.com/v2/dex/5Sfs67ZcuOWm/markets?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=price", headers=headers)
print(response.text) Response
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"stats": {
"24hVolume": "54030830805.08821",
"total": 3611
},
"markets": [
{
"uuid": "jgJvUYCmY55B",
"rank": 1,
"base": {
"uuid": "H3PgrgCyL",
"symbol": "QUQ"
},
"quote": {
"uuid": "i5jggxiwp",
"symbol": "BSC-USD"
},
"exchange": {
"name": "Uniswap v3 (BSC)",
"uuid": "gEu3FBYGdb",
"iconUrl": "https://cdn.coinranking.com/I3ZqUTC5S/7083.png"
},
"marketShare": "13.17",
"btcPrice": "3.4810583378e-8",
"recommended": true,
"filters": [],
"price": "0.003598230296669107",
"24hVolume": "7115923819.1953535"
},
{
"uuid": "Kn5jozcG0rlq",
"rank": 2,
"base": {
"uuid": "i5jggxiwp",
"symbol": "BSC-USD"
},
"quote": {
"uuid": "h0fv-rQTj",
"symbol": "KOGE"
},
"exchange": {
"name": "Uniswap v3 (BSC)",
"uuid": "gEu3FBYGdb",
"iconUrl": "https://cdn.coinranking.com/I3ZqUTC5S/7083.png"
},
"marketShare": "8.89",
"btcPrice": "0.000009669892405769",
"recommended": true,
"filters": [],
"price": "0.9995379693052033",
"24hVolume": "4805208932.719478"
},
...
]
}
} Response fields
| Property | Description |
|---|---|
status String | Status of the request Allowed values:success |
data Object | |
data.stats Object | |
data.stats.24hVolume String | Total 24h volume of markets in the reference currency |
data.stats.total Number | Total number of markets |
data.markets Object[] | |
data.markets.uuid String | UUID of the market |
data.markets.active Number | If the market is enabled or not |
data.markets.base String | The coin on the left side of the pair, which price is calculated in units of the quote |
data.markets.base.symbol String | Symbol of the baseCurrency of the market |
data.markets.base.uuid String | UUID of the baseCurrency of the market |
data.markets.quote String | The coin on the right side of the pair. The amount in tickers are how much quote you get for one unit of base. E.g. BTC/USD 10.000 means 1 BTC is traded for 10.000 USD. |
data.markets.quote.uuid String | UUID of the quoteCurrency of the market |
data.markets.quote.symbol String | Symbol of the quoteCurrency of the market |
data.markets.exchange String | DEX exchange this market belongs to |
data.markets.exchange.name String | Name of the DEX exchange |
data.markets.exchange.uuid String | UUID of the DEX exchange |
data.markets.exchange.iconUrl String | Location of the icon. Replace |
data.markets.24hVolume String | 24h volume of the latest ticker in the reference currency |
data.markets.price String | Price of the latest ticker in reference currency |
data.markets.btcPrice String | Price of the latest ticker expressed in Bitcoin. |
data.markets.rank Number | Rank of the market based on volume, taking into account exchange and currency filters |
data.markets.marketShare String | Percentage of the total market volume represented by this market, taking into account exchange and currency filters |
data.markets.recommended Boolean | Whether the market is recommended based on the DEX exchange it belongs to, see https://support.coinranking.com/article/82-recommended-exchanges |
data.markets.filters String[] | An array of filters that are applied to the market. Most of the filters will cause the market to not be included in the price calculation of the coins. Allowed values:PREV_FACTOR EXTERNAL_ZSCORE GEO OUTSIDE_TOP_20 |
Error response
HTTP/1.1 422 Unprocessable Entity
{
"status": "fail",
"type": "REFERENCE_UNAVAILABLE",
"message": "Reference currency not available"
} Error responses
| Error | Description |
|---|---|
EXCHANGE_NOT_FOUND Object | The DEX exchange could not be found. Try another UUID |
| Error | Description |
|---|---|
VALIDATION_ERROR Object | The request could not be validated. The response should provide more details. |
REFERENCE_UNAVAILABLE Object | The reference currency used in the request is not available. Choose another UUID. |