CLI#
@hightop/cli is the official command-line interface for the Agent API. The executable is hightop. It uses @hightop/sdk under the hood and derives its command coverage from the generated Agent API endpoint catalog, so every /v1/agent/* endpoint is reachable as a command.
Reach for the CLI for scripting, cron jobs, CI steps, and quick one-off operations from a shell. For TypeScript services use the SDK; for AI clients use MCP. See Choose Your Surface for the comparison. The full command listing is included in the generated CLI command reference on this page.
Install#
npm install -g @hightop/cliThis puts hightop on your PATH. The CLI targets Node 20 or newer.
Configure#
Set a base URL and exactly one auth mode. The CLI reads credentials from environment variables.
Header-key auth:
export HIGHTOP_BASE_URL=https://api.hightop.com
export HIGHTOP_AGENT_ID=...
export HIGHTOP_API_KEY=...Bearer-token auth:
export HIGHTOP_BASE_URL=https://api.hightop.com
export HIGHTOP_BEARER_TOKEN=...The Configuration table in the CLI command reference below lists every supported variable, including HIGHTOP_TIMEOUT_MS. Every variable has an equivalent flag for local or debug use:
hightop self --base-url https://api.hightop.com --agent-id ... --api-key ...The CLI does not auto-load .env files. For local testing, source one into your shell:
set -a
source .env.agent
set +aDiscover commands#
The CLI is self-documenting. Use --help at any level:
hightop --help # global help and command groups
hightop borrow collateral --help # a command group
hightop one-off-payments create --help # a single endpoint commandRun commands#
hightop self --pretty
hightop balances --pretty
hightop operations get <operation-id> --include onchain --pretty
hightop webhooks create --url https://example.com/hook --event-types payment.executed,webhook.test --pretty
hightop x402 quote --url https://example.com/paid-resource --pretty--pretty formats JSON output for humans; omit it for compact, pipe-friendly JSON.
Flags#
Flags are generated from each endpoint's query and body fields by converting underscores to dashes — amount_usd becomes --amount-usd. Booleans are detected from the schema, so a boolean field becomes a bare --flag.
Array fields accept repeated or comma-separated values:
hightop webhooks create --url https://example.com/hook --event-types payment.executed,webhook.test
hightop earn rewards claim --protocols underscore-earn --protocols ripe-rewardsFor complex or deeply nested bodies, pass raw JSON with --body:
# amount is a USDC base-unit integer string (6 decimals): "1000000" = 1 USDC
hightop x402 sign --body '{"pay_to":"0x...","amount":"1000000","target_url":"https://example.com"}'Writes: idempotency, simulate, wait#
Mutating commands generate an idempotency key automatically unless you pass --idempotency-key. The key is printed in the JSON response so you can deliberately retry the same logical operation:
hightop one-off-payments create --to 0x... --asset USDC --amount-usd 25 --prettyUse --simulate to validate a request shape against /v1/agent/simulate instead of broadcasting. Simulate is available on the write commands the API marks as simulatable:
hightop borrow repay --asset GREEN --amount-usd 25 --simulate --prettyUse --wait to poll the returned operation until it reaches a terminal state, with --wait-timeout-ms to bound the wait:
hightop conversions execute --quote-id <quote-id> --wait --prettyEscape hatches#
hightop raw calls any known /v1/agent/* route directly. The openapi command is public and runs without auth (it still needs HIGHTOP_BASE_URL or --base-url); capabilities requires auth (agent:read):
hightop raw GET /v1/agent/openapi.json --pretty
hightop openapi --pretty # public, no auth
hightop capabilities json --pretty # requires agent authOutput and exit codes#
Successful commands print the JSON response to stdout and exit 0. Failed requests print the normalized Agent API error and exit non-zero, so you can branch on exit status in scripts. Combine with --pretty for debugging and plain output for piping into jq.
CLI Command Reference#
This page is generated from the Agent API endpoint catalog and the @hightop/cli command-shaping rules. It documents 89 generated command rows plus the standalone raw, simulate, and operation-wait commands. Current package versions: @hightop/cli@0.1.9 and @hightop/sdk@0.1.9.
Configuration#
| Input | Purpose |
|---|---|
HIGHTOP_BASE_URL / --base-url | Agent API base URL. Defaults are not loaded from .env; export variables in the shell. |
HIGHTOP_AGENT_ID + HIGHTOP_API_KEY | Header-key auth. Use both together and do not combine with bearer auth. |
HIGHTOP_BEARER_TOKEN | OAuth bearer token auth. Use instead of header-key auth. |
HIGHTOP_TIMEOUT_MS / --timeout-ms | Request timeout in milliseconds. |
--pretty | Pretty-print JSON output. |
--help | Show global, group, or command-specific help. |
Boolean request fields currently parsed as boolean flags:
--allow-conversion, --allow-partial, --enabled, --move-all, --remove-all, --repay-all, --to-best-available, --use-available-cash-first, --use-best-available, --withdraw-all
Generated Endpoint Commands#
Endpoint paths are relative to /v1/agent
| Command | Endpoint | Request flags | Submit options | Description |
|---|---|---|---|---|
hightop account | GET/account | none | none | Return a scoped account summary for the authenticated agent wallet. |
hightop activity | GET/activity | --cursor, --limit, --type, --since | none | List scoped Activity rows for the authenticated agent wallet without marking them read. |
hightop activity list | GET/activity | --cursor, --limit, --type, --since | none | List scoped Activity rows for the authenticated agent wallet without marking them read. |
hightop assets | GET/assets | --cursor, --limit | none | List assets visible to the authenticated agent. |
hightop assets list | GET/assets | --cursor, --limit | none | List assets visible to the authenticated agent. |
hightop balances | GET/balances | --cursor, --limit | none | List balances for the authenticated agent wallet. |
hightop balances cash | GET/balances/cash | --cursor, --limit | none | List cash balances for the authenticated agent wallet. |
hightop balances cash list | GET/balances/cash | --cursor, --limit | none | List cash balances for the authenticated agent wallet. |
hightop balances list | GET/balances | --cursor, --limit | none | List balances for the authenticated agent wallet. |
hightop borrow | GET/borrow | none | none | Return borrow summary for the authenticated agent wallet. |
hightop borrow collateral | GET/borrow/collateral | --cursor, --limit | none | List collateral for the authenticated agent wallet. |
hightop borrow collateral add | POST/borrow/collateral/add | --asset, --source-asset, --allow-conversion, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a collateral add operation. |
hightop borrow collateral list | GET/borrow/collateral | --cursor, --limit | none | List collateral for the authenticated agent wallet. |
hightop borrow collateral remove | POST/borrow/collateral/remove | --asset, --remove-all, --max-ltv-after, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a collateral remove operation. |
hightop borrow collateral-options | GET/borrow/collateral-options | --cursor, --limit | none | List addable collateral options for the authenticated agent wallet. |
hightop borrow collateral-options list | GET/borrow/collateral-options | --cursor, --limit | none | List addable collateral options for the authenticated agent wallet. |
hightop borrow create | POST/borrow | --asset, --max-ltv-after, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a borrow operation for USDC or GREEN. |
hightop borrow deleverage | POST/borrow/deleverage | --target-ltv, --max-repay-amount-usd, --source-asset, --use-available-cash-first, --allow-conversion, --allow-partial | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a target-LTV deleverage operation. |
hightop borrow repay | POST/borrow/repay | --asset, --repay-all, --source-asset, --allow-conversion, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a debt repayment operation. |
hightop capabilities | GET/capabilities | none | none | Return Agent API capabilities for the authenticated agent. |
hightop capabilities json | GET/capabilities.json | none | none | Return Agent API capabilities as JSON. |
hightop conversions | GET/conversions | --cursor, --limit | none | List conversion operations for the authenticated agent. |
hightop conversions execute | POST/conversions | --quote-id | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Execute a conversion from a quote. |
hightop conversions get <id> | GET/conversions/{id} | --include | none | Get one conversion operation for the authenticated agent. |
hightop conversions list | GET/conversions | --cursor, --limit | none | List conversion operations for the authenticated agent. |
hightop conversions quote | POST/conversions/quote | --from-asset, --to-asset, --from-vault-address, --to-vault-address, --slippage-percent, --amount, --amount-usd | --idempotency-key, --simulate | Create a stateful conversion quote. |
hightop deposit-address | GET/deposit-address | --asset, --chain | none | Return a Base deposit address for an asset. |
hightop deposit-methods | GET/deposit-methods | --cursor, --limit | none | List deposit methods for the authenticated agent wallet. |
hightop deposit-methods list | GET/deposit-methods | --cursor, --limit | none | List deposit methods for the authenticated agent wallet. |
hightop earn | GET/earn | --cursor, --limit | none | List earn positions for the authenticated agent wallet. |
hightop earn deposit | POST/earn/deposit | --asset, --vault-id, --use-best-available, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create an earn deposit operation. |
hightop earn get <id> | GET/earn/{id} | none | none | Get one earn position for the authenticated agent wallet. |
hightop earn list | GET/earn | --cursor, --limit | none | List earn positions for the authenticated agent wallet. |
hightop earn move | POST/earn/move | --from-position-id, --move-all, --to-vault-id, --to-best-available, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create an earn move operation. |
hightop earn opportunities | GET/earn/opportunities | --cursor, --limit | none | List earn opportunities available to the authenticated agent. |
hightop earn opportunities list | GET/earn/opportunities | --cursor, --limit | none | List earn opportunities available to the authenticated agent. |
hightop earn rewards claim | POST/earn/rewards/claim | --protocols | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a rewards claim operation. |
hightop earn withdraw | POST/earn/withdraw | --position-id, --withdraw-all, --destination-asset, --allow-conversion, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create an earn withdrawal operation. |
hightop limits | GET/self/limits | none | none | Return effective operation permissions, spend/swap limits, and current-period usage for the authenticated agent. |
hightop one-off-payments | GET/one-off-payments | --cursor, --limit | none | List one-off payment operations for the authenticated agent. |
hightop one-off-payments create | POST/one-off-payments | --to, --asset, --note, --unlock-delay-seconds, --expires-in-seconds, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a one-off payment operation. |
hightop one-off-payments get <id> | GET/one-off-payments/{id} | --include | none | Get a one-off payment operation for the authenticated agent. |
hightop one-off-payments list | GET/one-off-payments | --cursor, --limit | none | List one-off payment operations for the authenticated agent. |
hightop openapi | GET/openapi.json | none | none | Return the public Agent API OpenAPI document. |
hightop operations | GET/operations | --cursor, --limit, --status, --type, --since | none | List AgentOperation rows for the authenticated agent. |
hightop operations get <id> | GET/operations/{id} | --include | none | Get one AgentOperation for the authenticated agent. |
hightop operations list | GET/operations | --cursor, --limit, --status, --type, --since | none | List AgentOperation rows for the authenticated agent. |
hightop payments | GET/payments | --cursor, --limit | none | List payment operations for the authenticated agent. |
hightop payments create | POST/payments | --to, --asset, --deliver-as, --note, --slippage-percent, --prefer, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a payment operation. |
hightop payments get <id> | GET/payments/{id} | --include | none | Get one payment operation for the authenticated agent. |
hightop payments list | GET/payments | --cursor, --limit | none | List payment operations for the authenticated agent. |
hightop protocols | GET/protocols | --cursor, --limit | none | List protocols visible to the authenticated agent. |
hightop protocols list | GET/protocols | --cursor, --limit | none | List protocols visible to the authenticated agent. |
hightop recipients | GET/recipients | --cursor, --limit | none | List payment recipients visible to the authenticated agent wallet. |
hightop recipients get <id> | GET/recipients/{id} | none | none | Get one recipient visible to the authenticated agent wallet. |
hightop recipients list | GET/recipients | --cursor, --limit | none | List payment recipients visible to the authenticated agent wallet. |
hightop recipients resolve | POST/recipients/resolve | --to, --asset, --action | none | Resolve an agent-facing recipient identifier. |
hightop recurring-payments | GET/recurring-payments | --cursor, --limit | none | List recurring payment recipients visible to the authenticated agent wallet. |
hightop recurring-payments get <id> | GET/recurring-payments/{id} | none | none | Get one recurring payment recipient visible to the authenticated agent wallet. |
hightop recurring-payments list | GET/recurring-payments | --cursor, --limit | none | List recurring payment recipients visible to the authenticated agent wallet. |
hightop self | GET/self | none | none | Return the authenticated agent and scoped wallet context. |
hightop self limits | GET/self/limits | none | none | Return effective operation permissions, spend/swap limits, and current-period usage for the authenticated agent. |
hightop self usage | GET/self/usage | none | none | Return current Agent API rate-limit and usage state. |
hightop trusted-destinations | GET/trusted-destinations | --cursor, --limit | none | List trusted destinations visible to the authenticated agent wallet. |
hightop trusted-destinations cancel <id> | POST/trusted-destinations/{id}/cancel | none | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Cancel a pending trusted destination for the authenticated agent wallet. |
hightop trusted-destinations confirm <id> | POST/trusted-destinations/{id}/confirm | none | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Confirm a pending trusted destination for the authenticated agent wallet. |
hightop trusted-destinations delete <id> | DELETE/trusted-destinations/{id} | none | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Remove a trusted destination from the authenticated agent wallet. |
hightop trusted-destinations get <id> | GET/trusted-destinations/{id} | none | none | Get one trusted destination visible to the authenticated agent wallet. |
hightop trusted-destinations list | GET/trusted-destinations | --cursor, --limit | none | List trusted destinations visible to the authenticated agent wallet. |
hightop usage | GET/self/usage | none | none | Return current Agent API rate-limit and usage state. |
hightop webhooks | GET/webhooks | --cursor, --limit | none | List outbound webhook endpoints for the authenticated agent. |
hightop webhooks create | POST/webhooks | --url, --description, --event-types | --idempotency-key | Create an outbound webhook endpoint. |
hightop webhooks delete <id> | DELETE/webhooks/{id} | none | --idempotency-key | Delete or disable an outbound webhook endpoint. |
hightop webhooks deliveries <id> | GET/webhooks/{id}/deliveries | --cursor, --limit, --status, --event-id | none | List webhook delivery attempts for one outbound webhook endpoint. |
hightop webhooks get <id> | GET/webhooks/{id} | --include | none | Get one outbound webhook endpoint for the authenticated agent. |
hightop webhooks list | GET/webhooks | --cursor, --limit | none | List outbound webhook endpoints for the authenticated agent. |
hightop webhooks rotate-secret <id> | POST/webhooks/{id}/rotate-secret | none | --idempotency-key | Rotate an outbound webhook signing secret. |
hightop webhooks test <id> | POST/webhooks/{id}/test | none | --idempotency-key | Send a webhook.test delivery to an outbound webhook endpoint. |
hightop webhooks update <id> | PATCH/webhooks/{id} | --url, --description, --event-types, --enabled | --idempotency-key | Update an outbound webhook endpoint. |
hightop withdrawal-methods | GET/withdrawal-methods | --cursor, --limit | none | List withdrawal methods visible to the authenticated agent wallet. |
hightop withdrawal-methods list | GET/withdrawal-methods | --cursor, --limit | none | List withdrawal methods visible to the authenticated agent wallet. |
hightop withdrawals | GET/withdrawals | --cursor, --limit | none | List withdrawal operations for the authenticated agent. |
hightop withdrawals get <id> | GET/withdrawals/{id} | --include | none | Get one withdrawal operation for the authenticated agent. |
hightop withdrawals list | GET/withdrawals | --cursor, --limit | none | List withdrawal operations for the authenticated agent. |
hightop withdrawals to-bank | POST/withdrawals/to-bank | --method-id, --asset, --note, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a bank withdrawal operation. |
hightop withdrawals to-crypto | POST/withdrawals/to-crypto | --destination-id, --asset, --note, --amount, --amount-usd | --idempotency-key, --simulate, --wait, --wait-timeout-ms | Create a crypto withdrawal operation. |
hightop x402 purchase | POST/x402/purchase | --url, --method, --body, --max-amount | --idempotency-key, --wait, --wait-timeout-ms | Fetch a URL, satisfy an x402 challenge when required, and return the upstream response. |
hightop x402 quote | POST/x402/quote | --url, --method, --body, --timeout-ms | none | Fetch a URL and return its supported x402 price without paying. |
hightop x402 sign | POST/x402/sign | --payment-requirements, --pay-to, --amount, --target-url, --max-timeout-seconds | --idempotency-key, --wait, --wait-timeout-ms | Sign a Base USDC x402 payment authorization from an x402 payment requirement. |
Standalone Commands#
| Command | Purpose | Important flags |
|---|---|---|
hightop raw <method> <path> | Call a known /v1/agent/* route directly. The SDK still validates known-route and idempotency requirements. | --query key=value, --body '{"field":"value"}', --idempotency-key <key> |
hightop simulate <method> <path> | Call POST /v1/agent/simulate for a supported write route without broadcasting. | --body '{"field":"value"}' |
hightop operations wait <id> | Poll an operation until it reaches a terminal status or times out. | --timeout-ms <ms>, --poll-interval-ms <ms> |
Next#
- Choose Your Surface — CLI vs SDK vs MCP vs raw HTTP
- Going to Production — idempotency, retries, and error handling
- Authentication — header-key and OAuth
