Nexus/API Reference/Account and capabilities

Read your options and stocks paper wallet

GEThttps://app.skylit.ai/api/nexus/v1/trading/wallets/{book}

How much paper cash your bot's got before it sizes a trade. main is your own paper wallet, agent is your bot's.

  • Every number is in cents, so 9927100 is $99,271.00.
  • buyingPowerCents is what you can spend on a new trade: your cash minus what resting buys hold back (reservedCents). A paper trade can't take you below zero.
  • openMarketValueCents and equityCents are left out when an open position hasn't been marked yet, instead of guessed.
  • opened is false until your first trade on that wallet. Until then you'll see the starting $100,000.

You only ever see your own wallets. It counts as a read.

Authorization

Authorization: Bearer <your API key>

Required. A missing header returns 401; an invalid, revoked or expired key returns 403.

Path parameters

  • bookstringrequired

    main is your own paper wallet, agent is your bot's.

    mainagent

Responses

  • 200

    The wallet.

  • 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 no limitPrice), 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 no stopPrice), 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.

  • 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).

  • 500

    Something went wrong on our side. If you sent a clientOrderId, retry with the same one. Code: internal_error.

  • 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

    An options and stocks paper wallet. Money is in cents.

    • bookstring
      mainagent
    • currencystring
    • asOfstringdate-time
    • openedboolean

      false until the first trade on this wallet.

    • startingCashCentsinteger

      What the wallet started with.

    • cashCentsinteger
    • buyingPowerCentsinteger

      Cash minus what resting buys hold back, never below 0.

    • reservedCentsinteger

      Held back by resting opens until they fill, are cancelled or expire.

    • realizedPnlCentsinteger

      Profit or loss from closed trades.

    • openPositionsinteger
    • openCostBasisCentsinteger

      What you paid for the open positions.

    • openMarketValueCentsinteger

      The open positions at their latest marks. Left out when one hasn't been marked yet.

    • equityCentsinteger

      Cash plus the open market value. Left out with it.

Last updated

Was this page helpful?