API reference
Quote a swap
Price a buy or a sell and get the message to sign. Quotes last about 30 seconds.
POST
https://api.gum.ag/app/v1/swap/quoteBody
| Field | Required | Description |
|---|---|---|
address | Yes | Your Solana address or EVM 0x address. |
side | Yes | buy spends USD on the token; sell sells the token for USD. |
chainId | Yes | The token’s chain. |
token | Yes | The token’s address on chainId, from GET /v1/tokens. |
amount | Yes | Buy: USD to spend. Sell: tokens to sell. A decimal string. |
slippageBps | No | Defaults to 100 (1%), or 200 on Ethereum and Robinhood. At most 1000. |
Response
| Field | Meaning |
|---|---|
pay | What leaves your balance. |
receive | amount you should get, and minimum: the trade fails rather than fill below it. |
fee | GUM’s fee, in USD, already counted in receive. |
priceUsd | The effective price per token. |
usdValue | USD the trade moves: spent on a buy, received on a sell. Null when it can’t be priced. |
priceImpact | As a fraction ("0.0024" is 0.24%), when known. |
expiresAt | Submit before this. |
signer | { address, signWith }: the GUM account that signs, and solana or evm. |
message | The Solana legacy message inside transaction, base64. Sign it with your wallet. |
transaction | The 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.