"MAX" to exit the position entirely.
Earn is in private beta. Contact us
to enable it for your organization.
Submit the withdrawal
enum<string>
required
ACTIVITY_TYPE_EARN_WITHDRAWstring
required
Timestamp (in milliseconds) of the request, used to verify liveness.
string
required
Unique identifier for your organization (or the sub-organization whose wallet is withdrawing).
string
required
Address of the deployed fee wrapper holding the position, from
earn_positions.string
required
The wallet account address to withdraw to and sign with.
string
required
Amount of the underlying asset to withdraw, in raw on-chain units (e.g.
"500000" for 0.50 USDC), or the literal "MAX" to withdraw the entire position.string
required
CAIP-2 chain identifier, e.g.
eip155:8453.boolean
Whether to sponsor the transaction’s gas via Gas Station. Defaults to
false.Full exit with MAX
"amountValue": "MAX" redeems the wallet’s exact live share balance in the wrapper, so the position closes completely without leaving dust.
A
MAX withdrawal resets the position’s lifetime accounting: after it
confirms, totalDeposited and totalWithdrawn in
earn_positions start again from zero
for that wrapper.Claiming yield only
To pay out yield without touching principal, withdraw exactly the yield amount. Compute it from the position’s raw fields:JavaScript
Poll withdrawal status (required)
status is PENDING, COMPLETED, or FAILED. On FAILED, the response includes an error field with the reason.
Gas
Identical to deposits:sponsor: true uses Gas Station (Pro plan or higher); otherwise the signWith wallet pays gas natively. See Gas: sponsored vs self-funded.
Next steps
- Track positions to verify the position after withdrawing