Install
Sign in
Finish account setup
Signing in starts a session, but two more things are required before you can trade: accepting the current Terms, Privacy Policy, and Risk Disclosure, and delegating your wallet. Check what is still needed:-
Accept the current policies, from an interactive terminal:
-
Delegate your wallet, by opening app.miramarket.org and signing in once in a browser.
miramarket-cli account statuswill confirm once this is done.
miramarket-cli account status again afterward to confirm you are ready to trade.
Post your first strategy
Use the guided wizard, which walks you through choosing a starting point, validating, previewing, and posting:--demo to post to simulate a run instead of using real funds.
Describe a strategy instead of writing it
You do not have to write the JSON yourself. Describe what the strategy should do and the CLI builds it with the same assistant that powers the visual builder, then hands you a file to validate, preview, and post:./fed.json only when it reports result: strategy. If the description could mean several markets, it lists them and asks which one you meant; if it is missing something, it says what; if you asked a question, it answers. Read the result before going on, including unmatched, which lists anything you named that could not be matched and was substituted or left out. Once a file is written, continue as with any other strategy file:
"buy TSLA if it crosses $400, sell at $450". To change a generated file, describe the change: miramarket-cli strategies generate "also sell everything below 30 cents" --strategy ./fed.json --out ./fed.json.
Everyday commands
Every command supports a
--json flag for machine-readable output, which agents and scripts should always use. Run any command with --help to see its full set of options. See the CLI reference for every command, flag, JSON shape, and exit code.
Using it with an AI agent
The CLI is designed so an AI coding agent (such as Claude Code) can drive it directly: runmiramarket-cli account status --json first to confirm the account can trade, then either miramarket-cli strategies generate "<description>" --out ./s.json --json or miramarket-cli schema plus hand-authored JSON, then validate, preview, and post. Signing in and accepting policies still require a human — an agent should stop and ask you to complete those steps rather than attempting them.
For the full strategy JSON format, worked examples, and the rules that determine whether a strategy actually behaves as intended (most of which validate can’t check for you), point your agent at /agent-strategy-guide.md — a single markdown file meant to be fetched and read directly, not browsed.