GET /public/coin/:coin_id
Name | Type | Description |
---|---|---|
coin_id | Number |
ID of the coin you want to request |
base (optional) | String |
Base currency Default value: USDAllowed values: USD EUR JPY BTC ETH etc. |
timePeriod (optional) | String |
Time period where the change and history are based on Default value: 24hAllowed values: 24h 7d 30d |
curl
- Example:
curl -X GET \
'https://api.coinranking.com/v1/public/coin/1335?base=EUR&timePeriod=7d'
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: success |
data | Object |
|
data.base | Object |
|
data.base.symbol | Number |
Symbol of the coin in which all prices are calculated, as specified with the base parameter |
data.base.sign | Number |
Some coins have a symbol, like $ for USD and Ƀ for BTC |
data.coin | Object |
|
data.coin.id | Number |
ID of the coin |
data.coin.slug | String |
Unique slug |
data.coin.symbol | String |
Currency symbol |
data.coin.name | String |
Name of the coin |
data.coin.description | String |
Small description of the coin |
data.coin.color | String |
Main HEX color of the coin |
data.coin.iconType | String |
Type of the icon Allowed values: vector pixel |
data.coin.iconUrl | String |
|
data.coin.websiteUrl | String |
URL of the primary website |
data.coin.socials | Object[] |
List of social media links |
data.coin.socials.name | String |
Name of the account |
data.coin.socials.url | String |
Link to the specific social media |
data.coin.socials.type | String |
The type of social media Allowed values: twitter telegram reddit discord medium bitcointalk youtube facebook instagram github |
data.coin.confirmedSupply | Boolean |
Coins without a confirmed supply are ranked below coins with a confirmed supply |
data.coin.type | String |
The type of the coin can be either 'coin' (BTC, ETH, etc.), 'fiat' (USD, EUR, etc.) or 'denominator' (Satoshi, Wei, etc.) Allowed values: fiat coin denominator |
data.coin.marketCap | Number |
Market capitalization. Price times circulating supply |
data.coin.price | String |
Price of the coin |
data.coin.volume | Number |
24h trade volume |
data.coin.circulatingSupply | Number |
Number of coins that are circulating in the public market |
data.coin.totalSupply | Number |
Number of coins that are in existence |
data.coin.firstSeen | Number |
Time when the first price was calculated |
data.coin.change | Number |
Percentage of change over the given time period |
data.coin.rank | Number |
The position in the ranks |
data.coin.numberOfMarkets | Number |
The number of markets that contain the this coin |
data.coin.numberOfExchanges | Number |
The number of exchanges that trade this coin |
data.coin.history | String |
Array of prices based on the time period parameter |
data.coin.allTimeHigh | Object |
|
data.coin.allTimeHigh.price | String |
The highest price that the coin has reached |
data.coin.allTimeHigh.timestamp | Number |
Time when the coin reached its highest price |
data.coin.penalty | Boolean |
Coinranking gives coins with a very low 24h trade volume a penalty and lists these coins below non-penalised coins |
Response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"coin": {
"id": 1,
"slug": "bitcoin-btc",
"symbol": "BTC",
"name": "Bitcoin",
"description": "Bitcoin is the first decentralized digital currency.",
"color": "#f7931A",
"iconType": "vector",
"iconUrl": "https://cdn.coinranking.com/Sy33Krudb/btc.svg",
"websiteUrl": "https://bitcoin.org",
"socials": [
{
"name": "Bitcoin",
"url": "https://www.reddit.com/r/Bitcoin/",
"type": "reddit"
}
],
"confirmedSupply": true,
"type": "coin",
"volume": 6818750000,
"marketCap": 159393904304,
"price": "9370.9993109108",
"circulatingSupply": 17009275,
"totalSupply": 21000000,
"firstSeen": 1330214400000,
"change": -0.52,
"rank": 1,
"numberOfMarkets": 9800,
"numberOfExchanges": 190,
"history": [
"9515.0454185372",
"9540.1812284677",
"9554.2212643043",
"9593.571539283",
"9592.8596962985",
"9562.5310295967",
"9556.7860427046",
"9388.823394515",
"9335.3004209165",
"9329.4331700521",
"9370.9993109108"
],
"allTimeHigh": {
"price": "19500.471361532",
"timestamp": 1513555200000
},
"penalty": false
}
}
}
Error
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: fail |
type | String |
Error code Allowed values: VALIDATION_ERROR BASE_UNAVAILABLE COIN_NOT_FOUND |
message | String |
Human readable error message |
Response:
HTTP/1.1 404 Not Found
{
"status": "fail",
"type": "COIN_NOT_FOUND",
"message": "Coin not found"
}
GET /public/coin/:coin_id/history/:timeframe
Name | Type | Description |
---|---|---|
coin_id | Number |
ID of the coin you want to request |
timeframe (optional) | String |
Time frame where the change and history are based on Default value: 24hAllowed values: 24h 7d 30d 1y 5y |
base (optional) | String |
Base currency Default value: USDAllowed values: USD EUR JPY BTC ETH etc. |
curl
- Example:
curl -X GET \
'https://api.coinranking.com/v1/public/coin/1335/history/7d?base=EUR'
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: success |
data | Object |
|
data.change | Number |
Percentage of change over the given time frame |
data.history | Object[] |
List of data points |
data.history.price | String |
Price of the coin |
data.history.timestamp | Number |
UNIX timestamp in milliseconds |
Response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"change": 12,
"history": [
{
"price": "9324.5169512436",
"timestamp": 1525100400000
}
]
}
}
Error
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: fail |
type | String |
Error code Allowed values: VALIDATION_ERROR BASE_UNAVAILABLE COIN_NOT_FOUND UNKNOWN_ERROR |
message | String |
Human readable error message |
Response:
HTTP/1.1 404 Not Found
{
"status": "fail",
"type": "COIN_NOT_FOUND",
"message": "Coin not found"
}
GET /public/coins
Name | Type | Description |
---|---|---|
base (optional) | String |
Base currency Default value: USDAllowed values: USD EUR JPY BTC ETH etc. |
timePeriod (optional) | String |
Time period where the change and history are based on Default value: 24hAllowed values: 24h 7d 30d |
prefix (optional) | String |
Search to filter the list on. Only one of prefix, symbols, slugs or IDs parameters can be used at once |
symbols (optional) | String |
Symbols to filter the list on. Separated by comma. Only one of prefix, symbols, slugs or IDs parameters can be used at once |
slugs (optional) | String |
Slugs to filter the list on. Separated by comma. Only one of prefix, symbols, slugs or IDs parameters can be used at once |
ids (optional) | String |
IDs to filter the list on. Separated by comma. Only one of prefix, symbols, slugs or IDs parameters can be used at once |
sort (optional) | String |
Index to sort on. Default is Coinranking which takes the penalties in account Default value: coinrankingAllowed values: coinranking price marketCap change |
limit (optional) | Number |
Limit. Used for pagination Default value: 50Size range: 0-100 |
offset (optional) | Number |
Offset. Used for pagination Default value: 0 |
order (optional) | String |
Sort in ascending or descending order Default value: descAllowed values: desc asc |
curl
- Example:
curl -X GET \
'https://api.coinranking.com/v1/public/coins?base=EUR&timePeriod=7d'
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: success |
data | Object |
|
data.stats | Object |
|
data.stats.total | Number |
Total number of coins |
data.stats.offset | Number |
Starting position in the list of coins, often used in combination with the limit parameter |
data.stats.limit | Number |
Amount of coins fetched, starting from the offset position. So, the ending position is the offset plus the limit |
data.stats.order | Number |
The specified sorting order of coins Allowed values: desc asc |
data.stats.base | String |
Symbol of the coin in which all prices are calculated, as specified with the base parameter |
data.base | Object |
|
data.base.symbol | String |
Symbol of the coin in which all prices are calculated, as specified with the base parameter |
data.base.sign | Number |
Some coins have a symbol, like $ for USD and Ƀ for BTC |
data.coins | Object[] |
List of coins |
data.coins.id | Number |
ID of the coin |
data.coins.slug | String |
Unique slug |
data.coins.symbol | String |
Currency symbol |
data.coins.name | String |
Name of the coin |
data.coins.description | String |
Small description of the coin |
data.coins.color | String |
Main HEX color of the coin |
data.coins.iconType | String |
Type of the icon Allowed values: vector pixel |
data.coins.iconUrl | String |
Location of the icon |
data.coins.websiteUrl | String |
URL of the primary website |
data.coins.socials | Object[] |
List of social media links |
data.coins.socials.name | String |
Name of the account |
data.coins.socials.url | String |
Link to the specific social media |
data.coins.socials.type | String |
The type of social media Allowed values: twitter telegram reddit discord medium bitcointalk youtube facebook instagram github |
data.coins.confirmedSupply | Boolean |
Coins without a confirmed supply are ranked below coins with a confirmed supply |
data.coins.type | String |
The type of the coin can be either 'coin' (BTC, ETH, etc.), 'fiat' (USD, EUR, etc.) or 'denominator' (Satoshi, Wei, etc.) Allowed values: fiat coin denominator |
data.coins.volume | Number |
24h trade volume |
data.coins.marketCap | Number |
Market capitalization. Price times circulating supply |
data.coins.price | String |
Price of the coin |
data.coins.circulatingSupply | Number |
Number of coins that are circulating in the public market |
data.coins.totalSupply | Number |
Number of coins that are in existence |
data.coins.firstSeen | Number |
Time when the first price was calculated |
data.coins.change | Number |
Percentage of change over the given time period |
data.coins.rank | Number |
The position in the ranks |
data.coins.numberOfMarkets | Number |
The number of markets that contain the this coin |
data.coins.numberOfExchanges | Number |
The number of exchanges that trade this coin |
data.coin.history | String |
Array of prices based on the time period parameter |
data.coins.allTimeHigh | Object |
|
data.coins.allTimeHigh.price | String |
The highest price that the coin has reached |
data.coins.allTimeHigh.timestamp | Number |
Time when the coin reached its highest price. Note that this timestamp differs per base |
data.coins.penalty | Boolean |
Coinranking gives coins with a very low 24h trade volume a penalty and lists these coins below non-penalised coins |
Response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"stats": {
"total": 3217,
"offset": 0,
"limit": 50,
"order": "desc",
"base": "USD"
},
"coins": [
{
"id": 1,
"slug": "bitcoin-btc",
"symbol": "BTC",
"name": "Bitcoin",
"description": "Bitcoin is the first decentralized digital currency.",
"color": "#f7931A",
"iconType": "vector",
"iconUrl": "https://cdn.coinranking.com/Sy33Krudb/btc.svg",
"websiteUrl": "https://bitcoin.org",
"socials": [
{
"name": "Bitcoin",
"url": "https://www.reddit.com/r/Bitcoin/",
"type": "reddit"
}
],
"confirmedSupply": true,
"type": "coin",
"volume": 6818750000,
"marketCap": 159393904304,
"price": "9370.9993109108",
"circulatingSupply": 17009275,
"totalSupply": 21000000,
"firstSeen": 1330214400000,
"change": -0.52,
"rank": 1,
"numberOfMarkets": 9800,
"numberOfExchanges": 190,
"history": [
"9515.0454185372",
"9540.1812284677",
"9554.2212643043",
"9593.571539283",
"9592.8596962985",
"9562.5310295967",
"9556.7860427046",
"9388.823394515",
"9335.3004209165",
"9329.4331700521",
"9370.9993109108"
],
"allTimeHigh": {
"price": "19500.471361532",
"timestamp": 1513555200000
},
"penalty": false
}
]
}
}
Error
Name | Type | Description |
---|---|---|
status | String |
Status of the request Allowed values: fail error |
type | String |
Error code Allowed values: VALIDATION_ERROR BASE_UNAVAILABLE |
message | String |
Human readable error message |
Response:
HTTP/1.1 422 Unprocessable Entity
{
"status": "fail",
"type": "BASE_UNAVAILABLE",
"message": "Base not available"
}