Publish the target weights of your strategy
POST/strategies/:strategyId/signals
Publishes 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.
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 whole of the next session, 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.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 409
- 415
- 422
- 429
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: 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.
invalid_api_key: X-API-Key is missing, malformed, unknown, or belongs to a different Treasures API. key_revoked: this key has been revoked; ask Treasures for a new one.
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 and every key you hold is refused until Treasures reactivates it.
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_tickers lists them in the order you sent them, and nothing was published. 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. The Retry-After header carries the seconds to wait.
Response Headers
Seconds to wait before retrying.