Skip to main content
Bumped by Community user
Bumped by Community user

Maybe my approach is wrong. I'm new to solanaSolana dev. I'm using the solanaSolana mainnet API and I'm trying to get the liquidity pool amounts for a given token pair on raydium. I'm using '''res=solana_client.get_account_info(Pubkey.from_string(pair_address),encoding='base64') data = res.value.data''' andMy code:

res=solana_client.get_account_info(Pubkey.from_string(pair_address),encoding='base64')
data = res.value.data

and the data I get are bytes in base64. Now I found on the raydium documentation the struct that should allow me to decode the data bytes and get various elements of which some are the liquidity amounts.

This doesn't work. I'm using pythonPython and it seems that in javaJava it is easier.

I honestly don't know what to do anymore. Anyone knows how to decode the data as a response to GetAccountInfo of a given raydium pair? I just need to get historical price data for a given pair on raydium without using any external third service api.

Sorry if it's not clear enough. Thank you in advance.

Maybe my approach is wrong. I'm new to solana dev. I'm using the solana mainnet API and I'm trying to get the liquidity pool amounts for a given token pair on raydium. I'm using '''res=solana_client.get_account_info(Pubkey.from_string(pair_address),encoding='base64') data = res.value.data''' and the data I get are bytes in base64. Now I found on the raydium documentation the struct that should allow me to decode the data bytes and get various elements of which some are the liquidity amounts.

This doesn't work. I'm using python and it seems that in java it is easier.

I honestly don't know what to do anymore. Anyone knows how to decode the data as a response to GetAccountInfo of a given raydium pair? I just need to get historical price data for a given pair on raydium without using any external third service api.

Sorry if it's not clear enough. Thank you in advance.

Maybe my approach is wrong. I'm new to Solana dev. I'm using the Solana mainnet API and I'm trying to get the liquidity pool amounts for a given token pair on raydium. My code:

res=solana_client.get_account_info(Pubkey.from_string(pair_address),encoding='base64')
data = res.value.data

and the data I get are bytes in base64. Now I found on the raydium documentation the struct that should allow me to decode the data bytes and get various elements of which some are the liquidity amounts.

This doesn't work. I'm using Python and it seems that in Java it is easier.

I honestly don't know what to do anymore. Anyone knows how to decode the data as a response to GetAccountInfo of a given raydium pair? I just need to get historical price data for a given pair on raydium without using any external third service api.

Sorry if it's not clear enough. Thank you in advance.

Source Link

Decode data from GetAccountInfo in python for a Raydium pair

Maybe my approach is wrong. I'm new to solana dev. I'm using the solana mainnet API and I'm trying to get the liquidity pool amounts for a given token pair on raydium. I'm using '''res=solana_client.get_account_info(Pubkey.from_string(pair_address),encoding='base64') data = res.value.data''' and the data I get are bytes in base64. Now I found on the raydium documentation the struct that should allow me to decode the data bytes and get various elements of which some are the liquidity amounts.

This doesn't work. I'm using python and it seems that in java it is easier.

I honestly don't know what to do anymore. Anyone knows how to decode the data as a response to GetAccountInfo of a given raydium pair? I just need to get historical price data for a given pair on raydium without using any external third service api.

Sorry if it's not clear enough. Thank you in advance.