Skip to main content

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 at ttl_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, and ttl_at is 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​

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.