cURL
curl --request GET \ --url https://api.example.com/api/fetch-price/:token \ --header 'x-payment-signature: <x-payment-signature>' \ --header 'x-payment-wallet: <x-payment-wallet>'
{ "data": { "id": "<string>", "mintSymbol": "<string>", "vsToken": "<string>", "vsTokenSymbol": "<string>", "price": 123 } }
Live token pricing via the Jupiter Price API
402 Payment Required
0.05 USDC
SOL
BONK
JUP
Show properties
# First call returns 402 — discover payment requirements curl -i http://localhost:3000/api/fetch-price/SOL # After payment, include signature to receive data curl -H "x-payment-signature: <TX_SIGNATURE>" \ -H "x-payment-wallet: <YOUR_PUBKEY>" \ http://localhost:3000/api/fetch-price/SOL