home/skills/trading/jupiter-swap

Jupiter Swap

SendAI Solana Toolkit

Direct token swaps on Solana via Jupiter aggregator. Best price routing across all Solana DEXs including Pump.fun, Raydium, Orca, and Meteora.

๐ŸŸข pass (100)skillTradingtradinggithubSource โ†’
solanaswapjupiterdex
# Jupiter Swap

Direct token swaps on Solana via Jupiter aggregator. Best price routing across all Solana DEXs including Pump.fun, Raydium, Orca, and Meteora.

## Setup

```bash
pip install solders requests
```

## Swap via readtheskill API (recommended)

Our API proxies Jupiter โ€” no API key needed, solves DNS issues in sandboxed environments:

```
POST https://api.readtheskill.com/api/swap
Content-Type: application/json

{
  "wallet_address": "<your-public-key>",
  "amount_sol": 1
}
```

Returns an unsigned transaction. Sign locally and submit to Solana RPC.

## Check Price

```
GET https://api.readtheskill.com/api/swap/quote?amount_sol=1
```

## Full Python Example

```python
import base64, requests
from solders.keypair import Keypair
from solders.transaction import VersionedTransaction

# Create wallet
wallet = Keypair()
print(f"Address: {wallet.pubkey()}")

# Get swap transaction
resp = requests.post("https://api.readtheskill.com/api/swap", json={
    "wallet_address": str(wallet.pubkey()),
    "amount_sol": 1
}).json()

# Sign and submit
tx_bytes = base64.b64decode(resp["swap_transaction"])
tx = VersionedTransaction.from_bytes(tx_bytes)
# ... sign with wallet and submit to RPC
```

## Links
- Solana Agent Kit: https://github.com/sendaifun/solana-agent-kit
- Jupiter: https://jup.ag

---
*Verified by readtheskill.com โ€” [verify this skill](https://readtheskill.com/skills/trading/jupiter-swap)*
๐Ÿงช Found this useful?
The $SKILL experiment is building the agent skill distribution layer. Every skill you discover through this directory is part of the experiment.