place_order
Submit a real buy or sell order to the Nexus Exchange matching engine with limit, market, stop-loss, take-profit, and trailing order types.
Instructions
Place an order on a market, buy/sell. Supports limit, market, stop-loss (stop_limit / stop_market), take-profit (take_profit_limit / take_profit_market), and trailing (trailing_stop / trailing_limit) orders. Limit-family orders require a price; stop / take-profit orders require a trigger_price; trailing orders require trailing_offset_bps (and trailing_limit also limit_offset_bps). Requires API credentials. This submits a REAL order to the matching engine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Order side. | |
| size | Yes | Order quantity in base units, as a positive decimal string (> 0). | |
| type | Yes | Order type. `limit` and `market` are unconditional. `stop_limit` / `stop_market` fire when the mark price crosses `trigger_price` in the adverse direction (stop-loss); `take_profit_limit` / `take_profit_market` fire on the favorable direction. `trailing_stop` fires a market order once the mark retraces from its best-seen extreme by `trailing_offset_bps`; `trailing_limit` fires the same way but rests a limit order priced off the fire price by `limit_offset_bps`. Field requirements: limit-family (`limit`, `stop_limit`, `take_profit_limit`) require `price`; stop / take-profit types require `trigger_price`; trailing types require `trailing_offset_bps`. | |
| price | No | Limit price as a positive decimal string (> 0). Required for limit-family orders (`limit`, `stop_limit`, `take_profit_limit`); must be omitted for market, stop_market, take_profit_market, and trailing orders (which are priced by the engine or computed at fire time). | |
| market_id | Yes | Market id, e.g. "BTC-USDX-PERP". | |
| reduce_only | No | If true, only reduces an existing position. | |
| time_in_force | No | Time in force. Defaults to GTC for limit, IOC for market. `PostOnly` rejects the order if it would take liquidity on entry, guaranteeing it rests as a maker. | |
| trigger_price | No | Trigger threshold as a positive decimal string (> 0). Required for stop and take-profit orders (`stop_limit`, `stop_market`, `take_profit_limit`, `take_profit_market`): the order activates once the mark price crosses it — adversely for stops, favorably for take-profits. Must be omitted for other order types. | |
| limit_offset_bps | No | Fire-time limit-price offset in basis points (`trailing_limit` only; required together with `trailing_offset_bps`). The rested limit sits at fire_price * (1 + offset) for buys / * (1 - offset) for sells; 0 rests exactly at the fire price. | |
| trailing_offset_bps | No | Trailing trigger offset in basis points (1 bp = 0.01%). Required for trailing orders (`trailing_stop`, `trailing_limit`); must be omitted otherwise. Fires once the mark price retraces from its best-seen extreme by this many bps (0 fires at the first evaluation). |