> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimate transaction fee

> This operation estimates the transaction fee of a token transfer or a contract call based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity.

You need to specify the transaction information, including the request ID, request type, source address, destination address, token ID (only applicable to token transfers), and chain ID (only applicable to contract calls).

The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees).


<Tip>
  Try [Cobo WaaS Skill](/v2/guides/overview/cobo-waas-skill) in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
</Tip>

<RequestExample>
  ```python Python theme={null}
  import cobo_waas2
  from cobo_waas2.models.estimate_fee_params import EstimateFeeParams
  from cobo_waas2.models.estimated_fee import EstimatedFee
  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.TransactionsApi(api_client)
      estimate_fee_params = cobo_waas2.EstimateFeeParams(
          cobo_waas2.EstimateTransferFeeParams(
              request_type="Transfer",
              source=cobo_waas2.TransferSource(
                  cobo_waas2.CustodialTransferSource(
                      source_type="Asset",
                      wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  )
              ),
              token_id="TRON_USDT",
              destination = cobo_waas2.TransferDestination(
                  cobo_waas2.AddressTransferDestination(
                      destination_type = "Address",
                      account_output = cobo_waas2.AddressTransferDestinationAccountOutput(
                          address = "19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku",
                          amount = "1.5"
                      )
                  )
              ),
              fee_type = "Fixed"
          )
      )

      try:
          # Estimate transaction fee
          api_response = api_instance.estimate_fee(
              estimate_fee_params=estimate_fee_params
          )
          print("The response of TransactionsApi->estimate_fee:\n")
          pprint(api_response)
      except Exception as e:
          print("Exception when calling TransactionsApi->estimate_fee: %s\n" % e)

  ```

  ```java Java theme={null}
  // Import classes:
  import com.cobo.waas2.ApiClient;
  import com.cobo.waas2.ApiException;
  import com.cobo.waas2.Configuration;
  import com.cobo.waas2.Env;
  import com.cobo.waas2.api.TransactionsApi;
  import com.cobo.waas2.model.*;
  import java.util.UUID;

  public class Example {
    public static void main(String[] args) {
      ApiClient defaultClient = Configuration.getDefaultApiClient();
      // Select the development environment. To use the production environment, replace `Env.DEV` with
      // `Env.PROD
      defaultClient.setEnv(Env.DEV);

      // Replace `<YOUR_PRIVATE_KEY>` with your private key
      defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
      TransactionsApi apiInstance = new TransactionsApi();
      EstimateFeeParams estimateFeeParams =
          new EstimateFeeParams(
              new EstimateTransferFeeParams()
                  .requestType(EstimateFeeRequestType.TRANSFER)
                  .source(
                      new TransferSource(
                          new CustodialTransferSource()
                              .sourceType(WalletSubtype.ASSET)
                              .walletId(UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"))))
                  .tokenId("TRON_USDT")
                  .destination(
                      new TransferDestination(
                          new AddressTransferDestination()
                              .destinationType(TransferDestinationType.ADDRESS)
                              .accountOutput(
                                new AddressTransferDestinationAccountOutput()
                                    .address("19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku")
                                    .amount("1.5")
                          )
                      )
                  )
                  .feeType(FeeType.FIXED)
            );
      try {
        EstimatedFee result = apiInstance.estimateFee(estimateFeeParams);
        System.out.println(result);
      } catch (ApiException e) {
        System.err.println("Exception when calling TransactionsApi#estimateFee");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
      }
    }
  }

  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
  	"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
  	"os"
  )

  func main() {
  	estimateFeeParams := coboWaas2.EstimateFeeParams{
  		EstimateContractCallFeeParams: coboWaas2.NewEstimateContractCallFeeParams(
  			coboWaas2.EstimateFeeRequestType("Transfer"),
  			"ETH",
  			coboWaas2.ContractCallSource{
  				CustodialWeb3ContractCallSource: coboWaas2.NewCustodialWeb3ContractCallSource(
  					coboWaas2.ContractCallSourceType("Web3"),
  					"f47ac10b-58cc-4372-a567-0e02b2c3d479",
  					"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  				),
  			},
  		),
  	}

  	configuration := coboWaas2.NewConfiguration()
  	// Initialize the API client
  	apiClient := coboWaas2.NewAPIClient(configuration)
  	ctx := context.Background()

  	// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
  	ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
  	// Replace `<YOUR_PRIVATE_KEY>` with your private key
  	ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
  		Secret: "<YOUR_PRIVATE_KEY>",
  	})
  	resp, r, err := apiClient.TransactionsAPI.EstimateFee(ctx).
  		EstimateFeeParams(estimateFeeParams).
  		Execute()
  	if err != nil {
  		fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.EstimateFee``: %v\n", err)
  		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
  	}
  	// response from `EstimateFee`: EstimatedFee
  	fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.EstimateFee`: %v\n", resp)
  }

  ```

  ```javascript JavaScript theme={null}
  const CoboWaas2 = require("@cobo/cobo-waas2");
  // Initialize the API client
  const apiClient = CoboWaas2.ApiClient.instance;
  // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
  apiClient.setEnv(CoboWaas2.Env.DEV);
  // Replace `<YOUR_PRIVATE_KEY>` with your private key
  apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
  // Call the API
  const apiInstance = new CoboWaas2.TransactionsApi();
  const opts = {
    EstimateFeeParams: CoboWaas2.EstimateFeeParams.constructFromObject({
      request_type: "Transfer",
      source: {
        source_type: "Asset",
        wallet_id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      },
      token_id: "ETH_USDT",
      "destination": {
        "destination_type": "Address",
        "account_output": {
          "address": "19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku",
          "memo": "",
          "amount": "0.1"
        }
      },
      "fee_type": "Fixed"
    }),
  };
  apiInstance.estimateFee(opts).then(
    (data) => {
      console.log("API called successfully. Returned data: " + data);
    },
    (error) => {
      console.error(error);
    },
  );

  ```
</RequestExample>


## OpenAPI

