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",
  "gas_station_type": "CoboOperationStation",
  "is_fee_station_applicable": true,
  "is_balance_sufficient": false,
  "balance": "0.0021",
  "total_fee_amount": "0.0021",
  "is_sponsor_applicable": true,
  "sponsored_fee_amount": "0.0021"
}
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 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"

amount
string
required

The amount of tokens to be transferred in this request.

Example:

"100.5"

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"

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"

Response

The request was successful.

The Fee Station usage 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"

gas_station_type
enum<string>
required

The Fee Station mode used for automatic gas payment:

  • FeeStation: The client uses their own Fee Station balance to cover the gas fee.
  • CoboOperationStation: Cobo covers the gas fee on behalf of the client.
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

balance
string
required

The current token balance available in Fee Station.

Example:

"0.0021"

total_fee_amount
string
required

The total gas amount required for this transfer request.

Example:

"0.0021"

is_sponsor_applicable
boolean
required

Indicates whether USDT (U) sponsorship is applied when Fee Station balance is insufficient.

Example:

true

sponsored_fee_amount
string
required

The amount of gas fee sponsored by USDT (U) when applicable.

Example:

"0.0021"