How to fetch withdrawal fees

There are two types of withdrawal fees depending on the asset: range-based (for BTC) and flat (for other assets).

  1. Range-Based Fee (Used for BTC Only)
    Bitcoin (BTC) uses a range-based flat fee. The fee amount depends on how much BTC you're withdrawing, but it's fixed within each range. This ensures transparency and predictability.
    Example JSON response:

    {
      "status": "success",
      "message": "Successful",
      "data": {
        "fee": [
          {
            "min": 0,
            "max": 0.0054,
            "type": "flat",
            "value": 0.0002
          },
          {
            "min": 0.0054,
            "max": 0.0136,
            "type": "flat",
            "value": 0.0002
          },
          {
            "min": 0.0136,
            "max": 0.0271,
            "type": "flat",
            "value": 0.0003
          },
          {
            "min": 0.0271,
            "max": 0.0813,
            "type": "flat",
            "value": 0.0004
          },
          {
            "min": 0.0813,
            "max": 0.2033,
            "type": "flat",
            "value": 0.0004
          },
          {
            "min": 0.2033,
            "max": 2,
            "type": "flat",
            "value": 0.0004
          },
          {
            "min": 2,
            "max": 10.0001,
            "type": "flat",
            "value": 0.0005
          }
        ],
        "type": "range"
      }
    }
    
    

    How it works:

    • The fee array contains multiple ranges defined by min and max values.
    • Each range has a value that represents the flat withdrawal fee (in BTC).
    • The system determines which range the withdrawal amount falls into, and applies the corresponding value as the fee.
    • The fee remains the same for any amount within that range.

    Examples:

    • If you're withdrawing 0.01 BTC, it falls between 0.0054 and 0.0136 → Fee is 0.0002 BTC
    • If you're withdrawing 0.03 BTC, it falls between 0.0271 and 0.0813 → Fee is 0.0004 BTC
    • If you're withdrawing 3 BTC, it falls between 2 and 10.0001 → Fee is 0.0005 BTC
  2. Flat Fee (Used for Other Assets):
    Other cryptocurrencies use a simple flat fee. The same fee is applied regardless of how much is being withdrawn.

    Example JSON response:

    {
      "status": "success",
      "message": "Successful",
      "data": {
        "fee": 1,
        "type": "flat"
      }
    }
    
    

    How it works:

    • The fee value is the exact fee charged for any withdrawal amount.
    • The type is flat, indicating the fee does not change based on the amount.
    • This is the standard model for most assets except BTC.