Przejdź do głównej zawartości

Estimate Withdrawal

POST
/withdrawal/estimate/

Simulate a withdrawal to see expected amounts and fees before creating the actual withdrawal. This is useful for showing users exactly what they will receive before confirming.

Authentication

Requires OAuth 2.0 authentication with read and write scopes.

Request Body

ParameterTypeRequiredDescription
amountdecimalConditionalCrypto amount to withdraw. Either amount or price_amount is required
price_amountdecimalConditionalFiat amount for conversion. Either amount or price_amount is required
price_currencystringNoFiat currency for price_amount conversion. Default: "USD"
final_amountbooleanNoIf true, amount is what user receives after fees. Default: false
currencystringConditionalCombined currency code (e.g., "USDTTRC20"). Either currency or blockchain + token
blockchainstringConditionalBlockchain network (e.g., "TRON", "ETH"). Use with token instead of currency
tokenstringConditionalToken symbol (e.g., "USDT"). Use with blockchain instead of currency
addressstringNoDestination address. Improves fee accuracy (e.g., new TRC20 addresses have higher fees)

Example Request

curl -X POST {{BASE_URL}}/withdrawal/estimate/ \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"currency": "USDTTRC20"
}'

Using blockchain + token

curl -X POST {{BASE_URL}}/withdrawal/estimate/ \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"blockchain": "TRON",
"token": "USDT"
}'

With final_amount

curl -X POST {{BASE_URL}}/withdrawal/estimate/ \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"currency": "USDTTRC20",
"final_amount": true
}'

Response

Success Response (200 OK)

{
"requested_amount": "100.00000000",
"fee": "1.50000000",
"amount": "98.50000000",
"currency": "USDTTRC20",
"blockchain": "TRX",
"token": "USDT",
"platform_fee": "1.00000000",
"network_fee": "0.50000000"
}

Response Fields

FieldTypeDescription
requested_amountstringAmount requested
feestringTotal fee (platform + network)
amountstringAmount user will receive
currencystringCombined currency code
blockchainstringBlockchain network
tokenstringToken symbol
platform_feestringPlatform fee component
network_feestringNetwork fee component

With final_amount = true

{
"requested_amount": "101.52000000",
"fee": "1.52000000",
"amount": "100.00000000",
"currency": "USDTTRC20",
"blockchain": "TRX",
"token": "USDT",
"platform_fee": "1.01520000",
"network_fee": "0.50480000"
}

Error Responses

400 Bad Request - Invalid Currency

{
"error": {
"code": "invalid_currency",
"message": "Currency INVALIDCOIN is not available for your account",
"details": {
"currency": "INVALIDCOIN"
}
}
}

Notes

  • This endpoint only simulates the withdrawal -- no actual transaction is created
  • Fees are estimates and may vary slightly when creating the actual withdrawal
  • For TRC20 tokens, providing an address gives more accurate fee estimates
  • The final_amount parameter is useful for "you receive exactly X" scenarios
  • Either currency or blockchain + token must be provided
  • Either amount or price_amount must be provided