What this key can trade right now
https://app.skylit.ai/api/nexus/v1/trading/capabilitiesThe asset classes, order types, futures contracts and futures accounts this key can trade right now, plus your per-key limits. Call it when your bot starts, so it asks instead of guessing.
assetClasseslists each asset class's order types. Options listlimitwhen resting orders are on andstopwhen options stops are on. Stocks listlimitandstopwhen stock resting orders are on.optionsOrdersandstocksOrdersdescribe the resting orders: time in force, what can be modified, the order routes andmaxWorkingOrders.optionsOrders.stopsdescribes options stop-losses.addsdescribes adding to a position.agentAccountandwalletsdescribe your bot's agent account and the wallet read.
The futures block is there only when your account has futures paper trading. When it doesn't, the futures entry under assetClasses says why. The first call creates your futures practice account if you don't have one yet, as Nexus does when you open the futures ticket.
Authorization
Authorization: Bearer <your API key>Required. A missing header returns 401; an invalid, revoked or expired key returns 403.
Responses
- 200
What you can trade.
- 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. - 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
dataobjectassetClassesobject[]One entry per asset class:
assetClass,available,orderTypes, andreasonwhen it isn't available.orderTypesstring[]What every asset class takes (
market). Futures list more underfutures.testOrdersbooleanWhether
"test": trueis accepted.futuresobjectOnly when your account has futures:
marketOpen,reopensAtwhile closed,maxOrderQuantity,orderTypes,bracket,modify(price,quantity,stopPrice), thecontractsyou can trade (with the front month, tick size and value, commission, and whether there's a live price), youraccounts(each aFuturesAccount) andlist, the futures trades list route.limitsobjectYour per-key
writesPerMinuteandreadsPerMinute.agentAccountobjectYour bot's agent account: the
accountvalue to send (agent), itsassetClasses,public(alwaysfalse), adescription, thereadsthat show it, and with futures on afuturesNoteon when its futures reads answer.walletsobjectThe wallet read (
read) and itsbooks(main,agent).quotesobjectWhere live prices are. The quotes
read, itssymbolFormat(OCC),maxSymbols(20),maxQuoteAgeSeconds(15), andmarks, the read that gives each open trade its live mark.optionsOrdersobjectWhen options resting orders are on:
orderTypes,timeInForce,open,exit,modify, the order routes (orders),maxWorkingOrders, andstopswhen options stops are on (triggerOn,exit,fields,fill,onEntry,modify,expires).stocksOrdersobjectWhen stock resting orders are on:
orderTypes,timeInForce,gtcDays,open,exit,shorts,priceSource(lastTrade),fill,maxQuoteAgeSeconds,modify,orders,maxWorkingOrdersandstopswhen stock stops are on (same fields asoptionsOrders.stops, withtriggerOnlastTrade).addsobjectAdding to a position: the
route,assetClasses,orderTypes,maxPositionper asset class, how thepriceis set, and whethertestadds work.streamobjectThe live stream:
available(whenfalse, poll the reads instead),route,events,accounts,resume,heartbeatSeconds,maxStreamsPerKey,replayWindowSeconds(120) andreplayEvents(128).spreadsobjectOnly on a server with spreads (beta). What this key may do with spreads now, by the same rule as the Spreads ticket in Nexus:
available,reason(why not,nullwhen available),account(alwaysmain),strategies(what you may open now;[]while you may only close, cancel and set exits),orderTypes(limit, andmarketwhen market spreads are on),timeInForce,modify,maxQuantity(100 spreads per order),mainTradingEnabled(opens need it; closes, cancels and exits never do) and the spreadroutes.expiryDayCutoffobjectOn a contract's expiration day, new opening orders stop at these New York times:
multiLegOpen(15:00, spreads),singleLegOpen(15:40),timeZone,covers(your main account and every extra port, never the agent account) andcode, the refusal's code (expiry_day_cutoff). Closes are never refused.
Last updated