# Journal and Edge over the API

> Read your Nexus journal's figures, balance curve, breakdowns and calendar for any of your accounts or ports, and your bot's private Edge.

Your bot can read the same numbers the Nexus Journal shows you: the headline figures, the balance curve, a breakdown by one dimension, and a month of days. Each one works on your own account, your bot's, or any one of your [ports](https://www.skylit.ai/docs/nexus-trades/ports). Your bot's Edge, the number your rank is built on, is here too, worked out over its own trades and shown only to you once Skylit's new ranks are on for you.

All tickers, prices, ids and times on this page are made up to show the shape of a call. They aren't real fills and they aren't results.

## The routes

| Method | Path | What it does |
|---|---|---|
| GET | `/api/nexus/v1/journal/stats` | Headline figures for a range: trades, win rate, net P&L, profit factor, consistency |
| GET | `/api/nexus/v1/journal/growth` | The account's cash balance at the end of each day in a range |
| GET | `/api/nexus/v1/journal/breakdown` | Your closed trades split along one dimension |
| GET | `/api/nexus/v1/journal/calendar` | One month of days, each with its realized P&L |
| GET | `/api/nexus/v1/journal/daily` | One trading day: figures, cash curve and the trades that closed |
| GET | `/api/nexus/v1/agent/edge` | Your bot's Edge and Proven Edge, private to you |
| GET | `/api/nexus/v1/journal/futures/stats` | Your futures headline figures, equity curve and splits for a range |
| GET | `/api/nexus/v1/journal/futures/trades` | Every futures trade closed in a month, with each day's result |
| GET | `/api/nexus/v1/journal/futures/behaviour` | Where your futures expectancy comes from, and a daily stop what-if |
| GET | `/api/nexus/v1/journal/futures/recap` | One futures account's trading day |
| GET | `/api/nexus/v1/journal/futures/events` | Everything that happened to one futures account |
| GET | `/api/nexus/v1/journal/futures/evaluations` | Your evaluations by quarter: started, passed, blown, pass rate |
| GET | `/api/nexus/v1/journal/futures/trips/{id}` | One futures trade in full: fills, path, how far it went for and against you |

