client.orders.create() or its top-level shortcut client.create_order(). Both methods call POST /v1/orders and return the created order object. The routing mode you choose determines whether you target a specific venue instrument (DIRECT) or let Molecule find the best available price across venues (BEST_PRICE, SPLIT).
Method
POST /v1/orders
Example
Parameters
string
required
The subaccount from which to submit the order.
integer
Venue-specific instrument ID. Required when
routing.mode is DIRECT. Identifies the exact instrument at a specific venue.integer
Cross-venue asset ID. Required when
routing.mode is BEST_PRICE or SPLIT. Molecule resolves the best available instrument(s) across venues automatically."BUY" | "SELL"
required
Direction of the order.
"YES" | "NO"
Binary outcome leg. Required for binary markets where the instrument tracks a specific resolution outcome.
"LIMIT" | "MARKET"
required
Order type.
LIMIT rests at the specified price; MARKET fills at the best available price."GTC" | "IOC" | "FOK" | "GTD"
Time-in-force. Controls how long the order remains active.
string
Limit price as a decimal string (e.g.,
"0.48"). Required for LIMIT orders.string
required
Order quantity as a decimal string (e.g.,
"10").object
Routing configuration object.
string
Your reference ID for this order. Molecule sends this value as the
Idempotency-Key request header. Use it to safely retry order submission without risk of duplicate fills.Response
The API returns the created order object. Key fields:string
Molecule’s unique identifier for the order.
OrderStatus
Current order status. One of
PENDING_SUBMISSION, OPEN, PARTIAL, FILLED, CANCELLED, REJECTED, or EXPIRED.string
The client-supplied reference ID echoed back by the API.
Routing modes in detail
DIRECT
Provide
instrument_id. Routes the order to that specific venue instrument without any cross-venue logic.BEST_PRICE
Provide
generic_asset_id. Molecule queries live venues and routes the full quantity to whichever offers the best executable price.SPLIT
Provide
generic_asset_id. Molecule distributes the quantity across venues to optimise execution. The router never invents size.Idempotency
Submitting an order with the same
client_order_id and the same request body is safe to retry — Molecule returns the original order response. Submitting the same client_order_id with a different body raises a ConflictError with error code idempotency_conflict.