Passer au contenu principal
GET
/
v1
/
rates
/
{id}
/
history
Get Rate History
curl --request GET \
  --url https://api.blockradar.co/v1/rates/{id}/history \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.blockradar.co/v1/rates/{id}/history"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.blockradar.co/v1/rates/{id}/history', 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.blockradar.co/v1/rates/{id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$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.blockradar.co/v1/rates/{id}/history"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

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.blockradar.co/v1/rates/{id}/history")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockradar.co/v1/rates/{id}/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "d69078ef-2467-40f4-bb00-63394efe32c0",
      "fromAsset": "BNB",
      "toAsset": "USDC",
      "network": "testnet",
      "rate": "1",
      "minAmount": "0.000005",
      "isActive": false,
      "maxAmount": null,
      "status": "deactivated",
      "version": 1,
      "previousRateId": null,
      "rootRateId": null,
      "createdBy": "86964e42-79dc-4267-a2ca-3612c4b095a8",
      "deactivatedBy": "86964e42-79dc-4267-a2ca-3612c4b095a8",
      "deactivatedAt": "2026-02-25T18:13:48.113Z",
      "deactivationReason": "re",
      "createdAt": "2026-02-19T07:50:17.042Z",
      "updatedAt": "2026-02-25T18:13:48.101Z"
    }
  ],
  "message": "Rate history retrieved successfully",
  "meta": {
    "totalItems": 1,
    "itemCount": 1,
    "itemsPerPage": 10,
    "totalPages": 1,
    "currentPage": 1
  },
  "statusCode": 200
}

Autorisations

x-api-key
string
header
requis

Paramètres de chemin

id
string
requis
Exemple:

"rate_id"

Réponse

200 - application/json

200

data
object[]
Exemple:
[
{
"id": "d69078ef-2467-40f4-bb00-63394efe32c0",
"fromAsset": "BNB",
"toAsset": "USDC",
"network": "testnet",
"rate": "1",
"minAmount": "0.000005",
"isActive": false,
"maxAmount": null,
"status": "deactivated",
"version": 1,
"previousRateId": null,
"rootRateId": null,
"createdBy": "86964e42-79dc-4267-a2ca-3612c4b095a8",
"deactivatedBy": "86964e42-79dc-4267-a2ca-3612c4b095a8",
"deactivatedAt": "2026-02-25T18:13:48.113Z",
"deactivationReason": "re",
"createdAt": "2026-02-19T07:50:17.042Z",
"updatedAt": "2026-02-25T18:13:48.101Z"
}
]
message
string
Exemple:

"Rate history retrieved successfully"

meta
object
statusCode
number
Exemple:

200