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
| Parameter | Type | Description |
|---|---|---|
chain | string · required | Chain id, for example tron. |
token | string · required | USDT or USDC. |
direction | string · required | in for a deposit, out for a payout. |
amount | string · required | Integer 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");
status, body = 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 fullamount.direction=outuses the same arithmetic asPOST /v1/payoutsand also returnsfee_mode,send_amount(what the player receives) andtotal(what your balance is charged).netequalssend_amount.acceptedisfalsewhen the amount is belowmin_amountor 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.