Skip to main content

Estimate Withdrawal

Simulate a withdrawal to see expected amounts and fees before creating the actual withdrawal.

Endpoint

POST /withdrawal/estimate/

Description

This endpoint allows you to simulate a withdrawal, showing:

  • Amount the user will receive after fees
  • Total fees (platform + network)
  • Breakdown of fees

This is useful for showing users exactly what they'll receive before confirming the withdrawal.

Authentication

Requires Bearer token with write scope.

Request Body

{
"amount": 100.00,
"currency": "USDTTRC20",
"address": "TXYZabc123...", // Optional - for more accurate TRC20 fees
"final_amount": false // Optional - if true, amount is what user should receive
}

Parameters

ParameterTypeRequiredDescription
amountnumberYesAmount to withdraw
currencystringYesCurrency code (e.g., "USDTTRC20")
addressstringNoDestination address (improves fee accuracy for TRC20)
final_amountbooleanNoIf true, amount is what user receives after fees

Alternative Format

You can also use blockchain and token instead of currency:

{
"amount": 100.00,
"blockchain": "TRX",
"token": "USDT",
"final_amount": false
}

Response

Success Response

Code: 200 OK

Content:

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

Response Fields

FieldTypeDescription
withdrawal_idnullAlways null for estimates
statusstringAlways "estimate"
amountstringAmount user will receive
requested_amountstringAmount requested
feestringTotal fee in withdrawal currency
platform_feestringPlatform fee component
network_feestringNetwork fee component
blockchainstringBlockchain network
tokenstringToken symbol
currencystringFull currency code

Examples

Example 1: Standard Withdrawal Estimate

Request:

curl -X POST https://api.cryptofuse.com/withdrawal/estimate/ \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 500.00,
"currency": "USDTTRC20"
}'

Response:

{
"withdrawal_id": null,
"status": "estimate",
"amount": "493.50000000",
"requested_amount": "500.00000000",
"fee": "6.50000000",
"platform_fee": "5.00000000",
"network_fee": "1.50000000",
"blockchain": "TRX",
"token": "USDT",
"currency": "USDTTRC20"
}

Example 2: With Final Amount (User Receives Exact Amount)

Request:

curl -X POST https://api.cryptofuse.com/withdrawal/estimate/ \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"currency": "USDTTRC20",
"final_amount": true
}'

Response:

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

Example 3: With Address for Accurate TRC20 Fees

Request:

curl -X POST https://api.cryptofuse.com/withdrawal/estimate/ \
-H "Authorization: Bearer your_token" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"currency": "USDTTRC20",
"address": "TNewAddressNeverUsedBefore123"
}'

Response:

{
"withdrawal_id": null,
"status": "estimate",
"amount": "84.00000000",
"requested_amount": "100.00000000",
"fee": "16.00000000",
"platform_fee": "1.00000000",
"network_fee": "15.00000000",
"blockchain": "TRX",
"token": "USDT",
"currency": "USDTTRC20",
"is_new_address": true,
"address_activation_fee": "14.00000000"
}

Fee Calculation

Platform Fee

  • Percentage-based fee set by the platform
  • Default: 1% of the withdrawal amount
  • Configurable per tenant

Network Fee

  • Blockchain transaction fee
  • Varies by blockchain and current network conditions
  • For TRC20: Higher for new addresses (includes activation fee)

Who Pays Fees?

  • If is_fee_paid_by_user is true: User receives amount - fees
  • If is_fee_paid_by_user is false: User receives full amount, merchant pays fees

Error Responses

Invalid Currency

Code: 400 Bad Request

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

Amount Below Minimum

Code: 400 Bad Request

{
"error": {
"code": "invalid_request",
"message": "Amount below minimum withdrawal limit",
"details": {
"minimum": "10.00",
"currency": "USDTTRC20"
}
}
}

Invalid Address

Code: 400 Bad Request

{
"error": {
"code": "invalid_request",
"message": "Invalid TRX address format",
"details": {
"address": "invalid_address",
"blockchain": "TRX"
}
}
}

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
  • Network fees can change based on blockchain congestion