Skip to content
Hightop docs header art
Hightop
Developer Tools

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#

terminal
command
npm install -g @hightop/cli

This 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:

terminal
command
export HIGHTOP_BASE_URL=https://api.hightop.com
export HIGHTOP_AGENT_ID=...
export HIGHTOP_API_KEY=...

Bearer-token auth:

terminal
command
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:

terminal
command
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:

terminal
command
set -a
source .env.agent
set +a

Discover commands#

The CLI is self-documenting. Use --help at any level:

terminal
command
hightop --help                       # global help and command groups
hightop borrow collateral --help     # a command group
hightop one-off-payments create --help   # a single endpoint command

Run commands#

terminal
command
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:

terminal
command
hightop webhooks create --url https://example.com/hook --event-types payment.executed,webhook.test
hightop earn rewards claim --protocols underscore-earn --protocols ripe-rewards

For complex or deeply nested bodies, pass raw JSON with --body:

terminal
command
# 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:

terminal
command
hightop one-off-payments create --to 0x... --asset USDC --amount-usd 25 --pretty

Use --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:

terminal
command
hightop borrow repay --asset GREEN --amount-usd 25 --simulate --pretty

Use --wait to poll the returned operation until it reaches a terminal state, with --wait-timeout-ms to bound the wait:

terminal
command
hightop conversions execute --quote-id <quote-id> --wait --pretty

Escape 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):

terminal
command
hightop raw GET /v1/agent/openapi.json --pretty
hightop openapi --pretty          # public, no auth
hightop capabilities json --pretty  # requires agent auth

Output 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#

InputPurpose
HIGHTOP_BASE_URL / --base-urlAgent API base URL. Defaults are not loaded from .env; export variables in the shell.
HIGHTOP_AGENT_ID + HIGHTOP_API_KEYHeader-key auth. Use both together and do not combine with bearer auth.
HIGHTOP_BEARER_TOKENOAuth bearer token auth. Use instead of header-key auth.
HIGHTOP_TIMEOUT_MS / --timeout-msRequest timeout in milliseconds.
--prettyPretty-print JSON output.
--helpShow 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

