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
168 stars 45 forks source link

Including platform fee #14

Closed spacesudo closed 7 months ago

spacesudo commented 8 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 7 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 7 months ago

Thanks