Reseving the price of the Kingdom token API SOLSCAN: Fast
Recently, Solana is appearances as a leadding for decentalized applications (DAPPS), and heritative cryptocurrency, Raydium token (Ray) Raydium token (Ray) Raydium token (Raya), Raydium token (Raya) is true. As a popular trading couple in Blockchain Solan, Ray is caringfully observed by both drivers and inventors. In this art, we will examin the process of obsessed the curent price of the Kingdom to sing API SOLSCAN (PRO (PRO).
What is the API SCAN?
Selscan API (PRO) is the a powerful tool tool tool tool ballows to interact with Solana’s Solana. It provides access to variant API interfaces, including Selscan, which offers with numbons of fations and tools for building customs applications.
First steps: configuration of API Selscan
To use the API SCAN interface, you need to register in the Solscan platform and get the API key. She’s a step by step here:
- Go to [Solscan website] (
- Create an account of account” and follow” instructions.
- Fill in the registration form E -Mal, password and other detils.
- Check your account by clicking the E -Mal.
Reseving the API Selscan key
After registering your account, you will be redeemed an API key. To use this in the API Selscace, follow there:
- Log to your Solescan account and to the “PI yys” section.
- Click “generate an new API key”.
- Fill the form with the APi die and other detils (e.g.me, e-mail).
- Download your API key by JSON file.
First steps API Selscan
Nowt tet the API key, you can start using it to get the price of the Kingdom to sltt. He was an exam fragment of the code in rust:
’s Rust
Use Solana_SDK :: Conc_info :: Conc_info, Program with Program with;
Use Solana_DK :: Key_Pair :: Keypair;
Use Solana_SDK :: Work:: Transection :: Writes;
// Defining the API key and account information for the Kingdom token
between almighty_eye: & p.
contemplate rays rails: & concreation = & concounted {
Pub key : Keyyir : : New ([1, 0]), // Replace with public address
Pub Program_d : Programs :: from_str ("ragram). breakdown (),
^
// Defining the trajectory to get the pricing of the Kingdom token
Ansyc n ge_raydiumdium_pree () -> result <() box
Let the MUT transaction = transaction = transaction :: b.);
transaction
transaction.adered_Account_info (hoye_Accountfort_info);
transaction.sign (a yography);
// Start the transaction
Read (tx_hash, _, _, _) = Solana_skk :: Work :: Work ( transaction) .await?;
Read the transaction_result = txshage.as_ref (). break ()
Adjust the transaction_result {
Ok (_) => ok (),
Err (e) => err (box (box (TSTD :: error :: it is error :: flose (e)),
}
}
// Main in function
ASync FN Main () - the respiration <(), box
Should the results = ge_raydiumdium_pree (). Wait?
If! Result.is_ok () {
Experience! ("Error: {}", results);
reputation;
}
// Prit the price of the Kingdom token
Prince! (“Raydium token price: {}", results.Nwrap ());
OK (()
}
`
startating the code
Save this code in a file (e.g. “Get_Rydume_Prire.SRS’) and rin st use your yor or communal line. Replace substitute IDE line or communal. Good substitute of substitute symbols (yurwy_key’,’ your collection of publicity, public address and othertalscare .
**
- Toet the currency price of the Kingdom token, you can use the transaction to evaluate the “Get_Pree” funding in Solan.
- You can use the “Get_COCCOUTINFO” funding to download information specified accounts, includes their balances and addresses.