Open winktool opened 7 months ago
Haha, thanks for your contribution. It's gold that shines.
ws.onopen = () => {
ws.send(
JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "blockSubscribe",
params: [
{
mentionsAccountOrProgram:
"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",
},
{
commitment: "confirmed",
maxSupportedTransactionVersion: 0,
encoding: "jsonParsed",
},
],
})
);
};
confirmed
That error is generated when attempting to swap a token that doesn't have added liquidity yet which is part of the strategy that spams buy txs, it will eventually go through the moment liquidity is added. I didn't expect people to actually use this code; I'll update it to make it less confusing.
SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 3: custom program error: 0x1b
SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 3: custom program error: 0x1b
Keep waiting, the script that listens for openbook "initialize market" starts sending swap transactions as soon as it finds a newly created market id. It usually takes ~1-2 minutes for liquidity to be added to Raydium. These two events are independent but the initialize market must happen before Raydium add liquidity. If you confirm that the token is actually live with liquidity and you still get that error lmk.
Got it, looking forward to your optimised code.
Server responded with 429 Too Many Requests. Retrying after 500ms delay...
plz how to solve this in code?
plz how to solve this in code?
That's due to rate-limits on non-paid RPC connections, including the default one for Solana. As long as it doesn't time out and stop retrying the code will work. You can add a deley between each retry to avoid hitting the limit but I suspect it would be slower than waiting out the RPC cooldown.
This code isn't optimized and it also makes a lot of repeat RPC calls with each swap retry which increases the chances of hitting the RPC call limit. I'll upload my improved version as I see people are interested this.
Thank you very much and I hope to see an update from you soon. The crypto world is full of passion because of you!
I think it would be nice to be able to buy and sell tokens automatically.
Code is good man, making bread :100: Working on adding auto sell feature based on percentage gain. Could prob make a ladder based approach with gradual selloffs
That error is generated when attempting to swap a token that doesn't have added liquidity yet which is part of the strategy that spams buy txs, it will eventually go through the moment liquidity is added. I didn't expect people to actually use this code; I'll update it to make it less confusing.