Skip to main content

Public Queries

In a streaming session, you can query public data using the query command. See Commands for the basic request format.

Preconf Markets Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "preconfMarkets",
"marketType": "inclusionPreconf"
}
]
}

Example Response

{
"q": "preconfMarkets",
"s": "ETH-PC-603391",
"P": {
"m": 1000000603391,
"T": "inclusionPreconf",
"s": 603391,
"i": "ETH-PC-603391",
"n": "Eth Preconf Inclusion Slot #603391",
"M": 1744685266000,
"f": 1744686038000,
"b": 1744685270000,
"q": "1",
"mQ": "1",
"MQ": "36000000",
"PS": "0.00000000001",
"mP": "0.00000000001",
"MP": "0.00001",
"d": false,
"BB": "0.00000000001",
"o": "0.00000000001",
"C": "3.99996",
"A": 36000000,
"r": 0,
"S": 0,
"e": 1,
"a": 1744685268000,
"c": 1744684515000,
"u": 1744684845000,
"tp": 36000000
}
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,preconfMarkets.
└marketTypestringMarket type, e.g.,inclusionPreconf.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,preconfMarkets.
sstringInstrument ID of the market, e.g.,ETH-PC-1151.
PobjectPayload data containing market information.
└mintegerMarket ID.
└TstringMarket type, e.g.inclusionPreconf
└sintegerSlot ID.
└istringInstrument ID.
└nstringMarket name, e.g.Eth Preconf Inclusion Slot #42093.
└MintegerMarket expiry time in milliseconds.
└aintegerBundle submission deadline in milliseconds. (Optional)
└fintegerBlock finality time in milliseconds.
└bintegerBlock time in milliseconds.
└mQstringMinimum order quantity allowed in the market. (Optional)
└MQstringMaximum order quantity allowed in the market. (Optional)
└qstringPrecision step of order quantity. (Optional)
└PSstringPrecision step of order price.
└mPstringMinimum price allowed in the market.
└MPstringMaximum price allowed in the market.
└pstringLast traded price of the market
└PCfloatPrice change percentage.
└dbooleanMarket direction.
└BBstringBest bid price.
└BAstringBest ask price.
└ostringOpen price.
└CstringCollateral per slot in ETH.
└AintegerAvailable preconf for sale.
└rintegerBlock owner reserved preconf not for sale.
└SintegerBlock owner submitted preconf not for sale.
└eintegerMarket status.
└cintegerMarket Creation time in milliseconds.
└uintegerLast market update time in milliseconds.
└tpintegerTotal amount of preconf allowed to sell in the market
Notes​
  • Market Status: Thee field is the market status code (see Market Status Codes).
  • Precision Values: Prices and quantities are represented with high precision for accurate calculations.
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Order Books Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "orderBook",
"marketType": "wholeBlock"
}
]
}

Example Response

{
"q": "orderBook",
"s": "ETH-WB-1535",
"P": {
"a": [],
"b": [
{
"q": "1",
"p": "0.00000000567"
},
{
"q": "2",
"p": "0.00000000566"
}
],
"t": 1736759161542,
"I": "ETH-WB-1535"
}
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,orderBook.
└marketTypestringMarket type, e.g.,wholeBlock.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,orderBook.
sstringInstrument ID of the market, e.g.,ETH-WB-1535.
PobjectPayload data containing order book information.
└aarrayList of ask orders (empty in the example).
└barrayList of bid orders.
└└qstringQuantity of the bid order.
└└pstringPrice of the bid order.
└tintegerTimestamp of the order book query in milliseconds.
└IstringInstrument ID, e.g.,ETH-WB-1535.
Notes​
  • Instrument ID: TheI field represents the specific market instrument being queried.
  • Order Details: Thea field contains ask orders, and theb field contains bid orders, each with a price (p) and quantity (q).
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Current Slot Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "currentSlot"
}
]
}

Example Response

{
"q": "currentSlot",
"P": {
"t": 1736759362264,
"s": 1497,
"r": 1736
}
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,currentSlot.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,currentSlot.
PobjectPayload data containing slot information.
└tintegerTimestamp of the current slot in milliseconds.
└sintegerCurrent slot ID.
└rintegerTotal number of updates in the current slot.
Notes​
  • Update Count: Ther field shows the total number of updates in the current slot.
  • Slot ID: Slot can only be queried for the incoming 2 epochs (max 64 slots).
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Candlesticks Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "candlesticks",
"interval": 1000,
"instrumentId": "ETH-PC-1567"
}
]
}

Example Response

