Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hirokisan/jup-cli
A Jupiter CLI that enables swap, etc.
https://github.com/hirokisan/jup-cli
cli jupiter solana swap
Last synced: about 2 months ago
JSON representation
A Jupiter CLI that enables swap, etc.
- Host: GitHub
- URL: https://github.com/hirokisan/jup-cli
- Owner: hirokisan
- License: mit
- Created: 2024-10-16T11:31:47.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T09:34:32.000Z (2 months ago)
- Last Synced: 2024-10-23T08:11:09.634Z (2 months ago)
- Topics: cli, jupiter, solana, swap
- Language: Rust
- Homepage:
- Size: 116 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jup-cli
A Jupiter CLI that enables swap, etc.
## Install
```console
$ cargo install jup-cli
```## Usage
```console
$ jup-cli swap --amount={amount} --mint-from={from} --mint-to={to} --key-pair-path={path-to-key-pair}
``````console
$ jup-cli price --mints={mint1,mint2,...}
```## Example
```console
$ jup-cli swap --dry-run --amount=1 --mint-from=7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU --mint-to=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --key-pair-path=key_pair.json
[2024-10-17T10:22:52Z INFO jup_cli] expected amount: 0.007395
``````console
$ jup-cli swap --amount=1 --mint-from=7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU --mint-to=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --key-pair-path=key_pair.json
[2024-10-17T10:42:40Z INFO jup_cli] expected amount: 0.007379
[2024-10-17T10:42:12Z INFO jup_cli] Transaction: xxxxxxxx
``````console
$ jup-cli price --mints=So11111111111111111111111111111111111111112,JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN
{"So11111111111111111111111111111111111111112":166.566327111,"JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN":0.980275}
```## Tips
### Create a Keypair
```console
$ solana-keygen new -o key_pair.json --no-bip39-passphrase
```