Whole Block Markets
Public endpoints for whole block market data. No authentication required.
GET /v1/p/wholeblock/markets
Get active all whole block market details.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/wholeblock/markets"
import requests
url = f"{ETHGAS_API_URL}/v1/p/wholeblock/markets"
response = requests.get(url)
print(response.text)
Request
No parameters required.
Response Body
| Name | Type | Description |
|---|---|---|
| markets | object[] | List of Whole Block Market objects |
| └ marketId | integer | Whole block market ID |
| └ slot | integer | Slot number of the block |
| └ instrumentId | string | Whole block market instrument ID (e.g. ETH-WB-295209) |
| └ name | string | Market name |
| └ priceStep | string | Minimum price increment |
| └ minPrice | string | Minimum price |
| └ maxPrice | string | Maximum price |
| └ availablePreconf | integer | Available preconf quantity for trading |
| └ direction | boolean | Last trading direction (true = buy, false = sell) |
| └ price | string | Latest traded market price |
| └ status | integer | Market status (see Market Status Codes) |
| └ maturityTime | integer | When market will be closed (UNIX ms) |
| └ blockTime | integer | When block starts (UNIX ms) |
| └ finalityTime | integer | When block is finalized (UNIX ms) |
GET /v1/p/wholeblock/positions
Get whole block positions.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/wholeblock/positions?instrumentId=ETH-WB-9884031&limit=10"
import requests
url = f"{ETHGAS_API_URL}/v1/p/wholeblock/positions"
params = {"instrumentId": "ETH-WB-9884031", "limit": 10}
response = requests.get(url, params=params)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| instrumentId | NO | string | Instrument ID |
| limit | NO | integer | Max positions to return (default: 10) |
GET /v1/p/wholeblock/orders
Get whole block orders.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/wholeblock/orders?instrumentId=ETH-WB-9884031&onbook=false&done=false&limit=10"
import requests
url = f"{ETHGAS_API_URL}/v1/p/wholeblock/orders"
params = {"instrumentId": "ETH-WB-9884031", "onbook": False, "done": False, "limit": 10}
response = requests.get(url, params=params)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| instrumentId | YES | string | Whole block market instrument ID |
| onbook | NO | boolean | Pending orders only (default: false) |
| done | NO | boolean | Done orders only (default: false) |
| startId | NO | integer | Order start ID (default: 0) |
| asc | NO | boolean | Sort ascending (default: false) |
| limit | NO | integer | Max orders to return (default: 10) |
GET /v1/p/wholeblock/trades
Get whole block trades.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/wholeblock/trades?instrumentId=ETH-WB-9884031&limit=10"
import requests
url = f"{ETHGAS_API_URL}/v1/p/wholeblock/trades"
params = {"instrumentId": "ETH-WB-9884031", "limit": 10}
response = requests.get(url, params=params)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| instrumentId | YES | string | Whole block market instrument ID |
| limit | NO | integer | Max trades to return (default: 10) |