Query Next Available Nonce
Endpoint Information
Endpoint: GET /api/v1/orders/maker/next-nonce
Description: Query the next available order nonce for a specific Maker on a specific chain
Authentication: API Key + Signature. See Authorization
Note: This is a Maker API endpoint. The
X-Maker-Addrheader is required and must be included in both the request headers and signature string.
Multi-Chain Support: Supports querying nonce on a specific chain via chain_id query parameter
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| chain_id | int | No | Blockchain network ID, uses default chain (BSC mainnet, chain_id = 56) if not specified |
Response Parameters
| Field | Type | Description |
|---|---|---|
| maker | string | Maker address |
| next_nonce | long | Next available nonce |
| chain_id | int | Chain ID |
Notes
- Returns the current maximum nonce + 1 for the Maker on the specified chain, i.e., the next available nonce value
- If the Maker has no orders on the specified chain, returns
next_nonce: 1 - Each chain maintains independent nonce sequences, the same Maker can have different nonce values on different chains
- Used to automatically obtain chain-specific nonce values when creating new orders
Request Example
bash
# Query nonce on default chain (BSC mainnet, chain_id = 56)
curl -X GET "{API_BASE_URL}/api/v1/orders/maker/next-nonce" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Maker-Addr: YOUR_MAKER_ADDRESS" \
-H "X-API-Timestamp: 1715100000000" \
-H "X-API-Signature: GENERATED_SIGNATURE" \
-H "Content-Type: application/json"
# Query nonce on specific chain
curl -X GET "{API_BASE_URL}/api/v1/orders/maker/next-nonce?chain_id=56" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Maker-Addr: YOUR_MAKER_ADDRESS" \
-H "X-API-Timestamp: 1715100000000" \
-H "X-API-Signature: GENERATED_SIGNATURE" \
-H "Content-Type: application/json"Response Example
json
{
"code": 0,
"data": {
"maker": "0x1234567890123456789012345678901234567890",
"next_nonce": 5,
"chain_id": 56
}
}