CommandEndpointRequest flagsSubmit optionsDescription
hightop accountGET/accountnonenoneReturn a scoped account summary for the authenticated agent wallet.
hightop activityGET/activity--cursor, --limit, --type, --sincenoneList scoped Activity rows for the authenticated agent wallet without marking them read.
hightop activity listGET/activity--cursor, --limit, --type, --sincenoneList scoped Activity rows for the authenticated agent wallet without marking them read.
hightop assetsGET/assets--cursor, --limitnoneList assets visible to the authenticated agent.
hightop assets listGET/assets--cursor, --limitnoneList assets visible to the authenticated agent.
hightop balancesGET/balances--cursor, --limitnoneList balances for the authenticated agent wallet.
hightop balances cashGET/balances/cash--cursor, --limitnoneList cash balances for the authenticated agent wallet.
hightop balances cash listGET/balances/cash--cursor, --limitnoneList cash balances for the authenticated agent wallet.
hightop balances listGET/balances--cursor, --limitnoneList balances for the authenticated agent wallet.
hightop borrowGET/borrownonenoneReturn borrow summary for the authenticated agent wallet.
hightop borrow collateralGET/borrow/collateral--cursor, --limitnoneList collateral for the authenticated agent wallet.
hightop borrow collateral addPOST/borrow/collateral/add--asset, --source-asset, --allow-conversion, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a collateral add operation.
hightop borrow collateral listGET/borrow/collateral--cursor, --limitnoneList collateral for the authenticated agent wallet.
hightop borrow collateral removePOST/borrow/collateral/remove--asset, --remove-all, --max-ltv-after, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a collateral remove operation.
hightop borrow collateral-optionsGET/borrow/collateral-options--cursor, --limitnoneList addable collateral options for the authenticated agent wallet.
hightop borrow collateral-options listGET/borrow/collateral-options--cursor, --limitnoneList addable collateral options for the authenticated agent wallet.
hightop borrow createPOST/borrow--asset, --max-ltv-after, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a borrow operation for USDC or GREEN.
hightop borrow deleveragePOST/borrow/deleverage--target-ltv, --max-repay-amount-usd, --source-asset, --use-available-cash-first, --allow-conversion, --allow-partial--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a target-LTV deleverage operation.
hightop borrow repayPOST/borrow/repay--asset, --repay-all, --source-asset, --allow-conversion, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a debt repayment operation.
hightop capabilitiesGET/capabilitiesnonenoneReturn Agent API capabilities for the authenticated agent.
hightop capabilities jsonGET/capabilities.jsonnonenoneReturn Agent API capabilities as JSON.
hightop conversionsGET/conversions--cursor, --limitnoneList conversion operations for the authenticated agent.
hightop conversions executePOST/conversions--quote-id--idempotency-key, --simulate, --wait, --wait-timeout-msExecute a conversion from a quote.
hightop conversions get <id>GET/conversions/{id}--includenoneGet one conversion operation for the authenticated agent.
hightop conversions listGET/conversions--cursor, --limitnoneList conversion operations for the authenticated agent.
hightop conversions quotePOST/conversions/quote--from-asset, --to-asset, --from-vault-address, --to-vault-address, --slippage-percent, --amount, --amount-usd--idempotency-key, --simulateCreate a stateful conversion quote.
hightop deposit-addressGET/deposit-address--asset, --chainnoneReturn a Base deposit address for an asset.
hightop deposit-methodsGET/deposit-methods--cursor, --limitnoneList deposit methods for the authenticated agent wallet.
hightop deposit-methods listGET/deposit-methods--cursor, --limitnoneList deposit methods for the authenticated agent wallet.
hightop earnGET/earn--cursor, --limitnoneList earn positions for the authenticated agent wallet.
hightop earn depositPOST/earn/deposit--asset, --vault-id, --use-best-available, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate an earn deposit operation.
hightop earn get <id>GET/earn/{id}nonenoneGet one earn position for the authenticated agent wallet.
hightop earn listGET/earn--cursor, --limitnoneList earn positions for the authenticated agent wallet.
hightop earn movePOST/earn/move--from-position-id, --move-all, --to-vault-id, --to-best-available, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate an earn move operation.
hightop earn opportunitiesGET/earn/opportunities--cursor, --limitnoneList earn opportunities available to the authenticated agent.
hightop earn opportunities listGET/earn/opportunities--cursor, --limitnoneList earn opportunities available to the authenticated agent.
hightop earn rewards claimPOST/earn/rewards/claim--protocols--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a rewards claim operation.
hightop earn withdrawPOST/earn/withdraw--position-id, --withdraw-all, --destination-asset, --allow-conversion, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate an earn withdrawal operation.
hightop limitsGET/self/limitsnonenoneReturn effective operation permissions, spend/swap limits, and current-period usage for the authenticated agent.
hightop one-off-paymentsGET/one-off-payments--cursor, --limitnoneList one-off payment operations for the authenticated agent.
hightop one-off-payments createPOST/one-off-payments--to, --asset, --note, --unlock-delay-seconds, --expires-in-seconds, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a one-off payment operation.
hightop one-off-payments get <id>GET/one-off-payments/{id}--includenoneGet a one-off payment operation for the authenticated agent.
hightop one-off-payments listGET/one-off-payments--cursor, --limitnoneList one-off payment operations for the authenticated agent.
hightop openapiGET/openapi.jsonnonenoneReturn the public Agent API OpenAPI document.
hightop operationsGET/operations--cursor, --limit, --status, --type, --sincenoneList AgentOperation rows for the authenticated agent.
hightop operations get <id>GET/operations/{id}--includenoneGet one AgentOperation for the authenticated agent.
hightop operations listGET/operations--cursor, --limit, --status, --type, --sincenoneList AgentOperation rows for the authenticated agent.
hightop paymentsGET/payments--cursor, --limitnoneList payment operations for the authenticated agent.
hightop payments createPOST/payments--to, --asset, --deliver-as, --note, --slippage-percent, --prefer, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a payment operation.
hightop payments get <id>GET/payments/{id}--includenoneGet one payment operation for the authenticated agent.
hightop payments listGET/payments--cursor, --limitnoneList payment operations for the authenticated agent.
hightop protocolsGET/protocols--cursor, --limitnoneList protocols visible to the authenticated agent.
hightop protocols listGET/protocols--cursor, --limitnoneList protocols visible to the authenticated agent.
hightop recipientsGET/recipients--cursor, --limitnoneList payment recipients visible to the authenticated agent wallet.
hightop recipients get <id>GET/recipients/{id}nonenoneGet one recipient visible to the authenticated agent wallet.
hightop recipients listGET/recipients--cursor, --limitnoneList payment recipients visible to the authenticated agent wallet.
hightop recipients resolvePOST/recipients/resolve--to, --asset, --actionnoneResolve an agent-facing recipient identifier.
hightop recurring-paymentsGET/recurring-payments--cursor, --limitnoneList recurring payment recipients visible to the authenticated agent wallet.
hightop recurring-payments get <id>GET/recurring-payments/{id}nonenoneGet one recurring payment recipient visible to the authenticated agent wallet.
hightop recurring-payments listGET/recurring-payments--cursor, --limitnoneList recurring payment recipients visible to the authenticated agent wallet.
hightop selfGET/selfnonenoneReturn the authenticated agent and scoped wallet context.
hightop self limitsGET/self/limitsnonenoneReturn effective operation permissions, spend/swap limits, and current-period usage for the authenticated agent.
hightop self usageGET/self/usagenonenoneReturn current Agent API rate-limit and usage state.
hightop trusted-destinationsGET/trusted-destinations--cursor, --limitnoneList trusted destinations visible to the authenticated agent wallet.
hightop trusted-destinations cancel <id>POST/trusted-destinations/{id}/cancelnone--idempotency-key, --simulate, --wait, --wait-timeout-msCancel a pending trusted destination for the authenticated agent wallet.
hightop trusted-destinations confirm <id>POST/trusted-destinations/{id}/confirmnone--idempotency-key, --simulate, --wait, --wait-timeout-msConfirm 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-msRemove a trusted destination from the authenticated agent wallet.
hightop trusted-destinations get <id>GET/trusted-destinations/{id}nonenoneGet one trusted destination visible to the authenticated agent wallet.
hightop trusted-destinations listGET/trusted-destinations--cursor, --limitnoneList trusted destinations visible to the authenticated agent wallet.
hightop usageGET/self/usagenonenoneReturn current Agent API rate-limit and usage state.
hightop webhooksGET/webhooks--cursor, --limitnoneList outbound webhook endpoints for the authenticated agent.
hightop webhooks createPOST/webhooks--url, --description, --event-types--idempotency-keyCreate an outbound webhook endpoint.
hightop webhooks delete <id>DELETE/webhooks/{id}none--idempotency-keyDelete or disable an outbound webhook endpoint.
hightop webhooks deliveries <id>GET/webhooks/{id}/deliveries--cursor, --limit, --status, --event-idnoneList webhook delivery attempts for one outbound webhook endpoint.
hightop webhooks get <id>GET/webhooks/{id}--includenoneGet one outbound webhook endpoint for the authenticated agent.
hightop webhooks listGET/webhooks--cursor, --limitnoneList outbound webhook endpoints for the authenticated agent.
hightop webhooks rotate-secret <id>POST/webhooks/{id}/rotate-secretnone--idempotency-keyRotate an outbound webhook signing secret.
hightop webhooks test <id>POST/webhooks/{id}/testnone--idempotency-keySend a webhook.test delivery to an outbound webhook endpoint.
hightop webhooks update <id>PATCH/webhooks/{id}--url, --description, --event-types, --enabled--idempotency-keyUpdate an outbound webhook endpoint.
hightop withdrawal-methodsGET/withdrawal-methods--cursor, --limitnoneList withdrawal methods visible to the authenticated agent wallet.
hightop withdrawal-methods listGET/withdrawal-methods--cursor, --limitnoneList withdrawal methods visible to the authenticated agent wallet.
hightop withdrawalsGET/withdrawals--cursor, --limitnoneList withdrawal operations for the authenticated agent.
hightop withdrawals get <id>GET/withdrawals/{id}--includenoneGet one withdrawal operation for the authenticated agent.
hightop withdrawals listGET/withdrawals--cursor, --limitnoneList withdrawal operations for the authenticated agent.
hightop withdrawals to-bankPOST/withdrawals/to-bank--method-id, --asset, --note, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a bank withdrawal operation.
hightop withdrawals to-cryptoPOST/withdrawals/to-crypto--destination-id, --asset, --note, --amount, --amount-usd--idempotency-key, --simulate, --wait, --wait-timeout-msCreate a crypto withdrawal operation.
hightop x402 purchasePOST/x402/purchase--url, --method, --body, --max-amount--idempotency-key, --wait, --wait-timeout-msFetch a URL, satisfy an x402 challenge when required, and return the upstream response.
hightop x402 quotePOST/x402/quote--url, --method, --body, --timeout-msnoneFetch a URL and return its supported x402 price without paying.
hightop x402 signPOST/x402/sign--payment-requirements, --pay-to, --amount, --target-url, --max-timeout-seconds--idempotency-key, --wait, --wait-timeout-msSign a Base USDC x402 payment authorization from an x402 payment requirement.

Standalone Commands#

CommandPurposeImportant 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#

Previous

TypeScript SDK

Next

MCP