Docs / Reference / Local API
Local API
The engine exposes a JSON API on http://127.0.0.1:8787. Bound to localhost only — do not expose the port.
State & identity
| Route | Method | Body | Returns |
|---|---|---|---|
/api/state | GET | — | vault/unlocked flags, wallets, plan status, token, jobs, log tail |
/api/balances | GET | — | live ETH balance per wallet on Robinhood |
/api/source-balance | POST | {chain} | wallet-0 ETH balance on a funding chain |
/api/holders | GET | — | external holder table for the tracked token |
Pipeline
| Route | Method | Body | Notes |
|---|---|---|---|
/api/seed | POST | {count, password} | generates vault; returns mnemonic once |
/api/unlock | POST | {password} | opens vault into memory |
/api/plan | POST | {hours, from_balance, src_chain, source_index} | builds out/funding-plan.json |
/api/execute | POST | {execute} | runs the plan; false = dry run |
/api/launch | POST | {name, symbol, logo?, description?, quote_in_eth, deployer_index, execute} | gated: rejects before steps 1–5 complete |
Trading
| Route | Method | Body |
|---|---|---|
/api/token | POST | {address} — resolve + track a token |
/api/buy | POST | {eth, wallet_index?} |
/api/sell | POST | {pct?, wallet_index?} |
/api/auto | POST | {lo_s, hi_s} — start progressive buys |
/api/stop | POST | — halt the auto loop |
/api/dump | POST | — parallel exit, all wallets |
/api/approve | POST | — stage sell approvals |
/api/lock | POST | — same staging via the lock control |
Rules every route enforces
- Signing requires an unlocked vault and
execute: true— otherwise simulate or refuse. /api/launchruns the pipeline gate,canLaunch, and aneth_callsimulation before broadcasting.- Errors come back as
{"error": "…"}with a 4xx/5xx status — the UI toasts them verbatim.