Nexus/API Reference/Journal and Edge

Read an account's balance curve

GEThttps://app.skylit.ai/api/nexus/v1/journal/growth

The account's cash at the end of each day in range, oldest first. It's a cash curve: buying a position lowers it by what you paid, and open positions aren't marked to the market. For what the account is worth now, read the wallet's equityCents.

  • startingBalance is the cash when the range began, so netChange and netChangePercent are for this range.
  • maxDrawdown is the deepest fall from a peak in the range, in dollars; maxDrawdownPercent is that fall as a share of the peak it fell from.
  • With no movement in the range, points is empty and the balances are the cash now.
  • On your own account, if you've ever held a paper spread, each point is the cash less the spread collateral held then.

Authorization

Authorization: Bearer <your API key>

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

Query parameters

  • accountstring

    main (your own simulated wallet, the default) or agent (your bot's).

    mainagent
  • rangestringdefault 30d

    How far back, in New York time. Left out, 30d.

    7d30d90dytdall

Responses

  • 200

    The curve.

  • 400

    Code: bad_request. account, range, by or month isn't one of the allowed values, or account=main was sent to agent/edge. The message says which.

  • 401

    No key, or a key that isn't valid. Codes: missing_api_key, invalid_api_key.

  • 403

    The key works but this can't be read. Codes: feature_disabled (you sent port: ports aren't available yet, so leave it out), account_suspended, nexus_access_denied.

  • 404

    Code: user_not_found. This Skylit account hasn't used Nexus yet, so it has no journal.

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

Response fields

  • dataobject

    The account's cash, day by day. Not marked to the market.

    • rangestring
    • startingBalancenumber
    • currentBalancenumber
    • peakBalancenumber
    • netChangenumber
    • netChangePercentnumber
    • maxDrawdownnumber
    • maxDrawdownPercentnumber
    • pointsobject[]
  • metaobject

    Which account was read.

    • accountstring
      mainagent
    • portstring | nulluuid

      Always null for now.

Last updated

Was this page helpful?