Batch Amend Orders
curl --request POST \
--url https://api.cnt.ekiden.fi/api/v1/order/amend-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": [
{
"price": "<string>",
"qty": "<string>",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_iv": 1,
"order_link_id": "<string>",
"tpsl": {
"stop_loss": {
"market": {
"trigger_price": "<string>"
}
},
"take_profit": {
"market": {
"trigger_price": "<string>"
}
}
},
"trigger": {
"trigger_price": "<string>"
}
}
],
"await_outcome": true
}
'import requests
url = "https://api.cnt.ekiden.fi/api/v1/order/amend-batch"
payload = {
"request": [
{
"price": "<string>",
"qty": "<string>",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_iv": 1,
"order_link_id": "<string>",
"tpsl": {
"stop_loss": { "market": { "trigger_price": "<string>" } },
"take_profit": { "market": { "trigger_price": "<string>" } }
},
"trigger": { "trigger_price": "<string>" }
}
],
"await_outcome": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request: [
{
price: '<string>',
qty: '<string>',
sub_account_address: '<string>',
symbol: 'BTC-USDCx',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
order_iv: 1,
order_link_id: '<string>',
tpsl: {
stop_loss: {market: {trigger_price: '<string>'}},
take_profit: {market: {trigger_price: '<string>'}}
},
trigger: {trigger_price: '<string>'}
}
],
await_outcome: true
})
};
fetch('https://api.cnt.ekiden.fi/api/v1/order/amend-batch', 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/amend-batch",
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([
'request' => [
[
'price' => '<string>',
'qty' => '<string>',
'sub_account_address' => '<string>',
'symbol' => 'BTC-USDCx',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order_iv' => 1,
'order_link_id' => '<string>',
'tpsl' => [
'stop_loss' => [
'market' => [
'trigger_price' => '<string>'
]
],
'take_profit' => [
'market' => [
'trigger_price' => '<string>'
]
]
],
'trigger' => [
'trigger_price' => '<string>'
]
]
],
'await_outcome' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cnt.ekiden.fi/api/v1/order/amend-batch"
payload := strings.NewReader("{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.cnt.ekiden.fi/api/v1/order/amend-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnt.ekiden.fi/api/v1/order/amend-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}"
response = http.request(request)
puts response.read_body{
"exit_info": [
{
"Error": {
"code": 1,
"msg": "<string>"
}
}
],
"result": [
{
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_link_id": "<string>"
}
],
"time": "1672531200000"
}Trade
Batch Amend Orders
Amend multiple existing orders in a single request
POST
/
api
/
v1
/
order
/
amend-batch
Batch Amend Orders
curl --request POST \
--url https://api.cnt.ekiden.fi/api/v1/order/amend-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": [
{
"price": "<string>",
"qty": "<string>",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_iv": 1,
"order_link_id": "<string>",
"tpsl": {
"stop_loss": {
"market": {
"trigger_price": "<string>"
}
},
"take_profit": {
"market": {
"trigger_price": "<string>"
}
}
},
"trigger": {
"trigger_price": "<string>"
}
}
],
"await_outcome": true
}
'import requests
url = "https://api.cnt.ekiden.fi/api/v1/order/amend-batch"
payload = {
"request": [
{
"price": "<string>",
"qty": "<string>",
"sub_account_address": "<string>",
"symbol": "BTC-USDCx",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_iv": 1,
"order_link_id": "<string>",
"tpsl": {
"stop_loss": { "market": { "trigger_price": "<string>" } },
"take_profit": { "market": { "trigger_price": "<string>" } }
},
"trigger": { "trigger_price": "<string>" }
}
],
"await_outcome": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request: [
{
price: '<string>',
qty: '<string>',
sub_account_address: '<string>',
symbol: 'BTC-USDCx',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
order_iv: 1,
order_link_id: '<string>',
tpsl: {
stop_loss: {market: {trigger_price: '<string>'}},
take_profit: {market: {trigger_price: '<string>'}}
},
trigger: {trigger_price: '<string>'}
}
],
await_outcome: true
})
};
fetch('https://api.cnt.ekiden.fi/api/v1/order/amend-batch', 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/amend-batch",
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([
'request' => [
[
'price' => '<string>',
'qty' => '<string>',
'sub_account_address' => '<string>',
'symbol' => 'BTC-USDCx',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order_iv' => 1,
'order_link_id' => '<string>',
'tpsl' => [
'stop_loss' => [
'market' => [
'trigger_price' => '<string>'
]
],
'take_profit' => [
'market' => [
'trigger_price' => '<string>'
]
]
],
'trigger' => [
'trigger_price' => '<string>'
]
]
],
'await_outcome' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cnt.ekiden.fi/api/v1/order/amend-batch"
payload := strings.NewReader("{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.cnt.ekiden.fi/api/v1/order/amend-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cnt.ekiden.fi/api/v1/order/amend-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": [\n {\n \"price\": \"<string>\",\n \"qty\": \"<string>\",\n \"sub_account_address\": \"<string>\",\n \"symbol\": \"BTC-USDCx\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_iv\": 1,\n \"order_link_id\": \"<string>\",\n \"tpsl\": {\n \"stop_loss\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n },\n \"take_profit\": {\n \"market\": {\n \"trigger_price\": \"<string>\"\n }\n }\n },\n \"trigger\": {\n \"trigger_price\": \"<string>\"\n }\n }\n ],\n \"await_outcome\": true\n}"
response = http.request(request)
puts response.read_body{
"exit_info": [
{
"Error": {
"code": 1,
"msg": "<string>"
}
}
],
"result": [
{
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_link_id": "<string>"
}
],
"time": "1672531200000"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Batch amend order request. You can amend unfilled or partially filled orders. TODO: Maximum 20 orders per request
⌘I