{
"q": "candlesticks",
"s": "ETH-PC-1567",
"P": [
{
"I": "ETH-PC-1567",
"m": 1000000001567,
"t": 1736759832000,
"i": 1000,
"o": "0.00000000009",
"h": "0.00000000009",
"l": "0.00000000009",
"c": "0.00000000009",
"v": "0",
"F": false
},
{
"I": "ETH-PC-1567",
"m": 1000000001567,
"t": 1736759831000,
"i": 1000,
"o": "0.00000000009",
"h": "0.00000000009",
"l": "0.00000000009",
"c": "0.00000000009",
"v": "0",
"F": true
},
{
"I": "ETH-PC-1567",
"m": 1000000001567,
"t": 1736759830000,
"i": 1000,
"o": "0.00000000008",
"h": "0.00000000009",
"l": "0.00000000008",
"c": "0.00000000009",
"v": "2912472",
"F": true
}
]
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,candlesticks.
└intervalintegerInterval for price history in milliseconds, e.g.,1000.
└instrumentIdstringInstrument ID to query price history, e.g.,ETH-PC-1567.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,candlesticks.
sstringInstrument ID of the queried market, e.g.,ETH-PC-1567.
ParrayArray of market price history objects.
└IstringInstrument ID, e.g.,ETH-PC-1567.
└mintegerMarket ID.
└tintegerTimestamp of the price data in milliseconds.
└iintegerInterval of the data.
└ostringOpen price during the interval.
└hstringHigh price during the interval.
└lstringLow price during the interval.
└cstringClose price during the interval.
└vstringVolume during the interval.
└FbooleanIndicates if the data is final (true) or incomplete (false).
Notes​
  • Finalized Data: TheF field indicates whether the price history data is finalized or still being updated.
  • Price Details: Includes open (o), high (h), low (l), and close (c) prices along with volume (v).
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Recent Trades Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "recentTrades",
"instrumentId": "ETH-PC-1567",
"limit": 10
}
]
}

Example Response

{
"q": "recentTrades",
"s": "ETH-PC-1567",
"P": [
{
"i": "ETH-PC-1567",
"p": "0.00000000021",
"q": "1534591",
"s": true,
"d": 1736760078290,
"t": 89130
},
{
"i": "ETH-PC-1567",
"p": "0.00000000021",
"q": "270409",
"s": false,
"d": 1736760078369,
"t": 89216
}
],
"l": 10
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,recentTrades.
└instrumentIdstringInstrument ID, e.g.,ETH-PC-1567.
└limitinteger(Optional) Maximum number of trades to return (default is100).

Response Body​

NameTypeDescription
qstringQuery type, e.g.,recentTrades.
sstringInstrument ID of the queried market, e.g.,ETH-PC-1567.
lintegerThe limit applied to the query.
ParrayArray of recent trade objects.
└istringInstrument ID, e.g.,ETH-PC-1567.
└pstringPrice at which the trade occurred.
└qstringTraded quantity .
└sbooleanTrade side (true for buy,false for sell).
└dintegerTimestamp of the trade in milliseconds.
└tintegerTrade ID.
Notes​
  • Limit Parameter: Thelimit field in the request allows you to restrict the number of returned trades, with a default of100.
  • Trade Details: Each trade object includes price (p), quantity (q), and trade side (s).
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Inclusion Preconf Top Sales Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "inclusionPreconfTopSales",
"slot": 403973
}
]
}

Example Response

{
"q": "inclusionPreconfTopSales",
"P": {
"s": 403973,
"g": 18662236,
"S": [
{
"p": "0.00000000009",
"q": "12662236"
}
]
}
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,inclusionPreconfTopSales.
└slotinteger(Optional) Slot to query. Uses next slot if omitted.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,inclusionPreconfTopSales.
PobjectPayload data containing inclusion preconf top sales information.
└sintegerSlot ID.
└gintegerTotal gas purchased in this slot.
└SarrayArray of top gas sales.
└└pstringPurchased price in average
└└qstringPurchased gas quantity
Notes​
  • Slot: Ifslot is omitted, the server uses the next slot.
  • Timestamp Fields: All timestamps are in milliseconds since the Unix epoch.

Current Block Builder Query​

Example Request

{
"op": "query",
"args": [
{
"queryType": "currentBlockBuilder",
"slot": 123456
}
]
}

If you want the next slot's builder, omit theslot field:

{
"op": "query",
"args": [
{
"queryType": "currentBlockBuilder"
}
]
}

Example Response

{
"q": "currentBlockBuilder",
"P": {
"s": 402361,
"p": "0xA25ADDC4FC16F72CA667177D7A5533D4287B3574F0127FFC227095E90B0B1FD0DD48C421E04E613D2298FE4DAC83A2A5",
"f": "0xa1885d66bef164889a2e35845c3b626545d7b0e513efe335e97c3a45e534013fa3bc38c3b7e6143695aecc4872ac52c4"
}
}

Request​

NameTypeDescription
opstringe.g.query
argsobjectArguments
└queryTypestringQuery type, e.g.,currentBlockBuilder.
└slotintegerSlot, e.g.,123456. Optional. Use next slot if not specified.

Response Body​

NameTypeDescription
qstringQuery type, e.g.,currentBlockBuilder.
sstringInstrument ID of the market, e.g.,ETH-WB-1631.
PobjectPayload data containing block builder information.
└sintegerslot.
└pstringBlock builder public key. optional if market owner does not delegate a builder
└fstringFallback builder public key.
Notes​
  • Slot ID: Slot can only be queried for the incoming 2 epochs (max 64 slots).