RestAPI Endpoints
Last updated
Last updated
The page includes a list of all available Token data endpoints on DIA network. To review the data sources and methodologies used for pricing, visit the following page:
GET
https://api.diadata.org/v1/assetQuotation/:blockchain/:asset
Returns the quotation for a fully qualified asset (i.e. distinguished by blockchain and address). Quotations are obtained by filtering trades data with a Moving Average filter and Interquartile Range outlier detection (MAIR).
Example: https://api.diadata.org/v1/assetQuotation/Bitcoin/0x0000000000000000000000000000000000000000
Name | Type | Description |
---|---|---|
GET
https://api.diadata.org/v1/quotation/:symbol
Get most recent information on the currency corresponding to symbol. Quotations are obtained by filtering trades data with a Moving Average filter and Interquartile Range outlier detection (MAIR).
Note: this endpoint is intended for testing purposes only; if multiple assets with the same symbol exists, data for the highest volume generating asset will be returned
Example: https://api.diadata.org/v1/quotation/BTC
GET
https://api.diadata.org/v1/quotedAssets
Returns a list of assets available for quotations.
Example: https://api.diadata.org/v1/quotedAssets
Use the query parameter blockchain in order to obtain exclusively assets on the selected blockchain.
Example: https://api.diadata.org/v1/quotedAssets?blockchain=Polygon
GET
https://api.diadata.org/v1/synthasset/:blockchain/:protocol
The endpoint provides information on the health factor of DeFi protocols.
It takes into consideration outstanding loans, contracts' balance and compares it to synthetic token issuance. This helps to make sure that all assets are fully collateralized.
Exemplary query:
https://api.diadata.org/v1/synthasset/Ethereum/Aave-V2
Currently only Aave V2 and Aave V3 are supported on Ethereum and Avalanche blockchains.
It is possible to receive collateral information for a single token by using token filter as in example below:
To receive all asset updates data during the selected period use starttime
and endtime
filter parameters with timestamps as inputs. Here is an example:
GET
https://api.diadata.org/v1/poolLiquidity/:blockchain/:pool_address
Get the latest state of a DEX pool's liquidity. Example: https://api.diadata.org/v1/poolLiquidity/Ethereum/0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc
GET
https://api.diadata.org/v1/poolSlippage/:blockchain/:pool_address/:token1_address/:pool_type/:desired_slippage
To predict the amount of tokens required to reach a specified slippage, you can use Pool Slippage
endpoint. It works for any pool that exists on Uniswap V2 or any fork DEX on supported list of exchanges.
Here is an exemplary API call:https://api.diadata.org/v1/poolSlippage/Ethereum/0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/UniswapV2/100
The logic is as follows:
Provide the address of the pool, select a token in which you wish to have slippage calculated (e.g. if selected ETH from ETH-USDC, it will show how much is ETH is required to move the price by selected amount) and determine the goal for price movement.
GET
https://api.diadata.org/v1/blockchains
Get a list of all available blockchains.
GET
https://api.diadata.org/v1/exchanges
Get a list of all available crypto exchanges.
GET
https://api.diadata.org/v1/pairsCex/:exchange
Get all pairs on a given exchange for which DIA is collecting trades data at the moment.
Example: https://api.diadata.org/v1/pairsCex/Kraken
Use the query parameter verified in order to get either verified or unverified pairs.
Example: https://api.diadata.org/v1/pairsCex/Kraken?verified=true
GET
https://api.diadata.org/v1/pairsAssetCex/:blockchain/:address
Get all pairs on a centralized exchange for which DIA is collecting trades data at the moment. Include pairs across all exchanges involving the requested asset as either base- or quote token.
Example: https://api.diadata.org/v1/pairsAssetCex/Shiden/0x0000000000000000000000000000000000000000
Use the query parameter verified in order to get either verified or unverified pairs.
GET
https://api.diadata.org/v1/lastTradesAsset/:blockchain/:address
Get last trade timestamp for an asset.
Example: https://api.diadata.org/v1/lastTradesAsset/Bitcoin/0x0000000000000000000000000000000000000000
GET
https://api.diadata.org/v1/chartPoints/:filter/:exchange/:symbol
Get chart points for an exchange.
Example: https://api.diadata.org/v1/chartPoints/MEDIR120/Binance/BTC Note: Successful responses can be rather large.
GET
https://api.diadata.org/v1/assetChartPoints/:filter/:blockchain/:address
Get asset details for all exchanges.
Example: https://api.diadata.org/v1/assetChartPoints/MA120/Bitcoin/0x0000000000000000000000000000000000000000
Remark: Careful! Successful responses can be rather large.
GET
https://api.diadata.org/v1/foreignSymbols/:source
Get the list of available symbols along with their ITIN for guest quotations.
Example: https://api.diadata.org/v1/foreignSymbols/Coingecko
GET
https://api.diadata.org/v1/foreignQuotation/:source/:symbol
Get the latest quotation for a token from a guest source.
Example: https://api.diadata.org/v1/foreignQuotation/CoinMarketCap/BTC Use the query parameter time in order to get the latest quotation before the specified timestamp
Example: https://api.diadata.org/v1/foreignQuotation/Coingecko/BTC?time=1647349656
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|