curl --request POST \
--url https://api.omnibook.xyz/v1/portfolio/orders \
--header 'Content-Type: application/json' \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2
}
'import requests
url = "https://api.omnibook.xyz/v1/portfolio/orders"
payload = {
"client_order_id": "182390",
"market_id": 123,
"qty": 2
}
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({client_order_id: '182390', market_id: 123, qty: 2})
};
fetch('https://api.omnibook.xyz/v1/portfolio/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order_id": "16777291",
"client_order_id": "42",
"status": "partially_filled",
"seq": "182391",
"filled_qty": 100,
"resting_qty": 400,
"fills": [
{
"tick_yes": 3500,
"qty": 100,
"path": "direct"
}
]
}{
"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": "duplicate_client_order_id",
"num": 259,
"origin": "core",
"message": "duplicate_client_order_id",
"details": null
}
}{
"error": {
"code": "insufficient_balance",
"num": 257,
"origin": "core",
"message": "insufficient_balance",
"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
}
}{
"error": {
"code": "sequencing_timeout",
"num": null,
"origin": "gateway",
"message": "sequencing_timeout",
"details": null
}
}Place an order
Closed request schema — an unknown field is 400 unknown_field. The
201 reports the actual sequenced outcome (the gateway holds the
request through ack-by-observation), not a synthesized “accepted”.
Execution outcomes (post-only cross, FOK/IOC, STP, max-cost) return
201 with status: "canceled" and a reason — they are not errors. Reservation and fee accounting are absent here; they
arrive on the WS user channel or via the balance read.
curl --request POST \
--url https://api.omnibook.xyz/v1/portfolio/orders \
--header 'Content-Type: application/json' \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>' \
--data '
{
"client_order_id": "182390",
"market_id": 123,
"qty": 2
}
'import requests
url = "https://api.omnibook.xyz/v1/portfolio/orders"
payload = {
"client_order_id": "182390",
"market_id": 123,
"qty": 2
}
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({client_order_id: '182390', market_id: 123, qty: 2})
};
fetch('https://api.omnibook.xyz/v1/portfolio/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order_id": "16777291",
"client_order_id": "42",
"status": "partially_filled",
"seq": "182391",
"filled_qty": 100,
"resting_qty": 400,
"fills": [
{
"tick_yes": 3500,
"qty": 100,
"path": "direct"
}
]
}{
"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": "duplicate_client_order_id",
"num": 259,
"origin": "core",
"message": "duplicate_client_order_id",
"details": null
}
}{
"error": {
"code": "insufficient_balance",
"num": 257,
"origin": "core",
"message": "insufficient_balance",
"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
}
}{
"error": {
"code": "sequencing_timeout",
"num": null,
"origin": "gateway",
"message": "sequencing_timeout",
"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
Closed schema — unknown field ⇒ 400.
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
The sequenced placement outcome.
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