Get Ledgers Info
curl --request POST \
--url https://gateway.varchev.com/crypto/getLedgersInfo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenantId: <tenantid>' \
--data '
{
"nonce": 79782943,
"asset": "all",
"aclass": "currency",
"type": "all",
"start": "-31344384",
"end": 32841065,
"ofs": "-48056751"
}
'import requests
url = "https://gateway.varchev.com/crypto/getLedgersInfo"
payload = {
"nonce": 79782943,
"asset": "all",
"aclass": "currency",
"type": "all",
"start": "-31344384",
"end": 32841065,
"ofs": "-48056751"
}
headers = {
"tenantId": "<tenantid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
tenantId: '<tenantid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
nonce: 79782943,
asset: 'all',
aclass: 'currency',
type: 'all',
start: '-31344384',
end: 32841065,
ofs: '-48056751'
})
};
fetch('https://gateway.varchev.com/crypto/getLedgersInfo', 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://gateway.varchev.com/crypto/getLedgersInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nonce' => 79782943,
'asset' => 'all',
'aclass' => 'currency',
'type' => 'all',
'start' => '-31344384',
'end' => 32841065,
'ofs' => '-48056751'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"tenantId: <tenantid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.varchev.com/crypto/getLedgersInfo"
payload := strings.NewReader("{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("tenantId", "<tenantid>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.varchev.com/crypto/getLedgersInfo")
.header("tenantId", "<tenantid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.varchev.com/crypto/getLedgersInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["tenantId"] = '<tenantid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}"
response = http.request(request)
puts response.read_body{
"error": [],
"result": {
"ledger": {
"L4UESK-KG3EQ-UFO4T5": {
"refid": "TJKLXF-PGMUI-4NTLXU",
"time": 1610464484.1787,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.5000",
"fee": "0.0490",
"balance": "459567.9171"
},
"LMKZCZ-Z3GVL-CXKK4H": {
"refid": "TBZIP2-F6QOU-TMB6FY",
"time": 1610444262.8888,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459592.4661"
},
"L62PIO-H6GVL-RU7P2V": {
"refid": "TJ6FXZ-NW2GP-7MUKRH",
"time": 1610444237.1186,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459591.4819"
},
"LYMXD5-CQXKP-YBJUC5": {
"refid": "TQETZH-4IU6L-Y7A6MX",
"time": 1610443726.5242,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459590.4977"
},
"LTS2VY-3V54Z-UYMBJE": {
"refid": "TRTH6D-XH4OI-AWHIPE",
"time": 1610443700.5213,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459589.5135"
},
"LBPAFZ-VIWB4-3LEIZK": {
"refid": "THW22F-LGPSJ-JF75IZ",
"time": 1610443673.6795,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459588.5293"
},
"L6FQNL-X2KVP-EK3B6P": {
"refid": "TQE4OJ-2SS75-DVZXUS",
"time": 1610411381.7107,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7360",
"fee": "0.0247",
"balance": "459587.5451"
},
"LI25LJ-HGRV5-3XTQ4S": {
"refid": "TYD2KL-FYR3T-TAK3GQ",
"time": 1610411299.5976,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7370",
"fee": "0.0247",
"balance": "459612.3058"
},
"LOZQ2J-KQMA7-ONUKJQ": {
"refid": "TNDLFB-VMRSR-VREQZH",
"time": 1610411228.747,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7090",
"fee": "0.0494",
"balance": "459637.0675"
},
"L27TEO-QPDH4-O5FHKS": {
"refid": "TOYTLL-3AJZI-J3SASM",
"time": 1610411228.7432,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-22.0000",
"fee": "0.0440",
"balance": "459661.8259"
},
"LIXT22-MNMIS-AILGP7": {
"refid": "TSHOGM-MIWTA-WLBGWW",
"time": 1610124514.0877,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-1.6370",
"fee": "0.0016",
"balance": "459683.8699"
},
"L3DSXB-EDXWW-FWGY6E": {
"refid": "TGW4MX-E624F-MG6QZA",
"time": 1610124514.0858,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.0950",
"fee": "0.0021",
"balance": "459685.5085"
},
"LTIAS4-WQEAS-4VEU5O": {
"refid": "TBAUTS-6WHY3-YMLIDI",
"time": 1610124514.0841,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1280",
"fee": "0.0021",
"balance": "459687.6056"
},
"LBXAYN-2PKLC-5HQYUP": {
"refid": "T4JWBD-6JM4T-CIHS5E",
"time": 1610124514.0821,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1280",
"fee": "0.0021",
"balance": "459689.7357"
},
"L77IRV-V5QGW-XFIVFT": {
"refid": "TA3YRJ-H3UBH-GW5NFU",
"time": 1610124514.08,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1620",
"fee": "0.0022",
"balance": "459691.8658"
}
},
"count": 15
}
}Private
Get Ledgers Info
Retrieve information about ledger entries. 50 results are returned at a time, the most recent by default.
POST
/
getLedgersInfo
Get Ledgers Info
curl --request POST \
--url https://gateway.varchev.com/crypto/getLedgersInfo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenantId: <tenantid>' \
--data '
{
"nonce": 79782943,
"asset": "all",
"aclass": "currency",
"type": "all",
"start": "-31344384",
"end": 32841065,
"ofs": "-48056751"
}
'import requests
url = "https://gateway.varchev.com/crypto/getLedgersInfo"
payload = {
"nonce": 79782943,
"asset": "all",
"aclass": "currency",
"type": "all",
"start": "-31344384",
"end": 32841065,
"ofs": "-48056751"
}
headers = {
"tenantId": "<tenantid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
tenantId: '<tenantid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
nonce: 79782943,
asset: 'all',
aclass: 'currency',
type: 'all',
start: '-31344384',
end: 32841065,
ofs: '-48056751'
})
};
fetch('https://gateway.varchev.com/crypto/getLedgersInfo', 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://gateway.varchev.com/crypto/getLedgersInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nonce' => 79782943,
'asset' => 'all',
'aclass' => 'currency',
'type' => 'all',
'start' => '-31344384',
'end' => 32841065,
'ofs' => '-48056751'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"tenantId: <tenantid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.varchev.com/crypto/getLedgersInfo"
payload := strings.NewReader("{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("tenantId", "<tenantid>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.varchev.com/crypto/getLedgersInfo")
.header("tenantId", "<tenantid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.varchev.com/crypto/getLedgersInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["tenantId"] = '<tenantid>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": 79782943,\n \"asset\": \"all\",\n \"aclass\": \"currency\",\n \"type\": \"all\",\n \"start\": \"-31344384\",\n \"end\": 32841065,\n \"ofs\": \"-48056751\"\n}"
response = http.request(request)
puts response.read_body{
"error": [],
"result": {
"ledger": {
"L4UESK-KG3EQ-UFO4T5": {
"refid": "TJKLXF-PGMUI-4NTLXU",
"time": 1610464484.1787,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.5000",
"fee": "0.0490",
"balance": "459567.9171"
},
"LMKZCZ-Z3GVL-CXKK4H": {
"refid": "TBZIP2-F6QOU-TMB6FY",
"time": 1610444262.8888,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459592.4661"
},
"L62PIO-H6GVL-RU7P2V": {
"refid": "TJ6FXZ-NW2GP-7MUKRH",
"time": 1610444237.1186,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459591.4819"
},
"LYMXD5-CQXKP-YBJUC5": {
"refid": "TQETZH-4IU6L-Y7A6MX",
"time": 1610443726.5242,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459590.4977"
},
"LTS2VY-3V54Z-UYMBJE": {
"refid": "TRTH6D-XH4OI-AWHIPE",
"time": 1610443700.5213,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459589.5135"
},
"LBPAFZ-VIWB4-3LEIZK": {
"refid": "THW22F-LGPSJ-JF75IZ",
"time": 1610443673.6795,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "0.9852",
"fee": "0.0010",
"balance": "459588.5293"
},
"L6FQNL-X2KVP-EK3B6P": {
"refid": "TQE4OJ-2SS75-DVZXUS",
"time": 1610411381.7107,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7360",
"fee": "0.0247",
"balance": "459587.5451"
},
"LI25LJ-HGRV5-3XTQ4S": {
"refid": "TYD2KL-FYR3T-TAK3GQ",
"time": 1610411299.5976,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7370",
"fee": "0.0247",
"balance": "459612.3058"
},
"LOZQ2J-KQMA7-ONUKJQ": {
"refid": "TNDLFB-VMRSR-VREQZH",
"time": 1610411228.747,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-24.7090",
"fee": "0.0494",
"balance": "459637.0675"
},
"L27TEO-QPDH4-O5FHKS": {
"refid": "TOYTLL-3AJZI-J3SASM",
"time": 1610411228.7432,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-22.0000",
"fee": "0.0440",
"balance": "459661.8259"
},
"LIXT22-MNMIS-AILGP7": {
"refid": "TSHOGM-MIWTA-WLBGWW",
"time": 1610124514.0877,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-1.6370",
"fee": "0.0016",
"balance": "459683.8699"
},
"L3DSXB-EDXWW-FWGY6E": {
"refid": "TGW4MX-E624F-MG6QZA",
"time": 1610124514.0858,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.0950",
"fee": "0.0021",
"balance": "459685.5085"
},
"LTIAS4-WQEAS-4VEU5O": {
"refid": "TBAUTS-6WHY3-YMLIDI",
"time": 1610124514.0841,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1280",
"fee": "0.0021",
"balance": "459687.6056"
},
"LBXAYN-2PKLC-5HQYUP": {
"refid": "T4JWBD-6JM4T-CIHS5E",
"time": 1610124514.0821,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1280",
"fee": "0.0021",
"balance": "459689.7357"
},
"L77IRV-V5QGW-XFIVFT": {
"refid": "TA3YRJ-H3UBH-GW5NFU",
"time": 1610124514.08,
"type": "trade",
"subtype": "",
"aclass": "currency",
"asset": "ZGBP",
"amount": "-2.1620",
"fee": "0.0022",
"balance": "459691.8658"
}
},
"count": 15
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
(Required)
Example:
79782943
Comma delimited list of assets to restrict output to
Example:
"all"
Asset class
Example:
"currency"
Type of ledger to retrieve
Example:
"all"
Starting unix timestamp or ledger ID of results (exclusive)
Example:
"-31344384"
Ending unix timestamp or ledger ID of results (inclusive)
Example:
32841065
Result offset for pagination
Example:
"-48056751"
Response
200 - application/json
OK
The response is of type object.
⌘I