````yaml post /transactions/estimate_fee
openapi: 3.0.3
info:
  title: Cobo Wallet as a Service 2.0
  description: >
    The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's
    WaaS API offering. It enables you to access Cobo's full suite of crypto
    wallet technologies with powerful and flexible access controls. By
    encapsulating complex security protocols and streamlining blockchain
    interactions, this API allows you to concentrate on your core business
    activities without worrying about the safety of your assets. The WaaS 2.0
    API presents the following key features:


    - A unified API for Cobo's [all four wallet
    types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform)

    - Support for 80+ chains and 3000+ tokens

    - A comprehensive selection of webhook events

    - Flexible usage models for MPC Wallets, including [Organization-Controlled
    Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction)
    and [User-Controlled
    Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction)

    - Programmatic control of smart contract wallets such as Safe{Wallet} with
    fine-grained access controls

    - Seamlessly transfer funds across multiple exchanges, including Binance,
    OKX, Bybit, Deribit, and more


    For more information about the WaaS 2.0 API, see [Introduction to WaaS
    2.0](https://www.cobo.com/developers/v2/guides/overview/introduction).
  termsOfService: https://cobo.com/waas/tos/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: Cobo WaaS
    url: https://www.cobo.com/waas
    email: help@cobo.com
  version: 1.0.0
servers:
  - url: https://api.dev.cobo.com/v2
    description: Development environment
  - url: https://api.cobo.com/v2
    description: Production environment
security:
  - CoboAuth: []
tags:
  - name: Organizations
    description: Operations related to Organizations.
  - name: Wallets
    description: Operations related to all wallets.
  - name: Wallets - MPC Wallets
    description: Operations related to mpc wallet.
  - name: Wallets - Exchange Wallet
    description: Operations related to exchange wallet.
  - name: Wallets - Smart Contract Wallets
    description: Operations related to smart contract wallet.
  - name: Transactions
    description: Operations related to all transactions.
  - name: Developers - Webhooks
    description: Operations related to webhooks.
  - name: Stakings
    description: Operations related to staking.
  - name: OAuth
    description: Operations related to OAuth.
  - name: Developers
    description: Operations related to developers.
  - name: AddressBooks
    description: Operations related to address books.
  - name: TravelRule
    description: Operations related to travel rule.
  - name: GraphQL
    description: Operations related to executing GraphQL queries and mutations.
  - name: PrimeBroker
    description: Operations related to prime broker.
  - name: AppWorkflows
    description: Operations related to app workflow.
  - name: FeeStation
    description: Operations related to fee station.
  - name: Payment
    description: Operations related to payment.
  - name: Batch Payouts
    description: Operations related to batch payouts.
  - name: Tokenization
    description: Operations related to tokenization.
  - name: AutoSweep
    description: Operations related to auto sweep.
  - name: Compliance
    description: Operations related to compliance.
paths:
  /transactions/estimate_fee:
    post:
      tags:
        - Transactions
      summary: Estimate transaction fee
      description: >
        This operation estimates the transaction fee of a token transfer or a
        contract call based on the fee model that the chain uses, considering
        factors such as network congestion and transaction complexity.


        You need to specify the transaction information, including the request
        ID, request type, source address, destination address, token ID (only
        applicable to token transfers), and chain ID (only applicable to
        contract calls).


        The response can contain different properties based on the transaction
        fee model used by the chain. For the legacy, EIP-1559, and UTXO fee
        models, Cobo also supports three different transaction speed levels:
        slow, recommended, and fast. For more information about estimating
        transaction fees, refer to [Estimate transaction
        fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees).
      operationId: estimate_fee
      requestBody:
        $ref: '#/components/requestBodies/estimateFeeBody'
      responses:
        '201':
          $ref: '#/components/responses/estimateFeeResponse'
        4XX:
          $ref: '#/components/responses/badRequestError'
        5XX:
          $ref: '#/components/responses/internalServerError'
      security:
        - CoboAuth: []
        - OAuth2:
            - transaction.estimate_fee
components:
  requestBodies:
    estimateFeeBody:
      description: >-
        The request body to estimate the transaction fee of a token transfer or
        a contract call.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EstimateFeeParams'
  responses:
    estimateFeeResponse:
      description: The request was successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EstimatedFee'
    badRequestError:
      description: >-
        Bad request. Your request contains malformed syntax or invalid
        parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    internalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    EstimateFeeParams:
      oneOf:
        - $ref: '#/components/schemas/EstimateTransferFeeParams'
        - $ref: '#/components/schemas/EstimateContractCallFeeParams'
      discriminator:
        propertyName: request_type
        mapping:
          Transfer: '#/components/schemas/EstimateTransferFeeParams:'
          ContractCall: '#/components/schemas/EstimateContractCallFeeParams:'
    EstimatedFee:
      oneOf:
        - $ref: '#/components/schemas/EstimatedFixedFee'
        - $ref: '#/components/schemas/EstimatedEvmEip1559Fee'
        - $ref: '#/components/schemas/EstimatedEvmLegacyFee'
        - $ref: '#/components/schemas/EstimatedUtxoFee'
        - $ref: '#/components/schemas/EstimatedSOLFee'
        - $ref: '#/components/schemas/EstimatedFILFee'
      discriminator:
        propertyName: fee_type
        mapping:
          Fixed:
            $ref: '#/components/schemas/EstimatedFixedFee'
          EVM_EIP_1559:
            $ref: '#/components/schemas/EstimatedEvmEip1559Fee'
          EVM_Legacy:
            $ref: '#/components/schemas/EstimatedEvmLegacyFee'
          UTXO:
            $ref: '#/components/schemas/EstimatedUtxoFee'
          SOL:
            $ref: '#/components/schemas/EstimatedSOLFee'
          FIL:
            $ref: '#/components/schemas/EstimatedFILFee'
    ErrorResponse:
      type: object
      description: The response of a failed request.
      required:
        - error_code
        - error_message
        - error_id
      properties:
        error_code:
          type: integer
          description: >-
            The error code. Refer to [Error codes and status
            codes](https://www.cobo.com/developers/v2/api-references/error-codes)
            for more details.
        error_message:
          type: string
          description: The error description.
        error_id:
          type: string
          description: >-
            The error log ID. You can provide the error ID when submitting a
            ticket to help Cobo to locate the issue.
          example: 0b6ddf19083c4bd1a9ca01bec44b24dd
    EstimateTransferFeeParams:
      type: object
      description: The information about a token transfer.
      title: Transfer
      required:
        - request_type
        - source
        - token_id
      properties:
        request_id:
          type: string
          description: The request ID that is used to track a transaction request.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        request_type:
          $ref: '#/components/schemas/EstimateFeeRequestType'
        source:
          $ref: '#/components/schemas/TransferSource'
        token_id:
          type: string
          description: >-
            The token ID of the transferred token. You can retrieve the IDs of
            all the tokens you can use by calling [List enabled
            tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
          example: ETH_USDT
        destination:
          $ref: '#/components/schemas/TransferDestination'
        fee_type:
          $ref: '#/components/schemas/FeeType'
        replaced_transaction_id:
          type: string
          description: The ID of the transaction that this transaction replaced.
          format: uuid
          example: aff0e1cb-15b2-4e1f-9b9d-a9133715986f
    EstimateContractCallFeeParams:
      type: object
      description: The information about a transaction that interacts with a smart contract
      title: ContractCall
      required:
        - request_type
        - chain_id
        - source
      properties:
        request_id:
          type: string
          description: The request ID that is used to track a transaction request.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        request_type:
          $ref: '#/components/schemas/EstimateFeeRequestType'
        chain_id:
          type: string
          description: >-
            The chain ID of the chain on which the smart contract is issued. You
            can retrieve the IDs of all the chains you can use by calling [List
            enabled
            chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
          example: ETH
        source:
          $ref: '#/components/schemas/ContractCallSource'
        destination:
          $ref: '#/components/schemas/ContractCallDestination'
        fee_type:
          $ref: '#/components/schemas/FeeType'
        replaced_transaction_id:
          type: string
          description: The ID of the transaction that this transaction replaced.
          format: uuid
          example: aff0e1cb-15b2-4e1f-9b9d-a9133715986f
    EstimatedFixedFee:
      type: object
      description: >
        The estimated transaction fee based on the fixed fee model.


        For more details about the fixed fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: Fixed
      required:
        - fee_type
        - token_id
        - fee_amount
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: TRON
            is_loop:
              type: boolean
              description: >
                Whether the transaction was executed as a [Cobo
                Loop](https://manuals.cobo.com/en/portal/custodial-wallets/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
        - $ref: '#/components/schemas/FeeAmount'
    EstimatedEvmEip1559Fee:
      type: object
      description: >
        The estimated transaction fee based on the EIP-1559 fee model.


        For more details about the EIP-1559 fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: EVM_EIP_1559
      required:
        - fee_type
        - token_id
        - recommended
      properties:
        fee_type:
          $ref: '#/components/schemas/FeeType'
        token_id:
          type: string
          description: The token used to pay the transaction fee.
          example: ETH
        slow:
          required:
            - max_fee_per_gas
            - max_priority_fee_per_gas
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmEip1559FeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
        recommended:
          required:
            - max_fee_per_gas
            - max_priority_fee_per_gas
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmEip1559FeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
        fast:
          required:
            - max_fee_per_gas
            - max_priority_fee_per_gas
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmEip1559FeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
    EstimatedEvmLegacyFee:
      type: object
      description: >
        The estimated transaction fee based on the Legacy fee model.


        For more details about the Legacy fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: EVM_Legacy
      required:
        - fee_type
        - token_id
        - recommended
      properties:
        fee_type:
          $ref: '#/components/schemas/FeeType'
        token_id:
          type: string
          description: The token used to pay the transaction fee.
          example: ETH
        slow:
          required:
            - gas_price
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmLegacyFeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
        recommended:
          required:
            - gas_price
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmLegacyFeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
        fast:
          required:
            - gas_price
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/EvmLegacyFeeBasePrice'
            - $ref: '#/components/schemas/FeeGasLimit'
            - $ref: '#/components/schemas/FeeReserved'
    EstimatedUtxoFee:
      type: object
      description: >
        The estimated transaction fee for UTXO-based chains.


        For more details about the UTXO fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: UTXO
      required:
        - fee_type
        - token_id
        - recommended
      properties:
        fee_type:
          $ref: '#/components/schemas/FeeType'
        token_id:
          type: string
          description: The token used to pay the transaction fee.
          example: BTC
        slow:
          required:
            - fee_rate
            - fee_amount
          allOf:
            - $ref: '#/components/schemas/UtxoFeeBasePrice'
            - $ref: '#/components/schemas/FeeAmount'
        recommended:
          required:
            - fee_rate
            - fee_amount
          allOf:
            - $ref: '#/components/schemas/UtxoFeeBasePrice'
            - $ref: '#/components/schemas/FeeAmount'
        fast:
          required:
            - fee_rate
            - fee_amount
          allOf:
            - $ref: '#/components/schemas/UtxoFeeBasePrice'
            - $ref: '#/components/schemas/FeeAmount'
    EstimatedSOLFee:
      type: object
      description: >
        The estimated transaction fee based on the SOL fee model.


        For more details about the SOL fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: SOL
      required:
        - fee_type
        - token_id
        - recommended
      properties:
        fee_type:
          $ref: '#/components/schemas/FeeType'
        token_id:
          type: string
          description: The token used to pay the transaction fee.
          example: ETH
        slow:
          required:
            - compute_unit_price
            - compute_unit_limit
            - base_fee
          allOf:
            - $ref: '#/components/schemas/SOLComputeUnit'
            - $ref: '#/components/schemas/SOLBase'
        recommended:
          required:
            - compute_unit_price
            - compute_unit_limit
            - base_fee
          allOf:
            - $ref: '#/components/schemas/SOLComputeUnit'
            - $ref: '#/components/schemas/SOLBase'
        fast:
          required:
            - compute_unit_price
            - compute_unit_limit
            - base_fee
          allOf:
            - $ref: '#/components/schemas/SOLComputeUnit'
            - $ref: '#/components/schemas/SOLBase'
    EstimatedFILFee:
      type: object
      description: >
        The estimated transaction fee based on the FIL fee model.


        For more details about the FIL fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
      title: FIL
      required:
        - fee_type
        - token_id
        - recommended
      properties:
        fee_type:
          $ref: '#/components/schemas/FeeType'
        token_id:
          type: string
          description: The token used to pay the transaction fee.
          example: ETH
        slow:
          required:
            - gas_premium
            - gas_fee_cap
            - gas_base
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/FILPrice'
            - $ref: '#/components/schemas/FILBase'
        recommended:
          required:
            - gas_premium
            - gas_fee_cap
            - gas_base
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/FILPrice'
            - $ref: '#/components/schemas/FILBase'
        fast:
          required:
            - gas_premium
            - gas_fee_cap
            - gas_base
            - gas_limit
          allOf:
            - $ref: '#/components/schemas/FILPrice'
            - $ref: '#/components/schemas/FILBase'
    EstimateFeeRequestType:
      type: string
      enum:
        - Transfer
        - ContractCall
      example: Transfer
      description: |
        The request type. Possible values include:
          - `Transfer`: A request to transfer tokens.
          - `ContractCall`: A request to interact with a smart contract.
    TransferSource:
      oneOf:
        - $ref: '#/components/schemas/CustodialTransferSource'
        - $ref: '#/components/schemas/CustodialWeb3TransferSource'
        - $ref: '#/components/schemas/MpcTransferSource'
        - $ref: '#/components/schemas/SafeTransferSource'
        - $ref: '#/components/schemas/ExchangeTransferSource'
      discriminator:
        propertyName: source_type
        mapping:
          Asset:
            $ref: '#/components/schemas/CustodialTransferSource'
          Web3:
            $ref: '#/components/schemas/CustodialWeb3TransferSource'
          Org-Controlled:
            $ref: '#/components/schemas/MpcTransferSource'
          User-Controlled:
            $ref: '#/components/schemas/MpcTransferSource'
          Safe{Wallet}:
            $ref: '#/components/schemas/SafeTransferSource'
          Main:
            $ref: '#/components/schemas/ExchangeTransferSource'
          Sub:
            $ref: '#/components/schemas/ExchangeTransferSource'
    TransferDestination:
      oneOf:
        - $ref: '#/components/schemas/AddressTransferDestination'
        - $ref: '#/components/schemas/CustodialTransferDestination'
        - $ref: '#/components/schemas/ExchangeTransferDestination'
      discriminator:
        propertyName: destination_type
        mapping:
          Address:
            $ref: '#/components/schemas/AddressTransferDestination'
          CustodialWallet:
            $ref: '#/components/schemas/CustodialTransferDestination'
          ExchangeWallet:
            $ref: '#/components/schemas/ExchangeTransferDestination'
    FeeType:
      type: string
      enum:
        - Fixed
        - EVM_EIP_1559
        - EVM_Legacy
        - UTXO
        - SOL
        - FIL
      example: EVM_EIP_1559
      default: EVM_EIP_1559
      description: >
        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](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
    ContractCallSource:
      oneOf:
        - $ref: '#/components/schemas/MpcContractCallSource'
        - $ref: '#/components/schemas/SafeContractCallSource'
        - $ref: '#/components/schemas/CustodialWeb3ContractCallSource'
      discriminator:
        propertyName: source_type
        mapping:
          Org-Controlled:
            $ref: '#/components/schemas/MpcContractCallSource'
          User-Controlled:
            $ref: '#/components/schemas/MpcContractCallSource'
          Safe{Wallet}:
            $ref: '#/components/schemas/SafeContractCallSource'
          Web3:
            $ref: '#/components/schemas/CustodialWeb3ContractCallSource'
    ContractCallDestination:
      oneOf:
        - $ref: '#/components/schemas/EvmContractCallDestination'
        - $ref: '#/components/schemas/SolContractCallDestination'
        - $ref: '#/components/schemas/StellarContractCallDestination'
        - $ref: '#/components/schemas/TronContractCallDestination'
        - $ref: '#/components/schemas/CosmosContractCallDestination'
      discriminator:
        propertyName: destination_type
        mapping:
          EVM_Contract:
            $ref: '#/components/schemas/EvmContractCallDestination'
          SOL_Contract:
            $ref: '#/components/schemas/SolContractCallDestination'
          STELLAR_Contract:
            $ref: '#/components/schemas/StellarContractCallDestination'
          TRON_Contract:
            $ref: '#/components/schemas/TronContractCallDestination'
          COSMOS_Contract:
            $ref: '#/components/schemas/CosmosContractCallDestination'
    FeeAmount:
      type: object
      description: The transaction fee.
      properties:
        fee_amount:
          type: string
          description: The transaction fee that you need to pay for the transaction.
          example: '0.1'
    EvmEip1559FeeBasePrice:
      type: object
      properties:
        max_fee_per_gas:
          type: string
          description: The maximum gas fee per gas unit used on the chain, in wei.
          example: '9000000000000'
        max_priority_fee_per_gas:
          type: string
          description: >-
            The maximum priority fee per gas unit used, in wei. The maximum
            priority fee represents the highest amount of miner tips that you
            are willing to pay for your transaction.
          example: '1000000000000'
    FeeGasLimit:
      type: object
      properties:
        gas_limit:
          type: string
          description: >-
            The gas limit. It represents the maximum number of gas units that
            you are willing to pay for the execution of a transaction or
            Ethereum Virtual Machine (EVM) operation. The gas unit cost of each
            operation varies.
          example: '21000'
    FeeReserved:
      type: object
      properties:
        reserved_fee:
          type: string
          description: >-
            The estimated fee required for submitting the transaction data to L1
            (Layer 1), measured in wei.
          example: '1000000000000'
    EvmLegacyFeeBasePrice:
      type: object
      properties:
        gas_price:
          type: string
          description: >-
            The gas price, in wei. The gas price represents the amount of ETH
            that must be paid to validators for processing transactions per gas
            unit used.
          example: '100000000'
    UtxoFeeBasePrice:
      type: object
      properties:
        fee_rate:
          type: string
          description: >-
            The fee rate in sat/vByte. The fee rate represents the satoshis you
            are willing to pay for each byte of data that your transaction will
            consume on the blockchain.
          example: '50'
    SOLComputeUnit:
      type: object
      properties:
        compute_unit_price:
          type: string
          description: >-
            The price paid per compute unit. This value determines the priority
            fee for the transaction, allowing you to increase inclusion
            probability in congested conditions.
          example: '0.0001'
        compute_unit_limit:
          type: string
          description: >-
            The maximum number of compute units your transaction is allowed to
            consume. It sets an upper bound on computational resource usage to
            prevent overload.
          example: '200000'
    SOLBase:
      type: object
      properties:
        base_fee:
          type: string
          description: >-
            A fixed fee charged per signature. The default is 5,000 lamports per
            signature.
          example: '0.000005'
        rent_amount:
          type: string
          description: >-
            The rent fee charged by the network to store non–rent-exempt
            accounts on-chain. It is deducted periodically until the account
            maintains the minimum balance required for rent exemption.
          example: '0.00001 '
    FILPrice:
      type: object
      properties:
        gas_premium:
          type: string
          description: >-
            An optional tip you can include to prioritize your transaction. The
            gas premium incentivizes miners to include your transaction sooner
            than those offering only the base fee.
          example: '0.0001'
        gas_fee_cap:
          type: string
          description: The maximum gas price you are willing to pay per unit of gas.
          example: '0.00035'
        gas_limit:
          type: string
          description: The maximum amount of gas your transaction is allowed to consume.
          example: '500'
    FILBase:
      type: object
      properties:
        gas_base:
          type: string
          description: >-
            The minimum fee required for a transaction to be included in a
            block. The base fee is dynamically adjusted based on network
            congestion to maintain target block utilization. It is burned rather
            than paid to miners, reducing the total Filecoin supply over time.
          example: '0.0002'
    CustodialTransferSource:
      type: object
      description: >
        The information about the transaction source types `Asset`. Refer to
        [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      title: Asset
      required:
        - source_type
        - wallet_id
      properties:
        source_type:
          $ref: '#/components/schemas/WalletSubtype'
        wallet_id:
          type: string
          description: The wallet ID.
          format: uuid
          example: d3fcfaef-f415-4210-9e5c-fbed0e090495
    CustodialWeb3TransferSource:
      type: object
      description: >
        The information about the transaction source types `Web3`. Refer to
        [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        - For UTXO-based chains: both `address` and `included_utxos` are
        optional. If both `address` and `included_utxos` are provided, the UTXOs
        must belong to the specified address. If neither `address` nor
        `included_utxos` is provided, the system will select UTXOs from the
        wallet associated with `wallet_id`.

        - For account-based chains: You need to provide `address` otherwise the
        token transfer will fail. However, when estimating fees for a transfer,
        `address` is not required.


        For detailed rules on `address` and `included_utxos` in both regular and
        RBF transactions, see [Address and included_utxos
        usage](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations#address-and-included-utxos-usage).


        Switch between the tabs to display the properties for different
        transaction sources.
      title: Web3
      required:
        - source_type
        - wallet_id
      properties:
        source_type:
          $ref: '#/components/schemas/WalletSubtype'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        address:
          type: string
          description: >
            Indicates the wallet address to be used as the source of funds.

            - For UTXO-based chains: both `address` and `included_utxos` are
            optional. If both `address` and `included_utxos` are provided, the
            UTXOs must belong to the specified address. If neither `address` nor
            `included_utxos` is provided, the system will select UTXOs from the
            wallet associated with `wallet_id`.

            - For account-based chains: You need to provide `address` otherwise
            the token transfer will fail. However, when estimating fees for a
            transfer, `address` is not required.


            For detailed rules on `address` and `included_utxos` in both regular
            and RBF transactions, see [Address and included_utxos
            usage](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations#address-and-included-utxos-usage).
          example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku
        included_utxos:
          type: array
          items:
            $ref: '#/components/schemas/TransactionUtxo'
        excluded_utxos:
          type: array
          items:
            $ref: '#/components/schemas/TransactionUtxo'
    MpcTransferSource:
      type: object
      description: >
        The information about the transaction source types `Org-Controlled` and
        `User-Controlled`. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        - For UTXO-based chains: both `address` and `included_utxos` are
        optional. If both `address` and `included_utxos` are provided, the UTXOs
        must belong to the specified address. If neither `address` nor
        `included_utxos` is provided, the system will select UTXOs from the
        wallet associated with `wallet_id`.

        - For account-based chains: You need to provide `address` otherwise the
        token transfer will fail. However, when estimating fees for a transfer,
        `address` is not required.


        For detailed rules on `address` and `included_utxos` in both regular and
        RBF transactions, see [Address and included_utxos
        usage](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations#address-and-included-utxos-usage).


        Switch between the tabs to display the properties for different
        transaction sources.
      title: Org-Controlled/User-Controlled
      required:
        - source_type
        - wallet_id
      properties:
        source_type:
          $ref: '#/components/schemas/WalletSubtype'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        address:
          type: string
          description: >
            Indicates the wallet address to be used as the source of funds.

            - For UTXO-based chains: both `address` and `included_utxos` are
            optional. If both `address` and `included_utxos` are provided, the
            UTXOs must belong to the specified address. If neither `address` nor
            `included_utxos` is provided, the system will select UTXOs from the
            wallet associated with `wallet_id`.

            - For account-based chains: You need to provide `address` otherwise
            the token transfer will fail. However, when estimating fees for a
            transfer, `address` is not required.


            For detailed rules on `address` and `included_utxos` in both regular
            and RBF transactions, see [Address and included_utxos
            usage](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations#address-and-included-utxos-usage).
          example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku
        included_utxos:
          type: array
          items:
            $ref: '#/components/schemas/TransactionUtxo'
        excluded_utxos:
          type: array
          items:
            $ref: '#/components/schemas/TransactionUtxo'
        mpc_used_key_share_holder_group:
          $ref: '#/components/schemas/MpcSigningGroup'
    SafeTransferSource:
      type: object
      description: >
        The information about the transaction source type `Safe{Wallet}`. Refer
        to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      title: Safe{Wallet}
      required:
        - source_type
        - wallet_id
        - address
        - delegate
      properties:
        source_type:
          $ref: '#/components/schemas/WalletSubtype'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        address:
          type: string
          description: The wallet address.
          example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku
        delegate:
          $ref: '#/components/schemas/CoboSafeDelegate'
    ExchangeTransferSource:
      type: object
      description: >
        The information about the transaction source types `Main` and `Sub`.
        Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Assets in an Exchange Wallet (Sub Account) can only be transferred to
        another Exchange Wallet.


        Switch between the tabs to display the properties for different
        transaction sources.
      title: Main/Sub
      required:
        - source_type
        - wallet_id
        - trading_account_type
      properties:
        source_type:
          $ref: '#/components/schemas/WalletSubtype'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        trading_account_type:
          type: string
          description: The trading account type.
          example: Asset
    AddressTransferDestination:
      type: object
      description: >
        The information about the transaction destination type `Address`. Refer
        to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        **You need to specify either the `account_output` property or the
        `utxo_outputs` property.**


        You can transfer tokens to multiple addresses only if you use MPC
        Wallets as the transaction source. To do this, you should use the
        `utxo_outputs` property to specify the destination addresses.


        Switch between the tabs to display the properties for different
        transaction destinations.
      title: Address
      required:
        - destination_type
      properties:
        destination_type:
          $ref: '#/components/schemas/TransferDestinationType'
        account_output:
          type: object
          required:
            - address
            - amount
          properties:
            address:
              type: string
              description: The destination address.
              example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku
            memo:
              type: string
              description: >-
                The memo that identifies a transaction in order to credit the
                correct account. For transfers out of Cobo Portal, it is highly
                recommended to include a memo for the chains such as XRP, EOS,
                XLM, IOST, BNB_BNB, ATOM, LUNA, and TON.
              example: '82840924'
            amount:
              type: string
              description: >
                The transfer amount. For example, if you trade 1.5 BTC, then the
                value is `1.5`.
              example: '1.5'
        utxo_outputs:
          type: array
          items:
            type: object
            required:
              - address
              - amount
            properties:
              address:
                type: string
                description: The destination address.
                example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sDEMO
              amount:
                type: string
                description: >
                  The transfer amount. For example, if you trade 1.5 BTC, then
                  the value is `1.5`.
                example: '1.5'
        change_address:
          type: string
          description: >-
            The address used to receive the remaining funds or change from the
            transaction.
          example: 19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sDEMO
        change_output_type:
          type: string
          enum:
            - Last
            - First
          example: First
          description: >
            The position of the change output in the transaction's outputs.
            Possible values are:

            - `Last`: The change output is placed at the end of the
            transaction's outputs.  

            - `First`: The change output is placed at the beginning of the
            transaction's outputs.
        force_internal:
          type: boolean
          description: >
            Whether the transaction request must be executed as a [Cobo
            Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop)
            transfer.
              - `true`: The transaction request must be executed as a Cobo Loop transfer.
              - `false`: The transaction request may not be executed as a Cobo Loop transfer.
              
            Please do not set both `force_internal` and `force_external` as
            `true`. If both are set to `false`, the system uses Cobo Loop by
            default if possible; otherwise, it proceeds with an on-chain
            transfer.
          example: false
        force_external:
          type: boolean
          description: >
            Whether the transaction request must not be executed as a [Cobo
            Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop)
            transfer.
              - `true`: The transaction request must not be executed as a Cobo Loop transfer.
              - `false`: The transaction request can be executed as a Cobo Loop transfer.

            Please do not set both `force_internal` and `force_external` as
            `true`. If both are set to `false`, the system uses Cobo Loop by
            default if possible; otherwise, it proceeds with an on-chain
            transfer.
          example: false
    CustodialTransferDestination:
      type: object
      description: >
        The information about the transaction destination type
        `CustodialWallet`. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        **Note: This destination type is deprecated and should no longer be
        used. Please use `Address` instead.**


        Switch between the tabs to display the properties for different
        transaction destinations.
      title: CustodialWallet
      required:
        - destination_type
        - wallet_id
        - amount
      properties:
        destination_type:
          $ref: '#/components/schemas/TransferDestinationType'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        amount:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 BTC, then the
            value is `1.5`.
          example: '1.5'
    ExchangeTransferDestination:
      type: object
      description: >
        The information about the transaction destination type `ExchangeWallet`.
        Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        An Exchange Wallet (Sub Account) can only receive asset transfers from
        another Exchange Wallet.


        Switch between the tabs to display the properties for different
        transaction destinations.
      title: ExchangeWallet
      required:
        - destination_type
        - wallet_id
        - trading_account_type
        - amount
      properties:
        destination_type:
          $ref: '#/components/schemas/TransferDestinationType'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        trading_account_type:
          type: string
          description: The trading account type.
          example: Asset
        amount:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 BTC, then the
            value is `1.5`.
          example: '1.5'
    MpcContractCallSource:
      title: Org-Controlled/User-Controlled
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
        - type: object
          properties:
            mpc_used_key_share_holder_group:
              $ref: '#/components/schemas/MpcSigningGroup'
    SafeContractCallSource:
      title: Safe{Wallet}
      description: >
        The information about the transaction source type `Safe{Wallet}`. Refer
        to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
        - type: object
          required:
            - delegate
          properties:
            delegate:
              $ref: '#/components/schemas/CoboSafeDelegate'
    CustodialWeb3ContractCallSource:
      title: Web3
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
    EvmContractCallDestination:
      title: EVM_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - address
        - calldata
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        address:
          type: string
          description: >
            The destination address.


            If you are deploying a new contract on an EVM chain, set this
            address to `0x0000000000000000000000000000000000000000`.
          example: '0x0406db8351aa6839169bb363f63c2c808fee8f99'
        value:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 ETH, then the
            value is `1.5`.
          example: '1.5'
        calldata:
          type: string
          description: >
            The data used to invoke a specific function or method within the
            specified contract at the destination address, with a maximum length
            of 65,000 characters.
          example: >-
            0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO
    SolContractCallDestination:
      title: SOL_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - instructions
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        instructions:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallInstruction'
        address_lookup_table_accounts:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallAddressLookupTableAccount'
    StellarContractCallDestination:
      title: STELLAR_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - contract_param
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        contract_param:
          $ref: '#/components/schemas/StellarContractCallContractParam'
    TronContractCallDestination:
      title: TRON_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - address
        - calldata
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        address:
          type: string
          description: The destination address.
          example: '0x0406db8351aa6839169bb363f63c2c808fee8f99'
        value:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 TRX, then the
            value is `1.5`.
          example: '1.5'
        calldata:
          type: string
          description: >
            The data that is used to invoke a specific function or method within
            the specified contract at the destination address.
          example: >-
            0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO
    CosmosContractCallDestination:
      title: COSMOS_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - cosmos_messages
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        cosmos_messages:
          type: array
          items:
            $ref: '#/components/schemas/CosmosContractCallMessage'
    WalletSubtype:
      type: string
      enum:
        - Asset
        - Web3
        - Org-Controlled
        - User-Controlled
        - Safe{Wallet}
        - Main
        - Sub
      example: Asset
      description: >
        The wallet sub-type. Possible values include:

        - `Asset`: Custodial Wallets (Asset Wallets).

        - `Web3`: Custodial Wallets (Web3 Wallets).

        - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets).

        - `User-Controlled`: MPC Wallets (User-Controlled Wallets).

        - `Safe{Wallet}`: Smart Contract Wallets (Safe).

        - `Main`: Exchange Wallets (Main Account).

        - `Sub`: Exchange Wallets (Sub Account).


        Each wallet sub-type requires a different set of properties. Switch
        between the above tabs for details.
    TransactionUtxo:
      type: object
      description: The UTXO information.
      properties:
        tx_hash:
          type: string
          description: The transaction hash of the UTXO.
          example: 7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo
        vout_n:
          type: integer
          description: The output index of the UTXO.
          example: 0
    MpcSigningGroup:
      type: object
      description: The information about the Signing Group of an MPC Wallet.
      required:
        - used_key_share_holder_group_id
      properties:
        used_key_share_holder_group_id:
          type: string
          description: The ID of the Signing Group.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        used_tss_node_ids:
          type: array
          items:
            type: string
            example: cobo5yb7BNEBwwp5XXedbhnzQfvQtp132W4dH4Jz4x4eDp4KA
          description: >-
            The ID of the TSS Nodes that are required to participate in the
            signature.
    CoboSafeDelegate:
      oneOf:
        - $ref: '#/components/schemas/MPCDelegate'
      discriminator:
        propertyName: delegate_type
        mapping:
          Org-Controlled:
            $ref: '#/components/schemas/MPCDelegate'
          User-Controlled:
            $ref: '#/components/schemas/MPCDelegate'
    TransferDestinationType:
      type: string
      enum:
        - Address
        - CustodialWallet
        - ExchangeWallet
      example: Address
      description: >
        The transaction destination type. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        **Note: The `CustodialWallet` destination type is deprecated and should
        no longer be used. Please use `Address` instead.**


        Each destination type requires a different set of properties. Switch
        between the above tabs for details.
    BaseContractCallSource:
      type: object
      description: >
        The information about the transaction source type. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      required:
        - source_type
        - wallet_id
        - address
      properties:
        source_type:
          $ref: '#/components/schemas/ContractCallSourceType'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        address:
          type: string
          description: The wallet address.
          example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
    ContractCallDestinationType:
      type: string
      enum:
        - EVM_Contract
        - SOL_Contract
        - STELLAR_Contract
        - TRON_Contract
        - COSMOS_Contract
      example: EVM_Contract
      description: >
        The type of the contract format. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
    SolContractCallInstruction:
      title: SOL Instruction
      type: object
      description: The information about the Solana instruction.
      required:
        - accounts
        - data
        - program_id
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallAccount'
        data:
          type: string
          description: >
            The Base64-encoded instruction data used for interacting with a
            Solana program.
          example: >-
            37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1
        program_id:
          type: string
          description: |
            The address of the Solana program (smart contract). 
          example: MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr
    SolContractCallAddressLookupTableAccount:
      title: SOL Address Lookup Table Account
      type: object
      description: The information about a Solana Address Lookup Table account.
      required:
        - alt_account_key
        - addresses
      properties:
        alt_account_key:
          type: string
          description: >-
            The on-chain public key of the Address Lookup Table (ALT) account,
            identifying the specific lookup table.
          example: ALT1Xyz9A1b2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q
        addresses:
          type: array
          items:
            type: string
            example: G7a1b2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9
          description: >-
            An array of stored account addresses within the lookup table, which
            can be referenced in transactions by index.
    StellarContractCallContractParam:
      oneOf:
        - $ref: '#/components/schemas/StellarContractCallTrustLineParam'
      discriminator:
        propertyName: contract_type
        mapping:
          TrustLine:
            $ref: '#/components/schemas/StellarContractCallTrustLineParam'
    CosmosContractCallMessage:
      title: Cosmos Message
      type: object
      description: The information about the Cosmos message.
      required:
        - type_url
        - message
      properties:
        type_url:
          type: string
          description: |
            The type URL of the Cosmos message.
          example: /babylon.btcstaking.v1.MsgCreateBTCDelegation
        message:
          type: string
          description: |
            The Base64-encoded Cosmos message.
          example: >-
            eyJ0eXBlIjoiYmFiY29zZS5idGNzdGFnaW5nLnYxLk1zZ0NyZWF0ZUJUQ0RlbGVnYXRpb24iLCJtZXNzYWdlIjp7ImNvbW1hbmRfaWQiOiJjb21tYW5kX2lkIiwibWVzc2FnZV92YWx1ZSI6Im1lc3NhZ2VfdmFsdWUiLCJtZXNzYWdlX3R5cGUiOiJtZXNzYWdlX3R5cGUifX0=
    MPCDelegate:
      title: MPC Wallet Delegate
      description: >-
        The information about the MPC Wallet as the Delegate. You can call the
        [List
        Delegates](https://www.cobo.com/developers/v2/api-references/wallets--smart-contract-wallets/list-delegates)
        operation to retrieve the applicable Delegates.
      type: object
      required:
        - delegate_type
        - wallet_id
        - address
      properties:
        delegate_type:
          $ref: '#/components/schemas/CoboSafeDelegateType'
        wallet_id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
          description: >-
            The wallet ID of the Delegate. This is required when initiating a
            transfer or contract call from Smart Contract Wallets
            (Safe{Wallet}).
        address:
          type: string
          example: '0x1234567890123456789012345678901234567890'
          description: >-
            The wallet address of the Delegate. This is required when initiating
            a transfer or contract call from Smart Contract Wallets
            (Safe{Wallet}).
    ContractCallSourceType:
      type: string
      enum:
        - Web3
        - Org-Controlled
        - User-Controlled
        - Safe{Wallet}
      example: Org-Controlled
      description: >
        The type of the source. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Each source type requires a different set of properties. Switch between
        the above tabs for details.
    SolContractCallAccount:
      title: SOL Instruction Account
      type: object
      description: The information about the account involved in a Solana instruction.
      required:
        - pubkey
        - is_signer
        - is_writable
      properties:
        pubkey:
          type: string
          description: >
            The public key of the account. If the account is a signer of this
            transaction, this property must be the same as the value of the
            `source.address` property.
          example: E4MhQWiqCLER3fFZNf8LyQFpLWW3BRxtsR5eps3c3vNS
        is_signer:
          type: boolean
          description: |
            Whether the account is the signer of this transaction:
            - `true`: The account is a signer.
            - `false`: The account is not a signer.
          example: true
        is_writable:
          type: boolean
          description: |
            Whether the account can be modified by the instruction:
            - `true`: The account can be modified by the instruction.
            - `false`: The account cannot be modified by the instruction.
          example: true
    StellarContractCallTrustLineParam:
      title: Stellar_TrustLine_Param
      type: object
      description: Parameters related to Stellar trustline operations.
      required:
        - contract_type
        - token_id
        - operation_type
      properties:
        contract_type:
          $ref: '#/components/schemas/StellarContractCallContractType'
        token_id:
          type: string
          description: The token ID, which is the unique identifier of a token.
          example: XLM_USDC
        operation_type:
          $ref: '#/components/schemas/StellarContractCallTrustLineOperationType'
    CoboSafeDelegateType:
      type: string
      enum:
        - Org-Controlled
        - User-Controlled
      example: Org-Controlled
      default: Org-Controlled
      description: |
        The wallet subtype of the Delegate. Possible values include:
        - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets).
        - `User-Controlled`: MPC Wallets (User-Controlled Wallets).
    StellarContractCallContractType:
      type: string
      enum:
        - TrustLine
      example: TrustLine
      description: |
        The type of the Stellar contract.
    StellarContractCallTrustLineOperationType:
      type: string
      enum:
        - ChangeTrust
      example: ChangeTrust
      description: |
        Operations to manage trustlines on the Stellar network.
  securitySchemes:
    CoboAuth:
      type: apiKey
      in: header
      name: BIZ-API-KEY
      description: >
        The API key. For more details, refer to [API
        key](https://www.cobo.com/developers/v2/guides/overview/cobo-auth#api-key).


        In the API playground, enter your [API
        secret](https://www.cobo.com/developers/v2/guides/overview/cobo-auth#api-secret),
        and your API key will be accordingly calculated.
    OAuth2:
      type: oauth2
      description: >-
        The [Org Access
        Token](https://www.cobo.com/developers/v2/apps/org-access-tokens). Use
        this authorization method only if you are developing Cobo Portal Apps
        for installation and use across different organizations.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.cobo.com/authorize
          tokenUrl: https://auth.cobo.com/oauth/token
          scopes:
            address_book.read: Read address book
            api_key.read: Read API key information
            callback.read: Read callback message
            callback.resend: Resend callback message
            wallet.create: Create wallet
            wallet.read: Read wallet information
            wallet.update: Update wallet information
            wallet.delete: Delete wallet information
            wallet.create_address: Create wallet address
            wallet.manage_utxo: Manage UTXO
            mpc_project.create: Create MPC project
            mpc_project.read: Read MPC project information
            mpc_project.update: Update MPC project information
            mpc_vault.create: Create MPC Vault
            mpc_vault.read: Read MPC Vault information
            mpc_vault.update: Update MPC Vault information
            mpc_key_group.create: Create MPC key group
            mpc_key_group.read: Read MPC key group information
            mpc_key_group.update: Update MPC key group information
            mpc_key_group.delete: Delete MPC key group information
            transaction.read: Read transaction information
            transaction.withdraw: Make withdrawals
            transaction.estimate_fee: Estimate transaction fee
            transaction.contract_call: Initiate contract calls
            transaction.message_sign: Initiate message signings
            transaction.stake: Stake assets
            transaction.unstake: Unstake assets
            transaction.unstake_withdraw: Withdraw unstaked assets
            transaction.manage: Manage ongoing transactions
            transaction.update: Update transaction notes
            travel_rule.read: Read travel rule information
            travel_rule.edit: Edit travel rule information
            webhook.read: Read webhook URLs/events
            webhook.edit: Edit webhook URLs
            webhook.resend: Resend webhook events
            payment_orders_payin.create: Create pay-in order
            payment_orders_payin.read: Read pay-in order information
            payment_orders_payin.update: Update pay-in order
            payment_orders_refund.create: Create payment refund order
            payment_orders_refund.read: Read payment refund order information
            payment_settlement.create: Create payment settlement request
            payment_settlement.read: Read payment settlement request information
            payment_merchant.create: Create payment merchant
            payment_merchant.read: Read payment merchant information
            payment_merchant.update: Update payment merchant
            payment_forced_sweep.create: Create payment force sweep request
            payment_forced_sweep.read: Read payment force sweep request information
            compliance_funds.refund: Refund compliance funds request
            compliance_funds.isolate: Isolate compliance funds request
            compliance_funds.unfreeze: Unfreeze compliance funds request
            compliance_funds.read: Read compliance funds request information
            compliance_kyt_review.update: Update KYT review status
            compliance_kyt_decisions.update: Update KYT decision status
            compliance_kyt_status.read: Read KYT screening status
            compliance_kya_screenings.create: Create KYA address screening requests
            compliance_kya_screenings.read: Read KYA address screening results

````