Broker order payload for Alpaca or Interactive Brokers. Built locally, never submitted
One command in the Execution pack, available in the CLI, as an MCP tool and as a JavaScript import: execution payload.
What it needs, and why
Every input is checked before anything is calculated. order and account are required; the rest refine the answer.
| Input | Required | The question it asks | Why it matters |
|---|---|---|---|
order | yes | What is the order: symbol, side, quantity and price? | It becomes the payload. |
account | yes | Which account number should the order be placed in? | The payload is account-specific. |
conid | optional | What is the Interactive Brokers contract id (conid) for this symbol? | IBKR routes on conid, so it must be resolved rather than guessed. |
Requests it answers
- “build the order for alpaca”
- “prepare this trade for IBKR”
An agent with this pack loaded picks the command from phrasing like that, asks for whatever input is missing, and reports the figures with the method that produced them.
Run it
node bin/wealth-skills.js execution payload --broker Alpaca --account ACC-123 --order '{"symbol":"VTI","action":"BUY","quantity":50,"price":275}'
Limits it inherits from wealth-execution
- Checks fail closed: a buy needs a reference price and settled cash, and a sell needs the held position. Missing data is an error, not a pass.
- Interactive Brokers routes on the contract ID. Resolve the
conidwithGET /iserver/secdef/search?symbol=<ticker>and pass it explicitly; the builder refuses to guess. - FIX
MsgSeqNummust come from the live FIX session; the generator's counter is a placeholder.
The full pack, its other 4 commands and what it deliberately leaves alone are on the Execution page.