Skip to content

Fill Order

Endpoint Information

Endpoint: POST /api/v1/orders/fill

Description: Execute order fill (partial or full). This endpoint requires Taker authentication.

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
fill_quantitystringYesFill quantity
taker_incentivestringYesActual transaction fee

Response Parameters

FieldTypeDescription
successbooleanWhether fill succeeded
tx_hashstringTransaction hash
order_hashstringOrder hash
filled_quantitystringFilled quantity
filled_amountstringFilled amount
fee_amountstringFee amount
incentive_amountstringIncentive amount
statusenumOrder status (see OrderStatus)

Request Example

bash
curl -X POST "/api/v1/orders/fill" \
     -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...",
       "fill_quantity": "50",
       "taker_incentive": "500000000000000000"
     }'

Response Example

json
{
    "code": 0,
    "data": {
        "success": true,
        "tx_hash": "0xabcdef1234567890...",
        "order_hash": "0x1234567890abcdef...",
        "filled_quantity": "50",
        "filled_amount": "7512500000000000000000",
        "fee_amount": "75125000000000000000",
        "incentive_amount": "500000000000000000",
        "status": "partially_filled"
    }
}

Enum Types

OrderStatus - Order Status

EnumDescription
partially_filledPartially filled
filledFully filled

Notes

  • Fill quantity cannot exceed remaining order quantity
  • Order must be in locked status to be filled
  • After partial fill, order status becomes partially_filled
  • After complete fill, order status becomes filled