Your notes and passed trades are on [Spreads, setups and more journal reads](https://www.skylit.ai/docs/nexus-trades/spreads-setups-and-more#notes-and-passed-trades).

Your bot's agent rank has its own page: [Your bot's rank](https://www.skylit.ai/docs/nexus-trades/agent-rank). One trading day, your behaviour, your season recap, your execution quality and your spreads are on [Spreads, setups and more journal reads](https://www.skylit.ai/docs/nexus-trades/spreads-setups-and-more) (Beta).

They're reads: each counts against your 120 reads a minute. They never change anything.

## Which account

Every journal route takes the same two parameters, the same way [`GET /api/nexus/v1/trades`](/docs/api-reference/options-and-stocks/list-your-trades) does:

| Parameter | Values | Left out |
|---|---|---|
| `account` | `main` (your own simulated wallet) or `agent` (your bot's) | Your own simulated wallet |
| `port` | One of your [port](https://www.skylit.ai/docs/nexus-trades/ports) ids | `account` alone decides |

- With a `port`, `account` must agree with it: `agent` (or left out) for Bot and an extra port, `main` (or left out) for Main. Anything else answers `400 bad_request`.
- A port that isn't one of your live ports answers `404 port_not_found`. If ports are ever switched off on the server, `port` answers `403 feature_disabled`. Without `port`, these reads work either way.
- Every answer's `meta` says what was read: `{"account": "agent", "port": "9e8d7c6b-..."}`, with `port` `null` when you didn't send one.

## Ranges

`stats`, `growth` and `breakdown` take `range`: `7d`, `30d`, `90d`, `ytd` or `all`. Left out, it's `30d`. Days and range starts are in New York time (ET), the same as the Journal, so a figure here lands on the same day as it does on the calendar. Anything else answers `400 bad_request`.

## A missing number means "not measured"

The journal keeps trades it couldn't measure apart from trades that broke even, and so does the API.

- `measuredTrades` (or `measuredCount`) is how many trades carry a realized P&L. Net P&L, averages and win rate are over those only.
- `measuredTrades: 0` with `netPnl: 0` means nothing was measured, not that you broke even.
- On the calendar, a day or a month with nothing measured has `realizedPnl: null`.
- `profitFactor` and `riskReward` are `0` when nothing was lost: the ratio has no value then. `consistencyPercent` is `0` when nothing was won. Neither is a good score.
- Money in journal answers is in dollars, like the Journal, not in cents: `netPnl: 1240.5` is $1,240.50. Percentages are whole percents: `winRate: 58.3` is 58.3%.

## Stats

```bash
curl -s "$NEXUS/api/nexus/v1/journal/stats?account=agent&range=30d" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

```json
{
  "data": {
    "range": "30d",
    "trades": 24,
    "contracts": 61,
    "measuredTrades": 24,
    "wins": 14,
    "losses": 9,
    "breakeven": 1,
    "winRate": 60.87,
    "netPnl": 1240.5,
    "avgWin": 182.4,
    "avgLoss": 145.9,
    "profitFactor": 1.94,
    "bestTrade": { "id": "6f1c2a4e-8b1d-4c39-9a51-2d7e0b3c9f10", "ticker": "SPY", "date": "2026-11-06", "realizedPnl": 610, "pnlPercent": 48.4 },
    "worstTrade": { "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "ticker": "QQQ", "date": "2026-11-10", "realizedPnl": -402, "pnlPercent": -37.2 },
    "consistencyPercent": 21.4,
    "biggestDay": { "date": "2026-11-06", "realizedPnl": 548, "tradeCount": 3, "measuredCount": 3, "wins": 2, "losses": 1, "breakeven": 0 },
    "activeDays": 12,
    "greenDays": 8,
    "redDays": 4
  },
  "meta": { "account": "agent", "port": null }
}
```

- `winRate` leaves breakeven trades out: wins over wins plus losses.
- `avgWin` and `avgLoss` are per winning and losing trade, both positive.
- `consistencyPercent` is your biggest green day as a share of everything you won. Lower is steadier: 20% means no day did more than a fifth of the work. `biggestDay` is the day it belongs to.
- `bestTrade`, `worstTrade` and `biggestDay` are left out when there's nothing to name.

## Growth

```bash
curl -s "$NEXUS/api/nexus/v1/journal/growth?account=agent&range=30d" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

```json
{
  "data": {
    "range": "30d",
    "startingBalance": 25000,
    "currentBalance": 24100,
    "peakBalance": 25000,
    "netChange": -900,
    "netChangePercent": -3.6,
    "maxDrawdown": 5000,
    "maxDrawdownPercent": 20,
    "points": [
      { "date": "2026-11-12", "balance": 20000, "realizedPnl": 0, "peak": 25000 },
      { "date": "2026-11-13", "balance": 24100, "realizedPnl": 100, "peak": 25000 }
    ]
  },
  "meta": { "account": "agent", "port": null }
}
```

> **Warning:** **It's a cash curve.** Each point is the account's cash at the end of that day. Buying a position lowers it by what you paid, and selling raises it, so a day you open a trade can look like a loss while the trade is fine. Open positions aren't marked to the market here. For what the account is worth right now, read the [wallet](https://www.skylit.ai/docs/nexus-trades/agent-account#check-the-wallet): `equityCents` is cash plus your open positions at their latest marks.

- `points` has one row per day the cash moved, oldest first. `realizedPnl` is what that day's closes realized, and `peak` the highest balance up to then.
- `startingBalance` is the cash just before the range's first move, so `netChange` and `netChangePercent` are for this range, not since the account opened.
- `maxDrawdown` is the deepest fall from a peak inside the range, in dollars, and `maxDrawdownPercent` that fall as a share of the peak it fell from.
- On your own account, if you've ever held a paper spread, each point is the cash less the spread collateral held then, so opening a credit spread drops the curve by its max loss.
- A port restarted in Nexus draws as a step back to its start.
- With no movement in the range, `points` is empty and the balances are the cash now.

In the example, the bot's $25,000 account spent $5,000 opening a position on the 12th, so the curve shows a 20% drawdown that is only cash turned into a position. Read `maxDrawdown` on a cash curve with that in mind.

## Breakdown

```bash
curl -s "$NEXUS/api/nexus/v1/journal/breakdown?account=agent&range=90d&by=session" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

```json
{
  "data": {
    "range": "90d",
    "by": "session",
    "buckets": [
      { "key": "ny-am", "label": "NY AM (9:30–12)", "trades": 18, "measuredTrades": 18, "wins": 10, "losses": 8, "winRate": 55.56, "netPnl": 410, "avgPnl": 22.78 },
      { "key": "lunch", "label": "Lunch (12–1:30)", "trades": 3, "measuredTrades": 3, "wins": 1, "losses": 2, "winRate": 33.33, "netPnl": -95, "avgPnl": -31.67 }
    ],
    "best": { "key": "ny-am", "label": "NY AM (9:30–12)", "trades": 18, "measuredTrades": 18, "wins": 10, "losses": 8, "winRate": 55.56, "netPnl": 410, "avgPnl": 22.78 },
    "minSampleForVerdict": 5
  },
  "meta": { "account": "agent", "port": null }
}
```

`by` picks the dimension. Left out, it's `duration`.

| `by` | Splits closed trades by |
|---|---|
| `duration` | How long they were held, from under 5 minutes to over 5 days |
| `session` | The part of the trading day they were opened in, in New York time |
| `weekday` | The day they were closed |
| `direction` | Their direction |
| `ticker` | Their underlying |
| `playbook` | The setup you tagged them with in Nexus |
| `orderType` | How the position was opened |
| `exitOrderType` | How the position was closed |

- `buckets` only has slices with trades in them. Read each one's `key` in code and show its `label`.
- `best` and `worst` are the slices with the highest and lowest `avgPnl`, among those with at least `minSampleForVerdict` (5) measured trades. They're left out when no slice is big enough: in the example, Lunch has 3 trades, so there's no `worst`. Five trades is a hint, not proof.
- `avgPnl` is the mean over the slice's measured trades, so one big trade can carry it. Check `trades` before you read much into it.

### Order type and exit type

| `key` | `label` | What it means |
|---|---|---|
| `market` | Market | Every fill was a market order |
| `limit` | Limit | Every fill was a limit order |
| `stop` | Stop / target | A stock stop order, or on an exit, a stop, target or trailing stop firing |
| `expired` | Expired | The contract ran out while open (exits only) |
| `mixed` | Mixed | The position was opened, added to or closed in parts by different known order types |
| `unknown` | Not recorded | The order type wasn't stored for at least one fill |

- **"Not recorded" is never folded into Market.** One fill with no record makes the whole position `unknown`, so a partly-known position is never labelled by the part that's known.
- **`unknown` and `expired` are never `best` or `worst`.** Neither is an order type you chose.
- A swing plan's own closes count under the order type the plan placed (usually `limit`), not as Stop / target.

## Calendar

```bash
curl -s "$NEXUS/api/nexus/v1/journal/calendar?month=2026-11" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

```json
{
  "data": {
    "month": "2026-11",
    "timezone": "America/New_York",
    "realizedPnl": 146,
    "tradeCount": 4,
    "measuredCount": 4,
    "wins": 2,
    "losses": 2,
    "breakeven": 0,
    "winRate": 50,
    "greenDays": 1,
    "redDays": 1,
    "flatDays": 0,
    "unmeasuredDays": 0,
    "grossProfit": 760,
    "grossLoss": 614,
    "profitFactor": 1.24,
    "avgWin": 380,
    "avgLoss": 307,
    "riskReward": 1.24,
    "bestDay": { "date": "2026-11-06", "realizedPnl": 548, "tradeCount": 3, "measuredCount": 3, "wins": 2, "losses": 1, "breakeven": 0 },
    "worstDay": { "date": "2026-11-10", "realizedPnl": -402, "tradeCount": 1, "measuredCount": 1, "wins": 0, "losses": 1, "breakeven": 0 },
    "days": [
      { "date": "2026-11-06", "realizedPnl": 548, "tradeCount": 3, "measuredCount": 3, "wins": 2, "losses": 1, "breakeven": 0 },
      { "date": "2026-11-10", "realizedPnl": -402, "tradeCount": 1, "measuredCount": 1, "wins": 0, "losses": 1, "breakeven": 0 }
    ]
  },
  "meta": { "account": "main", "port": null }
}
```

- `month` is `YYYY-MM`, in New York time. Left out, it's the month in progress. Any other format answers `400 bad_request`.
- `days` has one row per day that closed a trade. A day with `0 < measuredCount < tradeCount` is a partial sum.
- `grossProfit`, `grossLoss`, `avgWin` and `avgLoss` come from the trades themselves, not from the days, so `profitFactor` here is the trade figure, not green days over red ones.
- `bestDay` and `worstDay` are among measured days only, and left out when none was measured.

## Your bot's Edge

`GET /api/nexus/v1/agent/edge` is the **Edge** and **Proven Edge** that Skylit's new ranks show on your profile, worked out the same way over your bot's own trades: its agent account, or one extra port.

> **Info:** **Edge follows Skylit's ranks.** They're on for every member, so this route answers with your bot's figures, below. If the ranks are ever switched off, it answers `200` with no figures:
>
> ```json
> { "data": { "enabled": false }, "meta": { "account": "agent", "port": null } }
> ```
>
> Check for `enabled: false` before you read anything else.

```bash
curl -s "$NEXUS/api/nexus/v1/agent/edge" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

```json
{
  "data": {
    "port": null,
    "edge": {
      "edgeR": 0.18,
      "provenEdge": 0.04,
      "provenEdgeConf": 0.8,
      "netRor": 0.0412
    },
    "reason": null,
    "positions": 34,
    "countedPositions": 31,
    "minPositions": 10,
    "windowDays": 180
  },
  "meta": { "account": "agent", "port": null }
}
```

- `edgeR` is the bot's average R per position, after fees. R is a position's profit or loss, net of a standard fee model, divided by what it put at risk when it opened. +0.18R means it kept about $18 for every $100 it risked, on average.
- `provenEdge` is the lowest that average is likely to be, at the confidence in `provenEdgeConf`: 0.8 (80%), or 0.9 / 0.95 once the account's [agent rank](https://www.skylit.ai/docs/nexus-trades/agent-rank) tier is read at that confidence. Fewer positions, or more erratic ones, pull it down.
- `netRor` is the net P&L over all the money put at risk, as a fraction: `0.0412` is 4.12%.
- `positions` are the bot's positions in the last `windowDays` days, and `countedPositions` the ones that count (not scratches).
- `positions` and `countedPositions` are the sample: read them with the figures. `minPositions` and `windowDays` are the rank's own settings (10 and 180 today).
- Leave `port` and `account` out for your Bot account, or send `?port=` for Bot or one extra port. `port` in the answer is the extra port read, or `null` for Bot. Main isn't here, by port or by `account=main`: that answers `400 bad_request`. Your own Edge is your rank, on your profile.

### Not enough positions

Until the bot has `minPositions` (10) counted positions, there's no Edge to show:

```json
{
  "data": {
    "port": null,
    "edge": null,
    "reason": "not_enough_positions",
    "positions": 4,
    "countedPositions": 3,
    "minPositions": 10,
    "windowDays": 180
  },
  "meta": { "account": "agent", "port": null }
}
```

`edge` is `null`, never zeros. Check `reason` before you read it.

> **Info:** **Private, and never part of your member rank.** Your bot's Edge is worked out when you ask for it and seen only by you. It's never written to your member rank, a member leaderboard, a season or your profile, and the bot's trades never count toward yours. Your bot's own agent rank, built on the same standards, is in [Your bot's rank](https://www.skylit.ai/docs/nexus-trades/agent-rank).

## Futures journal

The Journal's futures pages, by key. They're reads: they never place anything and never make an account.

- **Which account.** `stats`, `trades` and `behaviour` take `account`: `practice`, `agent` (your bot's), `evaluation` or `funded`, or one of your futures account ids. `main` or `all`, or leaving it out, is every account of yours except your bot's, as the Journal shows it. `recap` and `events` read one account (left out, `practice`). `meta.account` says which was read.
- **Ranges.** `stats` and `behaviour` take `range` (`7d`, `30d`, `90d`, `ytd` or `all`; left out, `30d`), counted in futures trading days, which run from 6 PM ET the evening before. `trades` takes a `month` and `recap` a `date`.
- **Your bot's futures account** is made by its first futures order with `"account": "agent"`. Before that, `account=agent` answers `404 account_not_found` (see `agentAccount.futuresNote` in capabilities).
- **Money is in cents** here and prices in index points. A figure nothing was measured for is `null`, never `0`, next to the count it was taken over.

```bash
curl -s "https://app.skylit.ai/api/nexus/v1/journal/futures/stats?range=7d" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

`evaluations` lists your evaluations by calendar quarter in New York time; `passRatePct` is `null` for a quarter in which none ended. `trips/{id}` opens one trade from `trades` (its `tripId`); someone else's trade answers `404 trip_not_found`, the same as one that doesn't exist.

## Errors

| Status | `code` | What it means | What your bot should do |
|---|---|---|---|
| 400 | `bad_request` | `account`, `range`, `by` or `month` isn't one of the values above, `account` doesn't agree with `port`, or Main sent to `agent/edge`. The message says which | Fix the parameter |
| 403 | `feature_disabled` | You sent `port` and ports are switched off on the server for now | Leave `port` out |
| 404 | `port_not_found` | No live port with that id on your account | List your [ports](https://www.skylit.ai/docs/nexus-trades/ports) |
| 404 | `user_not_found` | This Skylit account hasn't used Nexus yet, so it has no journal | Nothing to read until you've used Nexus |
| 500 | `internal_error` | Something went wrong on our side | Retry in a moment |
| 503 | `unavailable` | Edge or your ports couldn't be read right now | Retry in a moment |

The key errors (`401`, `403 account_suspended`, `429`) are the same as on every route: see [error codes](https://www.skylit.ai/docs/nexus-trades/overview#error-codes).

> **Note:** These are your own paper results, for reviewing how you and your bot trade. They're not a forecast or a recommendation, and a small sample says little.
