Move a resting order's price or change its size
https://app.skylit.ai/api/nexus/v1/trading/accounts/{account}/orders/{orderId}/modifySend price, quantity, or both. Both change together or neither does.
pricemoves a working limit or stop order (or a bracket's stop or target), like dragging it on the Nexus chart. On a stop-limit,priceis its limit andstopPriceits trigger. The trigger can't move once a trade has hit it.quantitychanges a resting entry's size, 1 to 100. Going up is checked like a new order of that size, your evaluation's contract cap included, and the order loses its place in line from that moment. Going down keeps its place. Your stop and target follow the new size, so you can't resize them on their own.- Futures orders fill all at once, so a filled order can't be resized, and 0 isn't a size: cancel the order instead.
No live price answers 503 no_live_price and the order stays where it was. On a test order you can rehearse a size change with quantity alone. A test order's price can't be moved (400 test_modify_unavailable): cancel it and send a new test order at the new price.
Authorization
Authorization: Bearer <your API key>Required. A missing header returns 401; an invalid, revoked or expired key returns 403.
Path parameters
accountstringrequiredpractice,agent(your bot's account),evaluationorfunded(when you have exactly one running), or a futures account id from capabilities.orderIdstringuuidrequiredThe order's id, from the open, the working list or the history.
Request body
pricenumberThe order's new price, above 0: where a limit, a target or a stop-limit's limit rests, or where a stop or a stop loss triggers.
quantityintegerA resting entry's new size, 1 to 100. Its stop and target follow.
stopPricenumberA stop-limit's new trigger, until a trade reaches it.
testbooleanOptional. The order decides: on a test order only a size change can be rehearsed.
Responses
- 200
The order at its new price or size, with its bracket.
- 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). - 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
dataobjectA futures order. It's not a
Trade: futures keep their own book. Prices are in index points, money in cents.idstringuuidassetClassstringfuturessourcestringapiwhen a key placed it. Left out on an order you placed in Nexus.accountobjectsymbolstringThe contract, like
NQZ26.sidestringbuysellquantityintegerrolestringentryclosestop_losstake_profitorderTypestringmarketlimitstopstop_limitstatusstringheldis a stop or target waiting for its entry to fill.workingheldfilledcancelledrejectedstatusReasonstringWhy it was cancelled or rejected.
limitPricenumberstopPricenumbertrailingDistancenumberA trailing stop: how far behind the price it follows, in points.
fillPricenumberplacedAtstringdate-timefilledAtstringdate-timetriggeredAtstringdate-timeA stop-limit: when a trade hit its stop. From then on it works as a limit.
parentIdstringuuidOn a stop or target: the entry it was placed with.
bracketobject[]The stop and target placed with this order, each a
FuturesOrderwith its own id.clientOrderIdstringkeyIdstringThe public id of the key that placed it.
commissionCentsintegerrealizedPnlCentsintegerGross realized P/L of this fill. 0 on a fill that only opened.
testbooleantrueon a test order.
Last updated