iCryptoNow

Quote

GET/v1/quote

Returns the exact fee and minimum for an amount, so you can show players the real numbers before they pay or withdraw.

Query parameters

ParameterTypeDescription
chainstring · requiredChain id, for example tron.
tokenstring · requiredUSDT or USDC.
directionstring · requiredin for a deposit, out for a payout.
amountstring · requiredInteger in the token's smallest unit, greater than 0.

Example

const { body } = await icn("GET", "/v1/quote?chain=tron&token=USDT&direction=in&amount=50000000");
200 OK
{
  "asset": "tron:USDT",
  "decimals": 6,
  "direction": "in",
  "amount": "50000000",
  "fee": "1000000",
  "net": "49000000",
  "min_amount": "10000000",
  "accepted": true
}

Fields

  • fee = the higher of the percentage fee and the network minimum fee.
  • direction=in: net = amount − fee, what your balance receives. The player is still credited the full amount.
  • direction=out uses the same arithmetic as POST /v1/payouts and also returns fee_mode, send_amount (what the player receives) and total (what your balance is charged). net equals send_amount.
  • accepted is false when the amount is below min_amount or does not cover the fee. The amounts are then "0".
200 OK (direction=out, on_top)
{
  "asset": "tron:USDT",
  "decimals": 6,
  "direction": "out",
  "amount": "50000000",
  "fee": "2000000",
  "min_amount": "10000000",
  "accepted": true,
  "fee_mode": "on_top",
  "net": "50000000",
  "send_amount": "50000000",
  "total": "52000000"
}

Returns 404 not_found if the asset is not enabled for your account.

Apply now