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
- 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.
- 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.
- Treasures pays you. Payouts are booked against what you are owed and paid to your registered address.
GET /feesshows 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.
| Response | Meaning | What to do |
|---|---|---|
401 invalid_api_key | Missing, 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; contact Treasures if you have none |
403 manager_suspended | Your account is suspended, so every key you hold is refused | Contact 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 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 isGET /stocks/tickerson the public API. A ticker that is not on it is refused422 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.
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 | The 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
| Response | Meaning | What to do |
|---|---|---|
400 invalid_request | The body failed validation; message names the field | Fix the book |
400 invalid_strategy_id | The path segment is empty or over 64 characters | Check the id |
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 unsupported_signal_kind | The strategy is not configured to take a weights book | Contact Treasures |
429 | Over 60 requests this minute | Sleep 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
- Manager API reference: every field on both routes.
- Supported Services: the assets your followers can hold.
- Support: partnerships and technical contact.