Skip to content
Cirrus home
Sign in

Reference

Shared with you

Portfolios and automated strategies other people shared with you, read-only.

Strategies shared with you #

GET /v2/shared scope read

Strategies other users shared with you by name, newest change first (at most 200), without their documents.

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).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/shared" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": [
    {
      "strategy_id": "01M59PAX5AS3FKX3W9D93JY57E",
      "name": "NIFTY straddle",
      "description": "",
      "tags": [
        "weekly"
      ],
      "owner": "@user…",
      "version": 1,
      "summary": "",
      "read_only": true
    }
  ],
  "error": null
}

Get a strategy shared with you #

GET /v2/shared/strategies/{strategy_id} scope read

The newest saved version of a strategy its owner shared with you by name, read-only.

Parameters

  • strategy_id path · string required

    Strategy id.

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).

404shared_not_found

Nothing is shared with the caller here: the share was stopped or the link revoked, or it never existed.

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).

All fields (request and response schema)

Loading fields…

GET
curl "https://cirrus.pocketful.in/v2/shared/strategies/<strategy_id>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "strategy_id": "01M59PAX5AS3FKX3W9D93JY57E",
    "name": "NIFTY straddle",
    "description": "",
    "tags": [
      "weekly"
    ],
    "owner": "@user…",
    "version": 1,
    "summary": "Sell 1 lot of an ATM call (weekly expiry) and sell 1 lot of an ATM put (weekly expiry) on NIFTY. Enter as soon as the window opens, between 09:30 and 13:30, Monday to Friday. Everything closes at 15:15. Size: the legs' lots times each account's multiplier, at most 10 lots per leg. Orders: hedges first when there are any, limit prices 0.5% beyond the market, chasing up to 1% slippage; if only some legs fill: close a sold option left without its hedge, keep the rest. Protection: stop at ₹3,000 loss; no per-leg stops; at most 3 trades a day. No re-entries.",
    "read_only": true,
    "document": {
      "$schema": "/v2/strategies/schema/1.json",
      "schema_version": 1,
      "kind": "cirrus.strategy",
      "metadata": {
        "name": "NIFTY straddle",
        "description": "",
        "tags": [
          "weekly"
        ]
      },
      "spec": {
        "underlying": {
          "name": "NIFTY",
          "exchange": "NFO",
          "reference": "future"
        },
        "watch": {},
        "positional": false,
        "legs": {
          "selector": "chain@1",
          "items": [
            {
              "id": "sc",
              "instrument": "option",
              "side": "sell",
              "option_type": "call",
              "expiry": {
                "kind": "weekly",
                "n": 0
              },
              "strike": {
                "by": "atm",
                "offset": 0
              },
              "lots": 1,
              "hedge_for": null,
              "risk": null,
              "liquidity": {
                "max_spread_pct": 3,
                "min_oi": 0,
                "min_premium": 1
              }
            },
            {
              "id": "sp",
              "instrument": "option",
              "side": "sell",
              "option_type": "put",
              "expiry": {
                "kind": "weekly",
                "n": 0
              },
              "strike": {
                "by": "atm",
                "offset": 0
              },
              "lots": 1,
              "hedge_for": null,
              "risk": null,
              "liquidity": {
                "max_spread_pct": 3,
                "min_oi": 0,
                "min_premium": 1
              }
            }
          ]
        },
        "entry": {
          "source": {
            "type": "conditions@1",
            "when": null,
            "on": "close",
            "hold_s": 0
          },
          "window": {
            "start": "09:30",
            "end": "13:30"
          },
          "skip_first_min": 0,
          "skip_last_min": 0,
          "days": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
          ],
          "expiry_day": "normal",
          "active_from": null,
          "active_until": null
        },
        "exit": {
          "sources": [],
          "square_off": "15:15",
          "expiry_day_exit": null,
          "max_hold_min": null
        },
        "sizing": {
          "type": "fixed_lots@1",
          "max_lots": 10
        },
        "execution": {
          "type": "protected_limit@1",
          "order": "auto",
          "hedge_wait_ms": 5000,
          "stagger_ms": 0,
          "buffer_pct": 0.5,
          "chase": {
            "every_ms": 1000,
            "max_slippage_pct": 1,
            "max_attempts": 10
          },
          "on_incomplete": "safest",
          "retry_next_signal": null
        },
        "risk": {
          "per_leg": {
            "type": "per_leg@1",
            "stop_loss": null,
            "target": null,
            "trail": null,
            "on_leg_stop": "nothing",
            "at_broker": false
          },
          "combined": {
            "type": "combined@1",
            "scope": "account",
            "basis": "rupees",
            "stop_loss": {
              "rupees": 3000
            },
            "target": null,
            "breakeven": null,
            "trail": null,
            "lock_ladder": [],
            "deployment": null
          },
          "limits": {
            "type": "limits@1",
            "max_loss_per_day": null,
            "max_profit_per_day": null,
            "max_loss_per_week": null,
            "max_cycles_per_day": 3,
            "max_orders_per_day": 50,
            "exit_on_limit": true,
            "on_breaker": "nothing"
          }
        },
        "reentry": {
          "on": [],
          "max": 0,
          "delay_s": 300,
          "require_fresh_signal": true,
          "same_direction_only": true,
          "until": null
        },
        "adjustments": [],
        "notify": [],
        "costs": {
          "model": "auto",
          "slippage_pct": null
        }
      }
    }
  },
  "error": null
}

