Skip to main content
These codes cover holdings and cash writes, and rule and rules text writes. Refusals for negative share counts, Moves on Options and a mark outside Options are listed under INVALID_INPUT, and turning Allow shorts off while a short is held under IN_USE, in Record and price errors.

Holdings and cash

replace_positions left out holdings you still own, and the message names them. Include them, or add a {symbol, shares: 0, price} row for each one you mean to close. For one holding, use save_position. Close only what you no longer hold.
A buy or a withdrawal would overdraw the cash balance, including a balance of zero. For a buy, the message says how much more cash the trades need. If you have a deposit that isn’t recorded, or are bringing in holdings you already owned, record the deposit with record_cash_movement first; otherwise Claude asks you. For a withdrawal, the message says the amount is more than the recorded balance, with no figure, and Claude asks you which is wrong, the amount or the balance.
An idempotency_key was reused with a different cash movement. Use a new key for a new movement.

Rules

The rules text failed to parse. The message lists every issue found (missing frontmatter, a class with no min, max or size range, an unknown key, a duplicate class name) and a short valid example. Nothing was written. Fix every issue it names and try again.
A rule’s target falls outside its own band. Nothing was written. Adjust the target or the band and try again.

Next steps

Update with an agent

Sync holdings and cash through tools or REST.

Rules text format

The keys and class names a file accepts.

Targets

How a target sits inside a band.