Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value' #49

Open
VeryBoredPanda opened this issue Jan 31, 2025 · 5 comments
Assignees

Comments

@VeryBoredPanda
Copy link

VeryBoredPanda commented Jan 31, 2025

Hi,
I was often getting this error while using this bot stock.
I've been working on it few days to set some rules so it only buys some coins and sell based on price instead of fixed time.
Now I get this error i would say 9 times out of 10 when selling.
I'm using Chainstack Growth plan.
Maybe i'm wrong but i don't think it's a code problem because some transaction still goes through.
Could be my plan limit? Or maybe if the coin is getting lot of transaction?
Thank you

edit: looks like it happens when the price of the coin goes up or down very fast.

@akegaviar
Copy link
Member

Hey there @VeryBoredPanda

Now I get this error i would say 9 times out of 10 when selling.

I think you forgot to provide the error.

Could be my plan limit?

It could very well be. Have a look at our docs:Limits. This bot isn't using any Limits from any specific/exception methods, so double check these:

  • your limit plan is 250 RPS, make sure you are
  • if your new parts of code or your version of code isn't using of the other Solana limits specified in the article that have a lower RPS.

edit: looks like it happens when the price of the coin goes up or down very fast.

That looks like a slippage value issue?

@VeryBoredPanda
Copy link
Author

Thanks for replying.
The error I get is the one in the title:
AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value'
I only added a priority fee with compute unit price, 10sec price check before buying, a take profit and stop loss instead of fixed 20secs so no big changes.
Pretty sure is not a slippage value issue, I tried to remove Minimum Sol Output and also happens when selling price is higher.

The error appears in like this
Transaction confirmed
Waiting for 20 seconds before selling...
Selling tokens with 35.0% slippage tolerance.
An error occurred: AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value'

@akegaviar
Copy link
Member

I only added a priority fee with compute unit price

A fixed one? As a hardcoded value?

Try looking into the transactions adjacent to the one where you expect to have done the sell transaction. See here Analyzing adjacent transactions for priority fees.

Could be related to a priority fee not high enough. Also, if you are willing to spend a few cents or a dollar, try with a Warp transaction and a priority. Do note that each Warp transaction (not all requests, just the transaction itself) costs $0.15, so don't let it run wild. But just for an experiment.

@VeryBoredPanda
Copy link
Author

Yeah priority fee is fixed for now, I check recent fees and set a high number just to make sure, something in between 2-6 lamports per cu depending on current situation (I wanted to make sure bot works before adding
getRecentPrioritizationFees Method)
I also already tried a trader node same result, 1-2 competed transaction and the rest just having error when selling. Same as Growt plan
I'll try tomorrow to cancel all print functions with numbers or log saves from buy/sell maybe it's some problem with values printing.

@VeryBoredPanda
Copy link
Author

Hi again,
I found the problem to be the get_token_balance function before selling.
I changed it so it can print the response from RPC:

async def get_token_balance(conn: AsyncClient, associated_token_account: Pubkey):
try:
response = await conn.get_token_account_balance(associated_token_account)
print(f"RPC response: {response}")

The result is like this:
RPC response: InvalidParamsMessage { message: "Invalid param: could not find account" }

Buy transaction went ok, tokens are in my wallet and ATA is Initialized.
As I said happens only with coins with high profits, which are obv pumped by bots.
Anything I can do about it?
I understand that they may be faster in transactions but why not finding account when I already buyed with it?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants