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.
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
Instant mode only. Token to receive, which must be one of the vault’s token entries. Defaults to the vault’s underlying (
acceptedAssetMint). Queued requests can’t choose: they pay out in whatever tokens the vault fills them with, so passing mint with queued is an error.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.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>"]
}