Get order
curl --request GET \
--url https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}', 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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "018e53c4-cd35-7863-be61-924932bfd862",
"profileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountIdFrom": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountIdTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pair": "USDT/EUR",
"side": "buy",
"volume": "42",
"settings": {
"type": "market",
"desiredPrice": "42"
},
"state": {
"status": "initiated"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"charge": {
"percentage": 0.5,
"contractId": "regularContract"
}
}"see Schema for possible responses""see Schema for possible responses"Crypto
Get order
Eventually consistent operation. May not include the recently created orders.
GET
/
orders
/
{orderId}
Get order
curl --request GET \
--url https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}', 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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox1-dev.finhost.io/crypto-exchange/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "018e53c4-cd35-7863-be61-924932bfd862",
"profileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountIdFrom": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountIdTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pair": "USDT/EUR",
"side": "buy",
"volume": "42",
"settings": {
"type": "market",
"desiredPrice": "42"
},
"state": {
"status": "initiated"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"charge": {
"percentage": 0.5,
"contractId": "regularContract"
}
}"see Schema for possible responses""see Schema for possible responses"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Order ID Order ID (uuid version 7)
Example:
"018e53c4-cd35-7863-be61-924932bfd862"
Query Parameters
Company ID
Response
OK
Order ID (uuid version 7)
Example:
"018e53c4-cd35-7863-be61-924932bfd862"
Profile ID
Account ID from which funds are taken
Account ID to which funds are sent
Order pair
Pattern:
^[a-zA-Z0-9]{1,16}\/[a-zA-Z0-9]{1,16}$Examples:
"USDT/EUR"
"BTC/EUR"
"1INCH/USDT"
Order side
Available options:
buy, sell Order volume. If BUYING, the volume is in QUOTE currency. If SELLING, the volume is in BASE currency
Required string length:
1 - 36Examples:
"42"
"4.2"
"4.20"
Market order (executes immediately at the current market price)
- Option 1
- Option 2
Show child attributes
Show child attributes
Order initiated
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Created date
Updated date
Charge info
Show child attributes
Show child attributes