Get list of DEX protocols
Get a list of DEX (Decentralized Exchange) protocols. DEX protocols are child exchanges that are part of a parent DEX exchange. They are ranked based on their trading volume in the last 24 hours.
https://api.coinranking.com/v2/dex-protocols
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.
Query parameters
| Parameter | Description |
|---|---|
referenceCurrencyUuid (optional) String | UUID of coin (either fiat or crypto), in which all the prices are calculated. 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-protocols?referenceCurrencyUuid=5k-_VTxqtCEI
|
limit (optional) Number | Limit. Used for pagination. Only usable when no filters are applied. 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-protocols?limit=10
|
offset (optional) Number | Offset. Used for pagination. Default value: 0Example:
https://api.coinranking.com/v2/dex-protocols?offset=50
|
orderBy (optional) String | Order by either 24h volume, number of markets or latest ticker. Ordering can only be done when no filters are applied. Default value: 24hVolumeAllowed values: 24hVolume numberOfMarkets lastTickerCreatedAt Example:
https://api.coinranking.com/v2/dex-protocols?orderBy=24hVolume
|
orderDirection (optional) String | Applies direction to the orderBy query, which can be in ascending or descending order. Only usable when no filters are applied. Default value: descAllowed values: desc asc Example:
https://api.coinranking.com/v2/dex-protocols?orderDirection=asc
|
uuids (optional) Array | DEX Protocol UUIDs to filter the protocols on. Example:
https://api.coinranking.com/v2/dex-protocols?uuids[]=5Sfs67ZcuOWm&uuids[]=oIbmZCdhy
|
search (optional) String | Value to search for within results, e.g. protocol names. Example:
https://api.coinranking.com/v2/dex-protocols?search=uniswap
|
countries (optional) Array | Filter DEX protocols by supported countries using ISO 3166-1 alpha-2 country codes. Returns only protocols that support trading in at least one of the specified countries. See the country codes reference for a full list of supported codes. Example:
https://api.coinranking.com/v2/dex-protocols?countries[]=US&countries[]=GB
|
fiatCurrencyUuids (optional) Array | Filter DEX protocols by fiat currencies they support for trading pairs, using each currency's UUID. Returns only protocols that support at least one of the specified fiat currencies. You can find fiat currency UUIDs in the reference currencies endpoint using
https://api.coinranking.com/v2/dex-protocols?fiatCurrencyUuids[]=yhjMzLPhuIDl
Multiple values example:
https://api.coinranking.com/v2/dex-protocols?fiatCurrencyUuids[]=yhjMzLPhuIDl&fiatCurrencyUuids[]=5k-_VTxqtCEI
|
Code examples
curl 'https://api.coinranking.com/v2/dex-protocols?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=24hVolume' \
-H 'x-access-token: your-api-key' \
-G const options = {
headers: {
'x-access-token': 'your-api-key',
},
};
fetch('https://api.coinranking.com/v2/dex-protocols?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=24hVolume', 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-protocols?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=24hVolume",
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-protocols?referenceCurrencyUuid=5k-_VTxqtCEI&limit=50&offset=0&orderBy=24hVolume", headers=headers)
print(response.text) Response
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"stats": {
"24hVolume": "111955679139",
"total": 59
},
"exchanges": [
{
"uuid": "oIbmZCdhy",
"name": "PancakeSwap v3 (BSC)",
"iconUrl": "https://cdn.coinranking.com/3wigw7gEZ/pancakeswap.png",
"verified": false,
"recommended": true,
"numberOfMarkets": 789,
"numberOfCoins": 526,
"marketShare": "11.37",
"24hVolume": "38330704543"
},
{
"uuid": "FeCJqGOi1",
"name": "Uniswap v3 (Ethereum)",
"iconUrl": "https://cdn.coinranking.com/j-19SX5s-/7083.png",
"verified": false,
"recommended": true,
"numberOfMarkets": 675,
"numberOfCoins": 412,
"marketShare": "8.01",
"24hVolume": "26984105104"
}
]
}
} 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 DEX protocols in the reference currency |
data.stats.total Number | Total number of DEX protocols |
data.exchanges Object[] | List of DEX protocols (child exchanges) |
data.exchanges.uuid String | UUID of the DEX protocol |
data.exchanges.name String | Name of the DEX protocol |
data.exchanges.iconUrl String | Location of the icon. Replace |
data.exchanges.verified Boolean | DEPRECATED DEX protocols that are verified to not participate in harmful practices such as wash trading are marked as verified. |
data.exchanges.recommended Boolean | Whether the DEX protocol is recommended based on our criteria, see https://support.coinranking.com/article/82-recommended-exchanges |
data.exchanges.numberOfMarkets Number | Number of markets of the DEX protocol paired with Coinranking |
data.exchanges.numberOfCoins Number | Number of coins of the DEX protocol paired with Coinranking |
data.exchanges.24hVolume String | Total volume in 24 hours |
data.exchanges.marketShare String | Percentage of the total DEX protocol volume represented by this protocol. |
Error response
HTTP/1.1 422 Unprocessable Entity
{
"status": "fail",
"type": "REFERENCE_UNAVAILABLE",
"message": "Reference currency not available"
} Error responses
| 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. |