Skip to content
Fourohtwo

Run before putting any token amount into a transaction

solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert

Run before putting any token amount into a transaction. "5 USDC" is 5,000,000 raw units; wrong decimals send 1,000x too much or too little. Converts between normal amounts and raw units using the token's real on-chain decimals.

SolanaUnchecked
POSThttps://solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert

UptimeNot checked yet

30 days agoToday

Call it from an agent

curl -i -X POST -H 'content-type: application/json' "https://solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert" \
  -d '{"to":"raw","token":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"5"}'

# 402 Payment Required comes back with the price and where to pay.

Example input

{
  "to": "raw",
  "token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amount": "5"
}

More from Solana Pulse