📡Limit Order APIs
APIs are provided to help users relay the signed orders.
Basic Information
Base URL: https://fx-limit-order-api.aladdin.club/
Supported Blockchains: Ethereum
1. Create Limit Order
For risk considerations, creating orders through the API documentation is not recommended at this time. Please use the website to create limit orders.
2. Get Active Orders (For Bots/Keepers)
GET /v1/active-orders
Returns all open and fillable orders, sorted by their createdAt
timestamp in ascending order. This endpoint is optimized for keepers, bots, or external indexers that need to continuously fetch newly created orders available for on-chain execution.
Query Parameters:
after
(optional): Only include orders created after this UNIX timestamp (in seconds). Useful for incremental syncing.limit
(optional): Maximum number of orders to return (default: 100, max: 5000)
Response:
{
"statusCode": 0,
"message": "OK",
"result": [
{
"orderHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"data": {
"maker": "0x742D35Cc6609CBB9C1EC8f1E4A3ea5A1A8c1aB34",
"pool": "0x1234567890123456789012345678901234567890",
"positionId": 1,
"positionSide": true,
"orderType": false,
"orderSide": true,
"allowPartialFill": true,
"triggerPrice": "0",
"fxUSDDelta": "1000000000000000000000",
"collDelta": "500000000000000000000",
"debtDelta": "0",
"nonce": 1,
"salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
"deadline": 1703980800
},
"signature": "0x1234567890abcdef123456789...",
"execution": {
"status": 0,
"filled": "0",
"positionId": 1
},
"makingAmount": "1000000000000000000000",
"takingAmount": "500000000000000000000",
"expired": false,
"createdAt": 1703894400,
"updatedAt": 1703894400
}
]
}
3. Get Order Updates (For Real-time Monitoring)
GET /v1/order-updates
Returns orders that have changed state (created, filled, cancelled, or expired), sorted by their updatedAt
timestamp in ascending order. Ideal for clients or bots polling for updates to maintain an up-to-date local view of the order book.
Query Parameters:
after
(optional): Only include orders updated after this UNIX timestamp (in seconds). Enables incremental polling for order state changes.limit
(optional): Maximum number of orders to return (default: 100, max: 1000)
Response:
{
"statusCode": 0,
"message": "OK",
"result": [
{
"orderHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"data": { /* OrderData object */ },
"signature": "0x1234567890abcdef...",
"execution": {
"status": 1,
"filled": "250000000000000000000",
"positionId": 1
},
"makingAmount": "1000000000000000000000",
"takingAmount": "500000000000000000000",
"expired": false,
"createdAt": 1703894400,
"updatedAt": 1703894500
}
]
}
Last updated