Core Order API
Provides the complete set of API endpoints for managing the lifecycle of single-leg orders. These endpoints allow you to submit, retrieve, amend, pause, resume, and cancel single-leg orders.
For other order-specific API workflows, please refer to the documentation for Simple Orders, Algorithmic Orders, Multi-Orders, and Chained Orders.
Authentication
All endpoints require Authorization.
Send Authorization:
Token <API_KEY>with every request.For write endpoints, include
Content-Type: application/json
Example:
Header: Authorization:
Token 1a2b3c...
Get all orders
GET /api/orders/
Get all orders within the past 12 months. Identity is inferred by API token.
Query Parameters
statuses
string
Comma separate values of order statuses. (e.g., "ACTIVE,COMPLETED,CANCELED"). See the Type Reference page for a list of available values.
account_names
string
Comma separated values of account names. If using another user's account, must be scoped with prefix ex. username/account_name
before
string
ISO 8601 format timestamp, orders before this timestamp
after
string
ISO 8601 format timestamp, orders after this timestamp
custom_order_ids
string
Comma separated values of custom_order_id submitted with the order
page
string
1-indexed page number, default: 1
page_size
string
page size, default: 100
Response Fields
id
string (UUID)
No
Unique order identifier
custom_order_id
string
No
Custom order ID provided by client (empty string if not provided)
parent_order_id
string (UUID)
Yes
ID of parent multi-order if this is a child order
batch_order_id
string (UUID)
Yes
ID of batch order if this order is part of a batch
batch_order_strategy
string
Yes
Batch strategy name (e.g., "Scale Orders") if part of a batch
notes
string
Yes
Order notes or description
pair
string
No
Trading pair (e.g., "BTC:PERP-USD", "BTC-USDT")
side
string
No
Order side: "buy" or "sell"
exchanges
array (string)
No
Array of exchange names where the order was placed
buy_token
string
No
Token or contract symbol being bought
buy_token_amount
number (float)
Yes
Target buy token amount (decimal as number)
sell_token
string
No
Token or quote asset being sold
sell_token_amount
number (float)
Yes
Target sell token amount (decimal as number)
executed_qty
number (float)
No
Executed quantity in the order's target token
executed_buy_qty
number (float)
Yes
Executed buy quantity (base asset)
average_executed_price
string (decimal)
Yes
Volume-weighted average execution price (decimal as string)
executed_notional
number (float)
Yes
Executed notional value (quote asset)
target_order_qty
number (float)
No
Target order quantity
target_remaining_qty
number (float)
No
Remaining quantity to execute
target_token
string
No
Token in which target_order_qty and target_remaining_qty are measured
target_executed_qty
number (float)
Yes
Executed quantity in target token terms
pct_filled
string (decimal)
Yes
Percentage filled (0-100, decimal as string)
total_fee
number (float)
Yes
Total fee for the order
fee_asset
string
Yes
Asset in which total_fee is denominated
total_fee_in_base
number (float)
Yes
Total fee converted to base asset
strategy
string
No
Execution strategy name (e.g., "Market", "TWAP", "VWAP")
super_strategy
string
Yes
Super strategy name if applicable
duration
number (integer)
No
Order duration in seconds
accounts
array (string UUID)
No
Array of exchange credential IDs used for the order
account_names
array (string)
No
Array of account display names
engine_passiveness
number (float)
Yes
Passiveness parameter (0 = most aggressive, higher = more passive)
schedule_discretion
number (float)
Yes
Schedule discretion parameter
pov_limit
number (float)
Yes
POV (participation) limit for POV orders
pov_target
number (float)
Yes
POV target for POV orders
alpha_tilt
number (float)
Yes
Alpha tilt parameter (-1 to 1)
strategy_params
object
No
Strategy-specific parameters (e.g., {"passive_only": true})
user
string
No
User ID who owns the order
status
string
No
Order status: "ACTIVE", "COMPLETE", "CANCELED", "PAUSED", "SCHEDULED", "SUBMITTED", "FINISHER"
active
boolean
No
Whether order is currently active
is_simple
boolean
No
Whether this is a simple (single-slice) order
failure_reason
string
No
Failure reason if order failed (empty string if no failure)
limit_price
string
No
Limit price or expression (empty string if not used)
is_reverse_limit_price
boolean
No
Whether limit price is reversed (e.g., for OOL pause)
time_start
string (ISO 8601)
Yes
Order start time (UTC)
time_end
string (ISO 8601)
Yes
Order end time (UTC)
created_at
string (ISO 8601)
No
Timestamp when order was created (UTC)
updated_at
string (ISO 8601)
No
Timestamp when order was last updated (UTC)
Authorization: Token <API_KEY>
Example Request
Example Response
Response Codes:
Occurs when:
Invalid date format provided for before or after parameters (must be ISO 8601 format)
Account names provided don't exist or user doesn't have access to them
The specific error message will indicate which parameter caused the issue
Occurs when:
No valid authentication token provided in Authorization header
Token is expired or invalid
User account is not active
Occurs when:
Database connection issues
Unexpected server errors during order retrieval
Get active orders
get /api/active_orders/
Get all currently active orders for the authenticated user.
exclude_paused
string
Whether to exclude paused orders. Default: true
account_names
string
Comma separated values of account names to filter by
only_active
string
Whether to return only active orders. Default: false
Headers
Authorization: Token <API_KEY>
Example Request
Example Response
Response Codes
Occurs when:
Invalid account names are provided in the account_names query parameter
The user doesn't have access to the specified accounts
There's an issue resolving the account display names to account IDs
The specific error message depends on what went wrong in the account lookup process, but the response structure is always: {"error": "error message from account lookup"}S
Occurs when:
No valid authentication token provided
Token is expired or revoked
Submit an order
POST /api/orders/
Submit an order for scheduling and execution. The request contains all the parameters necessary to carry out the execution until completion.
The order is queued immediately if start_datetime is not set or is in the past.
Request Body
pair
string
Symbol for the token pair, refer to token pairs reference
side
string
Order side: buy or sell
pos_side
string
short or long. Use when the account's position mode is set to "Hedge"
base_asset_qty
decimal
Quantity of base asset. Must provide exactly one of: base_asset_qty, quote_asset_qty, or sell_token_amount
quote_asset_qty
decimal
Quantity of quote asset. Must provide exactly one of: base_asset_qty, quote_asset_qty, or sell_token_amount
sell_token_amount
decimal
Quantity of sell token. Must provide exactly one of: base_asset_qty, quote_asset_qty, or sell_token_amount
strategy
string
Trading algorithm UUID. See the Type Reference page for a list of values
strategy_params
object
Various options for configuring the strategy. See the Type Reference page for more details
accounts
array[string]
List of account names. You pick this name when linking a new exchange key under key management
duration
integer
Duration of execution in seconds. Required unless pov_target is provided
start_datetime
string (ISO 8601)
Time represented in Epoch milliseconds of when to start execution. If not provided, defaults to now
limit_price
string
Limit price for passive orders. If not provided, the algorithm will decide
is_reverse_limit_price
boolean
Engine will only trade at prices worse than limit_price
engine_passiveness
decimal [0, 1]
Passiveness of the engine (accepted values: 0 to 1). A higher passiveness will result in the engine placing further from the spread. For more information, read about Passiveness
schedule_discretion
decimal [0.02, 0.5]
Ratio of order size allowed to deviate from the target i.e. decides the upper and lower bounds of the schedule. For more information, read about Discretion
alpha_tilt
decimal [-1, 1]
Implied short-term alpha. See Alpha Tilt for more detail
pov_limit
decimal (0, 1]
The engine will trade at no more than this fraction of market volume. See Participation Rate Limit for more detail. Note that the GUI interprets this value as a percentage
pov_target
decimal (0, 1]
Participation Rate Target. Note that the GUI interprets this value as a percentage
max_otc
decimal [0, 1]
Upper bound of the fraction of the parent order that will be executed via OTC. See Max OTC Percentage. Note that the GUI interprets this value as a percentage
order_condition
string
An expression representing the condition that would trigger the start of execution. Refer to Conditional Order
notes
string
Arbitrary string to add notes
custom_order_id
string
64 max length string that can be used to filter in GET orders endpoint. When TaaS sends orders to supported exchanges, the client order id of the exchange orders will start with "TL" followed by first 9 alphanumeric characters of the custom_order_id
updated_leverage
integer
Leverage for the account can be updated prior to submitting the order (behavior varies based on the venue)
stop_price
decimal
Stop price for stop orders
order_slices
integer
Number of order slices to use for execution. Higher values create more granular execution with smaller individual placements.
target_asset
string
Specifies which asset (base or quote) the order quantity refers to. This determines how the order quantity is interpreted and calculated.
exposure_tolerance
decimal
Tolerance for exposure limits in multi-order scenarios
market_type
string
Market type for the order
super_strategy
string (UUID)
Super strategies are predefined configurations that include strategy parameters, engine passiveness, schedule discretion, and alpha tilt settings.
Headers
Authorization: Token <API_KEY>Content-Type: application/json
Example Request
Field
Type
Nullable
Description
id
string (UUID)
No
Unique identifier for the order
parent_order
string (UUID)
Yes
FK to MultiOrder - parent grouping for related orders
batch_order
string (UUID)
Yes
FK to BatchOrder - batch grouping (e.g., scale orders)
chained_orders
array[object]
No
List of chained orders linked to this order
created_at
string (ISO 8601 datetime)
No
Timestamp when the order was created
buy_token
string
No
Token symbol being bought (e.g., 'BTC:PERP', 'ETH')
sell_token
string
No
Token symbol being sold (e.g., 'USDT', 'USD')
pair
string
No
Trading pair in format 'BASE-QUOTE' (e.g., 'BTC:PERP-USDT')
side
string
No
Order side: 'buy' or 'sell'
sell_token_amount
string (decimal)
No
Amount of sell token (notional for buy orders, quantity for sell orders)
buy_token_amount
string (decimal)
Yes
Target buy token quantity. If set, order targets this quantity instead of sell_token_amount
target_order_qty
number (decimal)
No
Computed: target quantity based on buy_token_amount or sell_token_amount
target_remaining_qty
number (decimal)
No
Computed: remaining quantity to fill
strategy
string (UUID)
No
FK to Strategy - execution algorithm used
super_strategy
string
Yes
Name of the super strategy (e.g., 'Impact Minimization', 'Arrival Price')
super_strategy_name
string
Yes
Display name of the super strategy
strategy_params
object
No
Refer to StrategyParams in type reference, all fields are nullable
limit_price
string (decimal)
No
Limit price for the order (empty string if no limit)
is_reverse_limit_price
boolean
No
If true, limit price acts as floor (buy) or ceiling (sell)
time_start
string (ISO 8601 datetime)
No
Scheduled start time for order execution
time_end
string (ISO 8601 datetime)
No
Computed: scheduled end time (time_start + duration)
is_simple
boolean
No
Whether this is a simple/immediate order
orig_time_end
string (ISO 8601 datetime)
Yes
Original end time before any extensions
duration
integer
No
Order duration in seconds
accounts
array[string (UUID)]
No
List of ExchangeCredential IDs to execute on
account_names
array[string]
No
Computed: human-readable account names
unique_venues
array[string]
No
Computed: list of unique exchange venues
user
string
No
User ID who created the order
placements
array[object]
No
List of placement objects (child orders sent to exchanges)
executed_qty
number (decimal)
No
Computed: total executed sell token quantity
executed_buy_qty
number (decimal)
No
Computed: total executed buy token quantity
executed_price
string (decimal)
Yes
Computed: volume-weighted average execution price. Null if no fills
executed_notional
number (decimal)
No
Computed: total executed notional value
executed_token
number (decimal)
No
Computed: executed token quantity (base or quote depending on side)
active
boolean
No
Computed: whether order is currently active
status
string
Yes
Order status: 'SCHEDULED', 'ACTIVE', 'COMPLETED', 'CANCELLED', 'FAILED', etc.
engine_passiveness
string (decimal)
No
Passiveness parameter (0-1). Higher = more passive/maker orders
schedule_discretion
string (decimal)
Yes
Schedule discretion parameter (0-1). Controls execution timing flexibility
alpha_tilt
string (decimal)
Yes
Alpha tilt parameter. Biases execution toward start or end of window
exposure_tolerance
string (decimal)
Yes
Computed from parent_order: max exposure deviation tolerance (e.g., 0.09 = 9%)
pov_limit
string (decimal)
Yes
Maximum participation rate as fraction of market volume (e.g., 0.15 = 15%)
pov_target
string (decimal)
Yes
Target participation rate as fraction of market volume (e.g., 0.05 = 5%)
order_condition
string
Yes
Trigger condition in reverse polish notation
order_condition_vars
object
Yes
Variables used in order condition expressions
order_condition_expiry
string (ISO 8601 datetime)
Yes
When the order condition expires
failure_reason
string
No
Reason for order failure (empty string if not failed)
stop_price
string (decimal)
No
Stop price for stop orders. -1 if not a stop order
notes
string
No
User notes for the order
custom_order_id
string
No
User-defined custom order identifier (max 64 chars)
updated_leverage
integer
Yes
Leverage setting applied to the account for this order
vwap
string (decimal)
Yes
Computed: market VWAP during order execution window. Populated on completion
interval_volume
string (decimal)
Yes
Computed: total market volume during order execution window. Populated on completion
arrival_price
string (decimal)
Yes
Computed: market price at order start. Populated on completion
departure_price
string (decimal)
Yes
Computed: market price at order end. Populated on completion
pct_filled
number (decimal)
No
Computed: percentage of order filled (0-100)
order_variable_normal
object
No
Computed: order condition variables in human-readable infix notation
order_condition_normal
string
No
Computed: order condition in human-readable infix notation
paused_at
string (ISO 8601 datetime)
Yes
Timestamp when order was paused
resumed_at
string (ISO 8601 datetime)
Yes
Timestamp when order was resumed after pause
market_type
string
No
Market type: 'spot', 'perp', 'future', 'option'
max_otc
string (decimal)
No
Maximum OTC allocation (0 = no OTC)
pos_side
string
Yes
Position side for perpetuals: 'long' or 'short'
order_slices
integer
Yes
Number of slices to divide the order into
auto_order_metadata
object
No
Metadata for auto-generated orders
batch_order_strategy
string
Yes
Computed: batch strategy name (e.g., 'Scale Orders', 'Entry & Exit')
chase_decay
integer
Yes
Chase decay in seconds. Controls how frequently passive placements are re-pegged
Response body
Field
Value
Description
parent_order
UUID
FK to MultiOrder - parent grouping for related orders
batch_order
UUID
FK to BatchOrder - batch grouping (e.g., scale orders)
buy_token_amount
"0.01118596"
~1000 USDT / 89411.25 price = target BTC qty
strategy_params.max_clip_size
"500"
Max notional per slice (must be ≥100 per validation)
executed_price
"89385.50"
Weighted avg fill price (slightly better than limit)
exposure_tolerance
"0.09"
Default from codebase is 0.09 (9%)
pov_limit
"0.15"
Max % of interval volume (15% is typical)
pov_target
"0.05"
Target % of volume participation (5%)
order_condition_expiry
datetime
5 mins after time_end - when condition expires
updated_leverage
10
Integer leverage setting for the perp
vwap
"89392.75"
Volume-weighted avg price during execution window
interval_volume
"125847.32"
Total market volume during the order interval
arrival_price
"89411.25"
Price at order start (same as limit)
departure_price
"89378.50"
Price at order end
paused_at
datetime
When order was paused (if ever)
resumed_at
datetime
When order resumed after pause
pos_side
"long"
Position side for perps - "long" for buy orders
batch_order_strategy
"Scale Orders"
One of: "Scale Orders", "Entry & Exit"
chase_decay
30
Seconds between re-pegging passive orders
Occurs when:
Missing required fields: pair, side, accounts, strategy, or duration (unless pov_target provided)
No quantity field provided: must include exactly one of base_asset_qty, quote_asset_qty, or sell_token_amount
Multiple quantity fields provided: cannot have more than one of base_asset_qty, quote_asset_qty, or sell_token_amount
Invalid parameter values (e.g., negative quantities, invalid strategy UUID)
Invalid account names or insufficient permissions
Invalid pair format or unsupported trading pair
Invalid limit price format or value
Invalid strategy parameters
Invalid order condition expression
Invalid time format for start_datetime
Invalid leverage value for the specified venue
Occurs when:
Missing or invalid API token
Token has expired
Insufficient permissions to access the specified accounts
Occurs when:
Superusers on retail environment cannot place orders
Account access restrictions
Trading restrictions on the specified pair or venue
Occurs when:
Insufficient balance for the order
Market restrictions prevent order execution
Exchange-specific limitations
Invalid order configuration for the selected strategy
Occurs when:
Database connection issues
External service failures
Unexpected system errors
Get order summary
GET /api/order_summary/{id}
Get basic order information including execution status, quantities, and key parameters. This endpoint provides a concise summary of the order without detailed fill information.
Purpose: Get a list of orders with statistics
Scope: Multiple orders (paginated)
Data: Basic order info + statistics + fills for each order
Use Case: Dashboard, order list view, bulk analytics
Performance: Optimized for bulk retrieval
Path Parameters
id*
string (UUID)
UUID of the order to retrieve
Query Parameters
None.
Headers
Authorization: Token <API_KEY>
Example Request
GET /api/order_summary/45a18223-aeab-4451-9253-c3135261d55b
Response Codes
Occurs when:
No order ID provided in the URL path
Invalid UUID format for the order ID
Order ID is malformed or contains invalid characters
Occurs when:
Missing or invalid API token
Token has expired
User does not have permission to access the specified order
Occurs when:
Order with the specified ID does not exist
Order has been deleted or is not accessible
Order ID is valid but the order is not found in the database
Occurs when:
Database connection issues
External service failures
Unexpected system errors during order retrieval
Get orders with statistics
GET /api/orders_with_stats/
Retrieve a paginated list of orders with their associated statistics and analytics data. This endpoint provides comprehensive order information including execution statistics, fill breakdowns, and performance metrics.
Purpose: Get a list of orders with statistics
Scope: Multiple orders (paginated)
Data:
Basic Order Information: ID, pair, side, status, duration, etc.
Execution Statistics: VWAP, arrival price, departure price, interval volume
Fill Data: Detailed fill information with placement details
Performance Metrics: Fee calculations, execution analytics
Account Information: Associated accounts and exchange details
Use Case: Dashboard, order list view, bulk analytics
Performance: Optimized for bulk retrieval
Query Parameters
page
integer
Page number for pagination (Default: 1; Optional)
page_size
integer
Number of orders per page (Default: 500, Max: 100)
Headers
Authorization: Token <API_KEY>
Example Request
GET /api/orders_with_stats/?page=1&page_size=100
Example Response
Response Codes
Occurs when:
The page_size parameter is greater than 1000
Invalid query parameters are provided
Occurs when:
Invalid or missing authentication token
User is not authenticated
Notes
Superuser Access: Superusers can retrieve orders for all users; regular users only see their own orders.
Pagination: Use
pageandpage_sizeto control result set size.Statistics: Each order includes a
statsobject with VWAP, arrival price, departure price, and interval volume.Fills: Each order includes detailed fill data if available.
Related Endpoints
GET /api/orders/- Get orders (basic info, no stats)GET /api/order/<id>- Get single order details
Get order details
GET /api/order/{id}
Get detailed single order info along with executed fills
Purpose: Get detailed information about a single order
Scope: One specific order
Data: Comprehensive order details including:
Full order configuration
All placements and fills
Execution analytics
Market data
Performance metrics
Audit trail
Use Case: Order detail page, deep analysis of one order
Performance: Heavy computation for single order
Path Parameters
id*
string
UUID of the order (Required)
Query Parameters
include_fills
boolean
Whether to include fill data in response. (Default: false, Optional)
Headers
Authorization: Token <API_KEY>
Example Request
GET /api/order/6debb950-614a-4366-b73b-7d7574fd9e15?include_fills=true
Example Response
Response Fields
id
string (UUID)
Unique identifier for the order
parent_order_id
string (UUID) \
null Note: ID of the parent multi-order, if applicable
pair
string
Trading pair symbol
side
string
Order side: buy or sell
status
string
Current order status (e.g., ACTIVE, COMPLETED, CANCELED)
start_datetime
string (ISO 8601)
Order start time in UTC
duration
integer
Order duration in seconds
target_token
string
Token being targeted for the order
target_order_qty
decimal
Total order quantity
remaining_qty
decimal
Remaining quantity to be executed
executed_qty
decimal
Quantity already executed
executed_notional
decimal
Total notional value of executed quantity
exchange_names
array[string]
List of exchanges where the order is being executed
account_names
array[string]
List of account names used for the order
schedule_discretion
decimal
Schedule discretion parameter
engine_passiveness
decimal
Engine passiveness parameter
alpha_tilt
decimal
Alpha tilt parameter
strategy
string \
null Note: Super strategy name, if applicable
trajectory
string
Trading strategy/trajectory name
strategy_params
object
Strategy-specific parameters
participation_rate_target_percent
decimal \
null Note: Participation rate target as percentage
market_type
string
Market type (e.g., spot, perp, option)
failure_reason
string
Reason for order failure, if applicable
limit_price
string
Limit price for the order
placement_live_qty
decimal
Quantity currently in live placements
Get order details by custom ID
To retrieve orders by custom order ID, use the main orders endpoint with the custom_order_ids query parameter:
GET /api/orders/?custom_order_ids={custom_order_id}
Query Parameters
custom_order_ids*
string
Yes
Comma-separated list of custom order IDs to filter by
Optional Filters (same as Get All Orders): account_names, after, before, page, page_size, statuses.
Headers
Authorization: Token <API_KEY>
Example Request
GET /api/orders/?custom_order_ids=ETH_ACC_001
Example Response
Response Codes
Occurs when:
Missing custom_order_ids parameter
Invalid format for custom_order_ids parameter
Invalid account names in account_names filter
Invalid date format in after or before parameters
Occurs when:
Missing or invalid API token
Token has expired
Insufficient permissions to access the specified accounts
Occurs when:
Database connection issues
External service failures
Unexpected system errors
Get order errors
GET /api/order_errors/
Retrieve order errors and messages for orders. This endpoint returns error messages, warnings, and informational messages associated with orders, organized by order ID.
The response includes:
Order Errors: System-generated errors, warnings, and info messages
Message Types: ERROR, WARN, INFO classifications
Timestamps: When each message was created
Order Association: Messages grouped by order ID
Notes
There are non-error order messages ex with type message_type "INFO" or "WARNING"
There is currently no dedicated
/api/order_messages/{id}endpoint. Order messages are included as part of the response in endpoints such as/api/order/{id}and/api/multi_order/{id}
Query Parameters
order_ids
string
Comma-separated list of order UUIDs to filter by (Optional)
Headers
Authorization: Token <API_KEY>
Example Request
GET /api/order_errors/?order_ids=6debb950-614a-4366-b73b-7d7574fd9e15,7fecb061-725b-5477-c84c-8e8685ge0f26
Example Response
Response Codes
Occurs when:
No order ID provided in the URL path
Invalid UUID format for the order ID
Occurs when:
The order does not belong to the authenticated user and the user is not a superuser
Occurs when:
No order exists with the given ID
Notes:
If no order_ids parameter is provided, returns errors for all orders accessible to the user
Response is a dictionary where keys are order IDs and values are arrays of error messages
Messages are sorted by creation time (newest first)
Includes non-error messages with types "INFO" and "WARNING" in addition to "ERROR"
Cancel order
DELETE /api/order/{id}
Cancels the order and all active placements across venues.
Path Parameters
id*
string
UUID of the order
What Happens When You Cancel an Order
When you cancel an order, the following actions are performed:
Cancel Active Placements: All active placements across all venues are canceled
Update Order Status: Order status is changed to "CANCELED"
Cancel Sibling Orders: If this is a child order in a multi-order, sibling orders are also canceled
Trigger Chain Progression: If this is part of a chained order, chain progression is triggered
Cleanup Tasks: Order cleanup tasks are queued for execution
Analytics: On-complete analytics are scheduled to run
Broadcast Updates: Order cancellation event is broadcast to connected clients
Notifications: Order event notifications are sent
Points & Achievements: Points and achievements are applied based on order performance
Headers
Authorization: Token <API_KEY>
Example Request
Example Request
DELETE /api/order/6debb950-614a-4366-b73b-7d7574fd9e15
Example Response
Note: The response is a simple string message. If the order was already canceled, the response would be:
Response Codes
Occurs when:
No order ID provided in the URL path
Invalid UUID format for the order ID
Order ID is malformed or contains invalid characters
Occurs when:
Missing or invalid API token
Token has expired
User does not have permission to access the specified order
Occurs when:
Order with the specified ID does not exist
Order has been deleted or is not accessible
Order ID is valid but the order is not found in the database
Occurs when:
Order is in a state that prevents cancellation
Failed to cancel active placements on exchanges
Exchange-specific cancellation failures
Database transaction failures during cancellation
Network connectivity issues with exchanges
Order is part of a complex workflow that cannot be interrupted
Occurs when:
Database connection issues
External service failures
Unexpected system errors during cancellation process
Worker queue failures
Analytics service failures
Notes
Idempotent: Canceling an already canceled order will return a success message
Sibling Orders: Canceling a child order in a multi-order will also cancel sibling orders
Chained Orders: Canceling an order in a chain may trigger progression to the next order
Placement Cancellation: All active placements, including OTC placements, are canceled
Cleanup: Order cleanup happens asynchronously and includes reconciliation of active placements
Analytics: Order analytics are generated 3 minutes after cancellation to ensure all data is collected
Pause order
POST /api/pause_order/
Pause an active order, canceling all active placements and stopping execution until resumed. The order will maintain its current state and can be resumed later.
What Happens When You Pause an Order
When you pause an order, the following actions are performed:
Cancel Active Placements: All active placements across all venues are canceled, including OTC placements
Update Order Status: Order status is changed to "PAUSED"
Set Pause Timestamp: The paused_at timestamp is recorded
Clear Resume Condition: For manual pauses, any resume condition is cleared to prevent automatic resumption
Clear Future Schedule Points: Future schedule points are removed to prevent confusion during resumption
Pause Market Data Collection: Market data collection for the order is paused
Broadcast Updates: Order paused event is broadcast to connected clients
Send Notifications: Order pause event notifications are sent
Path Parameters
order_id
string
UUID of the order
Headers
Authorization: Token <API_KEY>Content-Type: application/json
Example Request
POST /api/pause_order/
Body:
Example Response
Response Codes
Occurs when:
Order is successfully paused
All active placements are canceled
Order status is updated to "PAUSED"
Occurs when:
Missing
order_idin request bodyInvalid UUID format for the order ID
Order ID is malformed or contains invalid characters
Occurs when:
Missing or invalid API token
Token has expired
User does not have permission to access the specified order
Occurs when:
No order exists with the given ID
Occurs when:
Order is not in an active/running state
Order is already paused
Order is completed, canceled, or in another terminal state
Failed to cancel active placements on exchanges
Exchange-specific cancellation failures
Database transaction failures during pause operation
Network connectivity issues with exchanges
Order is part of a complex workflow that cannot be paused
Occurs when:
Database connection issues
External service failures
Unexpected system errors during pause process
Market data service failures
Notification service failures
Notes
Order State Requirement: Only orders with status "ACTIVE" can be paused
Idempotent: Pausing an already paused order will return an error
Placement Cancellation: All active placements, including OTC placements, are canceled during pause
Schedule Preservation: Future schedule points are cleared to prevent confusion during resumption
Manual vs System Pause: Manual pauses clear resume conditions to prevent automatic resumption
Resume Condition: If a resume condition is provided, it will be set for automatic resumption
Market Data: Market data collection is paused to conserve resources
Notifications: Pause notifications are sent to inform users of the order state change
Related Endpoints
Resume Order:
POST /api/resume_order/- Resume a paused orderPause All Orders:
POST /api/pause_all_orders/- Pause all active orders for the userPause Multi Order:
POST /api/pause_multi_order/- Pause a multi-order and all its child ordersPause Chained Order:
POST /api/pause_chained_order/- Pause a chained order
Resume order
POST /api/resume_order/
Resume a previously paused order. This operation will restart order execution, update the order status to "ACTIVE", and trigger the execution workflow.
Path Parameters
order_id
string
UUID of the order
Headers
Authorization: Token <API_KEY>Content-Type: application/json
Example Request
POST /api/resume_order/
Body:
Example Response
Response Codes
Occurs when:
The
order_idfield is missing from the request bodyThe provided
order_idis not a valid UUID
Occurs when:
No order exists with the given
order_id
Occurs when:
The order is not in a paused state (cannot be resumed)
There is a failure amending the order schedule
There is a database or internal error during the resume process
{
"error": "Internal server error"
}
Amend order
POST /api/amend_order/
Amend an existing order by updating specific fields. This operation allows you to modify order parameters such as quantity, duration, limit price, and POV target while the order is still active.
Request Body
order_id*
string (UUID)
Yes
UUID of the order to amend
changes*
object
Yes
Object containing the fields to update and their new values
Updatable Fields
base_asset_qty
number
Base asset quantity (cannot be used with quote_asset_qty)
Must be positive
quote_asset_qty
number
Quote asset quantity (cannot be used with base_asset_qty)
Must be positive
duration
integer
Order duration in seconds
Must be at least 5% more than elapsed time
pov_target
number
Percentage of volume target (0-1)
Must be between 0 and 1
limit_price
string
Limit price for the order
Must be valid price expression
Headers
Authorization: Token <API_KEY>Content-Type: application/json
Example Request
POST /api/amend_order/
Body:
Example Response
Occurs when:
The
order_idor changes field is missing from the request bodyThe changes field is not an object
Both
base_asset_qtyandquote_asset_qtyare providedThe provided values are not valid (e.g., non-numeric quantities)
Occurs when:
A superuser attempts to amend an order in a retail environment
Occurs when:
No order exists with the given
order_id
Occurs when:
The order is too close to completion (less than 15 seconds remaining)
The order is a child order (unless in dev mode)
Both
base_asset_qtyandquote_asset_qtyare providedThe new
sell_token_amountis less than 5% above executed quantityThe new
durationis less than 5% above elapsed timeThe new
limit_priceis invalidThere is a failure updating the order or schedule
Occurs when:
Database connection issues
Unexpected server errors during order retrieval
Cancel all orders
POST /api/cancel_all_orders/
Cancel all active orders for the authenticated user. This operation will cancel all orders that are not in a terminated state (excluding COMPLETED, CANCELED, and other final statuses). By default, paused orders are also excluded unless specified otherwise.
Request Body
account_names
Comma-separated strings
Optional. List of account names. You pick this name when creating an account under account management (e.g., binance_main,coinbase_pro) If not provided, all user accounts are considered.
Query Parameters
exclude_paused
boolean
Optional. Whether to exclude paused orders from cancellations. (Default: true)
Headers
Authorization: Token <API_KEY>
Content-Type: application/json (only when sending a body)
Example Request
POST /api/cancel_all_orders/?exclude_paused=true
Example Response
Response Codes
Occurs when:
The
account_namesfield is provided but is not a comma-separated stringThere are errors fetching the specified accounts
Occurs when:
Some orders could not be canceled due to internal errors
There were failures canceling placements or updating order status
There were errors fetching the specified accounts and some orders failed to cancel
Pause all orders
POST /api/pause_all_orders/
Pause all active orders for the authenticated user. This operation will pause all orders with status "ACTIVE" and cancel their active placements. The orders will maintain their current state and can be resumed later.
What Happens When You Pause All OrdersWhen you pause all orders, the following actions are performed for each active order:
Cancel Active Placements: All active placements across all venues are canceled, including OTC placements
Update Order Status: Order status is changed from "ACTIVE" to "PAUSED"
Record Pause Time: The paused_at timestamp is recorded
Clear Resume Condition: Any resume conditions are cleared to prevent automatic resumption
Clear Future Schedule Points: Future schedule points are removed to prevent confusion
Pause Market Data Collection: Market data collection for the order is paused
Send Notifications: Order pause notifications are sent
Request Body
This endpoint does not require any request body parameters.
Headers
Authorization: Token <API_KEY>
Example Request
POST /api/pause_all_orders/
Example Response
Response Codes
Occurs when:
No active orders to pause, or invalid request parameters (e.g., account not found)
Occurs when:
Invalid or missing authentication token
User is not authenticated
Occurs when:
Some orders failed to pause due to system errors
Orders are in an invalid state for pausing
Notes
Superuser Access: Superusers can pause all orders across all users
Regular Users: Regular users can only pause their own active orders
Partial Failures: If some orders fail to pause, the response will indicate which orders failed
Order State: Paused orders maintain their current execution state and can be resumed later
No Request Body: This endpoint does not require any request parameters
Related Endpoints
POST /api/resume_all_orders/- Resume all paused ordersPOST /api/pause_order/- Pause a single orderPOST /api/resume_order/- Resume a single order
Resume all orders
POST /api/resume_all_orders/
Resumes all PAUSED single-leg orders for the authenticated user and sets them back to ACTIVE.. This operation will resume all orders with status "PAUSED" and restart their execution. Orders will transition back to "ACTIVE" and execution will continue from where they left off.
What Happens When You Resume All Orders
When you resume all orders, the following actions are performed for each paused order:
Update Order Status: Order status is changed from "PAUSED" to "ACTIVE"
Resume Execution: Order execution is restarted from the paused state
Resume Market Data Collection: Market data collection for the order is resumed
Send Notifications: Order resume notifications are sent
Request Body
This endpoint does not require any request body parameters.
Headers
Authorization: Token <API_KEY>
Example Request
POST /api/resume_all_orders/
Example Response
Response Codes
Occurs when:
No paused orders to resume
Occurs when:
Invalid or missing authentication token
User is not authenticated
Notes
Superuser Access: Superusers can resume all paused orders across all users
Regular Users: Regular users can only resume their own paused orders
No Request Body: This endpoint does not require any request parameters
Related Endpoints
POST /api/pause_all_orders/- Pause all active ordersPOST /api/pause_order/- Pause a single orderPOST /api/resume_order/- Resume a single order
Last updated
Was this helpful?