Read one options or stock order
https://app.skylit.ai/api/nexus/v1/trading/wallets/{book}/orders/{orderId}One order as it stands now, in any status: working, filled, cancelled, rejected or expired. statusReason says why when there's a reason.
A filled order shows fillPrice and tradeId. A stock stop that's been set off shows triggeredAt and triggerPrice. An options stop that fired shows firedLeg (stop_loss or take_profit), triggeredAt, triggerPrice (the stock price that set it off), fillPrice (what the option sold for) and fillOrderId.
Authorization
Authorization: Bearer <your API key>Required. A missing header returns 401; an invalid, revoked or expired key returns 403.
Path parameters
bookstringrequiredmainis your own paper wallet,agentis your bot's.mainagentorderIdstringuuidrequiredThe order's id, from the open, the working list or the history.
Responses
- 200
The order.
- 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. - 404
Not on your account. Codes:
trade_not_found,account_not_found,order_not_found. - 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).
Response fields
dataobjectA resting options or stock order: a limit, a stock stop, or an options stop-loss and target. It's not a
Trade: when it fills,tradeIdis the trade it went to.idstringuuidassetClassstringoptionsstockssourcestringapiwhen a key placed it. Left out on an order placed on the Options Desk in Nexus.bookstringmainagentclientOrderIdstringtickerstringstrikenumberOptions only.
directionstringcallorputon an option.longorshorton a stock: the side of the position it opens or closes.expirationstringdateOptions only.
sidestringbuysellpositionEffectstringopenclosequantityintegerfilledQuantityintegerorderTypestringstop,take_profitandbracketon an option are options stops. A trailing stop set on the Options Desk shows astrailing_stop(withtriggerOnpremiumwhen it trails the option's own bid), and a desk market order asmarket, on the main wallet's list.limitstoptake_profitbrackettrailing_stopmarkettimeInForcestringdaygtcstatusstringworkingfilledcancelledrejectedexpiredstatusReasonstringWhy, when there's a reason.
limitPricenumberstopPricenumberA stock stop's level.
stopLossnumberAn options stop: the stock price the stop fires at.
takeProfitnumberAn options stop: the stock price the target fires at.
triggerOnstringunderlyingon an options stop: its levels are the stock's price.underlyingpremiumunderlyingstringThe stock an options stop watches.
firedLegstringWhich leg of an options stop fired.
stop_losstake_profittriggeredAtstringdate-timeWhen a stop was set off. It can't be cancelled or changed after that.
triggerPricenumberThe trade (or for an options stop, the stock price) that set it off.
fillOrderIdstringuuidAn options stop that fired: the sell it sent.
fillPricenumberThe average fill: the ask a buy paid, the bid a sell got, or a stock's trade price.
tradeIdstringuuidThe trade the fill went to, or the trade an options stop protects.
reservedCentsintegerBuying power a resting open holds back. 0 once it stops resting, and on a close.
placedAtstringdate-timefilledAtstringdate-timeexpiresAtstringdate-timetestbooleantrueon a test order. It never fills.
Last updated