Quote a bridge
Returns the fee of a bridge and what your API account balance would be after it. Nothing moves and nothing is held. Use it before Create a bridge.
Body
The same fields as Create a bridge,
without merchantReference.
USDT or USDC.
The network to move the liquidity from.
The network to move the liquidity to. Payouts of the token must be active on it.
The amount that would arrive on toNetwork. Minimum 0.01.
Request
curl -X POST "https://api-prod.useknit.io/api/v1/bridges/quote" \
-H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "USDT",
"fromNetwork": "TRON_MAINNET",
"toNetwork": "ETHEREUM_MAINNET",
"amount": "200"
}'Response
{
"statusCode": 200,
"message": "Bridge quote retrieved successfully",
"data": {
"token": "USDT",
"fromNetwork": "TRON_MAINNET",
"toNetwork": "ETHEREUM_MAINNET",
"amount": "200",
"fee": "2",
"totalDebit": "202",
"accountBalanceBefore": "500",
"accountBalanceAfter": "498"
},
"success": true
}The fields have the same meaning as in the Create a bridge response.
A quote is not held. The fee or your balances can change before you create the bridge, and the create request uses the values at that time.
Errors
The same as Create a bridge, except that
there is no merchantReference check. A quote that your balance or liquidity
cannot cover gets the same 400 that the create request would get.