Skip to main content
POST
/
fee_station
/
transactions
/
estimate_fee
import cobo_waas2
from cobo_waas2.models.estimated_fixed_fee import EstimatedFixedFee
from cobo_waas2.models.fee_station_transfer import FeeStationTransfer
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.FeeStationApi(api_client)
    fee_station_transfer = cobo_waas2.FeeStationTransfer(token_id="ETH_USDT")

    try:
        # Estimate fee for Fee Station transaction
        api_response = api_instance.estimate_fee_station_fee(
            fee_station_transfer=fee_station_transfer
        )
        print("The response of FeeStationApi->estimate_fee_station_fee:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling FeeStationApi->estimate_fee_station_fee: %s\n" % e
        )

{
  "fee_type": "EVM_EIP_1559",
  "token_id": "TRON",
  "is_loop": false,
  "fee_amount": "0.1"
}
import cobo_waas2
from cobo_waas2.models.estimated_fixed_fee import EstimatedFixedFee
from cobo_waas2.models.fee_station_transfer import FeeStationTransfer
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.FeeStationApi(api_client)
    fee_station_transfer = cobo_waas2.FeeStationTransfer(token_id="ETH_USDT")

    try:
        # Estimate fee for Fee Station transaction
        api_response = api_instance.estimate_fee_station_fee(
            fee_station_transfer=fee_station_transfer
        )
        print("The response of FeeStationApi->estimate_fee_station_fee:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling FeeStationApi->estimate_fee_station_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 information about a Fee Station top-up transaction.

token_id
string
required

The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens.

Example:

"ETH_USDT"

destination
object

Response

The request was successful.

The estimated transaction fee based on the fixed fee model.

For more details about the fixed fee model, see Fee models.

The transaction fee.

fee_type
enum<string>
default:EVM_EIP_1559
required

The fee model. Possible values include:

  • Fixed: The fixed fee model.
  • EVM_EIP_1559: The EIP-1559 fee model.
  • EVM_Legacy: The legacy fee model.
  • UTXO: The fee model used in UTXO-based blockchains, such as Bitcoin.
  • SOL: The fee model used in Solana.
  • FIL: The fee model used in Filecoin.

Each fee model requires a different set of properties. Switch between the above tabs for details.

To learn more about the fee models, refer to Fee models.

Available options:
Fixed,
EVM_EIP_1559,
EVM_Legacy,
UTXO,
SOL,
FIL
Example:

"EVM_EIP_1559"

token_id
string
required

The token used to pay the transaction fee.

Example:

"TRON"

fee_amount
string
required

The transaction fee that you need to pay for the transaction.

Example:

"0.1"

is_loop
boolean

Whether the transaction was executed as a Cobo Loop transfer.

  • true: The transaction was executed as a Cobo Loop transfer.
  • false: The transaction was not executed as a Cobo Loop transfer.
Example:

false