Skip to content
Cirrus home
Sign in

Reference

Strategy P&L

Today's positions and P&L grouped by the strategy tag on your orders.

Your strategies today #

GET /v1/strategies scope read

Positions and P&L of each strategy across every linked account, for today (IST trading day).

More about this

A strategy is the strategy an order was placed with (on POST /v1/orders or by a v2 trigger); everything else is Unassigned (name null). Per account: each instrument and product with net quantity, average price, realized P&L and unrealized P&L at our latest price (ltp_stale when that price is not current). recon says whether the strategy's open positions add up to the broker's. Accounts with no ledger yet today are under missing (available is false while none has one): not an error.

Errors

HTTPCodeWhen
401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

503service_unavailable

A dependency is temporarily unavailable, or the feature is off on this server; retry later.

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v1/strategies" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "trading_day": "2026-10-16",
    "available": true,
    "strategies": [
      {
        "name": "momo.1",
        "label": "momo.1",
        "accounts": [
          {
            "account": "P1",
            "at": "2026-10-16T11:26:45.364286Z",
            "stale": false,
            "rows": [
              {
                "symbol": "RELIANCE",
                "tradingsymbol": "RELIANCE-EQ",
                "product": "MIS",
                "net_qty": 10,
                "avg_price": 2490,
                "realized": 150.5,
                "ltp": 2500,
                "ltp_stale": false,
                "unrealized": 100,
                "instrument_token": "CT:TEST:RELIANCE"
              }
            ],
            "totals": {
              "realized": 150.5,
              "unrealized": 100,
              "total": 250.5,
              "ltp_stale": false
            }
          },
          {
            "account": "P2",
            "at": "2026-10-16T11:26:45.364736Z",
            "stale": false,
            "rows": [
              {
                "symbol": "RELIANCE",
                "tradingsymbol": "RELIANCE-EQ",
                "product": "MIS",
                "net_qty": -4,
                "avg_price": 2510,
                "realized": 0,
                "ltp": 2500,
                "ltp_stale": false,
                "unrealized": 40,
                "instrument_token": "CT:TEST:RELIANCE"
              }
            ],
            "totals": {
              "realized": 0,
              "unrealized": 40,
              "total": 40,
              "ltp_stale": false
            }
          }
        ],
        "totals": {
          "realized": 150.5,
          "unrealized": 140,
          "total": 290.5,
          "ltp_stale": false
        },
        "recon": {
          "status": "ok",
          "note": "Matches the broker's positions."
        },
        "at": "2026-10-16T11:26:45.364286Z"
      },
      {
        "name": null,
        "label": "Unassigned",
        "accounts": [
          {
            "account": "P1",
            "at": "2026-10-16T11:26:45.364286Z",
            "stale": false,
            "rows": [
              {
                "symbol": "RELIANCE",
                "tradingsymbol": "RELIANCE-EQ",
                "product": "DELIVERY",
                "net_qty": 5,
                "avg_price": 2400,
                "realized": 0,
                "ltp": 2500,
                "ltp_stale": false,
                "unrealized": 500,
                "instrument_token": "CT:TEST:RELIANCE"
              }
            ],
            "totals": {
              "realized": 0,
              "unrealized": 500,
              "total": 500,
              "ltp_stale": false
            }
          }
        ],
        "totals": {
          "realized": 0,
          "unrealized": 500,
          "total": 500,
          "ltp_stale": false
        },
        "recon": {
          "status": "ok",
          "note": "Matches the broker's positions."
        },
        "at": "2026-10-16T11:26:45.364286Z"
      }
    ],
    "missing": [
      {
        "account": "Z1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "PF1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "U1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "5P1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "MO1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "TJ1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      }
    ]
  },
  "error": null
}

One strategy today #

GET /v1/strategies/{name} scope read

One strategy, as in GET /v1/strategies, with its v2 triggers.

More about this

~unassigned names the unassigned rest. A strategy with nothing today answers with no accounts and zero totals.

Parameters

  • name path · string required

    The strategy's name, or ~unassigned.

  • scenario query · integer (int32)

    1: add the analytics scenario grid (P&L today for spot −5% to +5% × IV −5, 0, +5 points).

Errors

HTTPCodeWhen
400invalid_query

The query string does not fit the route's parameters.

401unauthorized

No credential, or the credential is invalid, expired or revoked.

403forbidden

The credential may not use this route (missing scope, app-session-only route, IP not allowed).

422invalid_request

The request is well-formed but not valid; field names the input.

429rate_limited

Too many requests for this credential (or too many failed attempts); retry after the Retry-After header (seconds; error.retry_after_ms has the exact wait).

503service_unavailable

A dependency is temporarily unavailable, or the feature is off on this server; retry later.

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v1/strategies/<name>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "trading_day": "2026-10-16",
    "available": true,
    "strategy": {
      "name": "momo.1",
      "label": "momo.1",
      "accounts": [
        {
          "account": "P1",
          "at": "2026-10-16T11:30:11.811504Z",
          "stale": false,
          "rows": [
            {
              "symbol": "RELIANCE",
              "tradingsymbol": "RELIANCE-EQ",
              "product": "MIS",
              "net_qty": 10,
              "avg_price": 2490,
              "realized": 150.5,
              "ltp": 2500,
              "ltp_stale": false,
              "unrealized": 100,
              "instrument_token": "CT:TEST:RELIANCE"
            }
          ],
          "totals": {
            "realized": 150.5,
            "unrealized": 100,
            "total": 250.5,
            "ltp_stale": false
          }
        },
        {
          "account": "P2",
          "at": "2026-10-16T11:30:11.812357Z",
          "stale": false,
          "rows": [
            {
              "symbol": "RELIANCE",
              "tradingsymbol": "RELIANCE-EQ",
              "product": "MIS",
              "net_qty": -4,
              "avg_price": 2510,
              "realized": 0,
              "ltp": 2500,
              "ltp_stale": false,
              "unrealized": 40,
              "instrument_token": "CT:TEST:RELIANCE"
            }
          ],
          "totals": {
            "realized": 0,
            "unrealized": 40,
            "total": 40,
            "ltp_stale": false
          }
        }
      ],
      "totals": {
        "realized": 150.5,
        "unrealized": 140,
        "total": 290.5,
        "ltp_stale": false
      },
      "recon": {
        "status": "ok",
        "note": "Matches the broker's positions."
      },
      "at": "2026-10-16T11:30:11.811504Z"
    },
    "missing": [
      {
        "account": "Z1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "PF1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "U1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "5P1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "MO1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      },
      {
        "account": "TJ1",
        "code": "not_available_yet",
        "reason": "Not available yet: no strategy ledger for this account today. It appears once the account has a live broker session and its trades are read."
      }
    ],
    "triggers": [
      {
        "trigger_id": "01M527M374SGJ48V6D45YMQWJ2",
        "account": "P1",
        "kind": "bracket",
        "state": "submitted",
        "ended": false
      }
    ]
  },
  "error": null
}