Skip to main content

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

NameTypeDescription
opstringe.g.query
argsobjectArguments
queryTypestringQuery type, e.g.,openOrders.
instrumentIdstringInstrument ID, e.g.,ETH-PC-1567.
startIdinteger(Optional) starting order ID in the query.

Response Body

NameTypeDescription
qstringQuery type, e.g.,openOrders.
sstringInstrument ID of the queried market, e.g.,ETH-PC-1567.
astringAccount ID, e.g.,1234.
ParrayArray of order objects.
ointegerOrder ID, e.g.,1234.
cstringClient Order ID, e.g.,43f4159e.
aintegerAccount ID.
CintegerUser ID who created this order. For pricer only.
tbooleanOrder Type.
istringInstrument ID.
mintegerMarket Id.
pstringOrder price.
qstringOrder total quantity.
FstringOrder filled quantity .
fpstringOrder filled price * quantity.
ffeeOrder fee.
sbooleanOrder side.
PbooleanFlag for post-only order.
SintegerOrder Status.
dintegerTimestamp of order creation time.
uintegerTimestamp 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

NameTypeDescription
opstringe.g.query
argsobjectArguments
queryTypestringQuery type, e.g.,accountPositions.
marketTypestringMarket type, e.g.,inclusionPreconf.
accountIdintegerAccount ID, e.g.,1234.
pricerOnlybooleanFlag for only displaying pricer information. Optional. Default tofalse.

Response Body

NameTypeDescription
qstringQuery type, e.g.,accountPositions.
sstringInstrument ID of the market, e.g.,ETH-WB-1631.
ParrayPayload data containing position information.
aintegerAccount Id.
sintegerSlot number of the position.
mintegerMarket type of the position.
qstringPosition's total quantity.
lstringPosition's locked quantity
pstringPosition purchased price.
ebooleanExpired flag.
bintegerBuilder fill enable flag.
cintegerPosition create timestamp.
uintegerPosition last updated timestamp.
AintegerPosition'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

NameTypeDescription
opstringe.g.query
argsobjectArguments
queryTypestringQuery type, e.g.,preconfBundles.
slotintegerSlot, e.g.,1234. Optional. Use next slot if not specified.

Response Body

NameTypeDescription
qstringQuery type, e.g.,preconfBundles.
ParrayPayload data containing block builder information.
sintegerSlot ID.
buarrayArray of preconf bundles in the slot.
└└ustringUUID of the bundle.
└└pstringGas price of the bundle.
└└txsarrayArray of transaction in the bundle
└└└rbooleanWhether this ethereum transaction can be reverted.
└└└txstringRaw ethereum transaction data in the bundle
└└└hstringTransaction hash of transaction data