Bancor provides public API methods which take HTTP GET requests and return JSON.
Please note that making more than 6 calls per second to the public API, or repeatedly and needlessly fetching excessive amounts of data, can result in your IP being banned.
What is the “Ticker” API?
The “Ticker” API returns all relevant data (name, symbol, code, decimals, price 24h high, price 24h low, price, price 24h, volume 24h, total supply) for the specific pair.
“Volume” and “total supply” values are indicated in the smallest unit of the token (example: Wei for ETH) which means you will need to format it correctly based on the token’s decimal digit settings.
Ticker API URL Format:
Ticker URL is structure in the following way and require you to pass 2 values that indicate the pair.
- 1st value = paired token code. The 3 letter indication of the token you would like to receive data for. This will be placed in this position in the URL “/currencies/[enter token code here]/ticker”
- 2nd value = leading token code. The 3 letter indication of the leading token you are pairing with. We support here 2 optional values, ETH or BNT.
- When you indicate fromCurrencyCode=ETH, the data received will be for the 1st value/ETH. All data will be in ETH (or the smallest unit, in this case Wei).
Keep in mind: trying to pair token/ETH might return inaccurate data.
- When you indicate fromCurrencyCode=BNT, the data received will be for the 1st value/BNT. All data will be in BNT (of the smallest unit, in this case Wei)
Sample URL format:
- BNT/ETH pair:
- Any other token on the Bancor network/BNT pair:
- Token indication must be in upper case and match the token code from the “Pairs” API.
Keep in mind:
Bancor API is currently in alpha and is likely to break or be slow to respond.
We offer several APIs for our partners, for more information please visit our API Documentation