Skip to main content
POST
/
fee_station
/
check_fee_station_usage
import cobo_waas2
from cobo_waas2.models.fee_station_check_fee_station_usage import (
    FeeStationCheckFeeStationUsage,
)
from cobo_waas2.models.fee_station_check_fee_station_usage_response import (
    FeeStationCheckFeeStationUsageResponse,
)
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_check_fee_station_usage = cobo_waas2.FeeStationCheckFeeStationUsage(
        request_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
        amount="100.5",
        token_id="ETH_USDT",
        estimated_fee_amount="0.0021",
        from_address="0x1234567890abcdef1234567890abcdef12345678",
        from_wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479"
    )

    try:
        # Check Fee Station usage
        api_response = api_instance.check_fee_station_usage(
            fee_station_check_fee_station_usage=fee_station_check_fee_station_usage
        )
        print("The response of FeeStationApi->check_fee_station_usage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FeeStationApi->check_fee_station_usage: %s\n" % e)

{
  "token_id": "ETH",
  "balance": "0.0021",
  "gas_station_type": "CoboOperationStation",
  "is_fee_station_applicable": true,
  "is_balance_sufficient": false,
  "total_fee_amount": "0.0021",
  "is_sponsor_applicable": true,
  "sponsored_fee_amount": "0.0021",
  "sponsored_token_id": "ETH_USDT"
}
import cobo_waas2
from cobo_waas2.models.fee_station_check_fee_station_usage import (
    FeeStationCheckFeeStationUsage,
)
from cobo_waas2.models.fee_station_check_fee_station_usage_response import (
    FeeStationCheckFeeStationUsageResponse,
)
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_check_fee_station_usage = cobo_waas2.FeeStationCheckFeeStationUsage(
        request_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
        amount="100.5",
        token_id="ETH_USDT",
        estimated_fee_amount="0.0021",
        from_address="0x1234567890abcdef1234567890abcdef12345678",
        from_wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479"
    )

    try:
        # Check Fee Station usage
        api_response = api_instance.check_fee_station_usage(
            fee_station_check_fee_station_usage=fee_station_check_fee_station_usage
        )
        print("The response of FeeStationApi->check_fee_station_usage:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FeeStationApi->check_fee_station_usage: %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 evaluating Fee Station usage.

The information for evaluating Fee Station usage.

request_id
string
required

The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

estimated_fee_amount
string
required

The estimated transaction fee required for this transfer, before applying any Fee Station rules.

Example:

"0.0021"

from_address
string
required

The blockchain address that initiates the transfer.

Example:

"0x1234567890abcdef1234567890abcdef12345678"

from_wallet_id
string<uuid>
required

The wallet ID.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

amount
string

Applicable to transfer requests only. The amount of tokens to be transferred in this request.

Example:

"100.5"

token_id
string

Applicable to transfer requests only. The token ID of the asset to be transferred. You can retrieve available token IDs by calling List enabled tokens.

Example:

"ETH_USDT"

fee_token_id
string

The token ID used to pay the gas fee for the main transaction. You can retrieve available token IDs by calling List enabled tokens.

Example:

"ETH"

auto_fuel
enum<string>

The mode of transaction fee payment using Fee Station. Currently, Fee Station supports transactions made with MPC Wallets on EVM-compatible chains, TRON, and Solana. For more details, refer to Fee Station.

  • ProActiveAutoFuel: Always use Fee Station to pay transaction fees.
  • PassiveAutoFuel: Use Fee Station only when the source address balance is insufficient to cover transaction fees.
  • UsePortalPreference: Use fueling strategy based on the Portal configuration.
  • DisableAutoFuel: Do not use Fee Station for transaction fee payment under any circumstances.

If this parameter is not specified, it defaults to the behavior of UsePortalPreference.

Note: TRON and Solana does not support PassiveAutoFuel due to its fee delegation mechanism.

Available options:
PassiveAutoFuel,
ProActiveAutoFuel,
UsePortalPreference,
DisableAutoFuel
Example:

"PassiveAutoFuel"

Response

The request was successful.

The fee station evaluation result for the transfer request.

token_id
string
required

The token used to pay the gas fee for this specific transaction. You can retrieve the IDs of all supported tokens by calling List enabled tokens.

Example:

"ETH"

balance
string
required

The current token balance available in Fee Station.

Example:

"0.0021"

gas_station_type
enum<string>
required

The Fee Station mode used for automatic gas payment:

  • FeeStation: The user uses their own Fee Station balance to cover the gas fee.
  • CoboOperationStation: Cobo covers the gas fee on behalf of the user.
Available options:
FeeStation,
CoboOperationStation
Example:

"CoboOperationStation"

is_fee_station_applicable
boolean
required

Indicates whether Fee Station is applied for this transfer request.

Example:

true

is_balance_sufficient
boolean
required

If Fee Station is used, indicates whether its balance is sufficient to cover the required gas fee.

Example:

false

total_fee_amount
string
required

The total gas amount required for this transfer request.

Example:

"0.0021"

is_sponsor_applicable
boolean
required

Indicates whether USD stablecoin sponsorship is applied when the Fee Station balance is insufficient.

Example:

true

sponsored_fee_amount
string
required

The amount of gas fee sponsored by USD stablecoin when applicable.

Example:

"0.0021"

sponsored_token_id
string

The token ID used to sponsor the gas fee.

Example:

"ETH_USDT"