Withdraw to Crypto#
Use this when an agent needs to withdraw to an eligible crypto destination.
Prerequisites#
- The destination is an active withdrawal method.
- The destination is allowed for the asset.
- The agent has withdrawal write permission.
List Withdrawal Methods#
curl -sS "https://api.hightop.com/v1/agent/withdrawal-methods?limit=50" \
-H "x-agent-id: $HIGHTOP_AGENT_ID" \
-H "x-api-key: $HIGHTOP_API_KEY"Create the Withdrawal#
Agent API amount fields are decimal asset-unit strings. For USDC, "1" means 1 USDC.
curl -sS https://api.hightop.com/v1/agent/withdrawals/to-crypto \
-H "content-type: application/json" \
-H "x-agent-id: $HIGHTOP_AGENT_ID" \
-H "x-api-key: $HIGHTOP_API_KEY" \
-H "Idempotency-Key: crypto-withdrawal-$(uuidgen)" \
-d '{
"destination_id": "crypto-destination-id",
"asset": "USDC",
"amount": "1"
}'Current v1 execution can reject unsupported non-empty withdrawal notes. Omit note unless your integration has confirmed support.
Optional TypeScript SDK Shape#
const withdrawal = await client.v1.agent.withdrawals.toCrypto(
{
destination_id: 'crypto-destination-id',
asset: 'USDC',
amount: '1',
},
{ idempotencyKey: `crypto-withdrawal-${crypto.randomUUID()}` },
)Follow Up#
Poll the operation or subscribe to withdrawal.settled, withdrawal.execution_failed, and operation.policy_rejected.
Likely errors: recipient_not_allowed, permission_not_granted, insufficient_funds, limit_exceeded, validation_failed.