List portfolios shared with you #

GET /v1/shared scope read

The active shares other users granted to the caller: who, what (scopes) and which accounts.

More about this

Use owner_username with the other shared routes.

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/shared" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": [
    {
      "owner_username": "owner-01M3PGPS0YZSQCHVHW944RD3CK",
      "owner_name": "Asha Owner",
      "scopes": [
        "login",
        "funds",
        "positions",
        "holdings",
        "open_orders",
        "order_history"
      ],
      "account_scope": "all"
    }
  ],
  "error": null
}

Every shared account on one screen #

GET /v1/shared/consolidated scope read

One card per owner and shared account (balances, P&L, counts, and login status when login is shared), plus every shared position with its owner.

More about this

Each number needs its scope; a problem reading one owner only blanks that owner's numbers.

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/shared/consolidated" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "owners": [
      {
        "owner_username": "owner-01M3PGPS0YZSQCHVHW944RD3CK",
        "owner_name": "Asha Owner",
        "scopes": [
          "login",
          "funds",
          "positions",
          "holdings",
          "open_orders",
          "order_history"
        ],
        "account_scope": "all",
        "accounts": [
          {
            "client_id": "O1",
            "has_login": true,
            "has_funds": true,
            "has_positions": true,
            "opening_balance": 100000,
            "usable_balance": 80000,
            "utilisation": 20000,
            "pnl": 120.5,
            "positions_count": 1,
            "holdings_count": 1,
            "updated_at": {
              "positions": "2026-10-14T09:17:41.800064Z",
              "margins": "2026-10-14T09:17:41.801539Z",
              "holdings": "2026-10-14T09:17:41.800912Z"
            },
            "missing": {},
            "open_orders_count": 1,
            "failed_orders_count": 0,
            "orders_updated_at": "2026-10-14T09:17:41.802298Z",
            "broker": "paper",
            "account_tag": "main",
            "last_login_at": "1790683341",
            "logged_in_today": true
          },
          {
            "client_id": "O2",
            "has_login": true,
            "has_funds": true,
            "has_positions": true,
            "opening_balance": null,
            "usable_balance": null,
            "utilisation": null,
            "pnl": null,
            "positions_count": 0,
            "holdings_count": 0,
            "updated_at": {
              "positions": null,
              "margins": null,
              "holdings": null
            },
            "missing": {
              "positions": {
                "code": "no_session",
                "reason": "No live data yet: the account has no active broker session (log in to the broker)"
              },
              "margins": {
                "code": "no_session",
                "reason": "No live data yet: the account has no active broker session (log in to the broker)"
              },
              "holdings": {
                "code": "no_session",
                "reason": "No live data yet: the account has no active broker session (log in to the broker)"
              }
            },
            "open_orders_count": null,
            "failed_orders_count": null,
            "orders_updated_at": null,
            "broker": "paper",
            "account_tag": null,
            "last_login_at": null,
            "logged_in_today": false
          }
        ]
      }
    ],
    "positions": [
      {
        "account": "O1",
        "tradingsymbol": "RELIANCE-EQ",
        "product": "MIS",
        "net_qty": 5,
        "buy_qty": 5,
        "sell_qty": 0,
        "buy_value": 12500,
        "sell_value": 0,
        "average_price": 2500,
        "buy_average_price": 2500,
        "sell_average_price": 0,
        "pnl": 120.5,
        "lot_size": 1,
        "exchange": "NSE",
        "instrument_type": "EQUITY",
        "symbol": "RELIANCE",
        "expiry": "",
        "strike": 0,
        "option_type": "",
        "ltp": 2500,
        "prev_close": 2490,
        "owner_username": "owner-01M3PGPS0YZSQCHVHW944RD3CK",
        "owner_name": "Asha Owner",
        "instrument_token": "CT:TEST:RELIANCE"
      }
    ]
  },
  "error": null
}

