Skip to main content

Whole Block Trading

Authenticated endpoints for whole block order placement and management.

POST /v1/wholeblock/order

Create new whole block order.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/wholeblock/order" \
-H "Content-Type: application/json" \
-d '{"instrumentId":"ETH-WB-9884031","accountId":128,"side":true,"orderType":2,"clientOrderId":"05d61624","passive":false,"price":"0.01"}'

Request Body

ParameterRequiredTypeDescription
instrumentIdYESstringInstrument ID
accountIdYESintegerAccount ID
sideYESbooleanOrder side (true = buy, false = sell)
orderTypeYESintegerMarket = 1, Limit = 2, FOK = 3
clientOrderIdYESstringClient-generated order ID (max 32 chars)
passiveNObooleanPost-only (maker only) (default: false)
priceNOstringPrice (ETH per gas). Required for limit/FOK order
quantityYESstringOrder quantity (1 for whole block orders)

POST /v1/wholeblock/cancel-all-orders

Cancel all whole block orders for an account and instrument.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/wholeblock/cancel-all-orders?accountId=128&instrumentId=ETH-WB-1012051"

Request

ParameterRequiredTypeDescription
accountIdYESintegerAccount ID
instrumentIdYESstringInstrument ID

POST /v1/wholeblock/cancel-batch-orders

Cancel specific whole block orders.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/wholeblock/cancel-batch-orders?accountId=128&instrumentId=ETH-WB-1012051&orderIds=b25ab402,5e885ddd"

Request

ParameterRequiredTypeDescription
accountIdYESintegerAccount ID
instrumentIdYESstringInstrument ID
orderIdsYESstringComma-separated order IDs

POST /v1/wholeblock/cancel-order

Cancel a single whole block order.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/wholeblock/cancel-order" \
-H "Content-Type: application/json" \
-d '{"accountId":128,"instrumentId":"ETH-WB-1012051","orderId":"b25ab402"}'

Request

ParameterRequiredTypeDescription
accountIdYESintegerAccount ID
instrumentIdYESstringInstrument ID
orderIdYES*integerOrder ID (use orderId or clientOrderId)
clientOrderIdYES*stringClient order ID (use orderId or clientOrderId)

GET /v1/user/wholeblock/orders

Get user whole block orders for an account and instrument.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/wholeblock/orders?accountId=128&instrumentId=ETH-WB-9884031"

Request

ParameterRequiredTypeDescription
accountIdYESintegerAccount ID
instrumentIdNOstringInstrument ID
onBookNObooleanPending orders only
doneNObooleanDone orders only
startIdNOintegerStart of order ID for pagination
limitNOintegerMax orders to return

GET /v1/user/wholeblock/all-orders

Get all user whole block orders.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/wholeblock/all-orders?onBook=false&limit=10"

GET /v1/user/wholeblock/positions

Get user whole block positions.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/wholeblock/positions?instrumentId=ETH-WB-9884031&limit=10"

GET /v1/user/wholeblock/txs

Get user transactions for whole block market.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/wholeblock/txs?instrumentId=ETH-WB-63999&limit=100"