{
  "openapi": "3.1.0",
  "info": {
    "title": "Treasures Finance Manager API",
    "version": "v1",
    "description": "API for fund managers who publish a strategy on Treasures. You publish the target\nweights of the strategy you manage; Treasures rebalances every follower's wallet\ntowards them and pays you your share of the fees those followers pay.\n\n**What you can do.**\n\n- Publish a book (`POST /strategies/{strategyId}/signals`)\n- read the strategies assigned to you with their signal history and performance\n  (`GET /strategies`, `GET /strategies/{strategyId}/signals`,\n  `GET /strategies/{strategyId}/performance`)\n- read the separately managed accounts of an SMA strategy with their fills, holdings and\n  daily valuations (`GET /strategies/{strategyId}/accounts`,\n  `GET /strategies/{strategyId}/accounts/{address}/fills`, `.../holdings`, `.../performance`)\n- read the orders a strategy's books produced (`GET /strategies/{strategyId}/orders`)\n- read your fee ledger (`GET /fees`)\n- from a signed-in dashboard session, list, mint and revoke your own API keys (`/keys`).\n\nA dashboard session can also publish a book, within 900 seconds of a sign-in.\n\nOn a retail strategy you never see, and cannot ask about, an individual follower. The\naggregates you receive are follower counts, the total value of your followers' portfolios\nonce at least three followers contribute to it, and a signal's order counts by state once at\nleast three followers hold orders on it. On an SMA strategy that minimum does not apply, and\nyou see each account by its own wallet addresses, never the client behind it; but if anyone\nother than a separately managed account has ever followed it, those aggregates are withheld\non every read.\n\nEvery `{strategyId}` accepts the strategy's id or its slug.\n\n**Onboarding.** Treasures creates your manager account and assigns the strategy you will\npublish into. Your first key, or the link to your dashboard sign-in, comes from Treasures;\nafter that you can mint and revoke keys yourself. Ask your Treasures contact for a strategy\nto be assigned to you or to set the address your fees are paid to; neither can be done\nthrough this API.\n\n**Auth.** Every route requires a credential; there is no anonymous route on this API.\nTwo credentials are accepted:\n\n| Action | Manager API key | Dashboard session |\n|---|---|---|\n| Publish a book (`POST /strategies/{strategyId}/signals`) | yes | yes, with a recent sign-in |\n| Read your fee ledger (`GET /fees`) and every other read | yes | yes |\n| List, mint and revoke your keys (`/keys`) | no, `403 session_required` | yes |\n\n**Recent sign-in.** Publishing a book from a dashboard session, and minting a key, need a sign-in made in the last 15 minutes: otherwise the request is refused\n`403 reauth_required`; sign out and in again, then retry. Only signing in counts. Linking a\nnew login method to a signed-in session does not, and neither does a login method first\nlinked in the last 15 minutes.\n\nTreasures confirms the sign-in with its identity provider on each such request; if that check\ncannot complete, the request is refused `503 sign_in_check_unavailable` and nothing is\nwritten. A manager API key is never asked for a sign-in.\n\nA **manager API key** goes in the `X-API-Key` header (see `ManagerApiKey`); it is the\ncredential for your publishing system. A **dashboard session** is your own Privy login on\nthe Treasures dashboard, as a Member of the Organization your manager account belongs to:\nsend the Privy access token as `Authorization: Bearer <token>` and the Privy identity token\nin the `Privy-Id-Token` header (see `ManagerSession` and `PrivyIdToken`). Both answer reads\nidentically. When `X-API-Key` is present it is the only credential checked: a bad key is\nrefused even if a valid session is also sent.\n\n**Organizations and permissions.** A login that is a Member of more than one Organization\nwith a manager account names the one it acts for in the `X-Organization-Id` header; without\nit the request is refused `400 organization_required`, and naming an Organization the login\nis not a Member of is `404 organization_not_found`.\n\nA Member who is not an Admin may only do what its permissions grant:\n\n- `strategies:view` for the strategy list, signals, performance and publishing a book\n- `invested_wallets:view` for the accounts, their fills, holdings and performance, and the\n  orders feed\n- `fees:view` for the fee ledger; a separately managed account's address and transactions\n  on it also need `invested_wallets:view` (`fees:update` grants nothing any more and is being\n  retired)\n- `api_keys:view`, `api_keys:update` and `api_keys:delete` to list, mint and revoke keys.\n\nAnything else is refused `403 permission_denied`; an Admin holds every permission.\nA suspended Organization refuses every Member session `403 organization_suspended`; the\nmanager API keys keep working. Permissions never apply to an API key.\n\n**Breaking change (v1).** A request that carries no credential at all is now\n`401 unauthorized`. It used to be `401 invalid_api_key`. A key that is present but\nmalformed, unknown or revoked still answers `invalid_api_key` or `key_revoked`, so a\npublishing system that always sends its key sees no change.\n\n**Wire format.** Weights and USDC amounts are JSON **strings** to avoid float drift.\nTimestamps are ISO-8601 UTC strings; `trading_day` is a `YYYY-MM-DD` date.\n\n**Rate limits.** Per manager, one budget per credential kind: 60 requests per minute\nshared by every key you hold, and a separate 120 requests per minute for dashboard\nsessions. A dashboard can never use up the budget your keys publish with, nor the reverse.\nA `429` carries a `Retry-After` header in seconds; wait that long before retrying.\nA book published from a dashboard session counts against the session budget, not the key's.\n\n**Bodies must be JSON.** Send `Content-Type: application/json` on every request that\ncarries a body; any other content type is refused `415` before the body is read.\n"
  },
  "servers": [
    {
      "url": "https://api.treasures.io/manager/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ManagerApiKey": []
    },
    {
      "ManagerSession": [],
      "PrivyIdToken": []
    }
  ],
  "tags": [
    {
      "name": "Signals",
      "description": "Publish the target weights of the strategy you manage."
    },
    {
      "name": "Strategies",
      "description": "The strategies assigned to you, their signal history and their performance."
    },
    {
      "name": "Fees",
      "description": "Your share of the fees collected from your strategy's followers, and how much of it has been paid to you on-chain."
    },
    {
      "name": "Keys",
      "description": "Mint, list and revoke your API keys from a signed-in dashboard session."
    }
  ],
  "paths": {
    "/strategies": {
      "get": {
        "operationId": "listStrategies",
        "tags": [
          "Strategies"
        ],
        "summary": "The strategies assigned to you",
        "description": "Every strategy assigned to you, at every status (including `draft`, which followers cannot\nsee yet), newest first. At most 100 are returned; `truncated` is `true` when you have more.\nTakes no query parameters.\n\n- `book` is the newest book published into the strategy (by you, or by the strategy's\n  source), at whatever status it has reached (`received`, `executing`, `superseded`, ...), so you can see what you sent before\n  it finishes. `null` when you have published none, or when the newest one cannot be read.\n  Rebooks Treasures issues on its own (a rebalance for a follower who joined late, or a\n  retry of a failed order) are not your books and never appear here.\n- `live_follow_count` is how many followers the strategy has right now.\n- `audience` is who may follow the strategy: `retail` (the public catalog) or `sma`\n  (separately managed accounts only; never listed publicly or resold).\n- `aum_usdc` is the total value of your followers' portfolios at the last completed daily\n  valuation, and `aum_as_of` when that valuation was taken. Both are `null` until at least\n  three followers contribute to it: below that, the total would be one follower's balance.\n  On an SMA strategy (`audience: sma`) that minimum does not apply: both are served from\n  one contributing account up, unless anyone other than a separately managed account has ever followed it, when both are `null`.\n",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyList"
                },
                "example": {
                  "data": [
                    {
                      "strategy_id": "cst_01J7W3M9P2K5R8XV6T4H0B1C7D",
                      "slug": "income-tilt",
                      "name": "Income Tilt",
                      "status": "active",
                      "capacity_state": "open",
                      "audience": "retail",
                      "min_allocation": null,
                      "chains": [
                        "sol"
                      ],
                      "cells": [
                        {
                          "cell_id": "sol/ondo",
                          "chain": "sol",
                          "protocol": "ondo",
                          "buy_enabled": true,
                          "display_min_usdc": null,
                          "fixed_ticket_display_min_usdc": null,
                          "min_sell_usdc": "0.50"
                        }
                      ],
                      "signal_kinds": [
                        "weights"
                      ],
                      "book": {
                        "signal_id": "csg_01J8ZK6Q2M7R4XW9V3T5H2B6NE",
                        "status": "completed",
                        "as_of": "2026-09-28T14:02:11.418Z",
                        "source": "ingest",
                        "reserve_fees": false,
                        "weights": [
                          {
                            "ticker": "AAPL",
                            "weight": "0.35"
                          },
                          {
                            "ticker": "NVDA",
                            "weight": "0.25"
                          }
                        ]
                      },
                      "live_follow_count": 42,
                      "aum_usdc": "125400.12",
                      "aum_as_of": "2026-09-28T00:20:00.000Z"
                    }
                  ],
                  "truncated": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: a query parameter was sent; this route takes none.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidRequestError"
                },
                "example": {
                  "error": "invalid_request",
                  "message": "unrecognized_keys: Unrecognized key: \"limit\""
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/signals": {
      "parameters": [
        {
          "$ref": "#/components/parameters/StrategyId"
        }
      ],
      "post": {
        "operationId": "publishSignal",
        "tags": [
          "Signals"
        ],
        "summary": "Publish the target weights of your strategy",
        "security": [
          {
            "ManagerApiKey": []
          },
          {
            "ManagerSession": [],
            "PrivyIdToken": []
          }
        ],
        "description": "Publishes the book you want every follower of this strategy to hold: a list of tickers and\nthe fraction of the portfolio each should be. Treasures plans and executes the trades that\nmove each follower's wallet from what it holds to what you published; you do not place\norders yourself.\n\n**The body is the whole book, not a change to it.** A ticker you leave out is sold. Weights\nmust sum to at most `1`; whatever is left over is held as cash, so a book that sums to\n`0.8` is a deliberate 20% cash position. Weights are decimal strings with up to 8 fractional\ndigits, greater than zero (omit a position rather than setting it to `0`), and each ticker\nappears at most once. 1 to 200 positions per book.\n\nTickers are uppercase in the notation the catalog uses (`AAPL`, `BRK.B`); the catalog is at\n[`GET https://api.treasures.io/public/v1/stocks/tickers`](https://docs.treasures.io/api/list-stock-tickers)\nand a ticker that is not on it is refused `422 unknown_tickers`. A ticker that is on it but\nis not listed on the venues Treasures buys on for followers is refused\n`422 unavailable_tickers`. Both checks apply to a new `dedupe_key` only: repeating one you\nalready used returns the original signal even if a ticker has since left the catalog or\nthose venues.\n\n**`dedupe_key` is your idempotency key, and it is required.** Choose it: a date and\nrevision (`2026-09-28-r1`), your own book id, anything up to 200 characters that is unique\nper book you intend to publish. Repeating a `dedupe_key` you already used returns `200`\nwith the signal it created the first time (its original `trading_day` and `ttl_at`, not\ntoday's) and rebalances nothing. That is what makes a retry safe. It also means the same\nbook published on a later day needs a **new** `dedupe_key`, or it will be swallowed as a\nreplay.\n\n**When it executes.** `urgency` in the response tells you which session your book is\nqueued for:\n\n- `fresh`: the US market is open with more than 30 minutes left, and the book executes\n  now, over a window that ends at `ttl_at` (up to 4 hours, never past the close).\n- `stale`: the market is closed, or closes within 30 minutes; the book is queued for the\n  next session, starts 30 minutes after its open, and `ttl_at` is that session's close.\n\nYou cannot ask for one or the other; sending `urgency` or `kind` in the body is a `400`.\n`trading_day` is the date of the session the book targets.\n\n**A book that is not filled by `ttl_at` lapses and is not retried.** Publishing a new book\n(with a new `dedupe_key`) on the same trading day replaces the one still queued.\n`superseded_signal_ids` lists what this publish retired. If nothing filled, publish again.\n\n`follower_count` is how many live followers this book was fanned out to at the moment it\nwas accepted. Each follower is rebalanced within their own limits (minimum trade sizes,\navailable cash); a follower that cannot take a position is skipped, never blocked, and\nyou are not told which.\n\n**Publishing from the dashboard.** A signed-in dashboard session may publish too, with the\nsame body, the same replay rule and the same answers as a key. It needs a recent sign-in\n(see Recent sign-in above), checked before the strategy is looked at, so a stale session\nis refused `403 reauth_required` even when it repeats a `dedupe_key`; sign in again and the\nrepeat returns the original signal. If you send both an API key and a session, only the key\nis checked.\n\nA dashboard publish counts against your dashboard sessions' 120 requests per minute, not\nyour keys' 60.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishSignalRequest"
              },
              "example": {
                "dedupe_key": "2026-09-28-r1",
                "target_weights": [
                  {
                    "ticker": "AAPL",
                    "weight": "0.35"
                  },
                  {
                    "ticker": "NVDA",
                    "weight": "0.25"
                  },
                  {
                    "ticker": "MSFT",
                    "weight": "0.20"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay of a `dedupe_key` you already used: the signal it created the first time, with its original `trading_day` and `ttl_at`. Nothing was rebalanced; `superseded_signal_ids` is always empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Signal"
                },
                "example": {
                  "signal_id": "csg_01J8ZK6Q2M7R4XW9V3T5H2B6NE",
                  "outcome": "duplicate",
                  "urgency": "fresh",
                  "trading_day": "2026-09-28",
                  "ttl_at": "2026-09-28T19:30:00.000Z",
                  "follower_count": 42,
                  "superseded_signal_ids": []
                }
              }
            }
          },
          "201": {
            "description": "Accepted and fanned out to every live follower.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Signal"
                },
                "example": {
                  "signal_id": "csg_01J8ZK6Q2M7R4XW9V3T5H2B6NE",
                  "outcome": "ingested",
                  "urgency": "fresh",
                  "trading_day": "2026-09-28",
                  "ttl_at": "2026-09-28T19:30:00.000Z",
                  "follower_count": 42,
                  "superseded_signal_ids": [
                    "csg_01J8ZFD0K3P9QYX2W7M4T6C8RA"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request` with a `message` naming the field: a query parameter (this route takes none, and refuses one before any other check), malformed JSON, a missing or unknown field (including `urgency` or `kind`), a weight outside `(0, 1]` or with more than 8 fractional digits, a duplicate ticker, a book that sums past `1`, or more than 200 positions. `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "target_weights: target weights must sum to at most 1"
                    }
                  },
                  "invalid_strategy_id": {
                    "value": {
                      "error": "invalid_strategy_id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "- `reauth_required`: a dashboard session whose last sign-in was more than 15 minutes\n  ago, or was made with a login method first linked in the last 15 minutes; sign in\n  again, then retry. Answered before the strategy is looked at, whichever strategy it\n  names.\n- `strategy_forbidden`: this strategy is not assigned to you. The same response is\n  returned for a strategy id that does not exist, so the id space cannot be probed;\n  check the id with your Treasures contact.\n- `manager_suspended`: your account is suspended; every key you hold and your dashboard\n  session are refused until Treasures reactivates it.\n- `manager_not_linked`: a valid dashboard login that is a Member of no Organization with\n  a manager account.\n- `organization_suspended` and `permission_denied` as on every route.\n\nAll are answered before `reauth_required`, and checked again for a dashboard session\nonce its sign-in is confirmed, so a suspension or a removal from the Organization that\nlands while the request is in flight also refuses it, and nothing is published.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "examples": {
                  "reauth_required": {
                    "value": {
                      "error": "reauth_required"
                    }
                  },
                  "strategy_forbidden": {
                    "value": {
                      "error": "strategy_forbidden"
                    }
                  },
                  "manager_suspended": {
                    "value": {
                      "error": "manager_suspended"
                    }
                  },
                  "manager_not_linked": {
                    "value": {
                      "error": "manager_not_linked"
                    }
                  },
                  "organization_suspended": {
                    "value": {
                      "error": "organization_suspended"
                    }
                  },
                  "permission_denied": {
                    "value": {
                      "error": "permission_denied"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`strategy_not_accepting_signals`: the strategy is not active (Treasures has paused or halted it), so nothing can be published into it right now. Positions are held; contact Treasures.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "example": {
                  "error": "strategy_not_accepting_signals"
                }
              }
            }
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "description": "- `unknown_tickers`: one or more tickers are not in the Treasures catalog;\n  `unknown_tickers` lists them in the order you sent them, and nothing was published.\n- `unavailable_tickers`: one or more tickers are on the catalog, but not listed on the\n  venues Treasures buys on for followers; resend the book without them.\n  `unavailable_tickers` lists them in the order you sent them, and nothing was\n  published.\n\n  This is a listing check, not a check of whether a ticker can be bought right now: a\n  ticker listed on those venues is accepted even while it is halted or thinly traded.\n  It is also separate from the `tradability` field on the tickers endpoint: a ticker\n  marked `thin` or `untradable` there is not refused for that reason, and a ticker\n  with no warning there can still be refused here. A ticker refused here cannot be\n  kept: leaving it out of the book sells it from followers' portfolios.\n\n  When a book has both kinds of ticker, only `unknown_tickers` is returned; fix those\n  first.\n- `unsupported_signal_kind`: the strategy assigned to you is not configured to take a\n  weights book. Contact Treasures.\n",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnknownTickersError"
                    },
                    {
                      "$ref": "#/components/schemas/UnavailableTickersError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "unknown_tickers": {
                    "value": {
                      "error": "unknown_tickers",
                      "unknown_tickers": [
                        "APPL",
                        "NVDIA"
                      ]
                    }
                  },
                  "unavailable_tickers": {
                    "value": {
                      "error": "unavailable_tickers",
                      "unavailable_tickers": [
                        "XYZ"
                      ]
                    }
                  },
                  "unsupported_signal_kind": {
                    "value": {
                      "error": "unsupported_signal_kind"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`sign_in_check_unavailable`: a dashboard session's sign-in could not be confirmed with Treasures' identity provider, so nothing was published. Retry shortly. Never answered to an API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "example": {
                  "error": "sign_in_check_unavailable"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listStrategySignals",
        "tags": [
          "Strategies"
        ],
        "summary": "The signal history of your strategy",
        "description": "Every book and trade event published into this strategy, by you or by the strategy's\nsource, at every status, newest first: including books that were `superseded` by a later\none on the same trading day and books Treasures could not plan (`not_plannable`). Pass\n`status` to see one status only. Rebooks Treasures issues on its own (a rebalance for a\nfollower who joined late, a retry of a failed order) and the sells that close one\nfollower's position are not listed.\n\n- `summary` describes the book: how many positions, the weight deployed, and the five\n  largest positions. `null` when the stored signal cannot be read; the row is still listed.\n- `plan_attempts` is how many times Treasures tried to plan the signal into orders.\n- `plan_error` says why the last attempt gave up, or why the signal lapsed with nothing\n  owed; see `PlanError`. A reason that describes the followers (`no_active_followers`,\n  `all_follows_in_flight`, `nothing_owed`) is `null` when fewer than three followers were\n  following when the signal was published, or when fewer than three follow the strategy\n  now. On an SMA strategy (`audience: sma`) that minimum does not apply, unless anyone\n  other than a separately managed account has ever followed it, when such a reason is\n  always `null`.\n- `orders.by_state` counts the orders the signal produced, by state. It is served once\n  the signal has a final status (`completed`, `lapsed` or `halted`), every order on it is\n  terminal and at least three followers hold orders on it; otherwise `null`, so it is never\n  a count still moving. It is `null` on every other status, `superseded` and\n  `not_plannable` included, and while a lapsed or halted signal still has an order in\n  progress.\n\n  Below three followers the counts would describe one follower's own balance, limits or\n  allocation. On an SMA strategy (`audience: sma`) that minimum does not apply, unless\n  anyone other than a separately managed account has ever followed it, when `orders` is\n  always `null`. States with no orders are left out.\n\nPass `next_cursor` back as `cursor` to page; `null` means you have seen them all.\n",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Signals per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a prior response's `next_cursor`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only signals with this status.",
            "schema": {
              "$ref": "#/components/schemas/SignalStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategySignalPage"
                },
                "example": {
                  "data": [
                    {
                      "signal_id": "csg_01J8ZK6Q2M7R4XW9V3T5H2B6NE",
                      "kind": "weights",
                      "status": "completed",
                      "urgency": "fresh",
                      "source": "ingest",
                      "trading_day": "2026-09-28",
                      "created_at": "2026-09-28T14:02:11.418Z",
                      "updated_at": "2026-09-28T15:40:02.007Z",
                      "summary": {
                        "kind": "weights",
                        "position_count": 3,
                        "deployed_weight": "0.8",
                        "reserve_fees": false,
                        "top": [
                          {
                            "ticker": "AAPL",
                            "weight": "0.35"
                          },
                          {
                            "ticker": "NVDA",
                            "weight": "0.25"
                          },
                          {
                            "ticker": "MSFT",
                            "weight": "0.2"
                          }
                        ]
                      },
                      "superseded_by_signal_id": null,
                      "plan_attempts": 1,
                      "plan_error": null,
                      "orders": {
                        "by_state": {
                          "filled": 120,
                          "skipped_sub_floor": 6
                        }
                      }
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: an unknown query parameter, `limit` outside 1 to 100, an unknown `status`, or `cursor: malformed` (restart from the first page). `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "cursor: malformed"
                    }
                  },
                  "invalid_strategy_id": {
                    "value": {
                      "error": "invalid_strategy_id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/performance": {
      "get": {
        "operationId": "getStrategyPerformance",
        "tags": [
          "Strategies"
        ],
        "summary": "The performance chart of your strategy",
        "description": "The strategy's performance as one continuous line of daily values: a backtest, where one\nwas published, then the live model from `launched_on`. The body is the same one followers\nsee for a published strategy, and it is also served for your `draft` strategies. Empty\n`segments` and `points` mean no line exists yet. A line starts on its own at the first daily\nupdate after your first target weights reach a final status (`completed`, `lapsed` or\n`halted`) while the strategy is `active`, at a value of 1 on the last market close.\n\n`days` counts back from the newest point on the line.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/StrategyId"
          },
          {
            "name": "days",
            "in": "query",
            "description": "How many days of the line to return, counted back from its newest point.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1100,
              "default": 1095
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerformanceChart"
                },
                "example": {
                  "strategy_id": "cst_01J7W3M9P2K5R8XV6T4H0B1C7D",
                  "launched_on": "2026-01-05",
                  "segments": [
                    {
                      "source": "backtest",
                      "params": {
                        "net_of_fees": true
                      },
                      "generated_at": "2026-09-29T00:00:00.000Z",
                      "first_day": "2023-01-03",
                      "last_day": "2026-01-04"
                    }
                  ],
                  "points": [
                    {
                      "day": "2026-01-05",
                      "nav": "1.2",
                      "gross_nav": "1.3",
                      "benchmark_nav": "1.06",
                      "source": "model"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: an unknown query parameter or `days` outside 1 to 1100. `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "days: Number must be greater than or equal to 1"
                    }
                  },
                  "invalid_strategy_id": {
                    "value": {
                      "error": "invalid_strategy_id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/accounts": {
      "get": {
        "operationId": "listStrategyAccounts",
        "tags": [
          "Strategies"
        ],
        "summary": "The separately managed accounts of your SMA strategy",
        "description": "For a strategy whose `audience` is `sma` only: every separately managed account assigned\nto it, at every state including `closed`, newest assignment first. An account is named by\nits own wallet addresses, exactly as its wallet reports them; you never see the client\nbehind it.\n\n- An account that was closed and later assigned to the strategy again is listed once per\n  assignment, under the same addresses, each with its own `state` and valuation.\n  `assignment` tells those rows apart: it is the same number as the account's performance\n  `assignments[].assignment` and `points[].assignment`, and the account's fills take it as\n  `assignment` to show that row's alone.\n- `nav_usdc`, `nav_per_unit` and `as_of` are that assignment's latest daily valuation, in\n  every state: a closed assignment keeps its last one. All three are `null` before its\n  first.\n- `last_fill_at` is when that assignment's most recent order filled, never an earlier or\n  later assignment's; `null` before its first.\n- `cohort` totals the strategy's accounts at the last completed daily valuation, from one\n  contributing account up: the three-follower minimum does not apply. `aum_usdc` and\n  `aum_as_of` are `null` while no account has a valuation. If anyone other than a\n  separately managed account has ever followed the strategy, every `cohort` field is\n  `null`, and so are its `aum_usdc` in the strategy list and its signals' follower\n  reasons and `orders`: beside each account's own valuation, any total would be that\n  other follower's figure.\n\nPass `next_cursor` back as `cursor` to page; `null` means you have seen them all.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/StrategyId"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Accounts per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a prior response's `next_cursor`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmaAccountPage"
                },
                "example": {
                  "data": [
                    {
                      "addresses": {
                        "evm": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
                        "solana": "5vS6nXrW3hT8sPq2kZ4mBdLc7yJfEuGa9N1HpRtVwXe"
                      },
                      "assignment": 1,
                      "state": "following",
                      "nav_usdc": "25412.08",
                      "nav_per_unit": "1.0431",
                      "as_of": "2026-09-28T00:20:00.000Z",
                      "last_fill_at": "2026-09-27T14:05:12.331Z",
                      "total_deposited_usdc": "24000.000000",
                      "pending_deposit_usdc": "500.000000"
                    }
                  ],
                  "cohort": {
                    "live_account_count": 1,
                    "aum_usdc": "25412.08",
                    "aum_account_count": 1,
                    "aum_as_of": "2026-09-28T00:20:00.000Z"
                  },
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: an unknown query parameter, `limit` outside 1 to 500, or `cursor: malformed` (restart from the first page). `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "limit: Number must be less than or equal to 500"
                    }
                  },
                  "malformed_cursor": {
                    "value": {
                      "error": "invalid_request",
                      "message": "cursor: malformed"
                    }
                  },
                  "invalid_strategy_id": {
                    "value": {
                      "error": "invalid_strategy_id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "404": {
            "$ref": "#/components/responses/StrategyNotSma"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/accounts/{address}/fills": {
      "parameters": [
        {
          "$ref": "#/components/parameters/StrategyId"
        },
        {
          "$ref": "#/components/parameters/Address"
        }
      ],
      "get": {
        "operationId": "listAccountFills",
        "tags": [
          "Strategies"
        ],
        "summary": "The fills of one separately managed account",
        "description": "Every order that filled for one account of your SMA strategy, across every assignment of\nthat account to the strategy unless `assignment` names one, newest order first: ordered by\nwhen each order was placed, not by `filled_at`, so an order that filled late keeps its\nplace. Name the account by either of the addresses\nthe accounts list serves: its Solana address, or its EVM address in any letter case.\n\n- `usdc` is the exact USDC amount of the fill: spent on a `buy`, received on a `sell`.\n  `null` when the amount was not reported.\n- An order that filled only in part is listed with the part that filled, even if the\n  order then failed. Orders that never filled are not listed.\n- `signal_id` is the signal whose book placed the order.\n- `transactions` lists each leg of the fill with its own `chain` and `tx_hash`, the hash to\n  look up on that chain's explorer. A Solana leg's hash appears at once when it is a\n  Solana signature; an EVM trade's hash appears once the trade settles; until then `null`.\n  The fill's own `chain` is `null` on a sell, since each transaction names its own chain.\n  Each leg also names the `protocol` it filled on and its `cell_id`, `null` when not\n  recorded.\n\nAn address that is not an account of this strategy answers `404 account_not_found`,\nwhoever's address it is, and so does an `assignment` the account never had. Pass\n`next_cursor` back as `cursor` to page, and keep paging while\nit is not `null`, even after a short or empty page; `null` means you have seen them all.\n",
        "parameters": [
          {
            "name": "assignment",
            "in": "query",
            "description": "Only the fills of this assignment of the account: the accounts list's `assignment`, and the performance read's. Omit it for every assignment. Keep it on every page you request with `cursor`.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Fills per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a prior response's `next_cursor`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountFillPage"
                },
                "example": {
                  "data": [
                    {
                      "signal_id": "csg_01J8C2Q6Y5ZK9N3R7T1V4W8X0A",
                      "ticker": "AAPL",
                      "side": "buy",
                      "chain": "sol",
                      "usdc": "2500",
                      "filled_at": "2026-09-27T14:05:12.331Z",
                      "transactions": [
                        {
                          "chain": "sol",
                          "protocol": "ondo",
                          "cell_id": "sol/ondo",
                          "tx_hash": "3yZe7d8Hq1Lx5kPpWc9uVtR2sNfGbJmA4oQiE6hXwK1rTzUyLvBnMgDcFsAqPeRt"
                        }
                      ]
                    },
                    {
                      "signal_id": "csg_01J8A4F2B7XQ1M6N9P3R5T8V0W",
                      "ticker": "MSFT",
                      "side": "sell",
                      "chain": null,
                      "usdc": "812.4",
                      "filled_at": "2026-09-20T15:31:40.018Z",
                      "transactions": [
                        {
                          "chain": "base",
                          "protocol": "coinbase",
                          "cell_id": "base/coinbase",
                          "tx_hash": null
                        }
                      ]
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "- `invalid_address`: the address is neither a Solana nor an EVM address.\n- `invalid_request`:\n  - an unknown query parameter\n  - `limit` outside 1 to 100\n  - `assignment` not a whole number of 1 or more\n  - `cursor: malformed` (restart from the first page).\n- `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_address": {
                    "value": {
                      "error": "invalid_address"
                    }
                  },
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "limit: Number must be less than or equal to 100"
                    }
                  },
                  "malformed_cursor": {
                    "value": {
                      "error": "invalid_request",
                      "message": "cursor: malformed"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AccountNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/accounts/{address}/holdings": {
      "parameters": [
        {
          "$ref": "#/components/parameters/StrategyId"
        },
        {
          "$ref": "#/components/parameters/Address"
        }
      ],
      "get": {
        "operationId": "getAccountHoldings",
        "tags": [
          "Strategies"
        ],
        "summary": "What one separately managed account holds right now",
        "description": "A live read of one account of your SMA strategy: its stock positions, its stablecoins and\nthe value of the network gas it holds, read from the chains when you call. Name the account\nby either of the addresses the accounts list serves.\n\n- The parts add up: `nav_usdc` is the sum of every position's `usd_value`, every\n  stablecoin's `amount` and `gas_usdc`.\n- Stablecoins with a zero balance are left out.\n- When the account is not currently assigned to the strategy, or is assigned but its first\n  deposit has not yet been credited (even if the funds have arrived), nothing is read: the\n  lists are empty and `gas_usdc`, `nav_usdc` and `as_of` are `null`.\n- A balance or price read that does not complete is never answered with a partial figure:\n  the call answers `503` and you retry shortly. That includes gas the account holds that\n  has no price. A read that could only be answered from earlier results rather than from\n  the chains answers `503` `portfolio_busy`; retry after `Retry-After`.\n- The read is unavailable for a short window around the daily valuation (00:03 to 00:40\n  UTC): the call answers `503` `portfolio_busy`; retry after `Retry-After`, which carries\n  the seconds until the window ends.\n\nThis read has its own budget of 20 calls a minute per credential kind (your keys share one,\nyour dashboard sessions another), on top of the plane-wide one.\n",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHoldings"
                },
                "example": {
                  "addresses": {
                    "evm": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
                    "solana": "5vS6nXrW3hT8sPq2kZ4mBdLc7yJfEuGa9N1HpRtVwXe"
                  },
                  "positions": [
                    {
                      "ticker": "AAPL",
                      "chain": "sol",
                      "protocol": "ondo",
                      "cell_id": "sol/ondo",
                      "shares": "41.2",
                      "usd_value": "9512.33"
                    }
                  ],
                  "stablecoins": [
                    {
                      "chain": "sol",
                      "asset": "USDC",
                      "amount": "15890.11"
                    }
                  ],
                  "gas_usdc": "1.42",
                  "nav_usdc": "25403.86",
                  "as_of": "2026-09-28T14:02:11.000Z"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_address`: the address is neither a Solana nor an EVM address. `invalid_request`: any query parameter. `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_address": {
                    "value": {
                      "error": "invalid_address"
                    }
                  },
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "Unrecognized key(s) in object: 'x'"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AccountNotFound"
          },
          "429": {
            "$ref": "#/components/responses/HoldingsRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ReadIncomplete"
          }
        }
      }
    },
    "/strategies/{strategyId}/accounts/{address}/performance": {
      "parameters": [
        {
          "$ref": "#/components/parameters/StrategyId"
        },
        {
          "$ref": "#/components/parameters/Address"
        }
      ],
      "get": {
        "operationId": "getAccountPerformance",
        "tags": [
          "Strategies"
        ],
        "summary": "The daily valuations of one separately managed account",
        "description": "Every daily valuation of one account of your SMA strategy, across every assignment of that\naccount to the strategy, oldest first. Name the account by either of the addresses the\naccounts list serves.\n\n- `assignment` is 1 for the account's first assignment to this strategy, counting up.\n  Value per unit starts again at 1 on each assignment, so the two are never chained.\n- A day on which the account was assigned again can carry two points, one per assignment.\n- Points are sparse: a day with no valuation has no point, and none is filled in.\n- `assignments` lists every assignment with its `state` and the first and last day it has\n  a point in the window; both are `null` when it has none.\n\n`days` keeps the points on the days before the account's latest valuation day, that day\nincluded.\n",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "How many days of points to return, counted back from the account's latest valuation day.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1100,
              "default": 1095
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPerformance"
                },
                "example": {
                  "addresses": {
                    "evm": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
                    "solana": "5vS6nXrW3hT8sPq2kZ4mBdLc7yJfEuGa9N1HpRtVwXe"
                  },
                  "assignments": [
                    {
                      "assignment": 1,
                      "state": "following",
                      "first_day": "2026-09-26",
                      "last_day": "2026-09-28",
                      "total_deposited_usdc": "24000.000000",
                      "pending_deposit_usdc": "500.000000"
                    }
                  ],
                  "points": [
                    {
                      "assignment": 1,
                      "day": "2026-09-26",
                      "as_of": "2026-09-26T00:20:00.000Z",
                      "nav_usdc": "25000",
                      "nav_per_unit": "1"
                    },
                    {
                      "assignment": 1,
                      "day": "2026-09-28",
                      "as_of": "2026-09-28T00:20:00.000Z",
                      "nav_usdc": "25412.08",
                      "nav_per_unit": "1.0431"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`invalid_address`: the address is neither a Solana nor an EVM address. `invalid_request`: an unknown query parameter or `days` outside 1 to 1100. `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_address": {
                    "value": {
                      "error": "invalid_address"
                    }
                  },
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "days: Number must be greater than or equal to 1"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "404": {
            "$ref": "#/components/responses/AccountNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/strategies/{strategyId}/orders": {
      "get": {
        "operationId": "listStrategyOrders",
        "tags": [
          "Strategies"
        ],
        "summary": "Every fill across the accounts of your SMA strategy",
        "description": "For a strategy whose `audience` is `sma` only: every order that filled for any of its\nseparately managed accounts, at any assignment, newest order first, each with the account\nit filled for and the signal that placed it. Orders that never filled are not listed.\n\n- Each row is a fill as the account's own fills list serves it, plus `account`.\n- `signal_id` narrows the list to one signal's fills; a signal that is not this\n  strategy's answers an empty list.\n\nPass `next_cursor` back as `cursor` to page, and keep paging while it is not `null`, even\nafter a short or empty page; `null` means you have seen them all. The cursor does not carry\n`signal_id`: send the same `signal_id` with every page, or the next page lists every\nsignal's fills.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/StrategyId"
          },
          {
            "name": "signal_id",
            "in": "query",
            "description": "Only the fills of this signal.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Fills per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a prior response's `next_cursor`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyOrderPage"
                },
                "example": {
                  "data": [
                    {
                      "signal_id": "csg_01J8C2Q6Y5ZK9N3R7T1V4W8X0A",
                      "account": {
                        "evm": "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
                        "solana": "5vS6nXrW3hT8sPq2kZ4mBdLc7yJfEuGa9N1HpRtVwXe"
                      },
                      "ticker": "AAPL",
                      "side": "buy",
                      "chain": "sol",
                      "usdc": "2500",
                      "filled_at": "2026-09-27T14:05:12.331Z",
                      "transactions": [
                        {
                          "chain": "sol",
                          "tx_hash": "3yZe7d8Hq1Lx5kPpWc9uVtR2sNfGbJmA4oQiE6hXwK1rTzUyLvBnMgDcFsAqPeRt"
                        }
                      ]
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: an unknown query parameter, `limit` outside 1 to 100, `signal_id` empty or longer than 64 characters, or `cursor: malformed` (restart from the first page). `invalid_strategy_id` when the path segment is empty or longer than 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "limit: Number must be less than or equal to 100"
                    }
                  },
                  "malformed_cursor": {
                    "value": {
                      "error": "invalid_request",
                      "message": "cursor: malformed"
                    }
                  },
                  "invalid_strategy_id": {
                    "value": {
                      "error": "invalid_strategy_id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/StrategyForbidden"
          },
          "404": {
            "$ref": "#/components/responses/StrategyNotSma"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/fees": {
      "get": {
        "operationId": "getFees",
        "tags": [
          "Fees"
        ],
        "summary": "Your fee ledger (your share of each collection, and what reached you on-chain)",
        "description": "Treasures collects management and performance fees from the followers of your strategy,\nand a share of every collection is yours. This is the ledger of that share, for the\nmanager the credential belongs to. There is no manager id in the path.\n\n- `received_usdc`: your share paid to your fee address on-chain, inside the same\n  transaction that collected the fee.\n- `uncollected_usdc`: fees charged to your followers and not yet recorded as collected.\n  Collection runs on a weekly pass, when a follower exits, and on demand by Treasures,\n  and can be held back, so it has no fixed date. A fee whose transfer has gone through\n  counts here until its collection is recorded.\n- `collected_usdc`: the whole fee of every collection, all time.\n- `platform_usdc`: `collected_usdc` minus `received_usdc`, the part of collected fees\n  paid to the Treasures fee wallet. It includes any part of your share not paid to your\n  fee address on-chain: where `received_usdc` is 0, that is your whole share.\n- `lifetime_usdc`: `uncollected_usdc` plus `collected_usdc`.\n- `fee_addresses`: the fee address Treasures has registered for you on each address\n  family (`sol`, `evm`), `null` where none is registered.\n\nEvery total but `received_usdc` is a whole fee (what your followers pay), not your share.\nYour share of a fee is fixed only when it is collected, so `uncollected_usdc` has none.\n`collected_usdc` equals `received_usdc` plus `platform_usdc` whenever `platform_usdc` is\nabove 0; `platform_usdc` never goes below 0.\n\nA collection counts for whoever managed its strategy when it was collected. An uncollected\nfee counts for the strategy's current manager, so a strategy that moves to another manager\ntakes its uncollected fees with it and leaves its collections. `lifetime_usdc` can fall: a\nfee waived when a follower closes, a strategy moving away, fees switched off\n(`uncollected_usdc` then reads 0), or Treasures moving the date fees count from to a later\none or cancelling uncollected fees charged before a date. A collection that takes more than\nwas owed adds the difference.\n\n`collections` is the paged half: every collection from a follower of your strategy, newest\nfirst. `amount_usdc` is the whole fee collected; `manager_share_usdc` is the part that is\nyours, and `received_usdc` is the part of it paid to your fee address on-chain. For a separately managed\naccount, `account` is that account's address (the same `address` the accounts routes\ntake) and `transactions` lists the on-chain transactions that collected the fee; for any\nother follower both are empty (`null`, `[]`). Pass `next_cursor` back as `cursor` to page;\n`null` means you have seen them all.\n\nA dashboard Member that does not also hold `invested_wallets:view` gets `account` and\n`transactions` empty for every collection; the amounts are unchanged.\n\nThe totals and the collections page are read in one snapshot, so they never disagree\nabout a collection recorded while you were reading. A collection appears once its fee\ntransactions have settled.\n\nYour fee addresses are set by Treasures and cannot be changed from this API, so a leaked\nkey or session can read the ledger and the addresses but cannot redirect a fee. An EVM\naddress is echoed in checksum form. If a key leaks, revoke it (`DELETE /keys/{keyId}`) and\nmint a replacement (`POST /keys`) from a signed-in dashboard session, or ask Treasures to.\n",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Collections per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a prior response's `next_cursor`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeesLedger"
                },
                "example": {
                  "received_usdc": "0.000000",
                  "uncollected_usdc": "12.400000",
                  "collected_usdc": "48.120000",
                  "platform_usdc": "48.120000",
                  "lifetime_usdc": "60.520000",
                  "fee_addresses": {
                    "sol": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                    "evm": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"
                  },
                  "collections": [
                    {
                      "strategy_id": "cst_01J7W3M9P2K5R8XV6T4H0B1C7D",
                      "collected_at": "2026-09-27T20:00:00.912Z",
                      "amount_usdc": "48.120000",
                      "manager_share_usdc": "24.060000",
                      "received_usdc": "0.000000",
                      "account": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
                      "transactions": [
                        {
                          "chain": "sol",
                          "tx_hash": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
                        }
                      ]
                    }
                  ],
                  "next_cursor": "MjAyNi0wOS0yN1QyMDowMDowMC45MTIwMDBafGNmY18wMUo4WjRLOFE2TTJSN1hXMVYzVDVIOUIwTg"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: an unknown query parameter, `limit` outside 1–100, or `cursor: malformed` (restart from the first page).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidRequestError"
                },
                "example": {
                  "error": "invalid_request",
                  "message": "cursor: malformed"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/keys": {
      "get": {
        "operationId": "listKeys",
        "tags": [
          "Keys"
        ],
        "summary": "Your API keys (metadata only)",
        "description": "Every API key of the manager you are signed in as: active keys first, then revoked ones,\nnewest first within each. Only metadata is returned; a key's value is shown once, when it\nis minted, and can never be read back. Revoked keys stay listed, with when each was created,\nlast used and revoked, so you can audit your key history. Capped at 100 rows; `truncated` is\n`true` when there are more. No query parameters are accepted.\n\nOnly a dashboard session may call this; an API key is refused `403 session_required`.\n",
        "security": [
          {
            "ManagerSession": [],
            "PrivyIdToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK. Sent with `Cache-Control: private, no-store`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagerKeyList"
                },
                "example": {
                  "data": [
                    {
                      "key_id": "cmak_01J9A2K7Q9M3R5XW8V4T6H1B2N",
                      "label": "prod signal bot",
                      "created_at": "2026-10-02T09:12:44.103Z",
                      "last_used_at": "2026-10-22T05:58:10.920Z",
                      "revoked_at": null
                    },
                    {
                      "key_id": "cmak_01J8Y2K7Q9M3R5XW8V4T6H1B2M",
                      "label": "old bot",
                      "created_at": "2026-09-14T11:00:02.551Z",
                      "last_used_at": "2026-10-01T22:41:07.004Z",
                      "revoked_at": "2026-10-02T09:13:30.778Z"
                    }
                  ],
                  "truncated": false
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: a query parameter was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidRequestError"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/KeysForbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "operationId": "createKey",
        "tags": [
          "Keys"
        ],
        "summary": "Mint a new API key",
        "description": "Mints a new API key for the manager you are signed in as. The response carries the key\nitself in `api_key`. **It is shown once: store it now. It cannot be retrieved later**, and\nit is never shown by `GET /keys`.\n\nYou may hold at most 10 active keys; revoke one before minting an 11th. You may also make\nat most 20 self-service mints in any 24 hours, revoked ones included (`429 key_mint_limit`);\nkeys Treasures issues for you do not count. If you hit it, wait, or ask Treasures to issue one.\n\nMinting requires a recent sign-in: if you last signed in to the dashboard more than 15\nminutes ago, the request is refused `403 reauth_required`; sign out and in again, then\nretry. Only signing in counts. Linking a new login method (an email, a social account or a\nwallet) to a signed-in session does not, and neither does a login method first linked in\nthe last 15 minutes, so sign in with one you have held longer.\n\nTreasures confirms the sign-in with its identity provider on every mint; if that check\ncannot complete, the mint is refused `503 sign_in_check_unavailable` and nothing is\ncreated; retry shortly.\n\nIf the response is lost (a timeout, or a retried request), the key exists but its value\ncannot be recovered, and it counts toward your 10. List your keys and revoke the one you\nnever received. There is no idempotent replay, because replaying would require storing the\nkey's value.\n\nOnly a dashboard session may call this; an API key is refused `403 session_required`, so a\nkey can never mint its own replacement. No query parameters are accepted.\n",
        "security": [
          {
            "ManagerSession": [],
            "PrivyIdToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyRequest"
              },
              "example": {
                "label": "prod signal bot"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Minted. `api_key` is shown once; store it now. It cannot be retrieved later. Sent with `Cache-Control: private, no-store`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedManagerKey"
                },
                "example": {
                  "key_id": "cmak_01J9A2K7Q9M3R5XW8V4T6H1B2N",
                  "label": "prod signal bot",
                  "created_at": "2026-10-22T06:15:01.574Z",
                  "last_used_at": null,
                  "revoked_at": null,
                  "api_key": "cmk_EXAMPLEEXAMPLEEXAMPLE000"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: a query parameter was sent, the body is not valid JSON, `label` is missing, blank, longer than 100 characters or not a string, or the body has a field other than `label`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidRequestError"
                },
                "example": {
                  "error": "invalid_request",
                  "message": "label: Too small: expected string to have >=1 characters"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "- `reauth_required`: your last dashboard sign-in was more than 15 minutes ago, or was\n  made with a login method first linked in the last 15 minutes; sign in again, then\n  retry.\n- `manager_not_linked` is also answered when your login is removed from the\n  Organization while the mint is in flight.\n- `session_required`: an API key cannot manage keys; call this from a signed-in\n  dashboard session.\n- `manager_suspended`, `manager_not_linked`, `organization_suspended` and\n  `permission_denied` (this needs `api_keys:update`) as on every route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "examples": {
                  "reauth_required": {
                    "value": {
                      "error": "reauth_required"
                    }
                  },
                  "session_required": {
                    "value": {
                      "error": "session_required"
                    }
                  },
                  "manager_suspended": {
                    "value": {
                      "error": "manager_suspended"
                    }
                  },
                  "manager_not_linked": {
                    "value": {
                      "error": "manager_not_linked"
                    }
                  },
                  "organization_suspended": {
                    "value": {
                      "error": "organization_suspended"
                    }
                  },
                  "permission_denied": {
                    "value": {
                      "error": "permission_denied"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`key_limit`: you already hold 10 active keys; revoke one first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "example": {
                  "error": "key_limit"
                }
              }
            }
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "429": {
            "description": "`key_mint_limit`: 20 self-service mints in the last 24 hours, revoked ones included; wait, or ask Treasures to issue one. No `Retry-After` is sent for it. Otherwise the plane's request budget, as on every route (`Too many requests`, with `Retry-After`).",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying. Sent with the request-budget refusal only.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "examples": {
                  "key_mint_limit": {
                    "value": {
                      "error": "key_mint_limit"
                    }
                  },
                  "rate_limited": {
                    "value": {
                      "error": "Too many requests"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "`sign_in_check_unavailable`: Treasures could not confirm your sign-in with its identity provider, so no key was minted. Retry shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "example": {
                  "error": "sign_in_check_unavailable"
                }
              }
            }
          }
        }
      }
    },
    "/keys/{keyId}": {
      "delete": {
        "operationId": "revokeKey",
        "tags": [
          "Keys"
        ],
        "summary": "Revoke one of your API keys",
        "description": "Revokes a key at once: its very next request is refused `401 key_revoked`. A request\nalready in progress when you revoke finishes. Revoking a key that is already revoked\nsucceeds again and keeps the original revocation time. A key that is not one of yours\nanswers `404 key_not_found`, exactly as a key that does not exist.\n\nRevoking does not require a recent sign-in, so a leaked key can always be shut off at once.\nOnly a dashboard session may call this; an API key is refused `403 session_required`. No\nquery parameters are accepted.\n",
        "security": [
          {
            "ManagerSession": [],
            "PrivyIdToken": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "description": "The key's `key_id`, from `GET /keys` or the mint response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked. Sent with `Cache-Control: private, no-store`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "revoked"
                  ],
                  "properties": {
                    "revoked": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "example": {
                  "revoked": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_key_id`: the key id is blank or longer than 64 characters. `invalid_request`: a query parameter was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidRequestError"
                    },
                    {
                      "$ref": "#/components/schemas/SimpleError"
                    }
                  ]
                },
                "examples": {
                  "invalid_key_id": {
                    "value": {
                      "error": "invalid_key_id"
                    }
                  },
                  "invalid_request": {
                    "value": {
                      "error": "invalid_request",
                      "message": "Unrecognized key: \"x\""
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/KeysForbidden"
          },
          "404": {
            "description": "`key_not_found`: not one of your keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleError"
                },
                "example": {
                  "error": "key_not_found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ManagerApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Your manager API key, `cmk_` followed by 24 alphanumeric characters, issued by Treasures or\nminted by you (`POST /keys`). It is shown to you **once** at issue and cannot be retrieved\nafterwards, so store it when you receive it; if you lose it, revoke it yourself\n(`DELETE /keys/{keyId}`) and mint a new one.\n\nThe machine credential: it publishes a book with no sign-in step, and it cannot list, mint\nor revoke keys. When a request carries both a key and a session, only\nthe key is checked.\n\nA malformed or unknown key is `401 invalid_api_key` and a revoked key (by you or by\nTreasures) is `401 key_revoked`. A key for a different Treasures API (an integrator `tik_`\nkey, a wallet `twk_` key) is not accepted here.\n"
      },
      "ManagerSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "The Privy access token of your login on the Treasures manager dashboard, sent with\n`PrivyIdToken`. Accepted on every read, and the only credential that can list, mint or\nrevoke keys. It can also publish a book, but only within 900 seconds\nof a sign-in (`403 reauth_required` otherwise; `503 sign_in_check_unavailable` when the\nsign-in cannot be checked).\n\nThe login must be a Member of the Organization your manager account belongs to\n(`403 manager_not_linked` otherwise); a Member of several such Organizations sends\n`X-Organization-Id`. A Member's permissions decide which routes it may call\n(`403 permission_denied`).\n"
      },
      "PrivyIdToken": {
        "type": "apiKey",
        "in": "header",
        "name": "Privy-Id-Token",
        "description": "The Privy identity token of the same dashboard login, sent with `ManagerSession`. A session without it, or with one for a different login, is `401 unauthorized`."
      }
    },
    "parameters": {
      "StrategyId": {
        "name": "strategyId",
        "in": "path",
        "required": true,
        "description": "The strategy Treasures assigned to you: its id (`cst_…`) or its slug (lowercase letters, digits and inner hyphens, as `slug` on the strategy list).",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "Address": {
        "name": "address",
        "in": "path",
        "required": true,
        "description": "The account's Solana address, or its EVM address in any letter case.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      }
    },
    "responses": {
      "StrategyNotSma": {
        "description": "`strategy_not_sma`: the strategy is yours but its `audience` is `retail`; only an SMA strategy has accounts to list.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "example": {
              "error": "strategy_not_sma"
            }
          }
        }
      },
      "StrategyForbidden": {
        "description": "- `strategy_forbidden`: this strategy is not assigned to you. The same response is\n  returned for a strategy id that does not exist, so the id space cannot be probed; check\n  the id with your Treasures contact. It is decided before the query string is read.\n- `manager_suspended`: your account is suspended; every key you hold and your dashboard\n  session are refused until Treasures reactivates it.\n- `manager_not_linked`: a valid dashboard login that is a Member of no Organization with a\n  manager account.\n- `organization_suspended` and `permission_denied` as on every route.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "strategy_forbidden": {
                "value": {
                  "error": "strategy_forbidden"
                }
              },
              "manager_suspended": {
                "value": {
                  "error": "manager_suspended"
                }
              },
              "manager_not_linked": {
                "value": {
                  "error": "manager_not_linked"
                }
              },
              "organization_suspended": {
                "value": {
                  "error": "organization_suspended"
                }
              },
              "permission_denied": {
                "value": {
                  "error": "permission_denied"
                }
              }
            }
          }
        }
      },
      "Unauthenticated": {
        "description": "- `unauthorized`: no credential was sent at all (breaking change: this used to be\n  `invalid_api_key`), or a dashboard session failed verification: the access token is\n  missing, malformed or expired, or the identity token is missing or belongs to a\n  different login.\n- `invalid_api_key`: `X-API-Key` is malformed, unknown, or belongs to a different\n  Treasures API.\n- `key_revoked`: this key has been revoked; mint a new one or ask Treasures.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "unauthorized": {
                "value": {
                  "error": "unauthorized"
                }
              },
              "invalid_api_key": {
                "value": {
                  "error": "invalid_api_key"
                }
              },
              "key_revoked": {
                "value": {
                  "error": "key_revoked"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "- `manager_suspended`: your account is suspended; every key you hold and your dashboard\n  session are refused until Treasures reactivates it.\n- `manager_not_linked`: a valid dashboard login that is a Member of no Organization with a\n  manager account.\n- `organization_suspended`: your Organization is suspended; every Member session is\n  refused, your keys keep working.\n- `permission_denied`: your Member permissions do not grant this route.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "manager_suspended": {
                "value": {
                  "error": "manager_suspended"
                }
              },
              "manager_not_linked": {
                "value": {
                  "error": "manager_not_linked"
                }
              },
              "organization_suspended": {
                "value": {
                  "error": "organization_suspended"
                }
              },
              "permission_denied": {
                "value": {
                  "error": "permission_denied"
                }
              }
            }
          }
        }
      },
      "KeysForbidden": {
        "description": "`session_required`: an API key cannot manage keys; call this from a signed-in dashboard session. `manager_suspended`, `manager_not_linked`, `organization_suspended` and `permission_denied` as on every route.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "session_required": {
                "value": {
                  "error": "session_required"
                }
              },
              "manager_suspended": {
                "value": {
                  "error": "manager_suspended"
                }
              },
              "manager_not_linked": {
                "value": {
                  "error": "manager_not_linked"
                }
              },
              "organization_suspended": {
                "value": {
                  "error": "organization_suspended"
                }
              },
              "permission_denied": {
                "value": {
                  "error": "permission_denied"
                }
              }
            }
          }
        }
      },
      "AccountNotFound": {
        "description": "`strategy_not_sma`: the strategy is yours but its `audience` is `retail`. `account_not_found`: the address is not an account of this strategy.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "strategy_not_sma": {
                "value": {
                  "error": "strategy_not_sma"
                }
              },
              "account_not_found": {
                "value": {
                  "error": "account_not_found"
                }
              }
            }
          }
        }
      },
      "HoldingsRateLimited": {
        "description": "More than 20 holdings reads in the last minute across your keys, or across your dashboard sessions (each kind its own budget); the plane-wide budget also applies. The `Retry-After` header carries the seconds to wait.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "example": {
              "error": "Too many requests"
            }
          }
        }
      },
      "ReadIncomplete": {
        "description": "A balance or price read did not complete; retry shortly.\n\n- `portfolio_partial`: a balance could not be read.\n- `portfolio_unpriced`: a position, or gas the account holds, has no price.\n- `portfolio_read_timeout`: the read ran past its time budget.\n- `portfolio_busy`: too many reads are in flight, the read could only be answered from\n  earlier results rather than from the chains, or the call fell in the daily valuation\n  window; the `Retry-After` header carries the seconds to wait.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying; sent with `portfolio_busy`.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "examples": {
              "portfolio_partial": {
                "value": {
                  "error": "portfolio_partial"
                }
              },
              "portfolio_unpriced": {
                "value": {
                  "error": "portfolio_unpriced"
                }
              },
              "portfolio_read_timeout": {
                "value": {
                  "error": "portfolio_read_timeout"
                }
              },
              "portfolio_busy": {
                "value": {
                  "error": "portfolio_busy"
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "More than 60 requests in the last minute across every key you hold, or more than 120 across your dashboard sessions; each kind has its own budget. The `Retry-After` header carries the seconds to wait.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "example": {
              "error": "Too many requests"
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "The request body was sent with a `Content-Type` other than `application/json`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SimpleError"
            },
            "example": {
              "error": "Unsupported Media Type; expected application/json"
            }
          }
        }
      }
    },
    "schemas": {
      "Ticker": {
        "type": "string",
        "pattern": "^[A-Z0-9][A-Z0-9.]{0,9}$",
        "description": "Uppercase, 1–10 characters, in the catalog's own notation (`BRK.B`, not `BRK-B`). Not case-folded: `aapl` is refused.",
        "example": "AAPL"
      },
      "Weight": {
        "type": "string",
        "pattern": "^0(?:\\.\\d{1,8})?$|^1(?:\\.0{1,8})?$",
        "description": "Fraction of the portfolio, as a decimal string in `(0, 1]` with up to 8 fractional digits. `0` is refused; omit the position instead.",
        "example": "0.25"
      },
      "UsdcAmount": {
        "type": "string",
        "description": "USDC amount as a decimal string, 6 fractional digits.",
        "example": "48.120000"
      },
      "TargetWeight": {
        "type": "object",
        "required": [
          "ticker",
          "weight"
        ],
        "properties": {
          "ticker": {
            "$ref": "#/components/schemas/Ticker"
          },
          "weight": {
            "$ref": "#/components/schemas/Weight"
          }
        },
        "additionalProperties": false
      },
      "PublishSignalRequest": {
        "type": "object",
        "required": [
          "dedupe_key",
          "target_weights"
        ],
        "properties": {
          "dedupe_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Your idempotency key for this book. Repeating one you already used replays the original signal (`200`) and rebalances nothing, so a book you intend to publish again needs a new key. Keys starting with `replan:` or `catchup:` (any case) are reserved for the platform and refused with `400`.",
            "example": "2026-09-28-r1"
          },
          "target_weights": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "description": "The whole book. Tickers unique; weights sum to at most `1`, the remainder held as cash. A ticker not listed is sold.",
            "items": {
              "$ref": "#/components/schemas/TargetWeight"
            }
          }
        },
        "additionalProperties": false
      },
      "Signal": {
        "type": "object",
        "required": [
          "signal_id",
          "outcome",
          "urgency",
          "trading_day",
          "ttl_at",
          "follower_count",
          "superseded_signal_ids"
        ],
        "properties": {
          "signal_id": {
            "type": "string",
            "description": "The published signal's id."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "ingested",
              "duplicate"
            ],
            "description": "`ingested`: this call published a new book (`201`). `duplicate`: this `dedupe_key` was already used and the original signal is echoed (`200`)."
          },
          "urgency": {
            "$ref": "#/components/schemas/SignalUrgency"
          },
          "trading_day": {
            "type": "string",
            "format": "date",
            "description": "The `YYYY-MM-DD` date of the market session the book targets."
          },
          "ttl_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the execution window closes. Orders not filled by then lapse and are not retried; publish a new book if that happens."
          },
          "follower_count": {
            "type": "integer",
            "description": "How many live followers the book was fanned out to when it was accepted."
          },
          "superseded_signal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Signals of yours still queued for the same trading day that this publish replaced. Always empty on a replay."
          }
        },
        "additionalProperties": false
      },
      "SignalUrgency": {
        "type": "string",
        "enum": [
          "fresh",
          "stale"
        ],
        "description": "`fresh` executes in the current market session; `stale` runs in the current session when it has at least 30 minutes left (starting 30 minutes after its open at the earliest), else in the next one. Decided by Treasures from the market calendar, never requested."
      },
      "SignalStatus": {
        "type": "string",
        "enum": [
          "received",
          "planned",
          "executing",
          "completed",
          "lapsed",
          "superseded",
          "halted",
          "not_plannable"
        ],
        "description": "- `received`: queued, not yet planned into orders.\n- `planned`: orders written for your followers.\n- `executing`: orders are being placed.\n- `completed`: every order reached a final state.\n- `lapsed`: the execution window closed first, or nobody was owed the signal any more.\n- `superseded`: replaced by a later book for the same trading day before it was planned.\n- `halted`: stopped by Treasures.\n- `not_plannable`: Treasures gave up planning it; see `plan_error`."
      },
      "SignalKind": {
        "type": "string",
        "enum": [
          "weights",
          "event"
        ],
        "description": "`weights`: a whole book. `event`: one trade event (a buy or sell of one ticker)."
      },
      "SignalSource": {
        "type": "string",
        "enum": [
          "ingest",
          "rebalance"
        ],
        "description": "`ingest`: a signal you (or the strategy's source) published. `rebalance`: the weekly restatement of the book in force, which moves every follower back to it; Treasures no longer issues one for a strategy you publish into."
      },
      "PlanError": {
        "type": "string",
        "enum": [
          "plan_refused",
          "internal_error",
          "reference_prices_unavailable",
          "no_active_followers",
          "all_follows_in_flight",
          "nothing_owed",
          "no_followers_at_publish"
        ],
        "description": "- Why the last planning attempt gave up\n  - `plan_refused`: Treasures could not plan orders for the signal\n  - `internal_error`: Treasures failed while planning\n  - `reference_prices_unavailable`: the market reference prices needed to size orders\n    could not be read\n- or why the signal lapsed with nothing to do\n  - `no_active_followers`: no follower was active\n  - `all_follows_in_flight`: every follower was still executing an earlier signal\n  - `nothing_owed`: no follower was owed any order\n  - `no_followers_at_publish`: the strategy had no followers when you published.\n\nThe field is `null` when no reason was recorded: for example a `lapsed` signal whose\nexecution window simply closed, or a signal still in flight.\n\n`no_active_followers`, `all_follows_in_flight` and `nothing_owed` are also `null` when fewer\nthan three followers were following when the signal was published, since each would then\ndescribe one follower. On an SMA strategy that minimum does not apply, unless anyone other\nthan a separately managed account has ever followed it, when these three are always `null`.\n"
      },
      "OrderState": {
        "type": "string",
        "enum": [
          "planned",
          "ready",
          "leased",
          "submitted",
          "filled",
          "failed",
          "lapsed",
          "skipped_insufficient_balance",
          "skipped_sub_floor",
          "skipped_turnover",
          "skipped_follow_cap"
        ],
        "description": "The state of one follower order. `planned`, `ready`, `leased` and `submitted` are on their way; `filled`, `failed` and `lapsed` are final. The `skipped_*` states were never placed: the follower lacked the balance, the trade was below the minimum size, it would have exceeded the turnover budget, or it was above the follower's own per-signal cap."
      },
      "StrategyStatus": {
        "type": "string",
        "enum": [
          "draft",
          "active",
          "paused",
          "halted"
        ],
        "description": "- `draft`: not yet visible to followers.\n- `active`: taking followers and books.\n- `paused` and `halted`: stopped by Treasures; positions are held."
      },
      "CapacityState": {
        "type": "string",
        "enum": [
          "open",
          "constrained",
          "closed"
        ],
        "description": "Whether the strategy's combined flow still fits its market-impact budget. `open`; `constrained`: orders are scaled down pro rata; `closed`: no new followers."
      },
      "StrategyAudience": {
        "type": "string",
        "enum": [
          "retail",
          "sma"
        ],
        "description": "Who may follow the strategy. `retail`: the public catalog; `sma`: separately managed accounts only, never listed publicly and never resold. Set by Treasures."
      },
      "AccountState": {
        "type": "string",
        "enum": [
          "pending_funding",
          "following",
          "paused",
          "exiting",
          "closed"
        ],
        "description": "The state of one separately managed account on the strategy.\n\n- `pending_funding`: assigned, waiting for its first funds.\n- `following`: trading your books.\n- `paused`: positions held, no new books.\n- `exiting`: its positions are being closed out.\n- `closed`: no longer on the strategy."
      },
      "OrderSide": {
        "type": "string",
        "enum": [
          "buy",
          "sell"
        ],
        "description": "Whether the order bought or sold the ticker."
      },
      "PerformanceSource": {
        "type": "string",
        "enum": [
          "backtest",
          "reported",
          "model"
        ],
        "description": "- `backtest`: a hypothetical history, net of fees.\n- `reported`: a history the manager reported.\n- `model`: the live model from `launched_on` on."
      },
      "Protocol": {
        "type": "string",
        "enum": [
          "ondo",
          "xstocks",
          "robinhood",
          "coinbase",
          "reality",
          "backpack",
          "bstocks"
        ],
        "description": "A tokenizer. Treat the set as open: render an unknown value generically (its raw id, no icon) and never fail on it."
      },
      "StrategyBook": {
        "type": "object",
        "description": "The newest book you published into the strategy, at whatever status it has reached.",
        "required": [
          "signal_id",
          "status",
          "as_of",
          "source",
          "reserve_fees",
          "weights"
        ],
        "properties": {
          "signal_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SignalStatus"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the book was published."
          },
          "source": {
            "$ref": "#/components/schemas/SignalSource"
          },
          "reserve_fees": {
            "type": "boolean",
            "description": "Whether the book holds back cash for upcoming fees. False on books you publish: fees owed on your strategy are held back inside each of your books instead."
          },
          "weights": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetWeight"
            }
          }
        },
        "additionalProperties": false
      },
      "ManagerStrategy": {
        "type": "object",
        "required": [
          "strategy_id",
          "slug",
          "name",
          "status",
          "capacity_state",
          "audience",
          "min_allocation",
          "chains",
          "cells",
          "signal_kinds",
          "book",
          "live_follow_count",
          "aum_usdc",
          "aum_as_of"
        ],
        "properties": {
          "strategy_id": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/StrategyStatus"
          },
          "capacity_state": {
            "$ref": "#/components/schemas/CapacityState"
          },
          "audience": {
            "$ref": "#/components/schemas/StrategyAudience"
          },
          "min_allocation": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "The minimum allocation Treasures measured for following the strategy, per chain and per following style, as followers see it. `null` until the first measurement. A proportional block carrying `override_usdc` publishes that operator-set figure as its `entry_feasible_usdc` / `display_min_usdc` instead of the measured one."
          },
          "chains": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sol",
                "eth",
                "base",
                "arbitrum",
                "robinhood",
                "bnb"
              ]
            },
            "description": "The chains the strategy trades: those its `min_allocation` was measured on; `[sol]` until the first measurement. The same list followers see. Render an unknown chain generically (its raw id, no icon) and never fail on it."
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StrategyCell"
            },
            "description": "The (chain × protocol) cells followers buy on: the per-chain protocol choice over `chains`. A chain in `chains` can have no cell (base, arbitrum and robinhood today), so nothing is bought there."
          },
          "signal_kinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignalKind"
            },
            "description": "What the strategy accepts."
          },
          "book": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StrategyBook"
              },
              {
                "type": "null"
              }
            ]
          },
          "live_follow_count": {
            "type": "integer",
            "description": "How many followers the strategy has right now."
          },
          "aum_usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "Total value of your followers' portfolios at the last completed daily valuation, in USDC as a decimal string. The number of fractional digits is not fixed: it follows the valuations summed. `null` until at least three followers contribute; on an SMA strategy, until one account does."
          },
          "aum_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When that valuation was taken; `null` with `aum_usdc`."
          }
        },
        "additionalProperties": false
      },
      "Cell": {
        "type": "object",
        "required": [
          "cell_id",
          "chain",
          "protocol"
        ],
        "description": "One (chain × protocol) cell: a tokenizer on a chain. Treat `chain` and `protocol` as open sets: render an unknown value generically (its raw id, no icon) and never fail on it.",
        "properties": {
          "cell_id": {
            "type": "string",
            "description": "Unique per cell, for example `bnb/xstocks`. Key on it; never parse it."
          },
          "chain": {
            "type": "string",
            "enum": [
              "sol",
              "eth",
              "base",
              "arbitrum",
              "robinhood",
              "bnb"
            ],
            "description": "The cell's chain."
          },
          "protocol": {
            "$ref": "#/components/schemas/Protocol"
          }
        }
      },
      "StrategyCell": {
        "description": "A cell followers buy on, with its chain's published minimums (measured per chain, so each repeats on every cell of its chain).",
        "allOf": [
          {
            "$ref": "#/components/schemas/Cell"
          },
          {
            "type": "object",
            "required": [
              "buy_enabled",
              "display_min_usdc",
              "fixed_ticket_display_min_usdc",
              "min_sell_usdc"
            ],
            "properties": {
              "buy_enabled": {
                "type": "boolean",
                "description": "Followers' buys may route to this cell's chain right now: the chain is live for copy buys on this stage and, on an `audience: sma` strategy, is one SMA accounts trade: `sol`, plus `bnb` while it is live."
              },
              "display_min_usdc": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The chain's proportional `display_min_usdc`; `null` when none is published."
              },
              "fixed_ticket_display_min_usdc": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The chain's fixed-ticket `display_min_usdc`; `null` when none is published."
              },
              "min_sell_usdc": {
                "type": "string",
                "description": "The smallest exit sell leg, in USDC (`0.50`). The same on every cell; a venue may refuse a smaller order at its own minimum."
              }
            }
          }
        ]
      },
      "StrategyList": {
        "type": "object",
        "required": [
          "data",
          "truncated"
        ],
        "properties": {
          "data": {
            "type": "array",
            "maxItems": 100,
            "description": "Your strategies, newest first.",
            "items": {
              "$ref": "#/components/schemas/ManagerStrategy"
            }
          },
          "truncated": {
            "type": "boolean",
            "description": "`true` when you have more than the 100 strategies returned."
          }
        },
        "additionalProperties": false
      },
      "WeightsSummary": {
        "type": "object",
        "required": [
          "kind",
          "position_count",
          "deployed_weight",
          "reserve_fees",
          "top"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "weights"
            ]
          },
          "position_count": {
            "type": "integer"
          },
          "deployed_weight": {
            "type": "string",
            "description": "The sum of the book's weights, as a decimal string; the rest is cash."
          },
          "reserve_fees": {
            "type": "boolean"
          },
          "top": {
            "type": "array",
            "maxItems": 5,
            "description": "The five largest positions, largest first.",
            "items": {
              "$ref": "#/components/schemas/TargetWeight"
            }
          }
        },
        "additionalProperties": false
      },
      "EventSummary": {
        "type": "object",
        "required": [
          "kind",
          "side",
          "ticker",
          "fraction",
          "sizing"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "event"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "ticker": {
            "$ref": "#/components/schemas/Ticker"
          },
          "fraction": {
            "type": "string",
            "description": "The fraction of the position the event trades, as a decimal string."
          },
          "sizing": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "entry_ticket",
              null
            ],
            "description": "`entry_ticket`: a buy opens or adds one entry-sized trade rather than scaling the follower's held position. `null` when the event does not say."
          }
        },
        "additionalProperties": false
      },
      "OrderCounts": {
        "type": "object",
        "required": [
          "by_state"
        ],
        "properties": {
          "by_state": {
            "type": "object",
            "description": "Orders per state. States with no orders are left out.",
            "propertyNames": {
              "$ref": "#/components/schemas/OrderState"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "additionalProperties": false
      },
      "StrategySignalRecord": {
        "type": "object",
        "required": [
          "signal_id",
          "kind",
          "status",
          "urgency",
          "source",
          "trading_day",
          "created_at",
          "updated_at",
          "summary",
          "superseded_by_signal_id",
          "plan_attempts",
          "plan_error",
          "orders"
        ],
        "properties": {
          "signal_id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/SignalKind"
          },
          "status": {
            "$ref": "#/components/schemas/SignalStatus"
          },
          "urgency": {
            "$ref": "#/components/schemas/SignalUrgency"
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SignalSource"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` when the stored signal cannot be read."
          },
          "trading_day": {
            "type": "string",
            "format": "date",
            "description": "The `YYYY-MM-DD` date of the market session the signal targets."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "summary": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WeightsSummary"
              },
              {
                "$ref": "#/components/schemas/EventSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the signal said; `null` when the stored signal cannot be read."
          },
          "superseded_by_signal_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The later book that replaced this one, when `status` is `superseded`."
          },
          "plan_attempts": {
            "type": "integer",
            "minimum": 0,
            "description": "How many times Treasures tried to plan the signal into orders."
          },
          "plan_error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PlanError"
              },
              {
                "type": "null"
              }
            ]
          },
          "orders": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrderCounts"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order counts by state; served once the signal has a final status (`completed`, `lapsed` or `halted`), every order on it is terminal and at least three followers hold orders on it (on an SMA strategy, from one follower up, unless anyone other than a separately managed account has ever followed it); otherwise `null`."
          }
        },
        "additionalProperties": false
      },
      "StrategySignalPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "description": "One page of signals, newest first.",
            "items": {
              "$ref": "#/components/schemas/StrategySignalRecord"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `cursor` for the next page; `null` when there are no more."
          }
        },
        "additionalProperties": false
      },
      "AccountAddresses": {
        "type": "object",
        "required": [
          "evm",
          "solana"
        ],
        "description": "The account's own wallet addresses, as its wallet reports them.",
        "properties": {
          "evm": {
            "type": "string",
            "description": "The EVM address, checksummed."
          },
          "solana": {
            "type": "string",
            "description": "The Solana address."
          }
        },
        "additionalProperties": false
      },
      "AssignmentDepositedUsdc": {
        "type": "string",
        "description": "Every deposit to this assignment that has been priced into units, in USDC as a decimal string; \"0\" when none. Counted gross: a withdrawal is not netted out, so one taken before the assignment closes reads as a loss; the figure stays once it is closed."
      },
      "AssignmentPendingDepositUsdc": {
        "type": "string",
        "description": "Top-ups that have landed on this assignment but are not yet priced into units, in USDC as a decimal string; \"0\" when none, and always \"0\" outside `following` and `paused` (a first deposit is priced as it arms the assignment; an exiting or closed one takes no more). Live value includes them before units do, so profit and loss is the holdings read's live `nav_usdc` minus `total_deposited_usdc` minus this; a NAV snapshot can predate a deposit counted here."
      },
      "SmaAccount": {
        "type": "object",
        "required": [
          "addresses",
          "assignment",
          "state",
          "nav_usdc",
          "nav_per_unit",
          "as_of",
          "last_fill_at",
          "total_deposited_usdc",
          "pending_deposit_usdc"
        ],
        "properties": {
          "addresses": {
            "$ref": "#/components/schemas/AccountAddresses"
          },
          "assignment": {
            "type": "integer",
            "minimum": 1,
            "description": "Which assignment of the account to this strategy this row is: 1 for its first, counting up, the same number as the performance read's `assignments[].assignment` and `points[].assignment`. `state`, `nav_usdc`, `nav_per_unit`, `as_of`, `last_fill_at` and the two deposit figures are all this assignment's."
          },
          "state": {
            "$ref": "#/components/schemas/AccountState"
          },
          "nav_usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "This assignment's value at its latest daily valuation, in USDC as a decimal string; `null` before its first."
          },
          "nav_per_unit": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account's value per unit at that valuation; `null` with `nav_usdc`."
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When that valuation was taken; `null` with `nav_usdc`."
          },
          "last_fill_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this assignment's most recent order filled, never another assignment's; `null` before its first."
          },
          "total_deposited_usdc": {
            "$ref": "#/components/schemas/AssignmentDepositedUsdc"
          },
          "pending_deposit_usdc": {
            "$ref": "#/components/schemas/AssignmentPendingDepositUsdc"
          }
        },
        "additionalProperties": false
      },
      "SmaCohort": {
        "type": "object",
        "required": [
          "live_account_count",
          "aum_usdc",
          "aum_account_count",
          "aum_as_of"
        ],
        "properties": {
          "live_account_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many accounts follow the strategy right now. Every field here is `null` if anyone other than a separately managed account has ever followed the strategy."
          },
          "aum_usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "Total value of the strategy's accounts at the last completed daily valuation, in USDC as a decimal string. `null` while no account contributes."
          },
          "aum_account_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many accounts contribute to `aum_usdc`."
          },
          "aum_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When that valuation was taken; `null` with `aum_usdc`."
          }
        },
        "additionalProperties": false
      },
      "SmaAccountPage": {
        "type": "object",
        "required": [
          "data",
          "cohort",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "description": "One page of accounts, newest assignment first.",
            "items": {
              "$ref": "#/components/schemas/SmaAccount"
            }
          },
          "cohort": {
            "$ref": "#/components/schemas/SmaCohort"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `cursor` for the next page; `null` when there are no more."
          }
        },
        "additionalProperties": false
      },
      "AccountFill": {
        "type": "object",
        "required": [
          "signal_id",
          "ticker",
          "side",
          "chain",
          "usdc",
          "filled_at",
          "transactions"
        ],
        "properties": {
          "signal_id": {
            "type": "string",
            "description": "The signal whose book placed the order."
          },
          "ticker": {
            "$ref": "#/components/schemas/Ticker"
          },
          "side": {
            "$ref": "#/components/schemas/OrderSide"
          },
          "chain": {
            "type": [
              "string",
              "null"
            ],
            "description": "The order's chain; null on a sell; each transaction names its own chain."
          },
          "usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact USDC amount of the fill, as a decimal string: spent on a buy, received on a sell. `null` when it was not reported."
          },
          "filled_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the order filled."
          },
          "transactions": {
            "type": "array",
            "description": "Each leg of the fill, with its chain and its hash once it can be looked up.",
            "items": {
              "$ref": "#/components/schemas/FillTransaction"
            }
          }
        },
        "additionalProperties": false
      },
      "AccountFillPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "description": "One page of fills, newest order first; it can be short, or empty, mid-list.",
            "items": {
              "$ref": "#/components/schemas/AccountFill"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `cursor` for the next page, even after a short or empty page; `null` when there are no more."
          }
        },
        "additionalProperties": false
      },
      "FillTransaction": {
        "type": "object",
        "required": [
          "chain",
          "protocol",
          "cell_id",
          "tx_hash"
        ],
        "description": "One leg of a fill. Treat `chain` and `protocol` as open sets: render an unknown value generically (its raw id, no icon) and never fail on it.",
        "properties": {
          "chain": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sol",
              "eth",
              "base",
              "arbitrum",
              "robinhood",
              "bnb",
              null
            ],
            "description": "The chain the leg executed on. `null` only when the leg cannot be placed on a chain."
          },
          "protocol": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Protocol"
              },
              {
                "type": "null"
              }
            ],
            "description": "The tokenizer the leg filled on. `null` when it was not recorded; never guessed."
          },
          "cell_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The leg's `Cell.cell_id`; `null` whenever `chain` or `protocol` is."
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ],
            "description": "The leg's transaction hash, to look up on that chain's explorer. A Solana leg's hash appears at once when it is a Solana signature; an EVM trade's hash appears once the trade settles; until then `null`."
          }
        },
        "additionalProperties": false
      },
      "AccountPosition": {
        "type": "object",
        "required": [
          "ticker",
          "chain",
          "protocol",
          "cell_id",
          "shares",
          "usd_value"
        ],
        "description": "One position. Render an unknown `chain` or `protocol` generically (its raw id, no icon) and never fail on it.",
        "properties": {
          "ticker": {
            "$ref": "#/components/schemas/Ticker"
          },
          "chain": {
            "type": "string",
            "enum": [
              "sol",
              "eth",
              "base",
              "arbitrum",
              "robinhood",
              "bnb"
            ],
            "description": "The chain the position is held on."
          },
          "protocol": {
            "$ref": "#/components/schemas/Protocol"
          },
          "cell_id": {
            "type": "string",
            "description": "The position's `Cell.cell_id`."
          },
          "shares": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of underlying shares the position represents, as a decimal string; `null` when it cannot be stated."
          },
          "usd_value": {
            "type": "string",
            "description": "The position's value in USD, as a decimal string."
          }
        },
        "additionalProperties": false
      },
      "AccountStablecoin": {
        "type": "object",
        "required": [
          "chain",
          "asset",
          "amount"
        ],
        "properties": {
          "chain": {
            "type": "string",
            "description": "The chain the stablecoin is held on."
          },
          "asset": {
            "type": "string",
            "enum": [
              "USDC",
              "USDG"
            ]
          },
          "amount": {
            "type": "string",
            "description": "The balance, as a decimal string; never zero."
          }
        },
        "additionalProperties": false
      },
      "AccountHoldings": {
        "type": "object",
        "required": [
          "addresses",
          "positions",
          "stablecoins",
          "gas_usdc",
          "nav_usdc",
          "as_of"
        ],
        "properties": {
          "addresses": {
            "$ref": "#/components/schemas/AccountAddresses"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPosition"
            }
          },
          "stablecoins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountStablecoin"
            }
          },
          "gas_usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "The value of the network gas tokens the account holds, in USDC as a decimal string. `null` when the account is not currently assigned or its first deposit is not yet credited; nothing was read."
          },
          "nav_usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "Positions plus stablecoins plus gas, in USDC as a decimal string. `null` when the account is not currently assigned or its first deposit is not yet credited; nothing was read."
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the balances were read. `null` when the account is not currently assigned or its first deposit is not yet credited; nothing was read."
          }
        },
        "additionalProperties": false
      },
      "AccountAssignment": {
        "type": "object",
        "required": [
          "assignment",
          "state",
          "first_day",
          "last_day",
          "total_deposited_usdc",
          "pending_deposit_usdc"
        ],
        "properties": {
          "assignment": {
            "type": "integer",
            "minimum": 1,
            "description": "1 for the account's first assignment to this strategy, counting up; value per unit starts again at 1 on each."
          },
          "state": {
            "$ref": "#/components/schemas/AccountState"
          },
          "first_day": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first day this assignment has a point in the window; `null` when none."
          },
          "last_day": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The last day this assignment has a point in the window; `null` when none."
          },
          "total_deposited_usdc": {
            "$ref": "#/components/schemas/AssignmentDepositedUsdc"
          },
          "pending_deposit_usdc": {
            "$ref": "#/components/schemas/AssignmentPendingDepositUsdc"
          }
        },
        "additionalProperties": false
      },
      "AccountNavPoint": {
        "type": "object",
        "required": [
          "assignment",
          "day",
          "as_of",
          "nav_usdc",
          "nav_per_unit"
        ],
        "properties": {
          "assignment": {
            "type": "integer",
            "minimum": 1,
            "description": "The assignment this valuation belongs to."
          },
          "day": {
            "type": "string",
            "format": "date",
            "description": "The UTC day of the valuation."
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the valuation was taken."
          },
          "nav_usdc": {
            "type": "string",
            "description": "The account's value, in USDC as a decimal string."
          },
          "nav_per_unit": {
            "type": "string",
            "description": "The account's value per unit; it starts at 1 on each assignment."
          }
        },
        "additionalProperties": false
      },
      "AccountPerformance": {
        "type": "object",
        "required": [
          "addresses",
          "assignments",
          "points"
        ],
        "properties": {
          "addresses": {
            "$ref": "#/components/schemas/AccountAddresses"
          },
          "assignments": {
            "type": "array",
            "description": "Every assignment of the account to this strategy, first to latest.",
            "items": {
              "$ref": "#/components/schemas/AccountAssignment"
            }
          },
          "points": {
            "type": "array",
            "description": "The valuations in the window, oldest first, then by assignment.",
            "items": {
              "$ref": "#/components/schemas/AccountNavPoint"
            }
          }
        },
        "additionalProperties": false
      },
      "StrategyOrder": {
        "type": "object",
        "required": [
          "signal_id",
          "account",
          "ticker",
          "side",
          "chain",
          "usdc",
          "filled_at",
          "transactions"
        ],
        "description": "A fill, as the account's own fills list serves it, with the account it filled for.",
        "properties": {
          "signal_id": {
            "type": "string",
            "description": "The signal whose book placed the order."
          },
          "account": {
            "$ref": "#/components/schemas/AccountAddresses"
          },
          "ticker": {
            "$ref": "#/components/schemas/Ticker"
          },
          "side": {
            "$ref": "#/components/schemas/OrderSide"
          },
          "chain": {
            "type": [
              "string",
              "null"
            ],
            "description": "The order's chain; `null` on a sell, where each transaction names its own chain."
          },
          "usdc": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact USDC amount of the fill, as a decimal string: spent on a buy, received on a sell. `null` when it was not reported."
          },
          "filled_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the order filled."
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FillTransaction"
            }
          }
        },
        "additionalProperties": false
      },
      "StrategyOrderPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "description": "One page of fills, newest order first; it can be short, or empty, mid-list.",
            "items": {
              "$ref": "#/components/schemas/StrategyOrder"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `cursor` for the next page, even after a short or empty page; `null` when there are no more."
          }
        },
        "additionalProperties": false
      },
      "PerformanceSegment": {
        "type": "object",
        "required": [
          "source",
          "params",
          "generated_at",
          "first_day",
          "last_day"
        ],
        "properties": {
          "source": {
            "$ref": "#/components/schemas/PerformanceSource"
          },
          "params": {
            "type": "object",
            "additionalProperties": true,
            "description": "How the segment was produced."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "first_day": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "last_day": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "universe_cells": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Cell"
            },
            "description": "The cells a `model` segment was fixed to at launch. `null` on other segments and on a model launched before cells were recorded."
          }
        },
        "additionalProperties": false
      },
      "PerformancePoint": {
        "type": "object",
        "required": [
          "day",
          "nav",
          "gross_nav",
          "benchmark_nav",
          "source"
        ],
        "properties": {
          "day": {
            "type": "string",
            "format": "date"
          },
          "nav": {
            "type": "string",
            "description": "Value of one unit, net of fees, as a decimal string; the line starts at `1`."
          },
          "gross_nav": {
            "type": "string",
            "description": "The same, before fees."
          },
          "benchmark_nav": {
            "type": [
              "string",
              "null"
            ],
            "description": "The benchmark index on the same scale, when known."
          },
          "source": {
            "$ref": "#/components/schemas/PerformanceSource"
          }
        },
        "additionalProperties": false
      },
      "PerformanceChart": {
        "type": "object",
        "required": [
          "strategy_id",
          "launched_on",
          "segments",
          "points"
        ],
        "properties": {
          "strategy_id": {
            "type": "string"
          },
          "launched_on": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The first live model day; `null` before launch."
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerformanceSegment"
            }
          },
          "points": {
            "type": "array",
            "description": "The line, oldest first.",
            "items": {
              "$ref": "#/components/schemas/PerformancePoint"
            }
          }
        },
        "additionalProperties": false
      },
      "FeeAddresses": {
        "type": "object",
        "description": "The fee address Treasures has registered for you on each address family. Both keys are always present; `null` means no address is registered for that family. An EVM address is in EIP-55 checksum form; a Solana address is base58.",
        "required": [
          "sol",
          "evm"
        ],
        "properties": {
          "sol": {
            "type": [
              "string",
              "null"
            ]
          },
          "evm": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "FeeTransaction": {
        "type": "object",
        "required": [
          "chain",
          "tx_hash"
        ],
        "properties": {
          "chain": {
            "type": "string",
            "description": "The chain the fee was collected on."
          },
          "tx_hash": {
            "type": "string",
            "description": "The transaction hash (EVM) or signature (Solana)."
          }
        },
        "additionalProperties": false
      },
      "Collection": {
        "type": "object",
        "required": [
          "strategy_id",
          "collected_at",
          "amount_usdc",
          "manager_share_usdc",
          "received_usdc",
          "account",
          "transactions"
        ],
        "properties": {
          "strategy_id": {
            "type": "string",
            "description": "The strategy the follower was following."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time"
          },
          "amount_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "The whole fee collected from the follower."
          },
          "manager_share_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "The part of `amount_usdc` that is yours."
          },
          "received_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "The part of your share paid to your fee address on-chain."
          },
          "account": {
            "type": [
              "string",
              "null"
            ],
            "description": "The separately managed account the fee came from (its address, as the accounts routes take it); `null` for any other follower."
          },
          "transactions": {
            "type": "array",
            "description": "The on-chain transactions that collected this fee, for a separately managed account; empty for any other follower.",
            "items": {
              "$ref": "#/components/schemas/FeeTransaction"
            }
          }
        },
        "additionalProperties": false
      },
      "FeesLedger": {
        "type": "object",
        "required": [
          "received_usdc",
          "uncollected_usdc",
          "collected_usdc",
          "platform_usdc",
          "lifetime_usdc",
          "fee_addresses",
          "collections",
          "next_cursor"
        ],
        "properties": {
          "received_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "Your share, over every collection, paid to your fee address on-chain."
          },
          "uncollected_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "Whole fees charged to your followers and not yet recorded as collected."
          },
          "collected_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "The whole fee of every collection, all time."
          },
          "platform_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "`collected_usdc` minus `received_usdc`, never below 0: paid to the Treasures fee wallet."
          },
          "lifetime_usdc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdcAmount"
              }
            ],
            "description": "`uncollected_usdc` plus `collected_usdc`."
          },
          "fee_addresses": {
            "$ref": "#/components/schemas/FeeAddresses"
          },
          "collections": {
            "type": "array",
            "description": "One page of collections, newest first.",
            "items": {
              "$ref": "#/components/schemas/Collection"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass back as `cursor` for the next page of `collections`; `null` when there are no more."
          }
        },
        "additionalProperties": false
      },
      "ManagerKey": {
        "type": "object",
        "description": "One of your API keys. Metadata only; a key's value is never returned here.",
        "required": [
          "key_id",
          "label",
          "created_at",
          "last_used_at",
          "revoked_at"
        ],
        "properties": {
          "key_id": {
            "type": "string",
            "description": "The key's handle",
            "used to revoke it. Not a secret.": null
          },
          "label": {
            "type": "string",
            "description": "The label given at mint."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last time the key authenticated, to the minute; `null` if never used."
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was revoked; `null` while it is active."
          }
        },
        "additionalProperties": false
      },
      "ManagerKeyList": {
        "type": "object",
        "required": [
          "data",
          "truncated"
        ],
        "properties": {
          "data": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ManagerKey"
            },
            "description": "Active keys first, then revoked ones; newest first within each."
          },
          "truncated": {
            "type": "boolean",
            "description": "`true` when you have more than 100 keys and some are not listed."
          }
        },
        "additionalProperties": false
      },
      "CreateKeyRequest": {
        "type": "object",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "A name for the key, such as the system that will use it. Leading and trailing spaces are trimmed."
          }
        },
        "additionalProperties": false
      },
      "CreatedManagerKey": {
        "type": "object",
        "description": "The new key's metadata (as in `ManagerKey`) plus the key itself.",
        "required": [
          "key_id",
          "label",
          "created_at",
          "last_used_at",
          "revoked_at",
          "api_key"
        ],
        "properties": {
          "key_id": {
            "$ref": "#/components/schemas/ManagerKey/properties/key_id"
          },
          "label": {
            "$ref": "#/components/schemas/ManagerKey/properties/label"
          },
          "created_at": {
            "$ref": "#/components/schemas/ManagerKey/properties/created_at"
          },
          "last_used_at": {
            "$ref": "#/components/schemas/ManagerKey/properties/last_used_at"
          },
          "revoked_at": {
            "$ref": "#/components/schemas/ManagerKey/properties/revoked_at"
          },
          "api_key": {
            "type": "string",
            "pattern": "^cmk_[A-Za-z0-9]{24}$",
            "description": "The key itself. Shown once; store it now. It cannot be retrieved later."
          }
        },
        "additionalProperties": false
      },
      "SimpleError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "InvalidRequestError": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_request"
            ]
          },
          "message": {
            "type": "string",
            "description": "`<field>: <what is wrong>`."
          }
        },
        "additionalProperties": false
      },
      "UnknownTickersError": {
        "type": "object",
        "required": [
          "error",
          "unknown_tickers"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "unknown_tickers"
            ]
          },
          "unknown_tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The tickers not in the catalog, in the order you sent them."
          }
        },
        "additionalProperties": false
      },
      "UnavailableTickersError": {
        "type": "object",
        "description": "One or more tickers are on the catalog but not listed on the venues Treasures buys on for followers. This is a listing check: a ticker listed on those venues is accepted even while it is halted or thinly traded. It is separate from the `tradability` field on the tickers endpoint: a ticker marked `thin` or `untradable` there is not refused for that reason, and a ticker with no warning there can still be refused here.",
        "required": [
          "error",
          "unavailable_tickers"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "unavailable_tickers"
            ]
          },
          "unavailable_tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The tickers on the catalog that are not listed on the venues Treasures buys on for followers, in the order you sent them."
          }
        },
        "additionalProperties": false
      }
    }
  }
}
