Skip to content
Hightop docs header art
Hightop
API and Integrations

Move Funds into Earn#

Use this when an agent should move idle cash into an approved Earn vault.

Prerequisites#

  • The agent has earn write permission.
  • The asset is allowed.
  • Either you know the target vault_id or you want Hightop to use the best available approved vault.

List Opportunities#

curlrequest
curl -sS "https://api.hightop.com/v1/agent/earn/opportunities?limit=50" \
  -H "x-agent-id: $HIGHTOP_AGENT_ID" \
  -H "x-api-key: $HIGHTOP_API_KEY"

Deposit#

Agent API amount fields are decimal asset-unit strings. For USDC, "1" means 1 USDC.

curlrequest
curl -sS https://api.hightop.com/v1/agent/earn/deposit \
  -H "content-type: application/json" \
  -H "x-agent-id: $HIGHTOP_AGENT_ID" \
  -H "x-api-key: $HIGHTOP_API_KEY" \
  -H "Idempotency-Key: earn-deposit-$(uuidgen)" \
  -d '{
    "asset": "USDC",
    "amount": "1",
    "use_best_available": true
  }'

Use exactly one of vault_id or use_best_available: true.

Optional TypeScript SDK Shape#

typescriptexample
const deposit = await client.v1.agent.earn.deposit(
  {
    asset: 'USDC',
    amount: '1',
    use_best_available: true,
  },
  { idempotencyKey: `earn-deposit-${crypto.randomUUID()}` },
)

Follow Up#

Poll the operation or subscribe to earn.deposit.executed and operation.policy_rejected.

Likely errors: asset_not_allowed, protocol_not_allowed, permission_not_granted, insufficient_funds, limit_exceeded, validation_failed.

Previous

Convert with a Quote

Next

Withdraw to a Bank