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, and thereadsthat show it.walletsobjectThe wallet read (
read) and itsbooks(main,agent).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,ordersandmaxWorkingOrders.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).
Last updated