curl --request POST \
--url https://api.kamino.finance/ktx/kvault/deposit-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/deposit-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/deposit-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 deposit into a kvault
Instructions to deposit tokens into a specified Kamino Earn Vault. Additionally includes lookup tables to use to compress transaction size. An optional memo is added as an SPL memo instruction.
curl --request POST \
--url https://api.kamino.finance/ktx/kvault/deposit-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/deposit-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/deposit-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"
Amount to deposit (in decimal format, not lamports)
"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 deposit transaction.
1 - 64Optional. If omitted, the value is false. Set it to true to skip staking the received vault shares in the vault farm, so the depositor keeps the shares in their wallet.
true
Response
Default Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
{
"9p2oT9J6BojHigd3V5qXzrwsQf4dtgMgLxtrzLVR3rwu": [
"sadmBTQm5HJsyzWHEjV4YwG9CiahZKVDVqAyS4Wx1zH",
"HDsayqAsDWy3QvANGqh2yNraqcD8Fnjgh73Mhb3WRS5E",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}