Skip to content

Query Order List

Endpoint Information

Endpoint: GET /api/v1/orders

Description: Flexible order list query with filtering, pagination, and sorting

Authentication: Authorization header with JWT token

Query Parameters

ParameterTypeRequiredDescription
order_hashstringNoOrder hash (exact match)
principalstringNoRecipient address (exact match)
tickerstringNoStock symbol (exact or fuzzy match)
ticker_likebooleanNoEnable fuzzy search, default false
exchangeintNoExchange ID (exact match)
assetstringNoAsset token address (exact match)
is_buybooleanNoIs buy order (exact match)
nonceintNoNonce (exact match)
price_minstringNoMinimum price
price_maxstringNoMaximum price
quantity_minstringNoMinimum quantity
quantity_maxstringNoMaximum quantity
incentive_minstringNoMinimum incentive
incentive_maxstringNoMaximum incentive
filled_quantity_minstringNoMinimum filled quantity
filled_quantity_maxstringNoMaximum filled quantity
statusstringNoOrder status, supports multiple (comma-separated, e.g. "pending,filled")
deadline_afterintNoEarliest deadline (Unix timestamp)
deadline_beforeintNoLatest deadline (Unix timestamp)
created_afterintNoEarliest creation time (Unix timestamp)
created_beforeintNoLatest creation time (Unix timestamp)
sort_bystringNoSort field (price, quantity, incentive, deadline, created_at), 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
idstringOrder ID (UUID)
makerstringOrder creator address
principalstringRecipient address
is_buybooleanIs buy order
tickerstringStock symbol
exchangeintExchange ID
assetstringAsset token address
pricestringPrice (wei unit)
quantitystringQuantity (wei unit)
incentivestringIncentive amount (wei unit)
deadlineintDeadline (Unix timestamp)
nonceintNonce
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)
fillsarrayFill details list (only returned for partially_filled and filled status orders)

Fill Detail Object Fields

FieldTypeDescription
idstringFill record ID (UUID)
order_idstringOrder ID
order_hashstringOrder hash
takerstringTaker address
fill_quantitystringFill quantity (wei unit)
fill_amountstringFill amount (wei unit)
fee_amountstringFee amount (wei unit)
incentive_amountstringIncentive amount (wei unit)
taker_incentivestringTaker incentive (wei unit)
tx_hashstringTransaction hash
block_numberintBlock number
statusstringFill status
reference_idstringReference ID (optional)
created_atstringCreation time (ISO 8601 format)

Request Example

bash
# Basic query
curl -X GET "/api/v1/orders?ticker=AAPL&page=1&page_size=20" \
     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
     -H "Content-Type: application/json"

# Multiple status query
curl -X GET "/api/v1/orders?status=pending,partially_filled" \
     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
     -H "Content-Type: application/json"

# Price range query
curl -X GET "/api/v1/orders?price_min=100000000000000000000&price_max=200000000000000000000" \
     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
     -H "Content-Type: application/json"

Response Example

json
{
    "code": 0,
    "data": {
        "total": 3,
        "page": 1,
        "page_size": 20,
        "total_pages": 1,
        "orders": [
            {
                "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": "pending",
                "filled_quantity": "0",
                "notes": null,
                "created_at": "2025-01-17T03:00:24Z",
                "updated_at": "2025-01-17T03:00:24Z"
            },
            {
                "id": "660e8400-e29b-41d4-a716-446655440001",
                "maker": "0x1234567890123456789012345678901234567890",
                "principal": "0x1234567890123456789012345678901234567890",
                "is_buy": false,
                "ticker": "TSLA",
                "exchange": 0,
                "asset": "0x09671802Cc9Bbf6402f2e7a07b220Aa7b43D8c91",
                "price": "245000000000000000000",
                "quantity": "5000000000000000000",
                "incentive": "50000000000000000",
                "deadline": 1735747200,
                "nonce": 2,
                "signature": "0x789012fedcba...",
                "order_hash": "0x789012fedcba...",
                "status": "locked",
                "filled_quantity": "0",
                "notes": null,
                "created_at": "2025-01-17T05:30:00Z",
                "updated_at": "2025-01-17T06:15:00Z"
            },
            {
                "id": "770e8400-e29b-41d4-a716-446655440002",
                "maker": "0x1234567890123456789012345678901234567890",
                "principal": "0x1234567890123456789012345678901234567890",
                "is_buy": true,
                "ticker": "GOOGL",
                "exchange": 0,
                "asset": "0x09671802Cc9Bbf6402f2e7a07b220Aa7b43D8c91",
                "price": "138500000000000000000",
                "quantity": "20000000000000000000",
                "incentive": "200000000000000000",
                "deadline": 1735833600,
                "nonce": 3,
                "signature": "0xfedcba987654...",
                "order_hash": "0xfedcba987654...",
                "status": "filled",
                "filled_quantity": "20000000000000000000",
                "notes": null,
                "created_at": "2025-01-16T10:00:00Z",
                "updated_at": "2025-01-17T08:45:00Z",
                "fills": [
                    {
                        "id": "880e8400-e29b-41d4-a716-446655440003",
                        "order_id": "770e8400-e29b-41d4-a716-446655440002",
                        "order_hash": "0xfedcba987654...",
                        "taker": "0x9876543210987654321098765432109876543210",
                        "fill_quantity": "20000000000000000000",
                        "fill_amount": "2770000000000000000000",
                        "fee_amount": "13850000000000000000",
                        "incentive_amount": "200000000000000000",
                        "taker_incentive": "200000000000000000",
                        "tx_hash": "0xabcdef123456789...",
                        "block_number": 12345678,
                        "status": "confirmed",
                        "reference_id": "Taker-1737105945abc",
                        "created_at": "2025-01-17T08:45:00Z"
                    }
                ]
            }
        ]
    }
}