Private Queries
Private queries require login before use. They return account-specific data.
Open Orders Query
Example Request
{
"op": "query",
"args": [
{
"queryType": "openOrders",
"accountId": 1234,
"instrumentId": "ETH-PC-123456",
"pricerOnly": true,
"startId": 0
}
]
}
Example Response
{
"q": "openOrders",
"s": "ETH-PC-194361",
"P": [
{
"o": 61702036,
"c": "43f4159e",
"a": 2049,
"C": 53,
"t": 2,
"i": "ETH-PC-194361",
"m": 1000000194361,
"p": "0.00000000001",
"q": "1907125",
"F": "1907125",
"fp": "0.00001907125",
"f": "0.0000017164125",
"s": false,
"P": false,
"S": 10,
"d": 1739776227777,
"u": 1739776227777
},
{
"o": 61702196,
"c": "454057b4",
"a": 2049,
"C": 53,
"t": 2,
"i": "ETH-PC-194361",
"m": 1000000194361,
"p": "0.00000000001",
"q": "1864896",
"F": "1864896",
"fp": "0.00001864896",
"f": "0.0000016784064",
"s": false,
"P": false,
"S": 10,
"d": 1739776229952,
"u": 1739776229952
}
],
"a": 2049
}
Request
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,openOrders. |
└instrumentId | string | Instrument ID, e.g.,ETH-PC-1567. |
└startId | integer | (Optional) starting order ID in the query. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,openOrders. |
s | string | Instrument ID of the queried market, e.g.,ETH-PC-1567. |
a | string | Account ID, e.g.,1234. |
P | array | Array of order objects. |
└o | integer | Order ID, e.g.,1234. |
└c | string | Client Order ID, e.g.,43f4159e. |
└a | integer | Account ID. |
└C | integer | User ID who created this order. For pricer only. |
└t | boolean | Order Type. |
└i | string | Instrument ID. |
└m | integer | Market Id. |
└p | string | Order price. |
└q | string | Order total quantity. |
└F | string | Order filled quantity . |
└fp | string | Order filled price * quantity. |
└f | fee | Order fee. |
└s | boolean | Order side. |
└P | boolean | Flag for post-only order. |
└S | integer | Order Status. |
└d | integer | Timestamp of order creation time. |
└u | integer | Timestamp of last update time. |
Notes
- Order Status: See Order Status Codes.
- Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.
Account Positions Query
Example Request
{
"op": "query",
"args": [
{
"queryType": "accountPositions",
"marketType": "inclusionPreconf",
"accountId": 1234,
"pricerOnly": true
}
]
}
Example Response
{
"q": "accountPositions",
"P": [
{
"a": 2049,
"s": 403776,
"m": 1,
"q": "0",
"l": "0",
"p": "0",
"e": false,
"b": false,
"c": 1742289507000,
"u": 1742289508000,
"A": "0"
},
{
"a": 2049,
"s": 403780,
"m": 1,
"q": "0",
"l": "0",
"p": "0",
"e": false,
"b": false,
"c": 1742289507000,
"u": 1742289508000,
"A": "0"
}
]
}
Request
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,accountPositions. |
└marketType | string | Market type, e.g.,inclusionPreconf. |
└accountId | integer | Account ID, e.g.,1234. |
└pricerOnly | boolean | Flag for only displaying pricer information. Optional. Default tofalse. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,accountPositions. |
s | string | Instrument ID of the market, e.g.,ETH-WB-1631. |
P | array | Payload data containing position information. |
└a | integer | Account Id. |
└s | integer | Slot number of the position. |
└m | integer | Market type of the position. |
└q | string | Position's total quantity. |
└l | string | Position's locked quantity |
└p | string | Position purchased price. |
└e | boolean | Expired flag. |
└b | integer | Builder fill enable flag. |
└c | integer | Position create timestamp. |
└u | integer | Position last updated timestamp. |
└A | integer | Position's available quantity. |
Preconf Bundles Query
Example Request
{
"op": "query",
"args": [
{
"queryType": "preconfBundles",
"slot": 123456
}
]
}
Example Response
{
"q": "preconfBundles",
"P": {
"s": 194265,
"bu": [
{
"u": "c439371a-7095-4de6-82ce-6bf4fc6fd693",
"txs": [
{
"r": false,
"tx": "0x02f88a827e7e82088b808477359400830334509412643b525cc34282ba84298d32bf2d094448f1c4843b9aca009b45746847617320496e636c7573696f6e20507265636f6e66732e20c080a03b39cc9c4a92f32f8d4bc88546e2655378d4e87468ba74b0d20164ed9c346838a01bdbe85274f17b2c87e4689996089affd2d7d8c542616ef7020f5975bf4ddb52",
"h": "0xeb1bca2f601eb124563286455544cc87a1b04b28bd5bed6fb28be81417c4a0de"
}
],
"p": "0.00000000013"
}
]
}
}
Request
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,preconfBundles. |
└slot | integer | Slot, e.g.,1234. Optional. Use next slot if not specified. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,preconfBundles. |
P | array | Payload data containing block builder information. |
└s | integer | Slot ID. |
└bu | array | Array of preconf bundles in the slot. |
└└u | string | UUID of the bundle. |
└└p | string | Gas price of the bundle. |
└└txs | array | Array of transaction in the bundle |
└└└r | boolean | Whether this ethereum transaction can be reverted. |
└└└tx | string | Raw ethereum transaction data in the bundle |
└└└h | string | Transaction hash of transaction data |