Publish the target weights of your strategy
/strategies /{strategyId} /signalsPublishes the book you want every follower of this strategy to hold: a list of tickers and the fraction of the portfolio each should be. Treasures plans and executes the trades that move each follower's wallet from what it holds to what you published; you do not place orders yourself.
The body is the whole book, not a change to it. A ticker you leave out is sold. Weights
must sum to at most 1; whatever is left over is held as cash, so a book that sums to
0.8 is a deliberate 20% cash position. Weights are decimal strings with up to 8 fractional
digits, greater than zero (omit a position rather than setting it to 0), and each ticker
appears at most once. 1 to 200 positions per book.
Tickers are uppercase in the notation the catalog uses (AAPL, BRK.B); the catalog is at
GET https://api.treasures.io/public/v1/stocks/tickers
and a ticker that is not on it is refused 422 unknown_tickers. A ticker that is on it but
is not listed on the venues Treasures buys on for followers is refused
422 unavailable_tickers. Both checks apply to a new dedupe_key only: repeating one you
already used returns the original signal even if a ticker has since left the catalog or
those venues.
dedupe_key is your idempotency key, and it is required. Choose it: a date and
revision (2026-09-28-r1), your own book id, anything up to 200 characters that is unique
per book you intend to publish. Repeating a dedupe_key you already used returns 200
with the signal it created the first time (its original trading_day and ttl_at, not
today's) and rebalances nothing. That is what makes a retry safe. It also means the same
book published on a later day needs a new dedupe_key, or it will be swallowed as a
replay.
When it executes. urgency in the response tells you which session your book is
queued for:
fresh: the US market is open with more than 30 minutes left, and the book executes now, over a window that ends atttl_at(up to 4 hours, never past the close).stale: the market is closed, or closes within 30 minutes; the book is queued for the next session, starts 30 minutes after its open, andttl_atis that session's close.
You cannot ask for one or the other; sending urgency or kind in the body is a 400.
trading_day is the date of the session the book targets.
A book that is not filled by ttl_at lapses and is not retried. Publishing a new book
(with a new dedupe_key) on the same trading day replaces the one still queued.
superseded_signal_ids lists what this publish retired. If nothing filled, publish again.
follower_count is how many live followers this book was fanned out to at the moment it
was accepted. Each follower is rebalanced within their own limits (minimum trade sizes,
available cash); a follower that cannot take a position is skipped, never blocked, and
you are not told which.
Publishing from the dashboard. A signed-in dashboard session may publish too, with the
same body, the same replay rule and the same answers as a key. It needs a recent sign-in
(see Recent sign-in above), checked before the strategy is looked at, so a stale session
is refused 403 reauth_required even when it repeats a dedupe_key; sign in again and the
repeat returns the original signal. If you send both an API key and a session, only the key
is checked.
A dashboard publish counts against your dashboard sessions' 120 requests per minute, not your keys' 60.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 409
- 415
- 422
- 429
- 503
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.
Accepted and fanned out to every live follower.
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.
unauthorized: no credential was sent at all (breaking change: this used to beinvalid_api_key), or a dashboard session failed verification: the access token is missing, malformed or expired, or the identity token is missing or belongs to a different login.invalid_api_key:X-API-Keyis malformed, unknown, or belongs to a different Treasures API.key_revoked: this key has been revoked; mint a new one or ask Treasures.
reauth_required: a dashboard session whose last sign-in was more than 15 minutes ago, or was made with a login method first linked in the last 15 minutes; sign in again, then retry. Answered before the strategy is looked at, whichever strategy it names.strategy_forbidden: this strategy is not assigned to you. The same response is returned for a strategy id that does not exist, so the id space cannot be probed; check the id with your Treasures contact.manager_suspended: your account is suspended; every key you hold and your dashboard session are refused until Treasures reactivates it.manager_not_linked: a valid dashboard login that is a Member of no Organization with a manager account.organization_suspendedandpermission_deniedas on every route.
All are answered before reauth_required, and checked again for a dashboard session
once its sign-in is confirmed, so a suspension or a removal from the Organization that
lands while the request is in flight also refuses it, and nothing is published.
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.
The request body was sent with a Content-Type other than application/json.
-
unknown_tickers: one or more tickers are not in the Treasures catalog;unknown_tickerslists them in the order you sent them, and nothing was published. -
unavailable_tickers: one or more tickers are on the catalog, but not listed on the venues Treasures buys on for followers; resend the book without them.unavailable_tickerslists them in the order you sent them, and nothing was published.This is a listing check, not a check of whether a ticker can be bought right now: a ticker listed on those venues is accepted even while it is halted or thinly traded. It is also separate from the
tradabilityfield on the tickers endpoint: a ticker markedthinoruntradablethere is not refused for that reason, and a ticker with no warning there can still be refused here. A ticker refused here cannot be kept: leaving it out of the book sells it from followers' portfolios.When a book has both kinds of ticker, only
unknown_tickersis returned; fix those first. -
unsupported_signal_kind: the strategy assigned to you is not configured to take a weights book. Contact Treasures.
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.
Response Headers
Seconds to wait before retrying.
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.