Skip to main content
POST
/
api
/
v1
/
payments
/
estimate-outcome
{
  "amount": "1000000",
  "reverse": false,
  "chain_id": 56,
  "token_address": "0x55d398326f99059ff775485246999027b3197955",
  "order_type": 1,
  "buffer": 0.005
}
{
  "message": "success",
  "data": {
    "outcome": "38.61",
    "rate": 25850.00,
    "fee_vnd": 5000,
    "fees": {
      "service_fee": 0.01,
      "min_fee": 5000
    }
  }
}

Overview

Partners can calculate the final amount for a given input amount and order type. Set reverse=true to calculate the required input amount for a desired outcome.
  • Deposit orders: the outcome is the amount of tokens (in USD) the user will receive after fees.
  • Withdrawal orders: the outcome is the amount of fiat (in VND) the user will receive after fees.
amount
string
required
Original amount to calculate.
reverse
boolean
required
Reverse the amount calculation (from outcome to original).
chain_id
integer
required
Blockchain network ID.
token_address
string
required
Token contract address.
order_type
integer
required
Type of the order. 1 = Deposit, 2 = Withdrawal.
buffer
number
required
Optional buffer rate override (fractional). If set, effective buffer = max(override, configured buffer). Example: 0.005 = 0.5%.
{
  "amount": "1000000",
  "reverse": false,
  "chain_id": 56,
  "token_address": "0x55d398326f99059ff775485246999027b3197955",
  "order_type": 1,
  "buffer": 0.005
}
{
  "message": "success",
  "data": {
    "outcome": "38.61",
    "rate": 25850.00,
    "fee_vnd": 5000,
    "fees": {
      "service_fee": 0.01,
      "min_fee": 5000
    }
  }
}