Get Open & Closed Orders
curl --request GET \
--url https://api.cnt.ekiden.fi/api/v1/order/realtime \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cnt.ekiden.fi/api/v1/order/realtime"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cnt.ekiden.fi/api/v1/order/realtime', 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.cnt.ekiden.fi/api/v1/order/realtime",
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.cnt.ekiden.fi/api/v1/order/realtime"
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.cnt.ekiden.fi/api/v1/order/realtime")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnt.ekiden.fi/api/v1/order/realtime")
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{
"list": [
{
"avg_price": "<string>",
"close_on_trigger": true,
"created_time": "1672531200000",
"cum_exec_fee": "<string>",
"cum_exec_qty": "<string>",
"cum_exec_value": "<string>",
"last_price_on_created": "<string>",
"leaves_qty": "<string>",
"leaves_value": "<string>",
"margin_mode": "Cross",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_status": "New",
"order_type": "Limit",
"post_only": true,
"price": "<string>",
"qty": "<string>",
"reduce_only": true,
"side": "Sell",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"time_in_force": "GTC",
"updated_time": "1672531200000",
"cancel_type": "CancelByUser",
"closed_pnl": "<string>",
"create_type": "CreateByUser",
"expire_time": "1672531200000",
"order_link_id": "<string>",
"reject_reason": "EcNoError",
"stop_order_type": "TakeProfit",
"tpsl": {
"mode": "Full",
"stop_loss": {
"market": {
"trigger_by": "LastPrice",
"trigger_price": "<string>"
}
},
"take_profit": {
"market": {
"trigger_by": "LastPrice",
"trigger_price": "<string>"
}
}
},
"trigger": {
"trigger_by": "LastPrice",
"trigger_direction": "Up",
"trigger_price": "<string>"
}
}
],
"next_page_cursor": "<string>"
}Trade
Get Open & Closed Orders
Primarily query unfilled or partially filled orders in real-time, but also supports querying recent 500 closed status (Cancelled, Filled) orders. Please see the usage of request param open_only.
GET
/
api
/
v1
/
order
/
realtime
Get Open & Closed Orders
curl --request GET \
--url https://api.cnt.ekiden.fi/api/v1/order/realtime \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cnt.ekiden.fi/api/v1/order/realtime"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cnt.ekiden.fi/api/v1/order/realtime', 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.cnt.ekiden.fi/api/v1/order/realtime",
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.cnt.ekiden.fi/api/v1/order/realtime"
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.cnt.ekiden.fi/api/v1/order/realtime")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnt.ekiden.fi/api/v1/order/realtime")
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{
"list": [
{
"avg_price": "<string>",
"close_on_trigger": true,
"created_time": "1672531200000",
"cum_exec_fee": "<string>",
"cum_exec_qty": "<string>",
"cum_exec_value": "<string>",
"last_price_on_created": "<string>",
"leaves_qty": "<string>",
"leaves_value": "<string>",
"margin_mode": "Cross",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_status": "New",
"order_type": "Limit",
"post_only": true,
"price": "<string>",
"qty": "<string>",
"reduce_only": true,
"side": "Sell",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"time_in_force": "GTC",
"updated_time": "1672531200000",
"cancel_type": "CancelByUser",
"closed_pnl": "<string>",
"create_type": "CreateByUser",
"expire_time": "1672531200000",
"order_link_id": "<string>",
"reject_reason": "EcNoError",
"stop_order_type": "TakeProfit",
"tpsl": {
"mode": "Full",
"stop_loss": {
"market": {
"trigger_by": "LastPrice",
"trigger_price": "<string>"
}
},
"take_profit": {
"market": {
"trigger_by": "LastPrice",
"trigger_price": "<string>"
}
}
},
"trigger": {
"trigger_by": "LastPrice",
"trigger_direction": "Up",
"trigger_price": "<string>"
}
}
],
"next_page_cursor": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Symbol name
Example:
"BTC-USDCx"
Order ID
User customised order ID
true(default): query open status orders (New or PartiallyFilled).false: query a maximum of recent 500 closed status orders (Cancelled, Rejected, Filled).
Required range:
x >= 0⌘I