curl --request POST \
--url https://api.raeth.exchange/v1/portfolio/orders/batch \
--header 'Content-Type: application/json' \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 50,
"worst_tick": 50,
"expiry_ts": "182390",
"max_cost": "182390",
"group_id": 0,
"post_only": false,
"reduce_only": false,
"cancel_on_pause": false,
"stp_maker": false
}
]
}
'import requests
url = "https://api.raeth.exchange/v1/portfolio/orders/batch"
payload = { "orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 50,
"worst_tick": 50,
"expiry_ts": "182390",
"max_cost": "182390",
"group_id": 0,
"post_only": False,
"reduce_only": False,
"cancel_on_pause": False,
"stp_maker": False
}
] }
headers = {
"DX-ACCESS-KEY": "<api-key>",
"DX-ACCESS-TIMESTAMP": "<api-key>",
"DX-ACCESS-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'DX-ACCESS-KEY': '<api-key>',
'DX-ACCESS-TIMESTAMP': '<api-key>',
'DX-ACCESS-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orders: [
{
client_order_id: '182390',
market_id: 123,
qty: 2,
tick: 50,
worst_tick: 50,
expiry_ts: '182390',
max_cost: '182390',
group_id: 0,
post_only: false,
reduce_only: false,
cancel_on_pause: false,
stp_maker: false
}
]
})
};
fetch('https://api.raeth.exchange/v1/portfolio/orders/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.raeth.exchange/v1/portfolio/orders/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([
'orders' => [
[
'client_order_id' => '182390',
'market_id' => 123,
'qty' => 2,
'tick' => 50,
'worst_tick' => 50,
'expiry_ts' => '182390',
'max_cost' => '182390',
'group_id' => 0,
'post_only' => false,
'reduce_only' => false,
'cancel_on_pause' => false,
'stp_maker' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"DX-ACCESS-KEY: <api-key>",
"DX-ACCESS-SIGNATURE: <api-key>",
"DX-ACCESS-TIMESTAMP: <api-key>"
],
]);
$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.raeth.exchange/v1/portfolio/orders/batch"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("DX-ACCESS-KEY", "<api-key>")
req.Header.Add("DX-ACCESS-TIMESTAMP", "<api-key>")
req.Header.Add("DX-ACCESS-SIGNATURE", "<api-key>")
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.raeth.exchange/v1/portfolio/orders/batch")
.header("DX-ACCESS-KEY", "<api-key>")
.header("DX-ACCESS-TIMESTAMP", "<api-key>")
.header("DX-ACCESS-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raeth.exchange/v1/portfolio/orders/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["DX-ACCESS-KEY"] = '<api-key>'
request["DX-ACCESS-TIMESTAMP"] = '<api-key>'
request["DX-ACCESS-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"order_id": "182390",
"client_order_id": "182390",
"seq": "182390",
"filled_qty": 123,
"resting_qty": 123,
"fills": [
{
"tick_yes": 50,
"qty": 123
}
],
"reason": "<string>"
}
]{
"error": {
"code": "unknown_field",
"num": null,
"origin": "gateway",
"message": "unknown_field",
"details": null
}
}{
"error": {
"code": "unauthorized",
"num": null,
"origin": "gateway",
"message": "unauthorized",
"details": null
}
}{
"error": {
"code": "missing_scope",
"num": null,
"origin": "gateway",
"message": "missing_scope",
"details": null
}
}{
"error": {
"code": "rate_limited",
"num": null,
"origin": "gateway",
"message": "rate_limited",
"details": null
}
}{
"error": {
"code": "shed",
"num": null,
"origin": "gateway",
"message": "shed",
"details": null
}
}Place up to 20 orders
Fanned into independent commands (api.md §6.9). The response is per-item and index-aligned: each entry is either a placement response or an error object. Partial success is normal, not an error. Costs N write tokens.
curl --request POST \
--url https://api.raeth.exchange/v1/portfolio/orders/batch \
--header 'Content-Type: application/json' \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 50,
"worst_tick": 50,
"expiry_ts": "182390",
"max_cost": "182390",
"group_id": 0,
"post_only": false,
"reduce_only": false,
"cancel_on_pause": false,
"stp_maker": false
}
]
}
'import requests
url = "https://api.raeth.exchange/v1/portfolio/orders/batch"
payload = { "orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 50,
"worst_tick": 50,
"expiry_ts": "182390",
"max_cost": "182390",
"group_id": 0,
"post_only": False,
"reduce_only": False,
"cancel_on_pause": False,
"stp_maker": False
}
] }
headers = {
"DX-ACCESS-KEY": "<api-key>",
"DX-ACCESS-TIMESTAMP": "<api-key>",
"DX-ACCESS-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'DX-ACCESS-KEY': '<api-key>',
'DX-ACCESS-TIMESTAMP': '<api-key>',
'DX-ACCESS-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
orders: [
{
client_order_id: '182390',
market_id: 123,
qty: 2,
tick: 50,
worst_tick: 50,
expiry_ts: '182390',
max_cost: '182390',
group_id: 0,
post_only: false,
reduce_only: false,
cancel_on_pause: false,
stp_maker: false
}
]
})
};
fetch('https://api.raeth.exchange/v1/portfolio/orders/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.raeth.exchange/v1/portfolio/orders/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([
'orders' => [
[
'client_order_id' => '182390',
'market_id' => 123,
'qty' => 2,
'tick' => 50,
'worst_tick' => 50,
'expiry_ts' => '182390',
'max_cost' => '182390',
'group_id' => 0,
'post_only' => false,
'reduce_only' => false,
'cancel_on_pause' => false,
'stp_maker' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"DX-ACCESS-KEY: <api-key>",
"DX-ACCESS-SIGNATURE: <api-key>",
"DX-ACCESS-TIMESTAMP: <api-key>"
],
]);
$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.raeth.exchange/v1/portfolio/orders/batch"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("DX-ACCESS-KEY", "<api-key>")
req.Header.Add("DX-ACCESS-TIMESTAMP", "<api-key>")
req.Header.Add("DX-ACCESS-SIGNATURE", "<api-key>")
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.raeth.exchange/v1/portfolio/orders/batch")
.header("DX-ACCESS-KEY", "<api-key>")
.header("DX-ACCESS-TIMESTAMP", "<api-key>")
.header("DX-ACCESS-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raeth.exchange/v1/portfolio/orders/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["DX-ACCESS-KEY"] = '<api-key>'
request["DX-ACCESS-TIMESTAMP"] = '<api-key>'
request["DX-ACCESS-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"client_order_id\": \"182390\",\n \"market_id\": 123,\n \"qty\": 2,\n \"tick\": 50,\n \"worst_tick\": 50,\n \"expiry_ts\": \"182390\",\n \"max_cost\": \"182390\",\n \"group_id\": 0,\n \"post_only\": false,\n \"reduce_only\": false,\n \"cancel_on_pause\": false,\n \"stp_maker\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"order_id": "182390",
"client_order_id": "182390",
"seq": "182390",
"filled_qty": 123,
"resting_qty": 123,
"fills": [
{
"tick_yes": 50,
"qty": 123
}
],
"reason": "<string>"
}
]{
"error": {
"code": "unknown_field",
"num": null,
"origin": "gateway",
"message": "unknown_field",
"details": null
}
}{
"error": {
"code": "unauthorized",
"num": null,
"origin": "gateway",
"message": "unauthorized",
"details": null
}
}{
"error": {
"code": "missing_scope",
"num": null,
"origin": "gateway",
"message": "missing_scope",
"details": null
}
}{
"error": {
"code": "rate_limited",
"num": null,
"origin": "gateway",
"message": "rate_limited",
"details": null
}
}{
"error": {
"code": "shed",
"num": null,
"origin": "gateway",
"message": "shed",
"details": null
}
}Authorizations
The API key id (decimal string).
Request timestamp, Unix milliseconds (decimal). ±5000 ms replay window.
base64(HMAC-SHA256(secret, "timestamp\nMETHOD\npath?query\nbody")). For the WS handshake the body is empty and the path is /v1/ws.
Body
1 - 20 elementsShow child attributes
Show child attributes
Response
Per-item, index-aligned results (api.md §6.9).
- Option 1
- Option 2
The sequenced placement outcome (api.md §6.5).
A u64-domain value rendered as a decimal string (api.md §1).
^[0-9]+$"182390"
A u64-domain value rendered as a decimal string (api.md §1).
^[0-9]+$"182390"
resting, partially_filled, executed, canceled the NEW_ORDER's stamp
^[0-9]+$"182390"
Show child attributes
Show child attributes
present when status is canceled (execution outcome