An easy way to interact with liquidity Pools, Farms, and Vaults or query on-chain information is by using Solana Farms HTTP RPC service. Under the hood, it wraps Rust Client and serves its methods over HTTP.
HTTP RPC service is a part of Farms suite, and to use it, existing deployment of Farm programs and metadata must be present per Quick Start Guide.
To communicate with the service, use any tool or language that supports HTTP requests, for example:
curl 'http://127.0.0.1:9090/api/v1/token_account_balance?wallet_address=9wsC5hx5JopG5VwoDiUGrvgM2NaYz6tS3uyhuneRKgcN&token_name=RAY'
You can also use SwaggerHub to call any method interactively. Swagger schema is available in farms/farm-rpc/swagger.yaml
.
The default endpoint port is 9000
and route prefix /api/v1/
, e.g. http://localhost:9000/api/v1
. A static page with descriptions and links to all methods will be displayed if the endpoint is opened in a browser without a particular method.
While HTTP RPC service supports POST requests to interact with liquidity Pools, Farms, and Vaults, it is recommended for internal use or testing only because you will have to include a keypair with your request. Instead, you can sign a transaction locally with a wallet app and send it as usual via @solana/web3.js. To do so, you need to call an instruction building method (anything that starts with new_instruction_
or all_instructions_
) to receive a plain instruction in JSON, convert it, sign and send. Here is how it can be done in Javascript and Phantom:
const json_data = await (
await fetch(
"http://127.0.0.1:9090/api/v1/new_instruction_add_liquidity_vault?wallet_address=9wsC5hx5JopG5VwoDiUGrvgM2NaYz6tS3uyhuneRKgcN&vault_name=RDM.STC.RAY-SRM&max_token_a_ui_amount=0.1&max_token_b_ui_amount=0.0"
)
).json();
json_data.accounts.forEach(function (item, index) {
let acc = {
isSigner: item.is_signer ? true : false,
isWritable: item.is_writable ? true : false,
pubkey: new PublicKey(item.pubkey),
};
accounts.push(acc);
});
const instruction = new TransactionInstruction({
programId: new PublicKey(json_data.program_id),
data: json_data.data,
keys: accounts,
});
let transaction = new Transaction({
recentBlockhash: (await this.connection.getRecentBlockhash()).blockhash,
feePayer: this.state.provider.publicKey,
});
transaction.add(instruction);
let signed = await this.state.provider.signTransaction(transaction);
let signature = await this.connection.sendRawTransaction(signed.serialize());
No additional JS bindings or other dependencies are required for the above to work besides standard @solana/web3.js.
protocols
admins
program_admins
git_token
git_tokens
fund
funds
fund_ref
fund_refs
fund_by_ref
fund_name
find_funds
vault
vaults
vault_ref
vault_refs
vault_by_ref
vault_name
find_vaults
find_vaults_with_vt
pool
pools
pool_ref
pool_refs
pool_by_ref
pool_name
find_pools
find_pools_with_lp
pool_price
oracle
oracle_price
farm
farms
farm_ref
farm_refs
farm_by_ref
farm_name
find_farms_with_lp
token
tokens
token_ref
token_refs
token_by_ref
token_name
token_with_mint
token_with_account
program_id
program_ids
program_name
is_official_id
is_fund_manager
managed_funds
token_supply
associated_token_address
wallet_tokens
token_account_data
account_balance
token_account_balance
token_account_balance_with_address
has_active_token_account
fund_admins
fund_user_info
all_fund_user_infos
fund_user_requests
all_fund_user_requests
fund_info
all_fund_infos
fund_assets
fund_custody
fund_custody_with_balance
fund_custodies
fund_custodies_with_balance
fund_vault
fund_vaults
fund_stats
user_stake_balance
vault_stake_balance
vault_admins
vault_user_info
vault_info
all_vault_infos
vault_token_decimals
pool_tokens_decimals
new_instruction_create_system_account
new_instruction_create_system_account_with_seed
new_instruction_close_system_account
new_instruction_transfer
new_instruction_token_transfer
new_instruction_sync_token_balance
new_instruction_create_token_account
new_instruction_close_token_account
new_instruction_user_init_vault
new_instruction_add_liquidity_vault
new_instruction_lock_liquidity_vault
new_instruction_unlock_liquidity_vault
new_instruction_remove_liquidity_vault
new_instruction_add_liquidity_pool
new_instruction_remove_liquidity_pool
new_instruction_wrap_token
new_instruction_unwrap_token
new_instruction_swap
new_instruction_user_init
new_instruction_stake
new_instruction_unstake
new_instruction_harvest
new_instruction_crank_vault
new_instruction_user_init_fund
new_instruction_request_deposit_fund
new_instruction_cancel_deposit_fund
new_instruction_request_withdrawal_fund
new_instruction_cancel_withdrawal_fund
new_instruction_start_liquidation_fund
new_instruction_disable_deposits_fund
new_instruction_approve_deposit_fund
new_instruction_deny_deposit_fund
new_instruction_disable_withdrawals_fund
new_instruction_approve_withdrawal_fund
new_instruction_deny_withdrawal_fund
new_instruction_lock_assets_fund
new_instruction_unlock_assets_fund
new_instruction_update_fund_assets_with_custody
new_instruction_update_fund_assets_with_vault
new_instruction_fund_add_liquidity_pool
new_instruction_fund_remove_liquidity_pool
new_instruction_fund_user_init_farm
new_instruction_fund_stake
new_instruction_fund_unstake
new_instruction_fund_harvest
new_instruction_fund_user_init_vault
new_instruction_fund_add_liquidity_vault
new_instruction_fund_lock_liquidity_vault
new_instruction_fund_unlock_liquidity_vault
new_instruction_fund_remove_liquidity_vault
all_instructions_token_transfer
all_instructions_wrap_sol
all_instructions_unwrap_sol
all_instructions_add_liquidity_vault
all_instructions_add_locked_liquidity_vault
all_instructions_remove_liquidity_vault
all_instructions_remove_unlocked_liquidity_vault
all_instructions_add_liquidity_pool
all_instructions_remove_liquidity_pool
all_instructions_swap
all_instructions_stake
all_instructions_unstake
all_instructions_harvest
all_instructions_request_deposit_fund
all_instructions_request_withdrawal_fund
all_instructions_fund_add_liquidity_pool
all_instructions_fund_remove_liquidity_pool
all_instructions_fund_stake
all_instructions_fund_unstake
all_instructions_fund_harvest
all_instructions_fund_add_liquidity_vault
all_instructions_fund_add_locked_liquidity_vault
all_instructions_fund_remove_liquidity_vault
all_instructions_fund_remove_unlocked_liquidity_vault
create_system_account
create_system_account_with_seed
assign_system_account
close_system_account
transfer
token_transfer
wrap_sol
unwrap_sol
sync_token_balance
create_token_account
close_token_account
user_init_vault
add_liquidity_vault
add_locked_liquidity_vault
remove_liquidity_vault
remove_unlocked_liquidity_vault
add_liquidity_pool
remove_liquidity_pool
swap
user_init
stake
unstake
harvest
crank_vault
crank_vaults
reset_cache
user_init_fund
request_deposit_fund
cancel_deposit_fund
request_withdrawal_fund
cancel_withdrawal_fund
start_liquidation_fund
disable_deposits_fund
approve_deposit_fund
deny_deposit_fund
disable_withdrawals_fund
approve_withdrawal_fund
deny_withdrawal_fund
lock_assets_fund
unlock_assets_fund
update_fund_assets_with_custody
update_fund_assets_with_custodies
update_fund_assets_with_vault
update_fund_assets_with_vaults
fund_add_liquidity_pool
fund_remove_liquidity_pool
fund_user_init_farm
fund_stake
fund_unstake
fund_harvest
fund_user_init_vault
fund_add_liquidity_vault
fund_add_locked_liquidity_vault
fund_remove_liquidity_vault
fund_remove_unlocked_liquidity_vault
Returns description and stats of all supported protocols
No parameters
The result will be an array of ProtocolInfo objects in Json or 404 status code with error description.
Returns current admin signers for the Main Router
No parameters
The result will be a Multisig object in Json or 404 status code with error description.
Returns program upgrade signers
program_id
: Pubkey
The result will be a Multisig object in Json or 404 status code with error description.
Returns Token metadata from Github
name
: String
The result will be a GitToken object in Json or 404 status code with error description.
Returns all Tokens from Github
No parameters
The result will be a GitTokens object in Json or 404 status code with error description.
Returns the Fund struct for the given name
name
: String
The result will be a Fund object in Json or 404 status code with error description.
Returns all Funds available
No parameters
The result will be a FundMap object in Json or 404 status code with error description.
Returns the Fund metadata address for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns Fund refs: a map of Fund name to account address with metadata
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the Fund metadata at the specified address
fund_ref
: Pubkey
The result will be a Fund object in Json or 404 status code with error description.
Returns the Fund name for the given metadata address
fund_ref
: Pubkey
The result will be a String object or 404 status code with error description.
Returns all Funds that have Vaults with the name matching the pattern sorted by version
vault_name_pattern
: String
The result will be an array of Fund objects in Json or 404 status code with error description.
Returns the Vault struct for the given name
name
: String
The result will be a Vault object in Json or 404 status code with error description.
Returns all Vaults available
No parameters
The result will be a VaultMap object in Json or 404 status code with error description.
Returns the Vault metadata address for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns Vault refs: a map of Vault name to account address with metadata
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the Vault metadata at the specified address
vault_ref
: Pubkey
The result will be a Vault object in Json or 404 status code with error description.
Returns the Vault name for the given metadata address
vault_ref
: Pubkey
The result will be a String object or 404 status code with error description.
Returns all Vaults with tokens A and B sorted by version
token_a
: String
token_b
: String
The result will be an array of Vault objects in Json or 404 status code with error description.
Returns all Vaults with tokens A and B sorted by version
vt_token_name
: String
The result will be an array of Vault objects in Json or 404 status code with error description.
Returns the Pool struct for the given name
name
: String
The result will be a Pool object in Json or 404 status code with error description.
Returns all Pools available
No parameters
The result will be a PoolMap object in Json or 404 status code with error description.
Returns the Pool metadata address for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns Pool refs: a map of Pool name to account address with metadata
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the Pool metadata at the specified address
pool_ref
: Pubkey
The result will be a Pool object in Json or 404 status code with error description.
Returns the Pool name for the given metadata address
pool_ref
: Pubkey
The result will be a String object or 404 status code with error description.
Returns all Pools with tokens A and B sorted by version for the given protocol
protocol
: String
token_a
: String
token_b
: String
The result will be an array of Pool objects in Json or 404 status code with error description.
Returns all Pools sorted by version for the given LP token
lp_token
: String
The result will be an array of Pool objects in Json or 404 status code with error description.
Returns pair's price based on the ratio of tokens in the pool
name
: String
The result will be a String object or 404 status code with error description.
Returns oracle address for the given token
symbol
: String
The result will be a Pubkey object in Json or 404 status code with error description.
Returns the price in USD for the given token
symbol
: String
max_price_age_sec
: u64
max_price_error
: f64
The result will be a String object or 404 status code with error description.
Returns the Farm struct for the given name
name
: String
The result will be a Farm object in Json or 404 status code with error description.
Returns all Farms available
No parameters
The result will be a FarmMap object in Json or 404 status code with error description.
Returns the Farm metadata address for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns Farm refs: a map of Farm name to account address with metadata
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the Farm metadata at the specified address
farm_ref
: Pubkey
The result will be a Farm object in Json or 404 status code with error description.
Returns the Farm name for the given metadata address
farm_ref
: Pubkey
The result will be a String object or 404 status code with error description.
Returns all Farms for the given LP token
lp_token
: String
The result will be an array of Farm objects in Json or 404 status code with error description.
Returns the Token struct for the given name
name
: String
The result will be a Token object in Json or 404 status code with error description.
Returns all Tokens available
No parameters
The result will be a TokenMap object in Json or 404 status code with error description.
Returns the Token metadata address for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns Token refs: a map of Token name to account address with metadata
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the Token metadata at the specified address
token_ref
: Pubkey
The result will be a Token object in Json or 404 status code with error description.
Returns the Token name for the given metadata address
token_ref
: Pubkey
The result will be a String object or 404 status code with error description.
Returns the Token metadata for the specified mint
token_mint
: Pubkey
The result will be a Token object in Json or 404 status code with error description.
Returns the Token metadata for the specified token account
token_account
: Pubkey
The result will be a Token object in Json or 404 status code with error description.
Returns the official Program ID for the given name
name
: String
The result will be a String object or 404 status code with error description.
Returns all official Program IDs available
No parameters
The result will be a PubkeyMap object in Json or 404 status code with error description.
Returns the official program name for the given Program ID
prog_id
: Pubkey
The result will be a String object or 404 status code with error description.
Checks if the given address is the official Program ID
prog_id
: Pubkey
The result will be a bool object in Json or 404 status code with error description.
Checks if the given address is the Fund manager
wallet_address
: Pubkey
The result will be a bool object in Json or 404 status code with error description.
Returns all Funds managed by the given address
wallet_address
: Pubkey
The result will be an array of Fund objects in Json or 404 status code with error description.
Returns token supply as UI amount
token_name
: String
The result will be a String object or 404 status code with error description.
Returns the associated token account address for the given token name
wallet_address
: Pubkey
token_name
: String
The result will be a String object or 404 status code with error description.
Returns all tokens with active account in the wallet
wallet_address
: Pubkey
The result will be an array of String objects in Json or 404 status code with error description.
Returns UiTokenAccount struct data for the associated token account address
wallet_address
: Pubkey
token_name
: String
The result will be a UiTokenAccount object in Json or 404 status code with error description.
Returns native SOL balance
wallet_address
: Pubkey
The result will be a String object or 404 status code with error description.
Returns token balance for the associated token account address
wallet_address
: Pubkey
token_name
: String
The result will be a String object or 404 status code with error description.
Returns token balance for the specified token account address
token_account
: Pubkey
The result will be a String object or 404 status code with error description.
Returns true if the associated token account exists and is initialized
wallet_address
: Pubkey
token_name
: String
The result will be a bool object in Json or 404 status code with error description.
Returns current admin signers for the Fund
name
: String
The result will be a Multisig object in Json or 404 status code with error description.
Returns user stats for specific Fund
wallet_address
: Pubkey
fund_name
: String
The result will be a FundUserInfo object in Json or 404 status code with error description.
Returns user stats for all Funds
wallet_address
: Pubkey
The result will be an array of FundUserInfo objects in Json or 404 status code with error description.
Returns user requests for specific Fund and token
wallet_address
: Pubkey
fund_name
: String
token_name
: String
The result will be a FundUserRequests object in Json or 404 status code with error description.
Returns user requests for all tokens accepted by the Fund
fund_name
: String
The result will be an array of FundUserRequests objects in Json or 404 status code with error description.
Returns Fund stats and config
fund_name
: String
The result will be a FundInfo object in Json or 404 status code with error description.
Returns the Fund assets info
fund_name
: String
asset_type
: String
The result will be a FundAssets object in Json or 404 status code with error description.
Returns the Fund custody info
fund_name
: String
token_name
: String
custody_type
: String
The result will be a FundCustody object in Json or 404 status code with error description.
Returns the Fund custody extended info
fund_name
: String
token_name
: String
custody_type
: String
The result will be a FundCustodyWithBalance object in Json or 404 status code with error description.
Returns all custodies belonging to the Fund sorted by custody_id
fund_name
: String
The result will be an array of FundCustody objects in Json or 404 status code with error description.
Returns all custodies belonging to the Fund with extended info
fund_name
: String
The result will be an array of FundCustodyWithBalance objects in Json or 404 status code with error description.
Returns the Fund Vault info
fund_name
: String
vault_name
: String
vault_type
: String
The result will be a FundVault object in Json or 404 status code with error description.
Returns all Vaults belonging to the Fund sorted by vault_id
fund_name
: String
The result will be an array of FundVault objects in Json or 404 status code with error description.
Returns Fund's historical performance
fund_name
: String
timeframe
: String
start_time
: i64
limit
: u32
The result will be an array of FundStatsRecord objects in Json or 404 status code with error description.
Returns User's stacked balance
wallet_address
: Pubkey
farm_name
: String
The result will be a String object or 404 status code with error description.
Returns Vault's stacked balance
vault_name
: String
The result will be a String object or 404 status code with error description.
Returns current admin signers for the Vault
name
: String
The result will be a Multisig object in Json or 404 status code with error description.
Returns user stats for specific Vault
wallet_address
: Pubkey
vault_name
: String
The result will be a VaultUserInfo object in Json or 404 status code with error description.
Returns Vault stats
vault_name
: String
The result will be a VaultInfo object in Json or 404 status code with error description.
Returns number of decimal digits of the Vault token
vault_name
: String
The result will be a String object or 404 status code with error description.
Returns number of decimal digits of the Vault token
pool_name
: String
The result will be an array of u8 objects in Json or 404 status code with error description.
Returns a new Instruction for creating system account
wallet_address
: Pubkey
new_address
: Pubkey
lamports
: u64
space
: u64
owner
: Pubkey
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for creating system account with seed
wallet_address
: Pubkey
base_address
: Pubkey
seed
: String
lamports
: u64
space
: u64
owner
: Pubkey
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for closing system account
wallet_address
: Pubkey
target_address
: Pubkey
The result will be an Instruction object in Json or 404 status code with error description.
Returns the native SOL transfer instruction
wallet_address
: Pubkey
destination_wallet
: Pubkey
sol_ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a tokens transfer instruction
wallet_address
: Pubkey
token_name
: String
destination_wallet
: Pubkey
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for syncing token balance for the specified account
wallet_address
: Pubkey
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for creating associated token account
wallet_address
: Pubkey
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for closing associated token account
wallet_address
: Pubkey
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initializing a new User for the Vault
wallet_address
: Pubkey
vault_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for adding liquidity to the Vault
wallet_address
: Pubkey
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for locking liquidity in the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for unlocking liquidity from the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for removing liquidity from the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for adding liquidity to the Pool
wallet_address
: Pubkey
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for removing liquidity from the Pool
wallet_address
: Pubkey
pool_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for wrapping the token into protocol specific token
wallet_address
: Pubkey
pool_name
: String
token_to_wrap
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for unwrapping the token from protocol specific token
wallet_address
: Pubkey
pool_name
: String
token_to_unwrap
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for tokens swap
wallet_address
: Pubkey
protocol
: String
from_token
: String
to_token
: String
ui_amount_in
: f64
min_ui_amount_out
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initializing a new User in the Farm
wallet_address
: Pubkey
farm_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for tokens staking
wallet_address
: Pubkey
farm_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for tokens unstaking
wallet_address
: Pubkey
farm_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for rewards harvesting
wallet_address
: Pubkey
farm_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Vault Crank Instruction
wallet_address
: Pubkey
vault_name
: String
step
: u64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initializing a new User for the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for requesting deposit to the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for canceling pending deposit to the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for requesting withdrawal from the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for canceling pending withdrawal from the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initiating liquidation of the Fund
wallet_address
: Pubkey
fund_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for disabling deposits to the Fund
wallet_address
: Pubkey
fund_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for approving deposit to the Fund
wallet_address
: Pubkey
user_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for denying deposit to the Fund
wallet_address
: Pubkey
user_address
: Pubkey
fund_name
: String
token_name
: String
deny_reason
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for disabling withdrawals from the Fund
wallet_address
: Pubkey
fund_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for approving withdrawal from the Fund
wallet_address
: Pubkey
user_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for denying withdrawal from the Fund
wallet_address
: Pubkey
user_address
: Pubkey
fund_name
: String
token_name
: String
deny_reason
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for moving deposited assets to the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for releasing assets from the Fund to Deposit/Withdraw custody
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for updating Fund assets based on custody holdings
wallet_address
: Pubkey
fund_name
: String
custody_id
: u32
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for updating Fund assets with Vault holdings
wallet_address
: Pubkey
fund_name
: String
vault_id
: u32
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for adding liquidity to the Pool in the Fund
wallet_address
: Pubkey
fund_name
: String
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for removing liquidity from the Pool in the Fund
wallet_address
: Pubkey
fund_name
: String
pool_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initializing a new User for the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for tokens staking to the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for tokens unstaking from the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for rewards harvesting from the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for initializing a new User for the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for adding liquidity to the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for locking liquidity in the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for unlocking liquidity from the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new Instruction for removing liquidity from the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an Instruction object in Json or 404 status code with error description.
Returns a new complete set of instructions for tokens transfer
wallet_address
: Pubkey
token_name
: String
destination_wallet
: Pubkey
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for SOL wrapping
wallet_address
: Pubkey
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for SOL unwrapping
wallet_address
: Pubkey
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for adding liquidity to the Vault
wallet_address
: Pubkey
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for adding locked liquidity to the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing liquidity from the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing unlocked liquidity from the Vault
wallet_address
: Pubkey
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for adding liquidity to the Pool
wallet_address
: Pubkey
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing liquidity from the Pool
wallet_address
: Pubkey
pool_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for swapping tokens
wallet_address
: Pubkey
protocol
: String
from_token
: String
to_token
: String
ui_amount_in
: f64
min_ui_amount_out
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for staking tokens to the Farm
wallet_address
: Pubkey
farm_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for unstaking tokens from the Farm
wallet_address
: Pubkey
farm_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for harvesting rewards from the Farm
wallet_address
: Pubkey
farm_name
: String
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for requesting a new deposit to the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for requesting a new withdrawal from the Fund
wallet_address
: Pubkey
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for adding liquidity to the Pool in the Fund
wallet_address
: Pubkey
fund_name
: String
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing liquidity from the Pool in the Fund
wallet_address
: Pubkey
fund_name
: String
pool_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for staking tokens to the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for unstaking tokens from the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for harvesting rewards from the Farm in the Fund
wallet_address
: Pubkey
fund_name
: String
farm_name
: String
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for adding liquidity to the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of instructions for adding locked liquidity to the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing liquidity from the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Returns a new complete set of Instructions for removing unlocked liquidity from the Vault in the Fund
wallet_address
: Pubkey
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be an array of Instruction objects in Json or 404 status code with error description.
Creates a new system account
wallet_keypair
: Keypair
new_account_keypair
: Keypair
lamports
: u64
space
: u64
owner
: Pubkey
The result will be a Signature object or 404 status code with error description.
Creates a new system account with seed
wallet_keypair
: Keypair
base_address
: Pubkey
seed
: String
lamports
: u64
space
: u64
owner
: Pubkey
The result will be a Signature object or 404 status code with error description.
Assigns system account to a program
wallet_keypair
: Keypair
program_address
: Pubkey
The result will be a Signature object or 404 status code with error description.
Closes existing system account
wallet_keypair
: Keypair
target_account_keypair
: Keypair
The result will be a Signature object or 404 status code with error description.
Transfers native SOL from the wallet to the destination
wallet_keypair
: Keypair
destination_wallet
: Pubkey
sol_ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Transfers tokens from the wallet to the destination
wallet_keypair
: Keypair
token_name
: String
destination_wallet
: Pubkey
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Transfers native SOL from the wallet to the associated Wrapped SOL account
wallet_keypair
: Keypair
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Transfers Wrapped SOL back to SOL by closing the associated Wrapped SOL account
wallet_keypair
: Keypair
The result will be a Signature object or 404 status code with error description.
Updates token balance of the account, usefull after transfer SOL to WSOL account
wallet_keypair
: Keypair
token_name
: String
The result will be a Signature object or 404 status code with error description.
Returns the associated token account for the given user's main account or creates one
wallet_keypair
: Keypair
token_name
: String
The result will be a Signature object or 404 status code with error description.
Closes existing token account associated with the given user's main account
wallet_keypair
: Keypair
token_name
: String
The result will be a Signature object or 404 status code with error description.
Initializes a new User for the Vault
wallet_keypair
: Keypair
vault_name
: String
The result will be a Signature object or 404 status code with error description.
Adds liquidity to the Vault
wallet_keypair
: Keypair
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Adds locked liquidity to the Vault
wallet_keypair
: Keypair
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes liquidity from the Vault
wallet_keypair
: Keypair
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes unlocked liquidity from the Vault
wallet_keypair
: Keypair
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Adds liquidity to the Pool
wallet_keypair
: Keypair
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes liquidity from the Pool
wallet_keypair
: Keypair
pool_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Swaps tokens
wallet_keypair
: Keypair
protocol
: String
from_token
: String
to_token
: String
ui_amount_in
: f64
min_ui_amount_out
: f64
The result will be a Signature object or 404 status code with error description.
Initializes a new User for the Farm
wallet_keypair
: Keypair
farm_name
: String
The result will be a Signature object or 404 status code with error description.
Stakes tokens to the Farm
wallet_keypair
: Keypair
farm_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Unstakes tokens from the Farm
wallet_keypair
: Keypair
farm_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Harvests rewards from the Farm
wallet_keypair
: Keypair
farm_name
: String
The result will be a Signature object or 404 status code with error description.
Cranks single Vault
wallet_keypair
: Keypair
vault_name
: String
step
: u64
The result will be a Signature object or 404 status code with error description.
Cranks all Vaults
wallet_keypair
: Keypair
step
: u64
The result will be a String object or 404 status code with error description.
Clears cache records to force re-pull from blockchain
No parameters
The result will be a String object or 404 status code with error description.
Initializes a new User for the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
The result will be a Signature object or 404 status code with error description.
Requests a new deposit to the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Cancels pending deposit to the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
The result will be a Signature object or 404 status code with error description.
Requests a new withdrawal from the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Cancels pending deposit to the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
The result will be a Signature object or 404 status code with error description.
Starts the Fund liquidation
wallet_keypair
: Keypair
fund_name
: String
The result will be a Signature object or 404 status code with error description.
Disables deposits to the Fund
wallet_keypair
: Keypair
fund_name
: String
The result will be a Signature object or 404 status code with error description.
Approves pending deposit to the Fund
wallet_keypair
: Keypair
fund_name
: String
user_address
: Pubkey
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Denies pending deposit to the Fund
wallet_keypair
: Keypair
fund_name
: String
user_address
: Pubkey
token_name
: String
deny_reason
: String
The result will be a Signature object or 404 status code with error description.
Disables withdrawals from the Fund
wallet_keypair
: Keypair
fund_name
: String
The result will be a Signature object or 404 status code with error description.
Approves pending withdrawal from the Fund
wallet_keypair
: Keypair
fund_name
: String
user_address
: Pubkey
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Denies pending withdrawal from the Fund
wallet_keypair
: Keypair
fund_name
: String
user_address
: Pubkey
token_name
: String
deny_reason
: String
The result will be a Signature object or 404 status code with error description.
Moves deposited assets from Deposit/Withdraw custody to the Fund
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Releases assets from the Fund to Deposit/Withdraw custody
wallet_keypair
: Keypair
fund_name
: String
token_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Update Fund assets info based on custody holdings
wallet_keypair
: Keypair
fund_name
: String
custody_id
: u32
The result will be a Signature object or 404 status code with error description.
Update Fund assets info based on all custodies
wallet_keypair
: Keypair
fund_name
: String
The result will be a String object or 404 status code with error description.
Update Fund assets info based on Vault holdings
wallet_keypair
: Keypair
fund_name
: String
vault_id
: u32
The result will be a Signature object or 404 status code with error description.
Update Fund assets info based on Vault holdings
wallet_keypair
: Keypair
fund_name
: String
The result will be a String object or 404 status code with error description.
Adds liquidity to the Pool in the Fund
wallet_keypair
: Keypair
fund_name
: String
pool_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes liquidity from the Pool in the Fund
wallet_keypair
: Keypair
fund_name
: String
pool_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Initializes a new User for the Farm in the Fund
wallet_keypair
: Keypair
fund_name
: String
farm_name
: String
The result will be a Signature object or 404 status code with error description.
Stakes tokens to the Farm in the Fund
wallet_keypair
: Keypair
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Unstakes tokens from the Farm in the Fund
wallet_keypair
: Keypair
fund_name
: String
farm_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Harvests rewards from the Farm in the Fund
wallet_keypair
: Keypair
fund_name
: String
farm_name
: String
The result will be a Signature object or 404 status code with error description.
Initializes a new User for the Vault in the Fund
wallet_keypair
: Keypair
fund_name
: String
vault_name
: String
The result will be a Signature object or 404 status code with error description.
Adds liquidity to the Vault in the Fund
wallet_keypair
: Keypair
fund_name
: String
vault_name
: String
max_token_a_ui_amount
: f64
max_token_b_ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Adds locked liquidity to the Vault in the Fund
wallet_keypair
: Keypair
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes liquidity from the Vault in the Fund
wallet_keypair
: Keypair
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.
Removes unlocked liquidity from the Vault in the Fund
wallet_keypair
: Keypair
fund_name
: String
vault_name
: String
ui_amount
: f64
The result will be a Signature object or 404 status code with error description.