0xTaoDev / jupiter-python-sdk

Jupiter Python SDK is a Python library that allows you to use most of Jupiter features.
https://pypi.org/project/jupiter-python-sdk/
MIT License
120 stars 32 forks source link

Including platform fee #14

Closed spacesudo closed 3 months ago

spacesudo commented 3 months ago

Can we add platform fees on the swap function? Or do I have to do this manually? Also is the input amount in Lamport or sol?

0xTaoDev commented 3 months ago

Hello, I added platform fees on the swap function.

The input amount is in integer and you have to factor in the decimals for each token by looking up the decimals for that token. For example, USDC has 6 decimals and 1 USDC is 1000000 in integer when passing it in into the API. (from Jupiter docs)

spacesudo commented 3 months ago

Thanks