Skip to main content

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​

  1. 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.
  2. You publish a book. POST /strategies/{strategyId}/signals with the tickers you want held and the fraction of the portfolio each should be.
  3. 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.
  4. 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.
  5. 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 /fees shows 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_limit past 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 /keys routes answer a key 403 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 refused 503 sign_in_check_unavailable and 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_required without 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.
ResponseMeaningWhat to do
401 unauthorizedNo credential was sent at all, or a dashboard session failed verificationSend your key, or sign in again
401 invalid_api_keyMalformed or unknown key, or a key for a different Treasures APICheck the header value
401 key_revokedThis key was revokedUse a current key, or mint one from the dashboard
403 manager_suspendedYour account is suspended, so every key you hold and your dashboard session are refusedContact Treasures
403 manager_not_linkedA valid dashboard login that is a Member of no Organization with a manager accountAsk your Treasures contact
403 organization_suspendedYour Organization is suspended, so every Member session is refused; your keys keep workingContact Treasures
403 permission_deniedYour Member permissions do not grant this routeAsk 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 past 1 is refused.
  • Omit a position to sell it. A weight of 0 is 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, not BRK-B).
    • The catalog is GET /stocks/tickers on the public API. A ticker that is not on it is refused 422 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_tickers the same way. That is a listing check: a halted or thinly traded ticker is still accepted, and the tradability warning on the tickers endpoint plays no part.
    • Both checks apply to a new dedupe_key only.

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.

urgencyWhenWindow
freshThe US market is open with more than 30 minutes leftStarts now, ends at ttl_at: up to 4 hours, never past the close
staleThe market is closed, or closes within 30 minutesStarts 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​

ResponseMeaningWhat to do
400 invalid_requestThe body failed validation, or the URL carried a query parameter; message names the fieldFix the book; send nothing in the query string
400 invalid_strategy_idThe path segment is empty or over 64 charactersCheck the id
403 reauth_requiredDashboard session only: your last sign-in was more than 15 minutes ago. Answered even when you repeat a dedupe_keySign out and in again, then retry
403 strategy_forbiddenThis strategy is not assigned to you. A strategy id that does not exist gets the same answerCheck the id with your Treasures contact
409 strategy_not_accepting_signalsThe strategy is not active (Treasures has paused or halted it); positions are heldContact Treasures
415The body was not sent as application/jsonSet the header
422 unknown_tickersTickers not in the catalog, listed in unknown_tickersFix or remove them
422 unavailable_tickersTickers on the catalog but not listed on the venues followers buy on, listed in unavailable_tickers. Returned only when there are no unknown_tickersResend the book without them; leaving a held ticker out sells it from followers
422 unsupported_signal_kindThe strategy is not configured to take a weights bookContact Treasures
429Over 60 requests this minute from your keys, or 120 from your dashboard sessionsSleep Retry-After
503 sign_in_check_unavailableDashboard session only: your sign-in could not be confirmed, so nothing was publishedRetry 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.

RouteWhat it returns
GET /strategiesEvery 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}/signalsEvery 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}/performanceThe 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.

RouteWhat it returns
GET /strategies/{strategyId}/accountsEvery 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}/fillsEvery 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}/holdingsA live read of one account's positions, stablecoins and gas
GET /strategies/{strategyId}/accounts/{address}/performanceEvery daily valuation of one account, oldest first
GET /strategies/{strategyId}/ordersEvery 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 assignment to 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 answers 503 portfolio_busy with Retry-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[].

FieldWhat it is
uncollected_usdcFees 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_usdcThe whole fee of every collection, all time
received_usdcYour share paid to your fee address on-chain, inside the transaction that collected the fee
platform_usdccollected_usdc minus received_usdc. It includes any part of your share that was not paid to your fee address on-chain
lifetime_usdcuncollected_usdc plus collected_usdc
fee_addressesThe fee address registered for you on each address family (sol, evm), null where none is
  • Only received_usdc is a figure of your share. Every other total is a whole fee, what your followers pay. A collection can show a manager_share_usdc above its received_usdc: the difference was not paid to your fee address on-chain and is counted in platform_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_usdc is the whole fee, manager_share_usdc the part that is yours, and received_usdc the 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 with cursor and next_cursor.
  • lifetime_usdc can 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​