for developers
build agents that pay for themselves.
ParasolDEX handles x402 payments so your AI agents can access paid APIs on Solana without manual intervention. Automatic token swaps, automatic payments, automatic retries.
how x402 auto-pay works
agent calls API
standard HTTP request
gets 402
payment required response
auto-swap
wrong token → right token
auto-pay
signs + sends on Solana
retries request
with payment proof
quick start
import { HTTPInterceptor } from 'moltydex';
const interceptor = new HTTPInterceptor({
apiUrl: 'https://api.parasol.so',
walletSecretKey: process.env.WALLET_SECRET_KEY,
autoSwap: true,
});
// all fetch() calls now handle 402 automatically
const response = await fetch('https://some-paid-api.com/data');
const data = await response.json(); // it just worksinstall: npm install moltydex
features
fully automated
agents handle payments without intervention. no manual steps, no babysitting.
token swapping
automatically swaps any token to the required one. SOL, USDC, USDT, any SPL token.
client-side signing
private keys never leave your system. we build unsigned transactions, you sign locally.
MPC wallets
enterprise-grade key management via Turnkey. no raw private keys, no config file vulnerabilities.
use cases
premium API access
your agent needs paid data or services. ParasolDEX intercepts the 402, pays, retries. you get the data.
// just call APIs normally
const response = await fetch('https://premium-api.com/data');
const data = await response.json();
// if 402 → auto-swap → auto-pay → auto-retrymulti-API collection
collect from multiple paid APIs in parallel. each wants a different token. ParasolDEX handles all of them.
const apis = ['api1.com', 'api2.com', 'api3.com'];
const results = await Promise.all(
apis.map(url => fetch(url).then(r => r.json()))
);agent-to-agent payments
agents paying other agents for specialized services. the machine economy, handled quietly.
API endpoints
/api/quoteget swap quote with price, fees, and minimum output/api/swap/buildbuild unsigned swap transaction for client-side signing/api/balancecheck token balance for a wallet/api/x402/parse-paymentparse a 402 Payment Required response body/api/x402/auto-paycomplete x402 payment flow: balance → swap → pay/api/ultra/orderJupiter Ultra: quote + ready-to-sign transaction in one call/api/ultra/executeJupiter Ultra: submit signed transaction for executionBase URL: https://api.parasol.so · Full API reference →
faq
what is the x402 auto-pay agent?
a payment handler that intercepts HTTP 402 responses, swaps tokens if needed, pays on Solana, and retries the original request. your agent never sees the payment flow.
do I need to handle token swapping manually?
no. the ParasolDEX SDK (npm install moltydex) checks your balance, swaps via Jupiter if needed, pays, and retries. point it at api.parasol.so. all automatic.
how secure is this?
all signing happens client-side. private keys never leave your system. MPC wallet support via Turnkey means keys never exist in one place.
what languages are supported?
TypeScript/JavaScript and Python. both SDKs have the same feature set.
is the SDK open source?
the ParasolDEX SDK is open source and available on GitHub. review the code, contribute, verify security.
get your agent connected in under 5 minutes. zero platform fees.