import cobo_waas2
from cobo_waas2.models.estimated_fee import EstimatedFee
from cobo_waas2.models.tokenization_estimate_fee_request import (
TokenizationEstimateFeeRequest,
)
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.TokenizationApi(api_client)
tokenization_estimate_fee_request = cobo_waas2.TokenizationEstimateFeeRequest(
operation_params=cobo_waas2.TokenizationEstimateFeeRequestOperationParams(
cobo_waas2.TokenizationIssueEstimateFeeParams(
chain_id="ETH",
source=cobo_waas2.TokenizationTokenOperationSource(
cobo_waas2.TokenizationMpcOperationSource(
source_type="Org-Controlled",
wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
)
),
token_params=cobo_waas2.TokenizationIssueTokenParamsTokenParams(
cobo_waas2.TokenizationERC20TokenParams(
standard="ERC20",
name="My Awesome Token",
symbol="MAT",
decimals=18,
)
),
operation_type="Issue",
)
)
)
try:
# Estimate tokenization operation fee
api_response = api_instance.estimate_tokenization_fee(
tokenization_estimate_fee_request
)
print("The response of TokenizationApi->estimate_tokenization_fee:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TokenizationApi->estimate_tokenization_fee: %s\n"
% e
)
// 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.TokenizationApi;
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>");
TokenizationApi apiInstance = new TokenizationApi();
TokenizationEstimateFeeRequest tokenizationEstimateFeeRequest =
new TokenizationEstimateFeeRequest()
.operationParams(
new TokenizationEstimateFeeRequestOperationParams(
new TokenizationIssueEstimateFeeParams()
.chainId("ETH")
.source(
new TokenizationTokenOperationSource(
new TokenizationMpcOperationSource()
.sourceType(TokenizationOperationSourceType.ORG_CONTROLLED)
.walletId(
UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"))
.address("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")))
.tokenParams(
new TokenizationIssueTokenParamsTokenParams(
new TokenizationERC20TokenParams()
.standard(TokenizationTokenStandard.ERC20)
.name("My Awesome Token")
.symbol("MAT")
.decimals(18)))
.operationType(TokenizationOperationType.ISSUE)));
try {
EstimatedFee result = apiInstance.estimateTokenizationFee(tokenizationEstimateFeeRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokenizationApi#estimateTokenizationFee");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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() {
tokenizationEstimateFeeRequest := *coboWaas2.NewTokenizationEstimateFeeRequest(coboWaas2.TokenizationEstimateFeeRequest_operation_params{TokenizationBurnEstimateFeeParams: coboWaas2.NewTokenizationBurnEstimateFeeParams(coboWaas2.TokenizationTokenOperationSource{TokenizationMpcOperationSource: coboWaas2.NewTokenizationMpcOperationSource(coboWaas2.TokenizationOperationSourceType("Org-Controlled"), "f47ac10b-58cc-4372-a567-0e02b2c3d479", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")}, []coboWaas2.TokenizationBurnTokenParamsBurnsInner{*coboWaas2.NewTokenizationBurnTokenParamsBurnsInner("0.99", "0x051A924H4dCb264226d7B036C2893a0D344")}, coboWaas2.TokenizationOperationType("Issue"), "8a4f9324-ef2a-43cf-9f0e-d7f99999d3e8")})
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.TokenizationAPI.EstimateTokenizationFee(ctx).
TokenizationEstimateFeeRequest(tokenizationEstimateFeeRequest).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TokenizationAPI.EstimateTokenizationFee``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EstimateTokenizationFee`: EstimatedFee
fmt.Fprintf(os.Stdout, "Response from `TokenizationAPI.EstimateTokenizationFee`: %v\n", resp)
}
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.TokenizationApi();
const TokenizationEstimateFeeRequest =
new CoboWaas2.TokenizationEstimateFeeRequest();
apiInstance.estimateTokenizationFee(TokenizationEstimateFeeRequest).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"fee_type": "EVM_EIP_1559",
"token_id": "TRON",
"fee_amount": "0.1",
"is_loop": false
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}Estimate tokenization operation fee
This operation estimates the fee required for tokenization operations. For EVM-based chains, this calculates the gas cost for the specified operation.
import cobo_waas2
from cobo_waas2.models.estimated_fee import EstimatedFee
from cobo_waas2.models.tokenization_estimate_fee_request import (
TokenizationEstimateFeeRequest,
)
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.TokenizationApi(api_client)
tokenization_estimate_fee_request = cobo_waas2.TokenizationEstimateFeeRequest(
operation_params=cobo_waas2.TokenizationEstimateFeeRequestOperationParams(
cobo_waas2.TokenizationIssueEstimateFeeParams(
chain_id="ETH",
source=cobo_waas2.TokenizationTokenOperationSource(
cobo_waas2.TokenizationMpcOperationSource(
source_type="Org-Controlled",
wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
)
),
token_params=cobo_waas2.TokenizationIssueTokenParamsTokenParams(
cobo_waas2.TokenizationERC20TokenParams(
standard="ERC20",
name="My Awesome Token",
symbol="MAT",
decimals=18,
)
),
operation_type="Issue",
)
)
)
try:
# Estimate tokenization operation fee
api_response = api_instance.estimate_tokenization_fee(
tokenization_estimate_fee_request
)
print("The response of TokenizationApi->estimate_tokenization_fee:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TokenizationApi->estimate_tokenization_fee: %s\n"
% e
)
// 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.TokenizationApi;
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>");
TokenizationApi apiInstance = new TokenizationApi();
TokenizationEstimateFeeRequest tokenizationEstimateFeeRequest =
new TokenizationEstimateFeeRequest()
.operationParams(
new TokenizationEstimateFeeRequestOperationParams(
new TokenizationIssueEstimateFeeParams()
.chainId("ETH")
.source(
new TokenizationTokenOperationSource(
new TokenizationMpcOperationSource()
.sourceType(TokenizationOperationSourceType.ORG_CONTROLLED)
.walletId(
UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"))
.address("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")))
.tokenParams(
new TokenizationIssueTokenParamsTokenParams(
new TokenizationERC20TokenParams()
.standard(TokenizationTokenStandard.ERC20)
.name("My Awesome Token")
.symbol("MAT")
.decimals(18)))
.operationType(TokenizationOperationType.ISSUE)));
try {
EstimatedFee result = apiInstance.estimateTokenizationFee(tokenizationEstimateFeeRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokenizationApi#estimateTokenizationFee");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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() {
tokenizationEstimateFeeRequest := *coboWaas2.NewTokenizationEstimateFeeRequest(coboWaas2.TokenizationEstimateFeeRequest_operation_params{TokenizationBurnEstimateFeeParams: coboWaas2.NewTokenizationBurnEstimateFeeParams(coboWaas2.TokenizationTokenOperationSource{TokenizationMpcOperationSource: coboWaas2.NewTokenizationMpcOperationSource(coboWaas2.TokenizationOperationSourceType("Org-Controlled"), "f47ac10b-58cc-4372-a567-0e02b2c3d479", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")}, []coboWaas2.TokenizationBurnTokenParamsBurnsInner{*coboWaas2.NewTokenizationBurnTokenParamsBurnsInner("0.99", "0x051A924H4dCb264226d7B036C2893a0D344")}, coboWaas2.TokenizationOperationType("Issue"), "8a4f9324-ef2a-43cf-9f0e-d7f99999d3e8")})
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.TokenizationAPI.EstimateTokenizationFee(ctx).
TokenizationEstimateFeeRequest(tokenizationEstimateFeeRequest).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TokenizationAPI.EstimateTokenizationFee``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EstimateTokenizationFee`: EstimatedFee
fmt.Fprintf(os.Stdout, "Response from `TokenizationAPI.EstimateTokenizationFee`: %v\n", resp)
}
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.TokenizationApi();
const TokenizationEstimateFeeRequest =
new CoboWaas2.TokenizationEstimateFeeRequest();
apiInstance.estimateTokenizationFee(TokenizationEstimateFeeRequest).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"fee_type": "EVM_EIP_1559",
"token_id": "TRON",
"fee_amount": "0.1",
"is_loop": false
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}import cobo_waas2
from cobo_waas2.models.estimated_fee import EstimatedFee
from cobo_waas2.models.tokenization_estimate_fee_request import (
TokenizationEstimateFeeRequest,
)
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.TokenizationApi(api_client)
tokenization_estimate_fee_request = cobo_waas2.TokenizationEstimateFeeRequest(
operation_params=cobo_waas2.TokenizationEstimateFeeRequestOperationParams(
cobo_waas2.TokenizationIssueEstimateFeeParams(
chain_id="ETH",
source=cobo_waas2.TokenizationTokenOperationSource(
cobo_waas2.TokenizationMpcOperationSource(
source_type="Org-Controlled",
wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
)
),
token_params=cobo_waas2.TokenizationIssueTokenParamsTokenParams(
cobo_waas2.TokenizationERC20TokenParams(
standard="ERC20",
name="My Awesome Token",
symbol="MAT",
decimals=18,
)
),
operation_type="Issue",
)
)
)
try:
# Estimate tokenization operation fee
api_response = api_instance.estimate_tokenization_fee(
tokenization_estimate_fee_request
)
print("The response of TokenizationApi->estimate_tokenization_fee:\n")
pprint(api_response)
except Exception as e:
print(
"Exception when calling TokenizationApi->estimate_tokenization_fee: %s\n"
% e
)
// 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.TokenizationApi;
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>");
TokenizationApi apiInstance = new TokenizationApi();
TokenizationEstimateFeeRequest tokenizationEstimateFeeRequest =
new TokenizationEstimateFeeRequest()
.operationParams(
new TokenizationEstimateFeeRequestOperationParams(
new TokenizationIssueEstimateFeeParams()
.chainId("ETH")
.source(
new TokenizationTokenOperationSource(
new TokenizationMpcOperationSource()
.sourceType(TokenizationOperationSourceType.ORG_CONTROLLED)
.walletId(
UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"))
.address("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")))
.tokenParams(
new TokenizationIssueTokenParamsTokenParams(
new TokenizationERC20TokenParams()
.standard(TokenizationTokenStandard.ERC20)
.name("My Awesome Token")
.symbol("MAT")
.decimals(18)))
.operationType(TokenizationOperationType.ISSUE)));
try {
EstimatedFee result = apiInstance.estimateTokenizationFee(tokenizationEstimateFeeRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokenizationApi#estimateTokenizationFee");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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() {
tokenizationEstimateFeeRequest := *coboWaas2.NewTokenizationEstimateFeeRequest(coboWaas2.TokenizationEstimateFeeRequest_operation_params{TokenizationBurnEstimateFeeParams: coboWaas2.NewTokenizationBurnEstimateFeeParams(coboWaas2.TokenizationTokenOperationSource{TokenizationMpcOperationSource: coboWaas2.NewTokenizationMpcOperationSource(coboWaas2.TokenizationOperationSourceType("Org-Controlled"), "f47ac10b-58cc-4372-a567-0e02b2c3d479", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")}, []coboWaas2.TokenizationBurnTokenParamsBurnsInner{*coboWaas2.NewTokenizationBurnTokenParamsBurnsInner("0.99", "0x051A924H4dCb264226d7B036C2893a0D344")}, coboWaas2.TokenizationOperationType("Issue"), "8a4f9324-ef2a-43cf-9f0e-d7f99999d3e8")})
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.TokenizationAPI.EstimateTokenizationFee(ctx).
TokenizationEstimateFeeRequest(tokenizationEstimateFeeRequest).
Execute()
if err != nil {
fmt.Fprintf(
os.Stderr,
"Error when calling `TokenizationAPI.EstimateTokenizationFee``: %v\n",
err,
)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EstimateTokenizationFee`: EstimatedFee
fmt.Fprintf(os.Stdout, "Response from `TokenizationAPI.EstimateTokenizationFee`: %v\n", resp)
}
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.TokenizationApi();
const TokenizationEstimateFeeRequest =
new CoboWaas2.TokenizationEstimateFeeRequest();
apiInstance.estimateTokenizationFee(TokenizationEstimateFeeRequest).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
Authorizations
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
The request body to estimate tokenization operation fee.
- Issue
- Mint
- Burn
- Pause
- Unpause
- Update allowlist addresses
- Update blocklist addresses
- Toggle allowlist
- Contract call
- Option 10
Show child attributes
Show child attributes
Response
Successfully retrieved the estimated fee for token issuance.
- Fixed
- EVM_EIP_1559
- EVM_Legacy
- UTXO
- SOL
- FIL
The estimated transaction fee based on the fixed fee model.
For more details about the fixed fee model, see Fee models.
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.
Fixed, EVM_EIP_1559, EVM_Legacy, UTXO, SOL, FIL "EVM_EIP_1559"
The token used to pay the transaction fee.
"TRON"
The transaction fee that you need to pay for the transaction.
"0.1"
Was this page helpful?
