chainstacklabs / raydium-sdk-swap-example-typescript

An example to swap tokens on Solana using the Raydium SDK, TypeScript, and Chainstack
MIT License
99 stars 35 forks source link

Extra trading fees for the platform #4

Closed Moustafa22 closed 1 month ago

Moustafa22 commented 5 months ago

So, basically I am building a trading platform for fun, I implemented Jupiter before, in Jupiter there are parameters to take platform trading fees, which will reserve a small amount of fees to the platform.

Is there a way to do that in Raydium? If so, Please provide resources I couldn't find any!

Cheers

AMIYA8597 commented 4 months ago

so , your code running ??

Here I am facing a error and can`t figure out yet

" throw new Error('Non-base' + BASE + ' character') ^ Error: Non-base58 character "

can you please help me to solve this error

AliRazaSharafat commented 4 months ago

so , your code running ??

Here I am facing a error and can`t figure out yet

" throw new Error('Non-base' + BASE + ' character') ^ Error: Non-base58 character "

can you please help me to solve this error

@AMIYA8597 The error you're facing is related to your wallet private key format. If your private key is in array of byte format like this [111,222,333,....] then you don't need to call bs58.decode(private_key) method. Otherwise, if your private key is in the form of hash, you need to call bs58.decode method. Note: you may need to use JSON.parse(process.env.your_private_key) method to get private key from .env file