GUM Docs
Open GUM

API reference

Using the API

Base URL, the objects every endpoint shares, and pagination.

Base URLs:

EnvironmentBase URL
Productionhttps://api.gum.ag/app/v1
Devnethttps://dev-api.gum.ag/app/v1

Both use the same /app/v1 prefix. Examples and the playground use production.

GET /v1 lists every endpoint and GET /v1/openapi.json is the OpenAPI 3.1 spec. Errors and rate limits are on Errors and limits.

Activity

History, status and the live streams return the same object for a swap, withdrawal or deposit. A field that doesn’t apply to the type is left out; one that applies but isn’t known yet is null.

FieldForWhat it means
idAllThe request’s account on GUM Network, in base58. Pass a swap’s to GET /v1/swap/{id} and a withdrawal’s to GET /v1/withdraw/{id}. A swap that settles in one transaction (selling BSC USDT or Robinhood USDG) uses its transaction id.
typeAllswap, withdrawal or deposit. It decides which fields below appear.
statusAllpending until it finishes, then completed, failed, refunded (a failed swap’s funds are back in your balance) or cancelled (a cancelled withdrawal). See Track status.
finalAlltrue once nothing can change: stop polling. A failed swap isn’t final until its funds are back and it turns refunded.
stepPendingWhat’s happening now, for display, e.g. “Executing swap on Solana” or “Crediting your balance”. The wording can change, so don’t parse it.
reasonFailedWhy it failed, for display, e.g. “Not filled in time. The amount is being refunded to your balance.”
sideSwapsbuy spends USD on token. sell turns token into USD.
tokenAllThe token involved: address (its mint or contract on its home chain), chainId, decimals and symbol. Your USD balance shows as USD with no address. A USD withdrawal shows the dollar token it pays out, e.g. USDC on Base.
paySwaps{ amount, symbol } that left your balance: USD on a buy, the token on a sell.
receiveSwaps{ amount, symbol } that reached your balance. amount is null until the swap fills.
amountWithdrawals, deposits{ amount, symbol }: what arrives at destination, after fee, for a withdrawal; what was credited to your balance for a deposit.
feeSwaps, withdrawals{ amount, symbol }: GUM’s trading fee in USD for a swap, or null until the swap completes (the fee is only charged then, and a failed swap is refunded in full); the network fee in the withdrawn token for a withdrawal, already taken out of amount.
destinationWithdrawalsThe address on chainId that receives the funds.
chainIdAllThe other chain involved: where a swap’s token trades, where a withdrawal goes, where a deposit came from. 900 is Solana; GET /v1/chains lists them all.
txHashAllThe transaction on chainId: the swap, the withdrawal’s payout or the deposit you sent. null until there is one.
explorerUrlAlltxHash on that chain’s block explorer, or null without a txHash.
createdAtAllWhen the request was made, as an ISO 8601 UTC timestamp.
completedAtAllWhen it finished, as an ISO 8601 UTC timestamp. null while pending.

Amounts

Every amount is a decimal string in whole units, like "0.042203755". Send amounts the same way; the API rejects more decimal places than a token has rather than rounding.

Pagination

GET /v1/history/{address} returns nextCursor. Pass it back as cursor to get the next page; it’s null on the last one.