Positions per (market, outcome)
curl --request GET \
--url https://api.omnibook.xyz/v1/portfolio/positions \
--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/positions"
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/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"positions": [
{
"market_id": 123,
"outcome": "yes",
"free": 123,
"reserved_for_sale": 123
}
],
"cursor": "<string>",
"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"
}
}
}Positions per (market, outcome)
GET
/
v1
/
portfolio
/
positions
Positions per (market, outcome)
curl --request GET \
--url https://api.omnibook.xyz/v1/portfolio/positions \
--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/positions"
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/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"positions": [
{
"market_id": 123,
"outcome": "yes",
"free": 123,
"reserved_for_sale": 123
}
],
"cursor": "<string>",
"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.
Query Parameters
Opaque pagination cursor from a prior response; omit for the first page.
Page size.
Required range:
1 <= x <= 1000Response
A page of positions.
A u64-domain value rendered as a decimal string.
Pattern:
^[0-9]+$Example:
"182390"
⌘I