Token Price Quotation (by address)
curl --request GET \
--url https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}import requests
url = "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Symbol": "BTC",
"Name": "Bitcoin",
"Address": "0x0000000000000000000000000000000000000000",
"Blockchain": "Bitcoin",
"Price": 25703.376586196053,
"PriceYesterday": 25815.29054321003,
"VolumeYesterdayUSD": 1317774231.5192668,
"Time": "2023-09-11T10:07:59.944Z",
"Source": "diadata.org",
"Signature": "0x8e0ffd0f2aac9306a6605e82f87856859b0666f1e600c9247b2935bfe52ded71061aa0c04e83dde4b6272a3057b5b93d9395ed5d8e1f033d1b25b04e73e1680101"
}
Digital Assets Market Data
Token Price Quotation (by address)
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).
GET
/
v1
/
assetQuotation
/
{blockchain}
/
{asset}
Token Price Quotation (by address)
curl --request GET \
--url https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}import requests
url = "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/assetQuotation/{blockchain}/{asset}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"Symbol": "BTC",
"Name": "Bitcoin",
"Address": "0x0000000000000000000000000000000000000000",
"Blockchain": "Bitcoin",
"Price": 25703.376586196053,
"PriceYesterday": 25815.29054321003,
"VolumeYesterdayUSD": 1317774231.5192668,
"Time": "2023-09-11T10:07:59.944Z",
"Source": "diadata.org",
"Signature": "0x8e0ffd0f2aac9306a6605e82f87856859b0666f1e600c9247b2935bfe52ded71061aa0c04e83dde4b6272a3057b5b93d9395ed5d8e1f033d1b25b04e73e1680101"
}
Path Parameters
string
required
Name of the blockchain for requested asset
string
required
Address of the requested asset for this data
{
"Symbol": "BTC",
"Name": "Bitcoin",
"Address": "0x0000000000000000000000000000000000000000",
"Blockchain": "Bitcoin",
"Price": 25703.376586196053,
"PriceYesterday": 25815.29054321003,
"VolumeYesterdayUSD": 1317774231.5192668,
"Time": "2023-09-11T10:07:59.944Z",
"Source": "diadata.org",
"Signature": "0x8e0ffd0f2aac9306a6605e82f87856859b0666f1e600c9247b2935bfe52ded71061aa0c04e83dde4b6272a3057b5b93d9395ed5d8e1f033d1b25b04e73e1680101"
}
Was this page helpful?
⌘I