Get blockchain details

Growth This endpoint requires the growth plan or higher. Free, Basic and Startup plans can use preview access.

Find a blockchain

https://api.coinranking.com/v2/blockchain/:name

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
blockchain String

Name of the blockchain you want to request. You can find a list of all possible values by making a request to blockchains endpoint.

Code examples

curl
curl https://api.coinranking.com/v2/blockchain/ethereum \
  -H 'x-access-token: your-api-key' \
  -G
JavaScript
const options = {
  headers: {
    'x-access-token': 'your-api-key',
  },
};

fetch('https://api.coinranking.com/v2/blockchain/ethereum', options)
  .then((response) => response.json())
  .then((result) => console.log(result));
PHP
<?php
  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.coinranking.com/v2/blockchain/ethereum",
    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;
Python
import requests

headers = {
  'x-access-token': 'your-api-key'
}

response = requests.request("GET", "https://api.coinranking.com/v2/blockchain/ethereum", headers=headers)

print(response.text)

Response

json
HTTP/1.1 200 OK
{
  "status": "success",
  "data": {
    "blockchain": {
        "name": "ethereum",
        "totalCoins": 2
      }
    }
  }
}

Response fields

Property Description
status String

Status of the request

Allowed values:
success
data Object
data.blockchain Object
data.blockchain.name String

Name of the blockchain

data.blockchain.totalCoins Number/null

Amount of coins listed for this blockchain

Error response

json
HTTP/1.1 404 Not Found
{
  "status": "fail",
  "type": "BLOCKCHAIN_NOT_FOUND",
  "message": "Blockchain not found. Find a list of possible values at https://api.coinranking.com/v2/blockchains"
}

Error responses

Error Description
BLOCKCHAIN_NOT_FOUND Object

The blockchain could not be found.