raydium-sdk icon indicating copy to clipboard operation
raydium-sdk copied to clipboard

How to swap raydium/spl token with this library?

Open b68h4 opened this issue 3 years ago • 14 comments

I want to swap a raydium token with this library in my project.

How can I do it? Need example

b68h4 avatar Dec 12 '21 16:12 b68h4

Any update on this ?

Necmttn avatar Jan 04 '22 03:01 Necmttn

Agree, would be nice to have an example on the simple tasks

JeromeK13 avatar Jan 16 '22 17:01 JeromeK13

Unfortunately, still no change. Project owners continue to not respond.

b68h4 avatar Jan 16 '22 17:01 b68h4

I wonder if there is some demo API usage about query the balance, or staked coins and rewards. Or some info about APR and TVL.

dyustc avatar Mar 06 '22 13:03 dyustc

You guys should check out https://github.com/raydium-io/sdk_demo

alpha-defi avatar May 04 '22 14:05 alpha-defi

Any update on this please ?

tkennouche avatar Dec 08 '23 15:12 tkennouche

You should take a look at openbook v2, raydium use openbook to centralize markets. OpenBook provide a nice sdk to place bids if you need.

In complement with this raydium sdk you should be able to identify pools, markets and do what you want

AurelienConte avatar Dec 18 '23 21:12 AurelienConte

So you mean we can not swap using Raydium sdk now?

coin5555 avatar Jan 12 '24 06:01 coin5555

Any update on this??

francestu96 avatar Jan 19 '24 16:01 francestu96

francestu96!! Now there is no makeSwapTransaction function in Liquidity from @raydium-io/raydium-sdk. So I made transaction using makeSwapInstructionSimple and buildSimpleTransaction. Got transaction array but I don't know how to send these at once. I am using 1.3.1-beta-47. Please let me know. Sorry.

coin5555 avatar Jan 23 '24 09:01 coin5555

francestu96!! Now there is no makeSwapTransaction function in Liquidity from @raydium-io/raydium-sdk. So I made transaction using makeSwapInstructionSimple and buildSimpleTransaction. Got transaction array but I don't know how to send these at once. I am using 1.3.1-beta-47. Please let me know. Sorry.

Thank you, finally I gave up since I'm not even able to make this lib work...

I opened an issue but without success: https://github.com/raydium-io/raydium-sdk/issues/50

francestu96 avatar Jan 23 '24 17:01 francestu96

I made an example repo with simple code to help with the swap using this library. Check it out. precious-void/raydium-swap.

precious-void avatar Feb 05 '24 01:02 precious-void

Wonderful and Thank you. and did you check?

coin5555 avatar Feb 05 '24 06:02 coin5555

Thank you. I will check out.

coin5555 avatar Feb 09 '24 16:02 coin5555