Read an account's balance curve
https://app.skylit.ai/api/nexus/v1/journal/growthThe 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.
startingBalanceis the cash when the range began, sonetChangeandnetChangePercentare for this range.maxDrawdownis the deepest fall from a peak in the range, in dollars;maxDrawdownPercentis that fall as a share of the peak it fell from.- With no movement in the range,
pointsis 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
accountstringmain(your own simulated wallet, the default) oragent(your bot's).mainagentrangestringdefault30dHow far back, in New York time. Left out,
30d.7d30d90dytdall
Responses
- 200
The curve.
- 400
Code:
bad_request.account,range,byormonthisn't one of the allowed values, oraccount=mainwas sent toagent/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 sentport: 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-Afterseconds, then retry. Codes:rate_limited, andstream_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
dataobjectThe account's cash, day by day. Not marked to the market.
rangestringstartingBalancenumbercurrentBalancenumberpeakBalancenumbernetChangenumbernetChangePercentnumbermaxDrawdownnumbermaxDrawdownPercentnumberpointsobject[]
metaobjectWhich account was read.
accountstringmainagentportstring | nulluuidAlways
nullfor now.
Last updated