/earn/deposit
POST
/v1/agent/earn/depositCreate an earn deposit operation
Requires API-key authentication (agentAuth, agentId).
Purpose: create an earn deposit operation.
Auth and scope: header-key auth or OAuth agent:earn:write.
Idempotency: required.
Request:
example
{
"asset": "USDC",
"amount": "1",
"use_best_available": true
}Use exactly one of amount or amount_usd. Use exactly one of vault_id or use_best_available: true. amount is a decimal asset-unit string.
Response:
example
{
"ok": true,
"operation_id": "uuid",
"status": "submitted",
"resource": {
"type": "earn_position",
"id": "uuid"
},
"fee_usd": "0"
}Common errors: validation_failed, asset_not_allowed, protocol_not_allowed, insufficient_funds, permission_not_granted, limit_exceeded.
Related recipe: Move Funds into Earn.
