Quote
Returns quote for swap transaction
This endpoint will return an quote for swap
Create a Swap quote.
POST https://api.onramp.money/onramp/api/v2/whiteLabel/swap/quote
Request Body
fromAmount*
Decimal
Actual Crypto quantity to swap.
fromCoinId
Integer
Id of source coin E.g. coinId of USDT: 54
toCoinId
Integer
Id of destination coin
fromChainId
Integer
source network
E.g. chainId of matic20 is 3
toChainId
Integer
destination network
fromCoin
String
source coin
E.g. usdt, usdc
toCoin
String
destination coin E.g. usdt, usdc
fromChain
String
source network E.g. matic20, trc20
toChain
String
destination network E.g. matic20, trc20
isQuoteReverse
Integer
This should be set as 1, when you reverse quote is needed
{
"status": 1,
"code": 200,
"data": {
"toAmount": "130.77",
"withdrawalFee": "0.000009",
"inverseWithdrawalFee": "1.5",
"rate": "62031.3",
"inverseRate": "0.0000161209",
"expiryTime": 1726732339482,
"onrampFee": "0.20",
"clientFee": "0.00",
"gatewayFee": "0.00"
}
}{
"status": 0,
"code": 400,
"error": "Missing either parameters fromAmount, fromCoinId, fromChainId, toCoinId, toChainId."
}rate -> expected price estimate
withdrawalFee -> fee for withdrawal of destination coin
onrampFee -> onrampFee associated with the quote
gatewayFee -> gatewayFee associated with the quote
clientFee -> clientFee associated with the quote
Last updated