Cash balance (available / reserved)
curl --request GET \
--url https://api.omnibook.xyz/v1/portfolio/balance \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>'import requests
url = "https://api.omnibook.xyz/v1/portfolio/balance"
headers = {
"DX-ACCESS-KEY": "<api-key>",
"DX-ACCESS-TIMESTAMP": "<api-key>",
"DX-ACCESS-SIGNATURE": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'DX-ACCESS-KEY': '<api-key>',
'DX-ACCESS-TIMESTAMP': '<api-key>',
'DX-ACCESS-SIGNATURE': '<api-key>'
}
};
fetch('https://api.omnibook.xyz/v1/portfolio/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"available": "1250000",
"reserved": "300000",
"bonus_locked": "2000",
"withdrawable": "1248000",
"as_of_seq": "182390"
}{
"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"
}
}
}Cash balance (available / reserved)
GET
/
v1
/
portfolio
/
balance
Cash balance (available / reserved)
curl --request GET \
--url https://api.omnibook.xyz/v1/portfolio/balance \
--header 'DX-ACCESS-KEY: <api-key>' \
--header 'DX-ACCESS-SIGNATURE: <api-key>' \
--header 'DX-ACCESS-TIMESTAMP: <api-key>'import requests
url = "https://api.omnibook.xyz/v1/portfolio/balance"
headers = {
"DX-ACCESS-KEY": "<api-key>",
"DX-ACCESS-TIMESTAMP": "<api-key>",
"DX-ACCESS-SIGNATURE": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'DX-ACCESS-KEY': '<api-key>',
'DX-ACCESS-TIMESTAMP': '<api-key>',
'DX-ACCESS-SIGNATURE': '<api-key>'
}
};
fetch('https://api.omnibook.xyz/v1/portfolio/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"available": "1250000",
"reserved": "300000",
"bonus_locked": "2000",
"withdrawable": "1248000",
"as_of_seq": "182390"
}{
"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"
}
}
}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.
Response
Cash balance in pips (1 pip = 0.01¢; $1 = 10000).
pips
Pattern:
^[0-9]+$Example:
"182390"
open-buy reservations + pending withdrawals
Pattern:
^[0-9]+$Example:
"182390"
non-withdrawable marker already included in available
Pattern:
^[0-9]+$Example:
"182390"
max(available - bonus_locked
Pattern:
^[0-9]+$Example:
"182390"
A u64-domain value rendered as a decimal string.
Pattern:
^[0-9]+$Example:
"182390"
⌘I