curl -X POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_request/tx \
-H "Content-Type: application/json" \
-d '{
"address": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"wallet": "<WALLET>",
"shares": "500000",
"mode": "queued"
}'
{
"providerKind": "exponent",
"action": "withdrawRequestQueued",
"vault": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"user": "<WALLET>",
"requestId": "<REQUEST_ACCOUNT>",
"signers": ["<REQUEST_ACCOUNT>"],
"txBase64": "<WITHDRAW_REQUEST_TX>",
"txBase64s": ["<AUM_REFRESH_TX>", "<WITHDRAW_REQUEST_TX>"]
}
Earn Vaults
Withdraw from Earn Vault
POST
/
v1
/
pandora
/
earn
/
vaults
/
withdraw_request
/
tx
curl -X POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_request/tx \
-H "Content-Type: application/json" \
-d '{
"address": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"wallet": "<WALLET>",
"shares": "500000",
"mode": "queued"
}'
{
"providerKind": "exponent",
"action": "withdrawRequestQueued",
"vault": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"user": "<WALLET>",
"requestId": "<REQUEST_ACCOUNT>",
"signers": ["<REQUEST_ACCOUNT>"],
"txBase64": "<WITHDRAW_REQUEST_TX>",
"txBase64s": ["<AUM_REFRESH_TX>", "<WITHDRAW_REQUEST_TX>"]
}
Builds the transactions that withdraw shares from an Earn vault, either instantly from the vault’s reserves or through the withdrawal queue.
instantredeems shares straight from the vault’s reserves in one step, paying the vault’s fast-withdrawal cut. Payout is in the vault’s underlying unlessmintpicks another token entry, and it only succeeds while that token’s reserve holds enough.queuedopens a withdrawal request for the shares. Once the request is filled, claim it to receive the tokens, or cancel it before then to get the shares back. Passingmintrecords the token you want the request filled in; the vault manager honors it when filling.
instantEnabled and queueEnabled flags on Get Earn Vault before offering a mode.
Sign and send txBase64s in order as one Jito bundle, as described in Sending Earn transactions. A queued request transaction comes partially signed by the new request account; keep that signature when you add the wallet’s.
Body
string
required
Earn vault address.
string
required
Wallet that owns the shares. It pays fees and signs the transactions.
string | integer
required
Shares to withdraw, in LP base units.
string
required
instant or queued.string
Token to receive. Must be one of the vault’s token entries, the tokens the vault holds;
acceptedAssetMints on Get Earn Vault is the subset Loopscale offers in its app and is what integrators should stick to. Defaults to the vault’s accepted asset (acceptedAssetMint). Instant mode pays it out in the same transaction. Queued mode writes it into the request transaction as a memo, and the fill later uses that token; the request then shows it as payoutMint on Get Earn Position.string
default:"exponent"
Vault provider. Only
exponent is supported today.Response
Same shape as Deposit to Earn Vault, plus:string
withdrawRequestInstant or withdrawRequestQueued.string
Queued mode only. Address of the new withdrawal request account. Pass it to Claim or Cancel. It is also returned later as
onChainRequestAddr by Get Earn Position.string[]
Queued mode only. Contains
requestId, which has already signed the transaction.string
Token the withdrawal pays out in. Always set for instant mode; set for queued mode when
mint was passed.curl -X POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_request/tx \
-H "Content-Type: application/json" \
-d '{
"address": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"wallet": "<WALLET>",
"shares": "500000",
"mode": "queued"
}'
{
"providerKind": "exponent",
"action": "withdrawRequestQueued",
"vault": "EsTx9ToYW2k1DsTw6ccpmP3RrXQriod114hcM7U5ZKaR",
"user": "<WALLET>",
"requestId": "<REQUEST_ACCOUNT>",
"signers": ["<REQUEST_ACCOUNT>"],
"txBase64": "<WITHDRAW_REQUEST_TX>",
"txBase64s": ["<AUM_REFRESH_TX>", "<WITHDRAW_REQUEST_TX>"]
}