Open a trade (options, stocks or futures)
https://app.skylit.ai/api/nexus/v1/tradesOne route for every asset class. assetClass picks the book.
- Options are bought to open, at market. Send
contractas shorthand (likeSPY 600C 10/16), orticker,strike,directionandexpiration. Not both. 1 to 1,000 contracts. - Stocks take
ticker,side(buyorsell) andquantity, 1 to 100,000 shares, at market. - Futures take
ticker(a product likeNQfor the front month, or one contract likeNQZ26),side,quantity(1 to 100) and optionallyaccount. A market order fills now.orderType: "limit"withlimitPrice, or"stop"withstopPrice, rests until the market trades through it. AddstopLoss,takeProfitandtrailingStopfor a bracket on any order type: each leg is an order of its own,heldwhile the entry rests andworkingonce it fills. A resting order can wait on a quiet market. A market order needs a trade in the last 15 seconds to open or add. - reduceOnly stops a sell from opening a short when a stop already took you flat a second earlier. With
reduceOnly: truethe order goes through only if it shrinks what you hold, checked when it books. Otherwise it answers422 reduce_only_would_openand nothing is placed. It works on a market order with no bracket. - Futures go to your practice account unless
accountnames another:"evaluation"or"funded"when you have exactly one running, or an account id from capabilities. Evaluation and funded accounts keep all their rules (daily loss, max loss, contract cap). Challenge entries can't be traded through the API. - Add
"test": trueto check and price the order without placing it. See Test orders in the intro.
A new options or stock trade answers 201 with the trade. A futures order answers 201 with the order and its bracket. A repeated clientOrderId answers 200 with the first one.
Authorization
Authorization: Bearer <your API key>Required. A missing header returns 401; an invalid, revoked or expired key returns 403.
Headers
Idempotency-KeystringYour
clientOrderId, as a header instead of a body field. If you send both they must match.
Request body
assetClassstringWhich book the order goes to.
optionsstocksfuturescontractstringOptions shorthand, like
SPY 600C 10/16orSPY 600C 10/16 @ 1.84. Send this, orticker,strike,directionandexpiration.tickerstringA symbol like
SPY. For futures, a product likeNQ(the front month) or one contract likeNQZ26.directionstringOptions only.
callputstrikenumberOptions only, like
600or602.5.expirationstringdateOptions only, like
2026-10-16.sidestringStocks and futures. Options are always bought to open.
buysellquantityintegerOptions 1 to 1,000 contracts, stocks 1 to 100,000 shares, futures 1 to 100 contracts.
pricenumberOptions and stocks: your own fill price, taken only inside the window around the live quote.
ifOutsidestringWhat happens when
priceis outside the window: refuse, or fill at market.rejectmarketorderTypestringOptions and stocks take
marketonly. Futures also takelimit(withlimitPrice) andstop(withstopPrice).marketlimitstoplimitPricenumberFutures limit orders: the price the order rests at.
stopPricenumberFutures stop orders: the price that triggers it.
stopLossnumberFutures: a stop loss placed with the entry.
takeProfitnumberFutures: a take profit placed with the entry.
trailingStopbooleanFutures: the stop loss trails the price. Needs
stopLoss.reduceOnlybooleanFutures: only take contracts off a position you hold, never open, add or flip. Market orders with no bracket.
accountstringFutures:
practice(the default),evaluation,funded, or an account id.clientOrderIdstringYour own id for safe retries. 1 to 64 letters, digits, or
_ . : -.testbooleantruechecks and prices the order, then keeps it in your test log instead of placing it.
Responses
- 200
A repeated
clientOrderId: the first order, withmeta.idempotentReplay: true. Nothing new was placed. - 201
Filled (or, for a futures limit or stop order, resting). Options and stocks answer a
Trade, futures aFuturesOrder. A test order is the same shape with"test": true. - 400
The request was refused before anything was traded. Codes:
bad_request,bad_contract,invalid_quantity,invalid_price,unsupported_asset_class,unsupported_order_type,only_market_orders,test_orders_unavailable,test_modify_unavailable. - 401
No key, or a key that isn't valid. Codes:
missing_api_key,invalid_api_key. - 403
The key works but the account can't do this. Codes:
account_suspended,nexus_access_denied,futures_access_denied. - 404
Not on your account. Codes:
trade_not_found,account_not_found,order_not_found. - 409
The order clashes with what you hold or sent before. Codes:
duplicate_position(withtradeId),trade_closed,open_position_limit,client_order_id_used,request_in_progress,account_locked,account_busy,account_ended,order_not_working. - 422
Read fine, but the market or the account says no. Codes:
market_closed,contract_expired,contract_not_offered,price_outside_market,insufficient_buying_power,account_not_tradable,account_ambiguous,reduce_only_would_open,order_refused. - 429
Over a rate limit. Wait
Retry-Afterseconds, then retry. Code:rate_limited. - 500
Something went wrong on our side. If you sent a
clientOrderId, retry with the same one. Code:internal_error. - 503
Try again in a moment (honour
Retry-Afterwhen it's sent). Codes:stale_quote,no_live_price,rules_pending,unavailable,auth_unavailable,access_check_unavailable,api_keys_unavailable,trades_api_disabled.
Response fields
dataobjectAn options or stock trade, as Nexus shows it. Stocks use
directioncallfor long andputfor short, strike 0 and today's date. Nexus may add other fields it shows on a trade (Greeks, P/L, reactions).idstringuuiduserIdstringuuidtickerstringstrikenumberexpirationstringdatedirectionstringcallputassetClassstringoptionsstocksaverageEntryPricenumbercurrentPricenumberThe latest mark.
totalQuantityintegerremainingQuantityintegerstatusstringactiveclosedentryDatestringdate-timeexitDatestringdate-timeexitsobject[]sourcestringapion a trade a key opened.testbooleantrueon a test order.
metaobjectExtra facts about an order. Each field is there only when it applies.
fillobjectThe fill:
price,priceSource(marketorclient), and when you sent a price, thebidandaskit was checked against. On an exit,quantityis how many sold.clientOrderIdstringidempotentReplaybooleanThis answer is a repeat of an earlier order with the same
clientOrderId.testbooleanA test order: nothing was placed.
notCheckedstring[]Futures test orders: what the preview couldn't check, like
account_rules_judgmentorbracket_netting.discordRoutingobjectWhere Nexus routed the trade to Discord, when it did.
nothingToClosebooleanstillOpenstring[]A repeated
closeAll: positions still open.
Last updated