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 “Tokens” API?
The “Tokens” API returns all the available data we have for the tokens on the Bancor network.
Base URL format:
The following values can be appended to the API call :
- TokenType= indicate the type of tokens you wish to receive in the response
- Tokens - returns ERC20 and smart tokens
- Relays - returns relay tokens
- fromCurrencyCode=ETH - will result in receiving data back in ETH currency.
- orderBy= define the order of items returned. Available values:
- liquidityDepth - the size of the connector balance
- change24h - the change of token price in the last 24 hours
- price - the current token price
- volume24 - the conversion volume during the last 24 hours
- code - token name
- sortOrder= define the sort order of the list received. Available values:
- desc - descending order
- asc - ascending order
- limit= 1-100 (default is 30). Determine the amount of records to receive.
- skip= 1-100 (default is 0). Determine the amount of records to skip.
- includeTotal= boolean value. Indicate if you with to receive the total amount of available tokens in the response.
- TokenType = tokens
- fromCurrencyCode = ETH
- orderBy = liquidityDepth
- sortOrder = desc
- limit = 1
- skip = 0
- includeTotal = false
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