Skip to content

Validate Order

Endpoint Information

Endpoint: POST /api/v1/orders/validate

Description: Validate order validity (does not create order)

Authentication: API Key credential authentication

Request Parameters

FieldTypeRequiredDescription
orderobjectYesOrder information
order.makerstringYesOrder creator address
order.principalstringYesRecipient address
order.is_buyboolYesWhether it's a buy order
order.tickerstringYesStock symbol
order.exchangeintYesExchange ID
order.assetstringYesAsset token address
order.pricestringYesPrice
order.quantitystringYesQuantity
order.incentivestringYesIncentive amount
order.deadlinelongYesDeadline timestamp
order.noncelongYesAnti-replay nonce
signaturestringYesOrder signature

Response Parameters

FieldTypeDescription
validbooleanWhether order is valid
order_hashstringOrder hash
errorsarrayError list
maker_balancestringMaker balance
maker_allowancestringMaker allowance
nonce_validbooleanWhether nonce is valid
signature_validbooleanWhether signature is valid
not_expiredbooleanWhether not expired

Request Example

bash
curl -X POST "/api/v1/orders/validate" \
     -H "X-API-Key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "order": {
         "maker": "0x1234567890123456789012345678901234567890",
         "principal": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
         "is_buy": true,
         "ticker": "AAPL",
         "exchange": 0,
         "asset": "0x0000000000000000000000000000000000000001",
         "price": "150250000000000000000",
         "quantity": "100",
         "incentive": "1000000000000000000",
         "deadline": 1735689600,
         "nonce": 1
       },
       "signature": "0x..."
     }'

Response Example

json
{
    "code": 0,
    "data": {
        "valid": true,
        "order_hash": "0x1234567890abcdef...",
        "errors": [],
        "maker_balance": "10000000000000000000000",
        "maker_allowance": "5000000000000000000000",
        "nonce_valid": true,
        "signature_valid": true,
        "not_expired": true
    }
}

Notes

  • This endpoint only validates orders, does not create them
  • Can be used for pre-checks before locking orders
  • Validation includes: balance, allowance, nonce, signature, expiration time, etc.