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 credential. It does two things: publish a book and read your fee ledger. The full field-by-field reference is in the Manager API reference.

  • Base URL: https://api.treasures.io/manager/v1
  • Auth: your manager API key in X-API-Key, on every request
  • 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 a manager API key. None of these steps can be done through the API.
  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. Treasures pays you. Payouts are booked against what you are owed and paid to your registered address. GET /fees shows what you are owed, what is pending and what has been paid.

Your API key​

Your key starts with cmk_, goes in X-API-Key on every request, and is shown to you once, when Treasures issues it. Store it in a secrets manager when you receive it. You can hold more than one key, so rotating is issue-new, switch, revoke-old.

ResponseMeaningWhat to do
401 invalid_api_keyMissing, malformed or unknown key, or a key for a different Treasures APICheck the header value
401 key_revokedThis key was revokedUse a current key; contact Treasures if you have none
403 manager_suspendedYour account is suspended, so every key you hold is refusedContact Treasures

Rate limit: 60 requests per minute per manager, shared by every key you hold. 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.

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.

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 minutesThe whole of the next session; 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. Nothing on this API names a follower, a wallet or an individual order.

Errors when publishing​

ResponseMeaningWhat to do
400 invalid_requestThe body failed validation; message names the fieldFix the book
400 invalid_strategy_idThe path segment is empty or over 64 charactersCheck the id
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 unsupported_signal_kindThe strategy is not configured to take a weights bookContact Treasures
429Over 60 requests this minuteSleep Retry-After

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.

curl https://api.treasures.io/manager/v1/fees \
-H "X-API-Key: cmk_..."

The response has three totals (owed_usdc, pending_usdc, paid_usdc), your recent payouts[] (a payout is pending when booked, then paid with its transaction hash, or void with its collections owed to you again) and a paged list of collections[], each showing the whole fee collected and the part that is yours. Page with cursor and next_cursor. Every field is described in the reference.

Where the money goes is not yours to change here. Your payout address is registered and changed by Treasures only, so a leaked key can read a balance but cannot redirect it. To change the address, or if a key may have leaked, contact Treasures.

Where to go next​