Nexus/API Reference/Account and capabilities

What this key can trade right now

GEThttps://app.skylit.ai/api/nexus/v1/trading/capabilities

The 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.

  • assetClasses lists each asset class's order types. Options list limit when resting orders are on and stop when options stops are on. Stocks list limit and stop when stock resting orders are on.
  • optionsOrders and stocksOrders describe the resting orders: time in force, what can be modified, the order routes and maxWorkingOrders. optionsOrders.stops describes options stop-losses.
  • adds describes adding to a position. agentAccount and wallets describe 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-After seconds, then retry. Codes: rate_limited, and stream_limit_reached (too many live streams open: 3 per key, 6 per account).

  • 503

    Try again in a moment (honour Retry-After when 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

  • dataobject
    • assetClassesobject[]

      One entry per asset class: assetClass, available, orderTypes, and reason when it isn't available.

    • orderTypesstring[]

      What every asset class takes (market). Futures list more under futures.

    • testOrdersboolean

      Whether "test": true is accepted.

    • futuresobject

      Only when your account has futures: marketOpen, reopensAt while closed, maxOrderQuantity, orderTypes, bracket, modify (price, quantity, stopPrice), the contracts you can trade (with the front month, tick size and value, commission, and whether there's a live price), your accounts (each a FuturesAccount) and list, the futures trades list route.

    • limitsobject

      Your per-key writesPerMinute and readsPerMinute.

    • agentAccountobject

      Your bot's agent account: the account value to send (agent), its assetClasses, public (always false), a description, the reads that show it, and with futures on a futuresNote on when its futures reads answer.

    • walletsobject

      The wallet read (read) and its books (main, agent).

    • quotesobject

      Where live prices are. The quotes read, its symbolFormat (OCC), maxSymbols (20), maxQuoteAgeSeconds (15), and marks, the read that gives each open trade its live mark.

    • optionsOrdersobject

      When options resting orders are on: orderTypes, timeInForce, open, exit, modify, the order routes (orders), maxWorkingOrders, and stops when options stops are on (triggerOn, exit, fields, fill, onEntry, modify, expires).

    • stocksOrdersobject

      When stock resting orders are on: orderTypes, timeInForce, gtcDays, open, exit, shorts, priceSource (lastTrade), fill, maxQuoteAgeSeconds, modify, orders, maxWorkingOrders and stops when stock stops are on (same fields as optionsOrders.stops, with triggerOn lastTrade).

    • addsobject

      Adding to a position: the route, assetClasses, orderTypes, maxPosition per asset class, how the price is set, and whether test adds work.

    • streamobject

      The live stream: available (when false, poll the reads instead), route, events, accounts, resume, heartbeatSeconds, maxStreamsPerKey, replayWindowSeconds (120) and replayEvents (128).

    • spreadsobject

      Only 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, null when available), account (always main), strategies (what you may open now; [] while you may only close, cancel and set exits), orderTypes (limit, and market when market spreads are on), timeInForce, modify, maxQuantity (100 spreads per order), mainTradingEnabled (opens need it; closes, cancels and exits never do) and the spread routes.

    • expiryDayCutoffobject

      On 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) and code, the refusal's code (expiry_day_cutoff). Closes are never refused.

Last updated

Was this page helpful?