Token Price Quotation (by symbol)
curl --request GET \
--url https://api.diadata.org/v1/quotation/{symbol}import requests
url = "https://api.diadata.org/v1/quotation/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/quotation/{symbol}', 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/quotation/{symbol}",
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/quotation/{symbol}"
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/quotation/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/quotation/{symbol}")
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": 25692.061459484863,
"PriceYesterday": 25825.253617593764,
"VolumeYesterdayUSD": 1323023983.1804218,
"Time": "2023-09-11T10:15:59.299Z",
"Source": "diadata.org"
}
Digital Assets Market Data
Token Price Quotation (by 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).
GET
/
v1
/
quotation
/
{symbol}
Token Price Quotation (by symbol)
curl --request GET \
--url https://api.diadata.org/v1/quotation/{symbol}import requests
url = "https://api.diadata.org/v1/quotation/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/quotation/{symbol}', 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/quotation/{symbol}",
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/quotation/{symbol}"
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/quotation/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/quotation/{symbol}")
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": 25692.061459484863,
"PriceYesterday": 25825.253617593764,
"VolumeYesterdayUSD": 1323023983.1804218,
"Time": "2023-09-11T10:15:59.299Z",
"Source": "diadata.org"
}
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*
Path Parameters
string
required
Which symbol to get a quotation for, e.g., BTC.
{
"Symbol": "BTC",
"Name": "Bitcoin",
"Address": "0x0000000000000000000000000000000000000000",
"Blockchain": "Bitcoin",
"Price": 25692.061459484863,
"PriceYesterday": 25825.253617593764,
"VolumeYesterdayUSD": 1323023983.1804218,
"Time": "2023-09-11T10:15:59.299Z",
"Source": "diadata.org"
}
Was this page helpful?
⌘I