Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

LP File #78

Open
jlescalonap opened this issue Apr 22, 2024 · 3 comments
Open

LP File #78

jlescalonap opened this issue Apr 22, 2024 · 3 comments

Comments

@jlescalonap
Copy link

There is a problem when trying to fetch the LP-File (https://api.raydium.io/v2/sdk/liquidity/mainnet.json), most of times it does not retrieve any information or responds as null, só the flow breaks and the swap is not finished.

My config file is:

export const swapConfig = {
  executeSwap: false,
  useVersionedTransaction: true,
  tokenAAmount: 0.01,
  tokenAAddress: 'So11111111111111111111111111111111111111112',
  tokenBAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
  maxLamports: 1500000,
  direction: 'in' as 'in' | 'out',
  liquidityFile: 'https://api.raydium.io/v2/sdk/liquidity/mainnet.json',
  maxRetries: 20,
}

And the function that tries to fetch the liquidity file is:

await raydiumSwap.loadPoolKeys(swapConfig.liquidityFile)

I took the whole structure and functions from an example repo:
https://github.com/chainstacklabs/raydium-sdk-swap-example-typescript

@rudy5348
Copy link
Collaborator

I think you can start by investigating whether the data was successfully retrieved from API.

@benjiqq
Copy link

benjiqq commented May 4, 2024

@jlescalonap works ok, but its a big file, its circa 300'000 entires, 300MB

@brooke007
Copy link

@jlescalonap works ok, but its a big file, its circa 300'000 entires, 300MB

how you fetch the file, I tried to get the api, but it always return a network error. like this
image

@raydium-io raydium-io deleted a comment from Brovmos Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants