Skip to main content
POST
/
payments
/
estimate_fee
import cobo_waas2
from cobo_waas2.models.payment_estimate_fee201_response import (
    PaymentEstimateFee201Response,
)
from cobo_waas2.models.payment_estimate_fee_request import PaymentEstimateFeeRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.PaymentApi(api_client)
    payment_estimate_fee_request = cobo_waas2.PaymentEstimateFeeRequest(
        estimate_fees=[
            cobo_waas2.PaymentEstimateFee(
                token_id="req_20251016094218", amount="500.00"
            )
        ]
    )

    try:
        # Estimate fees
        api_response = api_instance.payment_estimate_fee(
            payment_estimate_fee_request=payment_estimate_fee_request
        )
        print("The response of PaymentApi->payment_estimate_fee:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PaymentApi->payment_estimate_fee: %s\n" % e)

{
  "data": [
    {
      "token_id": "<string>",
      "amount": "500.00",
      "commission_fee": {
        "fee_amount": "<string>"
      },
      "bridging_fee": {
        "fee_amount": "<string>",
        "received_token_id": "<string>",
        "received_amount": "<string>"
      },
      "otc_fee": {
        "fee_rate": "<string>",
        "token_id": "<string>"
      }
    }
  ]
}
import cobo_waas2
from cobo_waas2.models.payment_estimate_fee201_response import (
    PaymentEstimateFee201Response,
)
from cobo_waas2.models.payment_estimate_fee_request import PaymentEstimateFeeRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.PaymentApi(api_client)
    payment_estimate_fee_request = cobo_waas2.PaymentEstimateFeeRequest(
        estimate_fees=[
            cobo_waas2.PaymentEstimateFee(
                token_id="req_20251016094218", amount="500.00"
            )
        ]
    )

    try:
        # Estimate fees
        api_response = api_instance.payment_estimate_fee(
            payment_estimate_fee_request=payment_estimate_fee_request
        )
        print("The response of PaymentApi->payment_estimate_fee:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PaymentApi->payment_estimate_fee: %s\n" % e)

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Body

application/json

The request body for fee estimation.

estimate_fees
object[]
required

A list of token IDs and amounts for which fees will be calculated.

fee_type
enum<string>

The type of fee to estimate:

  • Order: Fee for accepting a payment.
  • Refund: Fee for processing a refund.
  • CryptoSettlement: Fee for crypto payouts.
  • OffRampSettlement: Fee for fiat off-ramp.
Available options:
Order,
Refund,
CryptoSettlement,
OffRampSettlement
Example:

"Order"

Response

The request was successful.

data
object[]

A list of estimated fees for the requested operations.