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. Send
contractas shorthand (likeSPY 600C 10/16), orticker,strike,directionandexpiration. Not both. 1 to 1,000 contracts. A market order fills now at the ask."orderType": "limit"withlimitPricerests at your price: it fills at your limit when the ask comes down to it (at the ask right away if the ask's already there when you send it).timeInForceisday(until 4:00 pm ET; sent after the close, it works the next session) orgtc(until 4:00 pm ET on the contract's last trading day). - Stocks take
ticker,side(buyorsell, wheresellopens a short) andquantity, 1 to 100,000 shares. A market order fills now at the last trade, and refuses a price more than 15 seconds old (503 stale_quote)."orderType": "limit"withlimitPricefills at your limit when a trade prints at or through it (at the last trade right away if it's already there when you send it)."orderType": "stop"withstopPricewaits for a trade through your stop, then fills at the next trade. Resting stock orders only fill between 9:30 am and 4:00 pm ET (1:00 pm on early-close days), andgtcworks for 90 days. - A resting options or stock open holds back buying power (contracts x limit x 100, or shares x limit or stop, a short included) until it fills, is cancelled or expires. It answers
201with the order ("status": "working"). If the market's already through your price it fills right away, with"status": "filled",fillPrice,tradeIdandmeta.fill. Manage it with the Options and stocks resting orders routes. A limit or stop fill isn't posted to Discord and isn't copied. - 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."stop_limit"takes both: nothing happens until a trade hits your stop, then it works as a limit atlimitPriceand only fills at that price or better. A buy's limit has to be at or above its stop, a sell's at or below. 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:"agent"(your bot's account),"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. "account": "agent"sends an options or stock order to your bot's own paper wallet instead of yours. It holds back the bot's buying power and its trades stay private.- Already hold the contract? Don't send a second open (
409 duplicate_position, withtradeId): add to it withPOST /api/nexus/v1/trades/{id}/adds. A limit buy on a contract you hold adds to that position when it fills. - Add
"test": trueto check and price the order without placing it. See Test orders in the intro.
A new options or stock market trade answers 201 with the trade. A resting options or stock order answers 201 with the order. 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 take
marketorlimit. Stocks takemarket,limitorstop. Futures takemarket,limit,stoporstop_limit(with bothstopPriceandlimitPrice).marketlimitstopstop_limitlimitPricenumberA limit or stop-limit: the price the order rests at. Options and stocks in cents, like
2.45(options up to 99,999.99, stocks up to 999,999.99).stopPricenumberA stock stop, or a futures stop or stop-limit: the price that triggers it.
timeInForcestringOptions and stock limits and stops.
dayworks until 4:00 pm ET (sent after the close, the next session).gtcworks until the option's last trading day, or 90 days for a stock.daygtcstopLossnumberFutures: 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.
accountstringagentsends any order to your bot's own agent account. Futures also takepractice(the default),evaluation,funded, or an account id. For options and stocks, leave it out for your own paper wallet.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 resting. An options or stock market order answers a
Trade, an options or stock limit or stop aWalletOrder, 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,limit_price_required(a limit with nolimitPrice),invalid_limit_price(not in cents, or outside 0.01 to 99,999.99 for options or 999,999.99 for stocks),stop_price_required(a stop with nostopPrice),invalid_stop_price(not in cents, or outside 0.01 to 999,999.99),invalid_take_profit,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: add to it instead),trade_closed,open_position_limit(open positions plus resting opens through the API are at 50),working_order_limit(50 options and stock orders already resting through the API),position_size_limit(an add would take the position past 1,000 contracts or 100,000 shares),client_order_id_used,request_in_progress,account_locked,account_busy,account_ended,order_not_working(it already filled, expired, or was cancelled or rejected),stop_triggered(a stop that's been set off is filling now, so it can't be cancelled or changed). - 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,order_rejected(a resting order that tried to fill right away and couldn't;orderIdpoints to it). A resting order that can't be covered answersinsufficient_buying_powerwithorderIdtoo: it's recorded as rejected. - 429
Over a rate limit. Wait
Retry-Afterseconds, then retry. Codes:rate_limited, andstream_limit_reached(too many live streams open: 3 per key, 6 per account). - 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(the quote, or a stock's last trade, is more than 15 seconds old, so nothing filled),no_live_price,rules_pending,unavailable,auth_unavailable,access_check_unavailable,api_keys_unavailable,trades_api_disabled,stream_unavailable(the live stream isn't on, or the server is restarting: try again shortly, or poll the reads).
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.tradeIdstringuuidA resting exit or an options stop: the trade it closes or protects.
triggerOnstringAn options stop:
underlying.underlyingPricenumberAn options stop: the stock's price right now.
marketOpenbooleanAn options stop: whether the market's open for the contract.
firesNowbooleanAn options stop: the stock's already through a level, so it fires on the next check.
firesOnsays which leg.wouldFireNowbooleanA test options stop: what
firesNowwould say.wouldFillNowbooleanA test limit: whether the real one would've filled right away, with
fillPrice.wouldTriggerNowbooleanA test stock stop: the last trade's already through it.
wouldRestBecausestringA test limit: why the real one would rest.
alreadyCancelledbooleanA repeated cancel: it was already cancelled.
Last updated