Skip to content

Query Orders

Query Order List

Endpoint Information

Endpoint: GET /api/v1/takers/orders

Description: Query orders locked or filled by taker, supports status filtering, pagination, and sorting

Authentication: API Key credential authentication

Query Parameters

ParameterTypeRequiredDescription
statusstringNoOrder status, multiple statuses separated by commas
tickerstringNoStock symbol
exchangeintNoExchange ID
is_buybooleanNoWhether buy order
created_afterlongNoCreated after (Unix timestamp)
created_beforelongNoCreated before (Unix timestamp)
sort_bystringNoSort field (created_at, locked_at, price), default created_at
sort_orderstringNoSort direction (asc, desc), default desc
pageintNoPage number, default 1
page_sizeintNoPage size, default 20, max 100

Response Parameters

FieldTypeDescription
totalintTotal records
pageintCurrent page
page_sizeintPage size
total_pagesintTotal pages
ordersarrayOrder list

Order Object Fields

FieldTypeDescription
order_hashstringOrder hash
makerstringOrder creator address
principalstringRecipient address
is_buybooleanWhether buy order
tickerstringStock symbol
exchangeintExchange ID
assetstringAsset token address
pricestringPrice (wei unit)
quantitystringQuantity (wei unit)
incentivestringIncentive amount (wei unit)
deadlinelongDeadline timestamp (Unix timestamp)
noncelongAnti-replay nonce
signaturestringOrder signature
statusstringOrder status
created_atstringCreation time (ISO 8601 format)
locked_bystringLocked by address (optional)
locked_atstringLock time (optional)
reference_idstringReference ID (optional)
tx_hashstringTransaction hash (optional)

Request Example

bash
curl -X GET "/api/v1/takers/orders?status=locked,partially_filled&page=1&page_size=20" \
     -H "X-API-Key: YOUR_API_KEY" \
     -H "Content-Type: application/json"

Response Example

json
{
    "code": 0,
    "data": {
        "total": 50,
        "page": 1,
        "page_size": 20,
        "total_pages": 3,
        "orders": [
            {
                "order_hash": "0x1234567890abcdef...",
                "maker": "0x1234567890123456789012345678901234567890",
                "principal": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
                "is_buy": true,
                "ticker": "AAPL",
                "exchange": 0,
                "asset": "0x0000000000000000000000000000000000000001",
                "price": "150250000000000000000",
                "quantity": "10000000000000000000",
                "incentive": "1000000000000000000",
                "deadline": 1735689600,
                "nonce": 1,
                "signature": "0x...",
                "status": "locked",
                "created_at": "2025-01-17T03:00:24Z",
                "locked_by": "0xabcdef1234567890...",
                "locked_at": "2025-01-17T03:05:00Z",
                "reference_id": "REF123456"
            }
        ]
    }
}

Get Single Order

Endpoint Information

Endpoint: GET /api/v1/takers/orders/:order_hash

Description: Get detailed information of a single order by order hash

Authentication: API Key credential authentication

Path Parameters

ParameterTypeRequiredDescription
order_hashstringYesOrder hash

Response Parameters

FieldTypeDescription
idstringOrder ID (UUID)
makerstringOrder creator address
principalstringRecipient address
is_buybooleanWhether buy order
tickerstringStock symbol
exchangeintExchange ID
assetstringAsset token address
pricestringPrice (wei unit)
quantitystringQuantity (wei unit)
incentivestringIncentive amount (wei unit)
deadlineintDeadline (Unix timestamp)
nonceintAnti-replay nonce
signaturestringOrder signature
order_hashstringOrder hash
statusstringOrder status
filled_quantitystringFilled quantity (wei unit)
notesstringNotes (optional)
created_atstringCreation time (ISO 8601 format)
updated_atstringUpdate time (ISO 8601 format)

Request Example

bash
curl -X GET "/api/v1/takers/orders/0x123456abcdef..." \
     -H "X-API-Key: YOUR_API_KEY" \
     -H "Content-Type: application/json"

Response Example

json
{
    "code": 0,
    "data": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "maker": "0x1234567890123456789012345678901234567890",
        "principal": "0x1234567890123456789012345678901234567890",
        "is_buy": true,
        "ticker": "AAPL",
        "exchange": 0,
        "asset": "0x09671802Cc9Bbf6402f2e7a07b220Aa7b43D8c91",
        "price": "150250000000000000000",
        "quantity": "10000000000000000000",
        "incentive": "100000000000000000",
        "deadline": 1735660800,
        "nonce": 1,
        "signature": "0xabcdef123456...",
        "order_hash": "0x123456abcdef...",
        "status": "locked",
        "filled_quantity": "0",
        "notes": null,
        "created_at": "2025-01-17T03:00:24Z",
        "updated_at": "2025-01-17T03:05:00Z"
    }
}

Notes

  • Can only query orders that Taker has locked or filled
  • Will return error if order does not exist or access is unauthorized
  • Recommend using this endpoint to get the latest order status