Get market details
Find information on a specific market listed on coinranking. On Coinranking, we use this endpoint on our market detail.
https://api.coinranking.com/v2/market/:uuid
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 Uuid | Uuid of the market you want to request |
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/market/MP77r-vKf4?referenceCurrencyUuid=5k-_VTxqtCEI
|
Code examples
curl 'https://api.coinranking.com/v2/market/MP77r-vKf4?referenceCurrencyUuid=5k-_VTxqtCEI' \
-H 'x-access-token: your-api-key' \
-G const options = {
headers: {
'x-access-token': 'your-api-key',
},
};
fetch('https://api.coinranking.com/v2/market/MP77r-vKf4?referenceCurrencyUuid=5k-_VTxqtCEI', 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/market/MP77r-vKf4?referenceCurrencyUuid=5k-_VTxqtCEI",
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/market/MP77r-vKf4?referenceCurrencyUuid=5k-_VTxqtCEI", headers=headers)
print(response.text) Response
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"market": {
"uuid": "MP77r-vKf4",
"rank": 7,
"base": {
"uuid": "Qwsogvtv82FCd",
"symbol": "BTC",
"name": "Bitcoin",
"type": "coin"
},
"quote": {
"symbol": "USDT",
"uuid": "HIVsRcGKkPFtW",
"name": "Tether",
"type": "coin"
},
"exchange": {
"name": "Binance",
"uuid": "-zdvbieRdZ",
"iconUrl": "https://cdn.coinranking.com/mDTK5qrmq/binance.svg",
"websiteUrl": "https://www.binance.com"
},
"latestTicker": {
"createdAt": 1594808541,
"close": "10190.495525500779",
"base24hVolume": "34878",
"quote24hVolume": "354103375"
},
"marketShare": "1.23",
"price": "9488.518829659914",
"btcPrice": "1",
"24hVolume": "353383358.2006244",
"recommended": true,
"filters": []
}
}
} Response fields
| Property | Description |
|---|---|
status String | Status of the request Allowed values:success |
data Object | |
data.market Object | |
data.market.uuid String | Uuid of the market |
data.markets.base String | The coin on the left side of the pair, which price is calculated in units of the quote |
data.market.base.uuid String | Uuid of the baseCurrency of the market |
data.market.base.symbol String | Symbol of the baseCurrency of the market |
data.market.base.type String | Indicates if the base of the market is a coin or if it is fiat Allowed values:coin fiat |
data.market.base.name String | Name 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.market.quote.uuid String | Uuid of the quoteCurrency of the market |
data.market.quote.symbol String | Symbol of the quoteCurrency of the market |
data.market.quote.name String | Name of the quoteCurrency of the market |
data.market.quote.type String | Indicates if the quote of the market is a coin or if it is fiat Allowed values:coin fiat |
data.markets.exchange String | Exchange this market belongs to |
data.market.exchange.name String | Name of the exchange |
data.market.exchange.uuid String | Uuid of the exchange |
data.market.exchange.iconUrl String | Location of the icon. Replace |
data.market.exchange.websiteUrl String | Url that points to the website of the exchange |
data.market.latestTicker.createdAt String | An Epoch timestamp in seconds when the latest ticker was received |
data.market.latestTicker.close String | The last price received from the market |
data.market.latestTicker.base24hVolume String | Moving average of the base volume of the market in the last 24 hours. For example in a BTC/USD market it would be the Bitcoins traded within a 24 hour timespan. |
data.market.latestTicker.quote24hVolume String | Moving average of the quote volume of the market in the last 24 hours. For example in a BTC/USD market it would be the US dollars traded within a 24 hour timespan. |
data.market.24hVolume String | The 24 hour volume of the base currency in the reference currency which defaults to US Dollar. For example in an ETH/BTC market the volume would be Ethereum in US Dollar. |
data.market.price String | The latest price of the base currency in the reference currency which defaults to US Dollar. For example in an ETH/BTC market the price would be Ethereum in US Dollar. |
data.market.btcPrice String | The latest price of the base currency in Bitcoin. |
data.market.rank Number | Rank of the market based on volume, taking into account exchange and currency filters |
data.market.marketShare String | Percentage of the total market volume reprented by this market |
data.market.recommended Boolean | Whether the market is recommended based on the exchange it belongs to, see https://support.coinranking.com/article/82-recommended-exchanges |
data.market.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 |
|---|---|
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 |