# Jupiter-Solana
Jupiter-Solana is a Python library for interacting with the Jupiter aggregator on the Solana blockchain.
## Features
* Token swapping
* Limit orders
## Installation
`pip install jupiter`
## Quick Start
```python
from solana.rpc.api import Client
from jupiter-solana import Jupiter
# Initialize Solana client
client = Client("YOUR_CUSTOM_RPC_URL")
# Initialize Jupiter
jupiter = Jupiter(client)
# Get a quote
quote = jupiter.quote(
input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC
output_mint="So11111111111111111111111111111111111111112", # SOL
amount=1000000 # 1 USDC
)
# Execute a swap
transaction_hash = jupiter.execute_swap(
input_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC
output_mint="So11111111111111111111111111111111111111112", # SOL
amount=1000000 # 1 USDC
)
```
## Features
### Quoting
Get the best swap route for a token pair:
```python
quote = jupiter.quote(input_mint, output_mint, amount)
```
### Swapping
Execute a token swap:
```python
transaction_hash = jupiter.execute_swap(input_mint, output_mint, amount)
```
### Limit Orders
Place a limit order:
```python
transaction_hash = jupiter.execute_limit_order(input_mint, output_mint, in_amount, out_amount)
```
Cancel limit orders:
```python
transaction_hash = jupiter.cancel_limit_orders(orders)
```
Refer to the method docstrings for detailed information on parameters and usage.
## Disclaimer
This library is in alpha and is not stable - it should not be used in production. By using this library you assume all risks of loss of your funds.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License and is a hard-fork of [0xtaodev jupiter-solana-sdk](https://github.com/0xTaoDev/jupiter-python-sdk)
Raw data
{
"_id": null,
"home_page": "https://github.com/truemagic-coder/jupiter",
"name": "jupiter-solana",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "jupiter, solana, sdk",
"author": "Bevan Hunt",
"author_email": "bevan@bevanhunt.com",
"download_url": "https://files.pythonhosted.org/packages/00/01/551461549989832e67bde426d5cb4a02e9247232cc2e84c64660cadc8d22/jupiter_solana-0.0.1.tar.gz",
"platform": null,
"description": "# Jupiter-Solana\nJupiter-Solana is a Python library for interacting with the Jupiter aggregator on the Solana blockchain.\n\n## Features\n* Token swapping\n* Limit orders\n\n## Installation\n`pip install jupiter`\n\n## Quick Start\n```python\nfrom solana.rpc.api import Client\nfrom jupiter-solana import Jupiter\n\n# Initialize Solana client\nclient = Client(\"YOUR_CUSTOM_RPC_URL\")\n\n# Initialize Jupiter\njupiter = Jupiter(client)\n\n# Get a quote\nquote = jupiter.quote(\n input_mint=\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\", # USDC\n output_mint=\"So11111111111111111111111111111111111111112\", # SOL\n amount=1000000 # 1 USDC\n)\n\n# Execute a swap\ntransaction_hash = jupiter.execute_swap(\n input_mint=\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\", # USDC\n output_mint=\"So11111111111111111111111111111111111111112\", # SOL\n amount=1000000 # 1 USDC\n)\n```\n\n## Features\n\n### Quoting\nGet the best swap route for a token pair:\n\n```python\nquote = jupiter.quote(input_mint, output_mint, amount)\n```\n\n### Swapping\nExecute a token swap:\n\n```python\ntransaction_hash = jupiter.execute_swap(input_mint, output_mint, amount)\n```\n\n### Limit Orders\nPlace a limit order:\n\n```python\ntransaction_hash = jupiter.execute_limit_order(input_mint, output_mint, in_amount, out_amount)\n```\n\nCancel limit orders:\n\n```python\ntransaction_hash = jupiter.cancel_limit_orders(orders)\n```\n\nRefer to the method docstrings for detailed information on parameters and usage.\n\n## Disclaimer\nThis library is in alpha and is not stable - it should not be used in production. By using this library you assume all risks of loss of your funds.\n\n## Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\nThis project is licensed under the MIT License and is a hard-fork of [0xtaodev jupiter-solana-sdk](https://github.com/0xTaoDev/jupiter-python-sdk)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Jupiter SDK",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/truemagic-coder/jupiter",
"Repository": "https://github.com/truemagic-coder/jupiter"
},
"split_keywords": [
"jupiter",
" solana",
" sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9caee47de1812930d4bacbab5bb8cc6869d42dcec7f134653b6c9c3d5b5ea1b8",
"md5": "2efec4608b1fa35fc22450fb0efb0908",
"sha256": "263a91654fbbb41781d0d045cbb7b3dfb6cded6f85e41fd32f4637b152acd264"
},
"downloads": -1,
"filename": "jupiter_solana-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2efec4608b1fa35fc22450fb0efb0908",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 5894,
"upload_time": "2024-12-13T01:20:29",
"upload_time_iso_8601": "2024-12-13T01:20:29.518237Z",
"url": "https://files.pythonhosted.org/packages/9c/ae/e47de1812930d4bacbab5bb8cc6869d42dcec7f134653b6c9c3d5b5ea1b8/jupiter_solana-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0001551461549989832e67bde426d5cb4a02e9247232cc2e84c64660cadc8d22",
"md5": "8363b71b3c56584188f12158a998332a",
"sha256": "0fadae4bdff827e6a07d2aeb078f581c62edccfa3152040985dcd80f92f5b282"
},
"downloads": -1,
"filename": "jupiter_solana-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8363b71b3c56584188f12158a998332a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 4479,
"upload_time": "2024-12-13T01:20:31",
"upload_time_iso_8601": "2024-12-13T01:20:31.881653Z",
"url": "https://files.pythonhosted.org/packages/00/01/551461549989832e67bde426d5cb4a02e9247232cc2e84c64660cadc8d22/jupiter_solana-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 01:20:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "truemagic-coder",
"github_project": "jupiter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jupiter-solana"
}