Managing a Strategy
This section is for fund managers who run a strategy that Treasures users can follow. You publish the target weights of your book; Treasures rebalances every follower's wallet towards them and pays you a share of the fees those followers pay. You never hold, see or touch a follower's funds.
The Manager API is a separate API from the B2B Public API, with its own base URL and its own credentials. It publishes your book, reads your strategies, their performance and your fee ledger, shows the accounts of an SMA strategy, and, from a signed-in dashboard session, mints and revokes your keys. The full field-by-field reference is in the Manager API reference, and the spec is published as OpenAPI JSON.
- Base URL:
https://api.treasures.io/manager/v1 - Auth: your manager API key in
X-API-Key, or a signed-in dashboard session, on every request (see Your credentials) - Bodies: JSON, with
Content-Type: application/json
How it works
- Treasures onboards you. Your Treasures contact creates your manager account, creates the strategy that followers will see, assigns it to you, registers the address your fees are paid to, and hands you your first manager API key or the link to your dashboard sign-in. None of these steps can be done through the API; after onboarding you mint and revoke your own keys.
- You publish a book.
POST /strategies/{strategyId}/signalswith the tickers you want held and the fraction of the portfolio each should be. - Treasures rebalances followers. Every live follower's wallet is moved from what it holds towards what you published, during the market session the response names. You place no orders.
- Fees accrue and are collected. Treasures charges followers management and performance fees under the strategy's terms. A share of every collection is yours, at the rate in your agreement with Treasures.
- You read what reached you. Your share of a collection can be paid to your registered fee address on-chain, inside the transaction that collects the fee.
GET /feesshows what has been charged, what has been collected and how much of your share reached your address that way.
Your credentials
Two credentials are accepted, and every route needs one.
Manager API key. Your key starts with cmk_, goes in X-API-Key, and is shown to you once, when it is issued. Store it in a secrets manager when you receive it. Your first key comes from Treasures; after that you mint and revoke keys yourself from a signed-in dashboard session (POST /keys, DELETE /keys/{keyId}). Rotating is mint-new, switch, revoke-old.
- You may hold 10 active keys (
409 key_limitpast that) and make 20 self-service mints in any 24 hours (429 key_mint_limit). - A mint whose response you lost still created a key. List your keys (
GET /keys) and revoke the one you never received. - A key can never manage keys: the three
/keysroutes answer a key403 session_required.
Dashboard session. Your own login on the Treasures dashboard, as a Member of the Organization your manager account belongs to. It is accepted on every route, and the headers it sends are in the reference.
- Recent sign-in. Publishing a book and minting a key from a session need a sign-in made in the last 15 minutes, or are refused
403 reauth_required: sign out and in again, then retry. Linking a new login method to a signed-in session does not count, and neither does signing in with one first linked in the last 15 minutes. If Treasures cannot confirm the sign-in, the request is refused503 sign_in_check_unavailableand nothing is written. Revoking a key needs no recent sign-in. - Organizations. A login that belongs to more than one Organization with a manager account names the one it acts for in
X-Organization-Id(400 organization_requiredwithout it). - Permissions. A Member who is not an Admin can do only what its permissions grant, or is refused
403 permission_denied. The permission each route needs is listed in the reference. Permissions never apply to a key. - When a request carries a key, only the key is checked, even if a valid session is sent with it.
| Response | Meaning | What to do |
|---|---|---|
401 unauthorized | No credential was sent at all, or a dashboard session failed verification | Send your key, or sign in again |
401 invalid_api_key | Malformed or unknown key, or a key for a different Treasures API | Check the header value |
401 key_revoked | This key was revoked | Use a current key, or mint one from the dashboard |
403 manager_suspended | Your account is suspended, so every key you hold and your dashboard session are refused | Contact Treasures |
403 manager_not_linked | A valid dashboard login that is a Member of no Organization with a manager account | Ask your Treasures contact |
403 organization_suspended | Your Organization is suspended, so every Member session is refused; your keys keep working | Contact Treasures |
403 permission_denied | Your Member permissions do not grant this route | Ask an Admin of your Organization |
Rate limit: 60 requests per minute per manager, shared by every key you hold, and a separate 120 per minute for your dashboard sessions; neither can use up the other. A 429 carries Retry-After in seconds; sleep exactly that long. Publishing is a few requests a day, so this is headroom for a retry loop, not a throughput target.
Publishing a book
A signal is the whole book, not a change to it. Send every ticker you want held with its target weight; a ticker you leave out is sold.
curl -X POST https://api.treasures.io/manager/v1/strategies/cst_01J7W3M9P2K5R8XV6T4H0B1C7D/signals \
-H "X-API-Key: cmk_..." \
-H "Content-Type: application/json" \
-d '{
"dedupe_key": "2026-09-28-r1",
"target_weights": [
{ "ticker": "AAPL", "weight": "0.35" },
{ "ticker": "NVDA", "weight": "0.25" },
{ "ticker": "MSFT", "weight": "0.20" }
]
}'
{
"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": []
}
The rules of a book
- Weights are decimal strings, greater than zero, at most
1, with up to 8 fractional digits. Never a JSON number. - Weights sum to at most
1. Whatever is left is held as cash: the example above is a 20% cash position, on purpose. A book that sums past1is refused. - Omit a position to sell it. A weight of
0is refused; leave the ticker out instead. - Each ticker once. 1 to 200 positions per book.
- Tickers are uppercase, in the notation the Treasures catalog uses (
BRK.B, notBRK-B).- The catalog is
GET /stocks/tickerson the public API. A ticker that is not on it is refused422 unknown_tickers, naming the offenders, and nothing is published. - A ticker that is on the catalog but not listed on the venues Treasures buys on for followers is refused
422 unavailable_tickersthe same way. That is a listing check: a halted or thinly traded ticker is still accepted, and thetradabilitywarning on the tickers endpoint plays no part. - Both checks apply to a new
dedupe_keyonly.
- The catalog is
dedupe_key: your idempotency key
dedupe_key is required, and you choose it: a date and revision, your own book id, any string up to 200 characters that is unique per book you intend to publish. Repeating one returns 200 with the original signal and rebalances nothing, which is what makes a retry after a timeout safe. The flip side: publishing the same book on a later day needs a new key, or nothing happens.
Keys starting with replan: or catchup: (any case) are reserved for the platform and refused with 400 invalid_request.
When your book executes
You cannot choose the execution window; Treasures decides it from the market calendar and tells you in the response. Sending urgency or kind in the body is a 400, and so is any query parameter on the URL.
urgency | When | Window |
|---|---|---|
fresh | The US market is open with more than 30 minutes left | Starts now, ends at ttl_at: up to 4 hours, never past the close |
stale | The market is closed, or closes within 30 minutes | Starts 30 minutes after the next session's open; ttl_at is that session's close |
trading_day is the date of the session the book targets.
A book not filled by ttl_at lapses and is not retried. If you need it done, publish again with a new dedupe_key. Publishing a new book on a day that already has one queued replaces the queued one; superseded_signal_ids lists what this publish retired.
What you see, and what you do not
follower_count is how many live followers the book was fanned out to when it was accepted. Each follower is rebalanced within their own limits (minimum trade sizes, cash available, position caps); a follower who cannot take a position is skipped rather than blocking the book, and you are not told which. On a retail strategy, nothing on this API names a follower, a wallet or an individual order. An SMA strategy is the exception: you see each account by its wallet addresses, with its holdings and every order that filled for it (see Reading your strategies), but never the client behind it.
Treasures can also publish a strategy to integrators, who then read its books through the strategy signals routes of the B2B API, marked source_kind: manager_published. That is a per-strategy decision made by Treasures, not something your credentials control; ask your Treasures contact if you want your strategy published or kept private.
Errors when publishing
| Response | Meaning | What to do |
|---|---|---|
400 invalid_request | The body failed validation, or the URL carried a query parameter; message names the field | Fix the book; send nothing in the query string |
400 invalid_strategy_id | The path segment is empty or over 64 characters | Check the id |
403 reauth_required | Dashboard session only: your last sign-in was more than 15 minutes ago. Answered even when you repeat a dedupe_key | Sign out and in again, then retry |
403 strategy_forbidden | This strategy is not assigned to you. A strategy id that does not exist gets the same answer | Check the id with your Treasures contact |
409 strategy_not_accepting_signals | The strategy is not active (Treasures has paused or halted it); positions are held | Contact Treasures |
415 | The body was not sent as application/json | Set the header |
422 unknown_tickers | Tickers not in the catalog, listed in unknown_tickers | Fix or remove them |
422 unavailable_tickers | Tickers on the catalog but not listed on the venues followers buy on, listed in unavailable_tickers. Returned only when there are no unknown_tickers | Resend the book without them; leaving a held ticker out sells it from followers |
422 unsupported_signal_kind | The strategy is not configured to take a weights book | Contact Treasures |
429 | Over 60 requests this minute from your keys, or 120 from your dashboard sessions | Sleep Retry-After |
503 sign_in_check_unavailable | Dashboard session only: your sign-in could not be confirmed, so nothing was published | Retry shortly |
The credential refusals in Your credentials apply here too.
Reading your strategies
Every read takes your key or a dashboard session, and every {strategyId} on this API accepts the strategy's cst_ id or its slug.
| Route | What it returns |
|---|---|
GET /strategies | Every strategy assigned to you, draft included, with its newest book, live follower count, audience (retail or sma) and the total value of its followers' portfolios |
GET /strategies/{strategyId}/signals | Every book published into the strategy at every status, newest first, with why planning gave up and, once a book is final, its order counts by state |
GET /strategies/{strategyId}/performance | The strategy's daily performance line: a backtest where one was published, then the live model |
On a retail strategy, follower totals (the value of your followers' portfolios, a signal's order counts) are withheld until at least three followers contribute to them, so that no figure describes one follower.
SMA accounts
An SMA strategy (audience: sma) is followed by separately managed accounts only, and is never listed publicly. The three-follower minimum does not apply to it, and it has five more reads; a retail strategy answers them 404 strategy_not_sma. Name an account by either of the addresses the accounts list serves.
| Route | What it returns |
|---|---|
GET /strategies/{strategyId}/accounts | Every account assigned to the strategy, named by its wallet addresses, with its state and latest daily valuation, plus totals across the accounts |
GET /strategies/{strategyId}/accounts/{address}/fills | Every order that filled for one account, newest first, with its USDC amount and each leg's chain and transaction hash |
GET /strategies/{strategyId}/accounts/{address}/holdings | A live read of one account's positions, stablecoins and gas |
GET /strategies/{strategyId}/accounts/{address}/performance | Every daily valuation of one account, oldest first |
GET /strategies/{strategyId}/orders | Every fill across the strategy's accounts, newest first, optionally for one signal_id |
- Assignments. An account that was closed and later assigned to the strategy again is listed once per assignment, numbered from 1. The fills read takes
assignmentto show one alone, and the performance read never chains value per unit across two. - Holdings is a live read with its own budget: 20 calls a minute per credential kind. A balance or price read that does not complete answers
503, never a partial figure; retry shortly. From 00:03 to 00:40 UTC, around the daily valuation, it answers503 portfolio_busywithRetry-After. - An address that is not an account of the strategy answers
404 account_not_found, whoever's address it is. - Mixed strategies. If anyone other than a separately managed account has ever followed an SMA strategy, its totals are withheld on every read.
Your fees
Treasures collects management and performance fees from the followers of your strategy, and a share of every collection is yours. GET /fees is the ledger of that share. There is no manager id in the path: the ledger is the one belonging to the key or session.
curl https://api.treasures.io/manager/v1/fees \
-H "X-API-Key: cmk_..."
The response has five totals, your fee_addresses and a paged list of collections[].
| Field | What it is |
|---|---|
uncollected_usdc | Fees charged to your followers and not yet recorded as collected. Collection runs weekly, when a follower exits, and on demand by Treasures, so it has no fixed date |
collected_usdc | The whole fee of every collection, all time |
received_usdc | Your share paid to your fee address on-chain, inside the transaction that collected the fee |
platform_usdc | collected_usdc minus received_usdc. It includes any part of your share that was not paid to your fee address on-chain |
lifetime_usdc | uncollected_usdc plus collected_usdc |
fee_addresses | The fee address registered for you on each address family (sol, evm), null where none is |
- Only
received_usdcis a figure of your share. Every other total is a whole fee, what your followers pay. A collection can show amanager_share_usdcabove itsreceived_usdc: the difference was not paid to your fee address on-chain and is counted inplatform_usdc. Your share of a fee is fixed when it is collected, so an uncollected fee has none yet. collections[]lists every collection from a follower of your strategy, newest first:amount_usdcis the whole fee,manager_share_usdcthe part that is yours, andreceived_usdcthe part of that paid to your fee address. For a separately managed account it also carries the account's address and the transactions that collected the fee. Page withcursorandnext_cursor.lifetime_usdccan fall: a fee waived when a follower closes, a strategy moving to another manager, or Treasures cancelling uncollected fees. The cases are listed in the reference.
Where the money goes is not yours to change here. Your fee addresses are registered and changed by Treasures only, so a leaked key or session can read the ledger but cannot redirect a fee. To change an address, contact Treasures. If a key may have leaked, revoke it from your dashboard (DELETE /keys/{keyId}), which needs no recent sign-in, and mint a replacement, or ask Treasures to.
Where to go next
- Manager API reference: every field on every route.
- Supported Services: the assets your followers can hold.
- Strategy Signals: how integrators read a published strategy's books.
- Support: partnerships and technical contact.