Refresh every shared portfolio #

POST /v1/shared/consolidated/refresh scope read

Asks for fresh data for every owner sharing with the caller (at most one refresh per owner every 10 seconds, by anyone; failures for one owner are skipped).

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…

POST
curl -X POST "https://cirrus.pocketful.in/v1/shared/consolidated/refresh" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 202
{
  "status": "success",
  "data": {
    "owners": 1,
    "dispatched": 1
  },
  "error": null
}

One view of every shared account #

GET /v1/shared/consolidated/{view} scope read

One kind of data from every account shared with the caller, across owners: the rows are exactly those of GET /v1/shared/{owner}/{view}, one entry per account tagged with its owner.

More about this

Accounts without data are under missing; owners who do not share this data (not_shared) or whose data could not be read right now (unavailable) are under skipped_owners. A problem with one owner never fails the response.

Parameters

  • view path · string required

    What to read: positions, holdings, margins (needs funds), open_orders, order_history.

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).

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/shared/consolidated/<view>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "accounts": [
      {
        "owner_username": "owner-01M4WV81FTX36BK617X9JFYPQ3",
        "owner_name": "Asha Owner",
        "account": "O1",
        "updated_at": "2026-10-14T09:17:41.800064Z",
        "data": [
          {
            "account": "O1",
            "tradingsymbol": "RELIANCE-EQ",
            "product": "MIS",
            "net_qty": 5,
            "buy_qty": 5,
            "sell_qty": 0,
            "buy_value": 12500,
            "sell_value": 0,
            "average_price": 2500,
            "buy_average_price": 2500,
            "sell_average_price": 0,
            "pnl": 120.5,
            "lot_size": 1,
            "exchange": "NSE",
            "instrument_type": "EQUITY",
            "symbol": "RELIANCE",
            "expiry": "",
            "strike": 0,
            "option_type": "",
            "ltp": 2500,
            "prev_close": 2490,
            "instrument_token": "CT:TEST:RELIANCE"
          }
        ]
      }
    ],
    "missing": [
      {
        "owner_username": "owner-01M4WV81FTX36BK617X9JFYPQ3",
        "owner_name": "Asha Owner",
        "account": "O2",
        "code": "no_session",
        "reason": "No live data yet: the account has no active broker session (log in to the broker)"
      }
    ],
    "skipped_owners": []
  },
  "error": null
}

Refresh a shared portfolio #

POST /v1/shared/{owner}/refresh scope read

Asks for fresh data from the broker for the owner's shared accounts.

More about this

At most one refresh per owner every 10 seconds, by anyone: within that window nothing is asked and requested is null. The data arrives in the views moments later.

Parameters

  • owner path · string required

    The owner's username (owner_username from GET /v1/shared).

Errors

HTTPCodeWhen
401unauthorized

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

403not_shared

That user has not shared this data with the caller.

403oms_not_enabled

Order management is not enabled for this user.

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…

POST
curl -X POST "https://cirrus.pocketful.in/v1/shared/<owner>/refresh" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 202
{
  "status": "success",
  "data": {
    "requested": 2
  },
  "error": null
}

Read one view of a shared portfolio #

GET /v1/shared/{owner}/{view} scope read

One kind of data from the owner's shared accounts, read from the same live snapshots as the owner's own portfolio and limited to the accounts the share covers.

More about this

Each view needs its scope: accounts -> login, positions, holdings, margins -> funds, open_orders, order_history. accounts returns SharedAccounts; the others return SharedPortfolio (accounts without data yet under missing). Credentials never appear.

Parameters

  • owner path · string required

    The owner's username (owner_username from GET /v1/shared).

  • view path · string required

    What to read: accounts (needs login), positions, holdings, margins (needs funds), open_orders, order_history.

Errors

HTTPCodeWhen
401unauthorized

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

403not_shared

That user has not shared this data with the caller.

403oms_not_enabled

Order management is not enabled for this user.

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/shared/<owner>/<view>" \
  -H "Authorization: token $CIRRUS_API_KEY"
Response · 200
{
  "status": "success",
  "data": {
    "accounts": [
      {
        "client_id": "O1",
        "broker": "paper",
        "account_tag": "main",
        "last_login_at": "1790683341",
        "logged_in_today": true
      },
      {
        "client_id": "O2",
        "broker": "paper",
        "account_tag": null,
        "last_login_at": null,
        "logged_in_today": false
      }
    ]
  },
  "error": null
}