Split your closed trades by one dimension
https://app.skylit.ai/api/nexus/v1/journal/breakdownClosed trades in range, split along by. Only slices with trades come back.
bestandworstare the slices with the highest and lowestavgPnlamong those with at leastminSampleForVerdict(5) measured trades, and are left out when none qualifies.orderType(how the position was opened) andexitOrderType(how it was closed) have the keysmarket,limit,stop("Stop / target"),expired(exits only),mixedandunknown("Not recorded"). One fill with no recorded type makes the positionunknown; it's never folded intomarket.unknownandexpiredare neverbestorworst.- 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.rangestringdefault30dHow far back, in New York time. Left out,
30d.7d30d90dytdallbystringdefaultdurationThe dimension. Left out,
duration.sessionis when the trade was opened,weekdaythe day it was closed,playbookthe setup you tagged it with.durationsessionweekdaydirectiontickerplaybookorderTypeexitOrderType
Responses
- 200
The slices.
- 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
dataobjectrangestringbystringbucketsobject[]bestobjectworstobjectminSampleForVerdictinteger
metaobjectWhich account and port were read.
accountstringmainagentportstring | nulluuidThe port you sent, or
null.
Last updated