Skip to main content

Get a swap quote

POSThttps://api.radom.com/swap/quote

Returns the estimated output amount, the mid-market and execution rates, the rate-component breakdown (spread, slippage, hedging) and the Radom fee, without executing the swap.

Authorization

Send your API key in the Authorization header. Scheme: radomToken.

Request body

fromManagedPaymentMethodrequired
networkNetworkrequired
AllowedBitcoinBitcoinTestnetLitecoinLitecoinTestnetDogecoinDogecoinTestnetBitcoinCashBitcoinCashTestnetBitcoinSVBitcoinSVTestnetHarryPotterObamaSonic10InuHarryPotterObamaSonic10InuTestnetSolanaSolanaTestnetSolanaDevnetEthereumSepoliaTestnetPolygonPolygonTestnetBNBBNBTestnetArbitrumArbitrumTestnetPolkadotPolkadotTestnetPolkadotAssetHubPolkadotAssetHubTestnetTronTronTestnetAvalancheAvalancheTestnetBaseBaseTestnetOptimismOptimismTestnetOpBnbFiat
tokenstringnullable
discountPercentOffnumber<float>nullable>= 0
intoManagedPaymentMethodrequired
networkNetworkrequired
AllowedBitcoinBitcoinTestnetLitecoinLitecoinTestnetDogecoinDogecoinTestnetBitcoinCashBitcoinCashTestnetBitcoinSVBitcoinSVTestnetHarryPotterObamaSonic10InuHarryPotterObamaSonic10InuTestnetSolanaSolanaTestnetSolanaDevnetEthereumSepoliaTestnetPolygonPolygonTestnetBNBBNBTestnetArbitrumArbitrumTestnetPolkadotPolkadotTestnetPolkadotAssetHubPolkadotAssetHubTestnetTronTronTestnetAvalancheAvalancheTestnetBaseBaseTestnetOptimismOptimismTestnetOpBnbFiat
tokenstringnullable
discountPercentOffnumber<float>nullable>= 0
amountnumber<double>required

Responses

200Quote retrieved successfully
amountnumber<double>required
feenumber<double>required

Total implied cost in source currency versus converting the full amount at the mid-market rate. Not the billed fee; use `radom_fee`.

ratenumber<double>required

Execution rate in target units per source unit after rate components (spread, slippage, hedging). Does not include the Radom fee.

marketRatenumber<double>required

Mid-market rate in the same units as `rate`, before rate components.

radomFeenumber<double>required

Radom fee deducted from the source amount before the rate is applied.

radomFeePercentnumber<double>required
networkFeenumber<double>required

On-chain withdrawal fee in target currency. 0 when the org does not charge network fees to the customer.

rateComponentsQuoteRateComponentsrequired
400Bad Request
errorstringrequired
401Unauthorized
errorstringrequired
500Internal server error
errorstringrequired
503Service unavailable
errorstringrequired