Get Closed Orders
curl --request POST \
--url https://gateway.varchev.com/crypto/getClosedOrders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenantId: <tenantid>' \
--data '
{
"nonce": "-51296282",
"asset": "XBT.M",
"amount": "Duis consequat"
}
'import requests
url = "https://gateway.varchev.com/crypto/getClosedOrders"
payload = {
"nonce": "-51296282",
"asset": "XBT.M",
"amount": "Duis consequat"
}
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: '-51296282', asset: 'XBT.M', amount: 'Duis consequat'})
};
fetch('https://gateway.varchev.com/crypto/getClosedOrders', 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/getClosedOrders",
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' => '-51296282',
'asset' => 'XBT.M',
'amount' => 'Duis consequat'
]),
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/getClosedOrders"
payload := strings.NewReader("{\n \"nonce\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\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/getClosedOrders")
.header("tenantId", "<tenantid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.varchev.com/crypto/getClosedOrders")
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\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\n}"
response = http.request(request)
puts response.read_body{
"error": [],
"result": {
"closed": {
"O37652-RJWRT-IMO74O": {
"userref": 36493663,
"status": "canceled",
"reason": "User requested",
"opentm": 1616148493.7708,
"closetm": 1616148610.0482,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTGBP",
"type": "buy",
"ordertype": "Stop-loss-limit",
"price": "2506.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTGBP @ limit 2506.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
},
"O6YDQ5-LOMWU-37YKEE": {
"userref": 36493663,
"status": "canceled",
"reason": "User requested",
"opentm": 1616148493.7708,
"closetm": 1616148610.0477,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTGBP",
"type": "buy",
"ordertype": "take-profit-limit",
"price": "2518.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTGBP @ limit 2518.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
}
},
"count": 2
}
}Private
Get Closed Orders
Retrieve information about orders that have been closed (filled or cancelled). 50 results are returned at a time, the most recent by default.
Note: If an order’s tx ID is given for start or end time, the order’s opening time (opentm) is used
POST
/
getClosedOrders
Get Closed Orders
curl --request POST \
--url https://gateway.varchev.com/crypto/getClosedOrders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenantId: <tenantid>' \
--data '
{
"nonce": "-51296282",
"asset": "XBT.M",
"amount": "Duis consequat"
}
'import requests
url = "https://gateway.varchev.com/crypto/getClosedOrders"
payload = {
"nonce": "-51296282",
"asset": "XBT.M",
"amount": "Duis consequat"
}
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: '-51296282', asset: 'XBT.M', amount: 'Duis consequat'})
};
fetch('https://gateway.varchev.com/crypto/getClosedOrders', 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/getClosedOrders",
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' => '-51296282',
'asset' => 'XBT.M',
'amount' => 'Duis consequat'
]),
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/getClosedOrders"
payload := strings.NewReader("{\n \"nonce\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\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/getClosedOrders")
.header("tenantId", "<tenantid>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.varchev.com/crypto/getClosedOrders")
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\": \"-51296282\",\n \"asset\": \"XBT.M\",\n \"amount\": \"Duis consequat\"\n}"
response = http.request(request)
puts response.read_body{
"error": [],
"result": {
"closed": {
"O37652-RJWRT-IMO74O": {
"userref": 36493663,
"status": "canceled",
"reason": "User requested",
"opentm": 1616148493.7708,
"closetm": 1616148610.0482,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTGBP",
"type": "buy",
"ordertype": "Stop-loss-limit",
"price": "2506.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTGBP @ limit 2506.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
},
"O6YDQ5-LOMWU-37YKEE": {
"userref": 36493663,
"status": "canceled",
"reason": "User requested",
"opentm": 1616148493.7708,
"closetm": 1616148610.0477,
"starttm": 0,
"expiretm": 0,
"descr": {
"pair": "XBTGBP",
"type": "buy",
"ordertype": "take-profit-limit",
"price": "2518.0",
"price2": "0",
"leverage": "none",
"order": "buy 0.00100000 XBTGBP @ limit 2518.0",
"close": ""
},
"vol": "0.00100000",
"vol_exec": "0.00000000",
"cost": "0.00000",
"fee": "0.00000",
"price": "0.00000",
"stopprice": "0.00000",
"limitprice": "0.00000",
"misc": "",
"oflags": "fciq",
"trigger": "index"
}
},
"count": 2
}
}Headers
Tenant/Owner id
Body
application/json
Response
200 - application/json
OK
The response is of type object.
⌘I

