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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,preconfMarkets. |
└marketType | string | Market type, e.g.,inclusionPreconf. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,preconfMarkets. |
s | string | Instrument ID of the market, e.g.,ETH-PC-1151. |
P | object | Payload data containing market information. |
└m | integer | Market ID. |
└T | string | Market type, e.g.inclusionPreconf |
└s | integer | Slot ID. |
└i | string | Instrument ID. |
└n | string | Market name, e.g.Eth Preconf Inclusion Slot #42093. |
└M | integer | Market expiry time in milliseconds. |
└a | integer | Bundle submission deadline in milliseconds. (Optional) |
└f | integer | Block finality time in milliseconds. |
└b | integer | Block time in milliseconds. |
└mQ | string | Minimum order quantity allowed in the market. (Optional) |
└MQ | string | Maximum order quantity allowed in the market. (Optional) |
└q | string | Precision step of order quantity. (Optional) |
└PS | string | Precision step of order price. |
└mP | string | Minimum price allowed in the market. |
└MP | string | Maximum price allowed in the market. |
└p | string | Last traded price of the market |
└PC | float | Price change percentage. |
└d | boolean | Market direction. |
└BB | string | Best bid price. |
└BA | string | Best ask price. |
└o | string | Open price. |
└C | string | Collateral per slot in ETH. |
└A | integer | Available preconf for sale. |
└r | integer | Block owner reserved preconf not for sale. |
└S | integer | Block owner submitted preconf not for sale. |
└e | integer | Market status. |
└c | integer | Market Creation time in milliseconds. |
└u | integer | Last market update time in milliseconds. |
└tp | integer | Total amount of preconf allowed to sell in the market |
Notes
- Market Status: The
efield 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,orderBook. |
└marketType | string | Market type, e.g.,wholeBlock. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,orderBook. |
s | string | Instrument ID of the market, e.g.,ETH-WB-1535. |
P | object | Payload data containing order book information. |
└a | array | List of ask orders (empty in the example). |
└b | array | List of bid orders. |
└└q | string | Quantity of the bid order. |
└└p | string | Price of the bid order. |
└t | integer | Timestamp of the order book query in milliseconds. |
└I | string | Instrument ID, e.g.,ETH-WB-1535. |
Notes
- Instrument ID: The
Ifield represents the specific market instrument being queried. - Order Details: The
afield contains ask orders, and thebfield 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,currentSlot. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,currentSlot. |
P | object | Payload data containing slot information. |
└t | integer | Timestamp of the current slot in milliseconds. |
└s | integer | Current slot ID. |
└r | integer | Total number of updates in the current slot. |
Notes
- Update Count: The
rfield 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,candlesticks. |
└interval | integer | Interval for price history in milliseconds, e.g.,1000. |
└instrumentId | string | Instrument ID to query price history, e.g.,ETH-PC-1567. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,candlesticks. |
s | string | Instrument ID of the queried market, e.g.,ETH-PC-1567. |
P | array | Array of market price history objects. |
└I | string | Instrument ID, e.g.,ETH-PC-1567. |
└m | integer | Market ID. |
└t | integer | Timestamp of the price data in milliseconds. |
└i | integer | Interval of the data. |
└o | string | Open price during the interval. |
└h | string | High price during the interval. |
└l | string | Low price during the interval. |
└c | string | Close price during the interval. |
└v | string | Volume during the interval. |
└F | boolean | Indicates if the data is final (true) or incomplete (false). |
Notes
- Finalized Data: The
Ffield 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,recentTrades. |
└instrumentId | string | Instrument ID, e.g.,ETH-PC-1567. |
└limit | integer | (Optional) Maximum number of trades to return (default is100). |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,recentTrades. |
s | string | Instrument ID of the queried market, e.g.,ETH-PC-1567. |
l | integer | The limit applied to the query. |
P | array | Array of recent trade objects. |
└i | string | Instrument ID, e.g.,ETH-PC-1567. |
└p | string | Price at which the trade occurred. |
└q | string | Traded quantity . |
└s | boolean | Trade side (true for buy,false for sell). |
└d | integer | Timestamp of the trade in milliseconds. |
└t | integer | Trade ID. |
Notes
- Limit Parameter: The
limitfield 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,inclusionPreconfTopSales. |
└slot | integer | (Optional) Slot to query. Uses next slot if omitted. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,inclusionPreconfTopSales. |
P | object | Payload data containing inclusion preconf top sales information. |
└s | integer | Slot ID. |
└g | integer | Total gas purchased in this slot. |
└S | array | Array of top gas sales. |
└└p | string | Purchased price in average |
└└q | string | Purchased gas quantity |
Notes
- Slot: If
slotis 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
| Name | Type | Description |
|---|---|---|
op | string | e.g.query |
args | object | Arguments |
└queryType | string | Query type, e.g.,currentBlockBuilder. |
└slot | integer | Slot, e.g.,123456. Optional. Use next slot if not specified. |
Response Body
| Name | Type | Description |
|---|---|---|
q | string | Query type, e.g.,currentBlockBuilder. |
s | string | Instrument ID of the market, e.g.,ETH-WB-1631. |
P | object | Payload data containing block builder information. |
└s | integer | slot. |
└p | string | Block builder public key. optional if market owner does not delegate a builder |
└f | string | Fallback builder public key. |
Notes
- Slot ID: Slot can only be queried for the incoming 2 epochs (max 64 slots).