Read a month of days
https://app.skylit.ai/api/nexus/v1/journal/calendarOne month, in New York time: a row for each day that closed a trade, and the month's totals.
- A day or a month with nothing measured has
realizedPnl: null, never0. A day with0 < measuredCount < tradeCountis a partial sum. grossProfit,grossLoss,avgWinandavgLosscome from the trades, soprofitFactoris the trade figure.bestDayandworstDayare among measured days only, and left out when none was measured.- Closed Simulated spreads on your Main account count here, one closed position per spread: its close time is its exit and its total realized P&L its result. A spread shows dollars only: when it is
bestTradeorworstTradeit carrieskind: "spread"and nopnlPercent. The Bot and your ports never hold a spread.
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).mainagentportstringuuidOne of your ports (see Ports in the Nexus Trades guide), by id.
account, if you send it too, must agree:agent(or left out) for Bot and an extra port, left out for Main. Left out,accountalone decides.monthstringYYYY-MM. Left out, the month in progress.
Responses
- 200
The month.
- 400
Code:
bad_request.account,range,byormonthisn't one of the allowed values,accountdoesn't agree withport, or Main was 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 done. Codes:
feature_disabled(ports are switched off on the server: leaveportout),account_suspended,nexus_access_denied. - 404
Codes:
port_not_found(no live port with that id on your account),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
dataobjectmonthstringtimezonestringrealizedPnlnumber | nulltradeCountintegermeasuredCountintegerwinsintegerlossesintegerbreakevenintegerwinRatenumbergreenDaysintegerredDaysintegerflatDaysintegerunmeasuredDaysintegergrossProfitnumbergrossLossnumberprofitFactornumberavgWinnumberavgLossnumberriskRewardnumberAverage win over average loss.
0when nothing was lost.bestDayobjectOne day in New York time.
realizedPnlis over measured trades only, andnullwhen none was measured.worstDayobjectOne day in New York time.
realizedPnlis over measured trades only, andnullwhen none was measured.daysobject[]
metaobjectWhich account and port were read.
accountstringmainagentportstring | nulluuidThe port you sent, or
null.
Last updated