Testnetsats and USDhb here have no value.
Skip to content
Open testnet app

Safety ​

This page is for the human who lets an agent trade, and for anyone reviewing that setup. It says what the venue enforces today and what the agent, or you, must still enforce.

The delegate-key pattern ​

Your master key never goes to an agent.

  1. Keep the master key offline. hardbasis auth login prints it once and stores only the delegate.
  2. The agent runs on a read,trade delegate. A stolen delegate can lose you a position; it cannot move your balance off the venue. See Authentication.
  3. Revoke a delegate with hardbasis auth revoke (it needs your master key, by design) or from the web app.

Never withdraw from an agent key ​

An agent key never carries withdraw. hardbasis auth login --scopes warns when you add it, and the paper and co-pilot levels stop when they see it. Withdrawals are something you do, with your own key.

One exception to know about: a USDhb redemption currently needs the withdraw scope even though the sats never leave the venue. Do not grant withdraw to an agent to make redemptions work; redeem yourself.

Cancel-all-after discipline ​

Before any unattended loop, arm the dead-man switch and keep re-arming it:

bash
hardbasis cancel-all-after create --timeout-ms 60000

If the agent stops re-arming (crash, hang, lost network), the venue cancels every resting order when the timer runs out. hardbasis mcp --autopilot arms it at start, re-arms it every 30 s and disarms it on clean shutdown. The hardbasis-emergency-flatten skill is the manual stop: cancel every order, close every position reduce-only, revoke the key, in that order.

Dry-run first, retry with the same key ​

  • Every write, funds and credential command takes --dry-run (MCP: dryRun: true), which validates and prints the exact request without sending it.
  • Every non-GET request carries an idempotency key. A timeout on a write may mean it landed: retry only with the --idempotency-key the error names, never a fresh one.

The cli_* error codes ​

Route on code, never on the prose.

codeexitsent?do
cli_validation2nofix the input
cli_no_mainnet2nostay on testnet
cli_ack_required (MCP)n/anoask the human; retry with acknowledged: true only then
cli_user_declined (MCP)n/anothe human said no; do not retry unless they ask again
cli_confirm_not_rendered (MCP)n/anothe client answered without showing a prompt; tell the user, suggest --confirm ack
cli_autopilot_requires_limits2norun without --autopilot
cli_network (timeout)3mayberetry only with the named idempotencyKey
API {code, error}1yeslook the code up in Errors

What the venue enforces today, and what it does not ​

Enforced by the venue todayThe agent must enforce itself
Key scopes: a read,trade key cannot withdraw or mint keysPosition size, order size and daily turnover per key (venue limits are planned, R-AP-10)
Margin, liquidation and the account's own risk limitsWhich markets the agent may trade
Rate limits per key and per account (Rate limits)When to stop: drawdown, loss, time of day
cancel-all-after, once armedArming and re-arming cancel-all-after
Idempotency on every writeUsing the same key on retry
A cap on live keys per accountNever asking for, storing or printing a master key

The MCP gates (the agent's acknowledged and your confirm prompt) run inside the CLI on your machine, not at the venue. They protect you from an agent acting on its own say; they do not protect a key that has leaked, which is why the key's scope is the boundary that matters.

Last updated 2026-11-02

Program policy v1 · numbers current as of 2026-11-25

Testnet: test sats have no value. Nothing on this page is an offer, a solicitation, or advice.