Agents
For agents, in order
What an agent needs before its first call, one line each; the detail stays on the page linked.
- Auth. One
x-api-keyheader; scopes, sessions and the delegate-key pattern: Authentication. - Base URLs. Testnet first;
GET /deploymentsays which environment answered: Environments. - Units. Money, prices, rates and counts are decimal strings; read each field's unit off
x-hardbasis-unit: Wire encoding. - Idempotency. An
idempotency-keyheader on every write; each operation page says what the value must be: Place an order. - Rate limits. Three budgets; honor the
RateLimit-*headers: Rate limits. - Errors. Match on the stable
code, never the message: Errors. - Pagination. Lists page by a named cursor, never a generic key: Wire encoding.
- WebSocket resume. Reconnect, take the REST snapshot, then resume the stream: Reconnect doctrine.
- The worked loop. Signup to withdrawal, runnable: Quickstart for agents.
The agent layer
HardBasis ships an agent layer on top of the public API:
- A CLI.
hardbasisturns every public route into a command, with JSON output,--dry-runon every write, and the API's machinecodeon every refusal. - An MCP server.
hardbasis mcpserves the same commands as MCP tools over stdio to Claude Code, Cursor, Codex, Gemini CLI and other clients. - Skills. A pack of agentskills.io skills, each tagged with the lowest autonomy level that may run it.
- Scoped keys. An agent trades on a
read,tradedelegate key, never on your master key. - Testnet first. Testnet is the default everywhere, and
hardbasis auth logingives you a funded testnet account.
Bitcoin perps your agent can check. The goal is that every limit an agent runs under is venue state it can read back, and every fill is evidence it can verify.
Live today vs planned
| What | Status |
|---|---|
hardbasis CLI: every public route, --dry-run, decimal-string money, machine error codes | live, testnet |
hardbasis mcp over stdio, with the agent's ack and the human's confirm prompt | live, testnet |
| Skills pack (nine published skills) | live |
Delegate keys with read, trade, withdraw scopes; cancel-all-after dead-man switch | live |
Proof of reserves as a tool (por get, por dashboard) | live |
| Engine-enforced per-key limits | planned, R-AP-10 |
| Agent accounts and a stop button | planned, R-AP-11 |
| Audit and replay of your account history; sats-per-request (L402) premium data | planned, R-AP-12 |
| Remote MCP (no local install) | planned, R-AP-13 |
| Mainnet | not live |
Nothing in the planned rows is available yet. The numbers are the rulings in the agent platform spec that will deliver them.
R-AP-10 Key limits
Limits set when a key is minted (position size per market, order notional, daily turnover, a market allowlist, reduce-only, expiry), enforced by the venue and readable back from GET /v1/limits. Until this ships, the agent enforces its own limits; see Safety.
R-AP-11 Agent accounts
A child account for an agent whose keys can never withdraw, funded from yours with a cap, plus one call that revokes its keys, cancels its orders and optionally flattens it.
R-AP-12 Audit, replay and L402
Your account's event history with local hash-chain checks and exportable fill evidence, and premium market data paid per request in sats over L402.
R-AP-13 Remote MCP
A hosted MCP endpoint authenticated by a trade-scoped delegate you mint in the web app, so a cloud agent can connect without a local install.
Pages
- Install: the installer, npm, a source checkout, verify, log in.
- MCP: client setup, tool groups, the two gates, autopilot, the audit stream.
- Autonomy levels: what an agent may call at each level.
- Skills: the published skills index.
- Safety: what the venue enforces today and what your agent must enforce itself.
Per-command reference pages arrive with hardbasis-cli v0.1.1.