Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/al-the-bot-father/jupiter_py
Jupiter swap with Python
https://github.com/al-the-bot-father/jupiter_py
jupiter python solana swap trade
Last synced: 21 days ago
JSON representation
Jupiter swap with Python
- Host: GitHub
- URL: https://github.com/al-the-bot-father/jupiter_py
- Owner: AL-THE-BOT-FATHER
- Created: 2024-05-27T17:21:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-02T20:14:03.000Z (2 months ago)
- Last Synced: 2024-11-28T07:29:21.314Z (about 1 month ago)
- Topics: jupiter, python, solana, swap, trade
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 14
- Watchers: 1
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jupiter_py
Simple python implementation of the Jupiter Swap API.
Clone the repo, and add your Private Key (Base58 string) and RPC to the config.py.
Reference: https://station.jup.ag/docs/apis/swap-api
```
from jupiter_py import buy# Buy Example
token_address = "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr" # POPCAT
sol_in = .1
slippage = 10
buy(token_address, sol_in, slippage)
``````
from jupiter_py import sell# Sell Example
token_address = "7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr" # POPCAT
percentage = 100
slippage = 10
sell(token_address, percentage, slippage)
```