Cardano Token Registry API

Cardano Token Registry API

I created recently created a simple API for the Cardano Token Registry and I made it public on Github. I wrote this in Python, the programming language I like using from time to time for my personal projects. The documentation for it is also on Github.

What does this API provide? People can find out the essential information registered in the Cardano Token Registry repository by doing a GET request with the Ticked of a token or with the policy ID and the hex name of a token (as returned by the cardano-cli query utxo command).

A query by ticket (GET /api/v0/ticker/cNETA) will return the response in the following format:

[
  {
    "policy_id": "b34b3ea80060ace9427bda98690a73d33840e27aaa8d6edb7f0c757a",
    "name_hex": "634e455441",
    "name": "anetaBTC",
    "ticker": "cNETA",
    "description": "AnetaBTC is a fully on-chain, decentralized protocol that allows Bitcoin to be directly wrapped on the Ergo and Cardano blockchains. This token serves as a Cardano governance token for anetaBTC.",
    "decimals": 0
  }
]

A query by policy ID and hex name (/api/v0/token/b34b3ea80060ace9427bda98690a73d33840e27aaa8d6edb7f0c757a/634e455441) will return the response in the following format:

[
  {
    "name": "anetaBTC",
    "ticker": "cNETA",
    "description": "AnetaBTC is a fully on-chain, decentralized protocol that allows Bitcoin to be directly wrapped on the Ergo and Cardano blockchains. This token serves as a Cardano governance token for anetaBTC.",
    "decimals": 0
  }
]

The reason for returning a list is that some tokens are registered multiple times (especially when querying by ticker), and all the matches will be returned. Sometimes one of the tokens is a scam attempt, but as long as they are in the Cardano Token Registry, my API will also return them.

I hope this will be useful!