/v1/ohlc
OHLC candles over a date range
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/cryptohistory-api/v1/ohlc" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cryptohistory-api/v1/ohlc", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cryptohistory-api/v1/ohlc");
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/cryptohistory-api/v1/ohlc",
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": {
"vs": "usd",
"coin": "bitcoin",
"days": 30,
"count": 180,
"source": "CoinGecko",
"candles": [
{
"low": 81584,
"high": 82027,
"open": 81971,
"time": 1778544000000,
"close": 81725
},
{
"low": 80882,
"high": 81735,
"open": 81735,
"time": 1778558400000,
"close": 81065
},
{
"low": 80834,
"high": 81264,
"open": 81026,
"time": 1778572800000,
"close": 80862
},
{
"low": 80487,
"high": 80910,
"open": 80846,
"time": 1778587200000,
"close": 80746
},
{
"low": 80189,
"high": 80921,
"open": 80749,
"time": 1778601600000,
"close": 80351
},
{
"low": 79880,
"high": 80800,
"open": 80337,
"time": 1778616000000,
"close": 80788
},
{
"low": 80441,
"high": 80811,
"open": 80810,
"time": 1778630400000,
"close": 80481
},
{
"low": 80412,
"high": 81214,
"open": 80412,
"time": 1778644800000,
"close": 81196
},
{
"low": 80894,
"high": 81227,
"open": 81214,
"time": 1778659200000,
"close": 80927
},
{
"low": 80498,
"high": 81263,
"open": 80976,
"time": 1778673600000,
"close": 80498
},
{
"low": 78828,
"high": 80515,
"open": 80485,
"time": 1778688000000,
"close": 78828
},
{
"low": 78795,
"high": 79736,
"open": 78888,
"time": 1778702400000,
"close": 79532
},
{
"low": 79217,
"high": 79672,
"open": 79563,
"time": 1778716800000,
"close": 79278
},
{
"low": 78973,
"high": 79626,
"open": 79351,
"time": 1778731200000,
"close": 78973
},
{
"low": 78992,
"high": 79872,
"open": 78992,
"time": 1778745600000,
"close"
…