curl --request POST \
--url https://api.kamino.finance/ktx/kvault/withdraw-instructions \
--header 'Content-Type: application/json' \
--data '
{
"wallet": "KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9",
"kvault": "HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"amount": "0.1234"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet: 'KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9',
kvault: 'HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E',
amount: '0.1234'
})
};
fetch('https://api.kamino.finance/ktx/kvault/withdraw-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/ktx/kvault/withdraw-instructions"
payload = {
"wallet": "KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9",
"kvault": "HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"amount": "0.1234"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)false{
"instructions": [
{
"accounts": [
{
"address": "9y7uLMUMW6EiRwH1aJFSp9Zka7dVx2JdZKA3858u6YHT",
"role": "WRITABLE_SIGNER",
"signer": {
"address": "9y7uLMUMW6EiRwH1aJFSp9Zka7dVx2JdZKA3858u6YHT"
}
}
],
"data": "8iPGiVLh8rYA4fUFAAAAAA==",
"programAddress": "KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd"
}
],
"lutsByAddress": {
"9p2oT9J6BojHigd3V5qXzrwsQf4dtgMgLxtrzLVR3rwu": [
"sadmBTQm5HJsyzWHEjV4YwG9CiahZKVDVqAyS4Wx1zH",
"HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
}{
"statusCode": 400,
"message": "<string>",
"error": "Bad Request",
"code": "DECIMAL_TO_LAMPORTS_OVERFLOW"
}Get instructions to withdraw from a kvault
Instructions to withdraw tokens from a specified Kamino Earn Vault. Includes lookup tables for transaction compression. An optional memo is added as an SPL memo instruction.
curl --request POST \
--url https://api.kamino.finance/ktx/kvault/withdraw-instructions \
--header 'Content-Type: application/json' \
--data '
{
"wallet": "KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9",
"kvault": "HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"amount": "0.1234"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet: 'KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9',
kvault: 'HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E',
amount: '0.1234'
})
};
fetch('https://api.kamino.finance/ktx/kvault/withdraw-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kamino.finance/ktx/kvault/withdraw-instructions"
payload = {
"wallet": "KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9",
"kvault": "HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"amount": "0.1234"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)false{
"instructions": [
{
"accounts": [
{
"address": "9y7uLMUMW6EiRwH1aJFSp9Zka7dVx2JdZKA3858u6YHT",
"role": "WRITABLE_SIGNER",
"signer": {
"address": "9y7uLMUMW6EiRwH1aJFSp9Zka7dVx2JdZKA3858u6YHT"
}
}
],
"data": "8iPGiVLh8rYA4fUFAAAAAA==",
"programAddress": "KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd"
}
],
"lutsByAddress": {
"9p2oT9J6BojHigd3V5qXzrwsQf4dtgMgLxtrzLVR3rwu": [
"sadmBTQm5HJsyzWHEjV4YwG9CiahZKVDVqAyS4Wx1zH",
"HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
}{
"statusCode": 400,
"message": "<string>",
"error": "Bad Request",
"code": "DECIMAL_TO_LAMPORTS_OVERFLOW"
}Body
User wallet address (base58) that will also sign the transaction
32 - 44"KUMtRazMP7vwvc2kthnGZ9Cq6ZsGRiYC97snMYepNx9"
Target Kamino vault address
32 - 44"HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E"
Vault share amount in token units, not lamports. To withdraw all shares, use the decimal string "18446744073709551615".
"0.1234"
Optional. If omitted, the value is false. Set it to true to target a vault owned by the staging kvault program instead of the mainnet program.
true
The memo is optional. If provided, it must be non-empty and at most 64 UTF-8 bytes. The API includes it in the vault withdrawal transaction.
1 - 64Optional. If omitted, the value is false. Set it to true to request user-state closure on a full withdrawal. Closure is not guaranteed.
true
Response
Default Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
{
"9p2oT9J6BojHigd3V5qXzrwsQf4dtgMgLxtrzLVR3rwu": [
"sadmBTQm5HJsyzWHEjV4YwG9CiahZKVDVqAyS4Wx1zH",
"HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}