Get UUID by contract address

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

Find a specific coin by the contract address on its blockchain. We use the term contract address, but the name differs per ecosystem. For example, in Ethereum, it's called a smart contract address, others call it a token address, assetID, or something else.

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

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 our blockchains endpoint.

address String

Address of the token you want to request. This is the same address as is used on the blockchain the token is minted on. For example, the Tether (USDT) contract address on Ethereum is 0xdac17f958d2ee523a2206206994597c13d831ec7. In our case, the address is case-insensitive.

Code examples

curl
curl https://api.coinranking.com/v2/blockchain/ethereum/0xdac17f958d2ee523a2206206994597c13d831ec7 \
  -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/0xdac17f958d2ee523a2206206994597c13d831ec7', 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/0xdac17f958d2ee523a2206206994597c13d831ec7",
    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/0xdac17f958d2ee523a2206206994597c13d831ec7", headers=headers)

print(response.text)

Response

json
HTTP/1.1 200 OK
{
  "status": "success",
  "data": {
    "coin": {
      "uuid": "razxDUgYGNAdQ",
      "name": "Ethereum",
      "symbol": "ETH",
      "contractAddresses": [
        "ethereum/0xNative",
        "bitcoin/0xBtc"
      ],
      "coinrankingUrl": "https://coinranking.com/coin/razxDUgYGNAdQ+ethereum-eth"
    }
  }
}

Response fields

Parameter Description
status String

Status of the request

Allowed values:
success
data Object
data.coin Object
data.coin.UUID String

Uuid of the coin

data.coin.name String

Name of the coin

data.coin.symbol String

Symbol of the coin (e.g. BTC, ETH, XRP)

data.coin.contractAddresses Object[]

List of contract addresses for this coin. The format is blockchain/contractAddress. A single coin can be minted on multiple blockchains. For example, Tether (USDT) is available on Ethereum (ethereum/0xda...) Bitcoin Cash (bitcoin-cash/9fc...) and seven other blockchains.

data.coin.coinrankingUrl String

Where to find the coin on coinranking.com

Error response

json
HTTP/1.1 404 Not Found
{
  "status": "fail",
  "type": "COIN_NOT_FOUND",
  "message": "Coin not found"
}

Error responses

Error Description
COIN_NOT_FOUND Object

The coin could not be found. Try another UUID

Error Description
VALIDATION_ERROR Object

The request could not be validated. The response should provide more details.