Skip to main content

Pricer

POST /v1/user/delegate/pricer

Enable or disable the pricer for selling preconf or block.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/user/delegate/pricer?enable=true"

Request

ParameterRequiredTypeDescription
enableYESbooleanEnable (true) or disable (false) pricer.

Response Body

FieldTypeDescription
successbooleanIndicates whether the request succeeded.

GET /v1/user/pricer

Retrieve the pricer's current setting.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/pricer"

Request

No parameters required.

Response Body

FieldTypeDescription
delegatedPricerstringIndicates whether the pricer is "enabled" or "disabled".

GET /v1/pricer/account-tokens

Retrieve all account tokens delegated to the pricer.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/account-tokens"

Request

No parameters required.

Response Body

FieldTypeDescription
accountTokensobject[]List of account tokens.
└ accountIdintegerUnique ID for each of the user's current & trading accounts assigned by ETHGas
└ tokenIdintegerETHGas Token ID (see Token IDs)
└ quantitystringAmount of token in account in USD
└ lockedQuantitystringAmount covering pending limit orders (cannot be transferred out of account)
└ codestringToken code
└ availableQuantitystringAmount of unlocked tokens in account

GET /v1/pricer/inclusion-preconf/orders

Retrieve inclusion preconf orders delegated to the pricer.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/inclusion-preconf/orders?accountId=123&instrumentId=abc&pending=true&limit=20"

Request

ParameterRequiredTypeDescription
accountIdNOintegerAccount ID for filtering orders.
instrumentIdNOstringInstrument ID for filtering orders.
pendingNObooleanWhether to include only open orders.
doneNObooleanWhether to include only completed orders.
startIdNOlongOrder start ID for pagination.
limitNOintegerMaximum number of orders to return.
ascNObooleanSorting order (true for asc, false for desc).

Response Body

FieldTypeDescription
ordersobjectList of orders.

GET /v1/pricer/inclusion-preconf/positions

Retrieve inclusion preconf positions delegated to the pricer.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/inclusion-preconf/positions?instrumentId=123&accountId=456"

Request

ParameterRequiredTypeDescription
instrumentIdNOstringInstrument ID for filtering positions.
accountIdNOintegerAccount ID for filtering positions.

Response Body

FieldTypeDescription
positionsobjectList of positions.

GET /v1/pricer/wholeblock/orders

Retrieve whole block orders delegated to the pricer.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/wholeblock/orders?accountId=123&instrumentId=abc&pending=true&limit=20"

Request

ParameterRequiredTypeDescription
accountIdNOintegerAccount ID for filtering orders.
instrumentIdNOstringInstrument ID for filtering orders.
pendingNObooleanWhether to include only open orders.
doneNObooleanWhether to include only completed orders.
startIdNOlongOrder start ID for pagination.
limitNOintegerMaximum number of orders to return.
ascNObooleanSorting order (true for asc, false for desc).

Response Body

FieldTypeDescription
ordersobjectList of orders.

GET /v1/pricer/wholeblock/positions

Retrieve wholeblock positions delegated to the pricer.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/wholeblock/positions?instrumentId=123&accountId=456"

Request

ParameterRequiredTypeDescription
instrumentIdNOstringInstrument ID for filtering positions.
accountIdNOintegerAccount ID for filtering positions.

Response Body

FieldTypeDescription
positionsobjectList of positions.

GET /v1/pricer/markets/active

Retrieve all active markets that the pricer is responsible for.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/pricer/markets/active"

Request

No parameters required.

Response Body

FieldTypeDescription
inclusionPreconfMarketsobjectList of active inclusion preconf markets.
wholeBlockMarketsobjectList of active whole block markets.