curl --request POST \
--url https://api.omnibook.xyz/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": 5000,
"worst_tick": 5000,
"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.omnibook.xyz/v1/portfolio/orders/batch"
payload = { "orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 5000,
"worst_tick": 5000,
"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: 5000,
worst_tick: 5000,
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.omnibook.xyz/v1/portfolio/orders/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"order_id": "182390",
"client_order_id": "182390",
"status": "resting",
"seq": "182390",
"filled_qty": 123,
"resting_qty": 123,
"fills": [
{
"tick_yes": 5000,
"qty": 123,
"path": "direct"
}
],
"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": {
"retry_after_ms": "10"
}
}
}{
"error": {
"code": "shed",
"num": null,
"origin": "gateway",
"message": "shed",
"details": null
}
}Place up to 20 orders
Fanned into independent commands. 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.omnibook.xyz/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": 5000,
"worst_tick": 5000,
"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.omnibook.xyz/v1/portfolio/orders/batch"
payload = { "orders": [
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2,
"tick": 5000,
"worst_tick": 5000,
"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: 5000,
worst_tick: 5000,
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.omnibook.xyz/v1/portfolio/orders/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"order_id": "182390",
"client_order_id": "182390",
"status": "resting",
"seq": "182390",
"filled_qty": 123,
"resting_qty": 123,
"fills": [
{
"tick_yes": 5000,
"qty": 123,
"path": "direct"
}
],
"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": {
"retry_after_ms": "10"
}
}
}{
"error": {
"code": "shed",
"num": null,
"origin": "gateway",
"message": "shed",
"details": null
}
}Authorizations
The public API key (alphanumeric access_key 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 elementsHide child attributes
Hide child attributes
idempotency key
^[0-9]+$"182390"
buy, sell yes, no limit, market x >= 1limit only
1 <= x <= 9999market only, optional; marketable-limit bound (default 9999 buy / 1 sell)
1 <= x <= 9999limit only; market ⇒ forced ioc
gtc, gtt, ioc, fok ns; gtt only
^[0-9]+$"182390"
pips; required for market buys
^[0-9]+$"182390"
Response
Per-item, index-aligned results.
- Option 1
- Option 2
The sequenced placement outcome.
A u64-domain value rendered as a decimal string.
^[0-9]+$"182390"
A u64-domain value rendered as a decimal string.
^[0-9]+$"182390"
resting, partially_filled, executed, canceled the NEW_ORDER's stamp
^[0-9]+$"182390"
Hide child attributes
Hide child attributes
present when status is canceled