Nexus/API Reference/Options and stocks

List your trades

GEThttps://app.skylit.ai/api/nexus/v1/trades

Your own options and stock trades, newest first. account=agent lists your bot's agent wallet instead of yours.

Futures: add assetClass=futures to list one futures account's trades. Leave account out for your practice account, or send agent, evaluation, funded or an account id. status=open lists the open positions with the same numbers as the account read. status=closed lists closed trades, flat to flat, with the same P/L your futures journal shows, newest first. Leave status out for both, open first. A futures row is a FuturesTrade, not a Trade. Without assetClass=futures the list is options and stocks, same as always.

With test=true it lists your test log instead (your 10 newest test orders, futures ones included) and never a real trade.

Authorization

Authorization: Bearer <your API key>

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

Query parameters

  • assetClassstring

    futures lists one futures account's positions and closed trades. Leave it out for options and stocks.

    futures
  • accountstring

    Options and stocks: agent lists your bot's wallet; leave it out for yours. Futures: practice (or left out), agent, evaluation, funded or an account id.

  • statusstringdefault all

    Which trades to list.

    openclosedall
  • limitintegerdefault 50min 1 · max 200

    Page size. Anything over 200 is read as 200.

  • offsetintegerdefault 0min 0 · max 100000

    How many trades to skip.

  • teststringdefault false

    true lists your test log instead of your trades.

    truefalse

Responses

  • 200

    Your trades. meta.total counts every match, not just this page.

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

  • 404

    Not on your account. Codes: trade_not_found, account_not_found, order_not_found.

  • 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[]
    • idstringuuid
    • userIdstringuuid
    • tickerstring
    • strikenumber
    • expirationstringdate
    • directionstring
      callput
    • assetClassstring
      optionsstocks
    • averageEntryPricenumber
    • currentPricenumber

      The latest mark.

    • totalQuantityinteger
    • remainingQuantityinteger
    • statusstring
      activeclosed
    • entryDatestringdate-time
    • exitDatestringdate-time
    • exitsobject[]
    • sourcestring

      api on a trade a key opened.

    • testboolean

      true on a test order.

  • metaobject
    • totalinteger
    • limitinteger
    • offsetinteger
    • testboolean

      With test=true: this is your test log.

    • maxRowsinteger

      With test=true: how many test orders the log keeps (10).

Last updated

Was this page helpful?