GUM Docs
Open GUM

API reference

Quote a swap

Price a buy or a sell and get the message to sign. Quotes last about 30 seconds.

POSThttps://api.gum.ag/app/v1/swap/quote

Try it

Body

FieldRequiredDescription
addressYesYour Solana address or EVM 0x address.
sideYesbuy spends USD on the token; sell sells the token for USD.
chainIdYesThe token’s chain.
tokenYesThe token’s address on chainId, from GET /v1/tokens.
amountYesBuy: USD to spend. Sell: tokens to sell. A decimal string.
slippageBpsNoDefaults to 100 (1%), or 200 on Ethereum and Robinhood. At most 1000.

Response

FieldMeaning
payWhat leaves your balance.
receiveamount you should get, and minimum: the trade fails rather than fill below it.
feeGUM’s fee, in USD, already counted in receive.
priceUsdThe effective price per token.
usdValueUSD the trade moves: spent on a buy, received on a sell. Null when it can’t be priced.
priceImpactAs a fraction ("0.0024" is 0.24%), when known.
expiresAtSubmit before this.
signer{ address, signWith }: the GUM account that signs, and solana or evm.
messageThe Solana legacy message inside transaction, base64. Sign it with your wallet.
transactionThe GUM Network transaction in its wire format, base64, signed by GUM’s fee payer and waiting for your signature. Send it back unchanged to POST /v1/swap.

A quote doesn’t reserve anything: nothing happens until you submit it.