/v1/chart
Price series over time for a token
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/tokenpricehistory-api/v1/chart" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/tokenpricehistory-api/v1/chart", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/tokenpricehistory-api/v1/chart");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/tokenpricehistory-api/v1/chart",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"note": "Price series over time. timestamp is unix seconds; price is in USD.",
"span": 30,
"count": 30,
"period": "1d",
"prices": [
{
"price": 2194.96610829,
"timestamp": 1778918765
},
{
"price": 2185.31030794,
"timestamp": 1779005086
},
{
"price": 2121.06881797,
"timestamp": 1779091583
},
{
"price": 2138.34353201,
"timestamp": 1779177908
},
{
"price": 2127.65685691,
"timestamp": 1779264384
},
{
"price": 2136.73062416,
"timestamp": 1779350809
},
{
"price": 2127.4388102,
"timestamp": 1779437203
},
{
"price": 2026.36957954,
"timestamp": 1779523322
},
{
"price": 2119.20003555,
"timestamp": 1779610004
},
{
"price": 2112.58707332,
"timestamp": 1779696425
},
{
"price": 2093.40193321,
"timestamp": 1779782722
},
{
"price": 2082.65397827,
"timestamp": 1779869182
},
{
"price": 1991.54985621,
"timestamp": 1779955307
},
{
"price": 2006.15456684,
"timestamp": 1780042023
},
{
"price": 2013.12740891,
"timestamp": 1780128484
},
{
"price": 2023.79204847,
"timestamp": 1780214803
},
{
"price": 1975.41951119,
"timestamp": 1780301123
},
{
"price": 1980.09532884,
"timestamp": 1780387506
},
{
"price": 1875.13101398,
"timestamp": 1780473600
},
{
"price": 1779.37727048,
"timestamp": 1780560344
},
{
"price": 1672.04110227,
"timestamp": 1780646866
},
{
"price": 1574.9289146,
"timestamp": 1780732783
},
{
"price": 1614.88054414,
"timestamp": 1780819445
},
{
"price": 1671.89479969,
"timestamp": 1780905584
},
{
"price": 1679.21135017,
"timestamp": 1780992004
},
{
…