v1
latestOpenAPI 3.0.32026-08-041747125.8 KBCreate a withdrawal
Source of Funds — Rebalancer Contract Pool Balance
Withdrawals move tokens from a pool held by the user's rebalancer contract back to the user's wallet. The funds are NOT in the user's wallet — they are already inside the DeFi protocol (Aave, Morpho, or Euler) deposited by the rebalancer.
The chain, token, poolContract, and available amount must all be derived from GET /v1/balances/{walletAddress} — do not guess or hardcode these values.
How to build a withdrawal request from the balances response
- Call GET /v1/balances/{walletAddress} to get the rebalancer's holdings.
- Navigate to: perToken[n].perChain[m].perProtocol[p].perPool[q]
- From the pool object:
- chain field → use as chain in the withdrawal request
- poolAddress field → use as poolContract in the withdrawal request
- balanceRaw field → maximum withdrawable amount (raw units)
- withdrawRequest field → pre-filled EIP-712 domain, types, and value for signing
- The withdrawRequest.value contains token (token contract address) and poolContract (pool address) — use these as the signing value.
- Supply amount (≤ balanceRaw, ≥ minimum) and deadline (unix timestamp, max 1 minute in future).
- Sign the EIP-712 typed data using the domain/types/value from withdrawRequest.
- Submit this endpoint with all fields.
Field-by-field mapping from balances response to WithdrawalRequest
| WithdrawalRequest field | Source |
|---|---|
| chain | PoolBalance.chain (string, e.g. "BASE") |
| token | Parent token key/symbol (e.g. "USDC") — NOT withdrawRequest.value.token which is a contract address |
| walletAddress | The user's wallet address (same as used in JWT) |
| poolContract | PoolBalance.poolAddress |
| amount | User-chosen raw amount, ≤ PoolBalance.balanceRaw, ≥ 100000 for USDC |
| deadline | User-chosen unix timestamp, max 60 seconds from now |
| signature | EIP-712 sign of withdrawRequest.domain + withdrawRequest.types + {token: withdrawRequest.value.token, poolContract: withdrawRequest.value.poolContract, amount: <your_amount>, deadline: <your_deadline>} |
Initiates a withdrawal transaction from DeFi protocols.
Initiates a withdrawal transaction from DeFi protocols.
Withdrawal must be signed as per EIP-712 Typed structured data hashing and signing. The signature must be created by wallet.
Signature relevant information is retrieved by /v1/balances/{walletAddress} endpoint in the withdrawRequest field. EIP 712 domain parameters and types are provided for convenience. The value field contains the token (address) and poolContract (address) that must match the withdrawal request, while amount and deadline must be supplied by the user.
Deadline must be a unix timestamp no more than 1 minute in the future which is the maximum amount of time the server waits for transaction confirmation.
Amount must be at least 0.1 (stablecoin) of the token to cover on-behalf transaction gas fees and no more than the available balance in the specified pool. This value is specified in raw units (e.g., 6 decimals for USDC). Token decimals are included in the token object of /v1/balances/{walletAddress} endpoint for reference.
Signature must be a 0x-prefixed hex string signed by the wallet address associated with the JWT token. For a standard EOA wallet this is 132 characters (0x + 130 hex characters). Smart contract wallets are also supported (e.g. multisig, passkey wallets) via EIP-1271 (isValidSignature) verification, so the signature may be longer than 132 characters in that case — up to a maximum of 4096 hex characters.
Rate limiting: 1 request per 3 seconds per client IP. Excess requests receive HTTP 429 with Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers (see RateLimitExceeded response).
Request body
Example request
{
"amount": "500000",
"deadline": "1700000100"
}Response
Withdrawal initiated successfully
Example response
{
"trackingId": "550e8400-e29b-41d4-a716-446655440000"
}