Specifications
sanctumpy.sanctum.SanctumClient
Setup
__init__(private_key=None, network='devnet')
The constructor sets up the client. It allows you to set your Sanctum Trade API key, your wallet private key to perform operations and the Solana network where transactions are set.
| Parameters: |
|
|---|
Data
get_infinity_infos()
Retrieve the main information about the INF token.
| Returns: |
|
|---|
get_lst_apy(lst, epochs=None, latest=True)
Retrieve APY inception data for specified tokens.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_lst_sol_value(lst)
Retrieve the SOL value of the specified LST.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_lst_tvl(lst)
Retrieve the TVL of the specified LST.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_lst_infos(lst)
Retrieve the information of the specified LST.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_metadata(lst_mint)
Retrieve the metadata of the specified LST.
| Parameters: |
|
|---|
get_price(lst_mint)
Retrieve the price of the specified LST.
| Parameters: |
|
|---|
get_quote(from_token, to_token, amount, mode='ExactIn', swap_src=None)
Retrieve the quote for the specified token.
| Parameters: |
|
|---|
add_liquidity(amount, lst_mint=SOL_ADDRESS, run=False)
Add liquidity to the specified LST.
| Parameters: |
|
|---|
remove_liquidity(amount, lst_mint=SOL_ADDRESS, run=False)
Remove liquidity from the specified LST.
| Parameters: |
|
|---|
swap_tokens(from_token, to_token, amount, mode='ExactIn', swap_src='Jup')
Swap tokens from the specified token to the specified token.
| Parameters: |
|
|---|
Trading
add_liquidity(amount, lst_mint=SOL_ADDRESS, run=False)
Add liquidity to the specified LST.
| Parameters: |
|
|---|
remove_liquidity(amount, lst_mint=SOL_ADDRESS, run=False)
Remove liquidity from the specified LST.
| Parameters: |
|
|---|
swap_tokens(from_token, to_token, amount, mode='ExactIn', swap_src='Jup')
Swap tokens from the specified token to the specified token.
| Parameters: |
|
|---|