import cobo_waas2
from cobo_waas2.models.extended_token_info import ExtendedTokenInfo
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.WalletsApi(api_client)
token_id = "ETH_USDT"
try:
# Get token information
api_response = api_instance.get_token_by_id(token_id)
print("The response of WalletsApi->get_token_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WalletsApi->get_token_by_id: %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.WalletsApi;
import com.cobo.waas2.model.*;
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>");
WalletsApi apiInstance = new WalletsApi();
String tokenId = "ETH_USDT";
try {
ExtendedTokenInfo result = apiInstance.getTokenById(tokenId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WalletsApi#getTokenById");
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() {
tokenId := "ETH_USDT"
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.WalletsAPI.GetTokenById(ctx, tokenId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WalletsAPI.GetTokenById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTokenById`: ExtendedTokenInfo
fmt.Fprintf(os.Stdout, "Response from `WalletsAPI.GetTokenById`: %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.WalletsApi();
const token_id = "ETH_USDT";
apiInstance.getTokenById(token_id).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"token_id": "ETH_USDT",
"chain_id": "ETH",
"can_deposit": true,
"can_withdraw": true,
"asset_id": "USDT",
"symbol": "USDT",
"name": "Tether USDT",
"decimal": 18,
"icon_url": "https://d.cobo.com/public/logos/USDT.png",
"token_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"fee_token_id": "ETH",
"dust_threshold": "0.00000546",
"custodial_minimum_deposit_threshold": "0.0001",
"asset_model_type": "Account"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}Get token information
This operation retrieves the detailed information about a specified token.
import cobo_waas2
from cobo_waas2.models.extended_token_info import ExtendedTokenInfo
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.WalletsApi(api_client)
token_id = "ETH_USDT"
try:
# Get token information
api_response = api_instance.get_token_by_id(token_id)
print("The response of WalletsApi->get_token_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WalletsApi->get_token_by_id: %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.WalletsApi;
import com.cobo.waas2.model.*;
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>");
WalletsApi apiInstance = new WalletsApi();
String tokenId = "ETH_USDT";
try {
ExtendedTokenInfo result = apiInstance.getTokenById(tokenId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WalletsApi#getTokenById");
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() {
tokenId := "ETH_USDT"
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.WalletsAPI.GetTokenById(ctx, tokenId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WalletsAPI.GetTokenById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTokenById`: ExtendedTokenInfo
fmt.Fprintf(os.Stdout, "Response from `WalletsAPI.GetTokenById`: %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.WalletsApi();
const token_id = "ETH_USDT";
apiInstance.getTokenById(token_id).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"token_id": "ETH_USDT",
"chain_id": "ETH",
"can_deposit": true,
"can_withdraw": true,
"asset_id": "USDT",
"symbol": "USDT",
"name": "Tether USDT",
"decimal": 18,
"icon_url": "https://d.cobo.com/public/logos/USDT.png",
"token_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"fee_token_id": "ETH",
"dust_threshold": "0.00000546",
"custodial_minimum_deposit_threshold": "0.0001",
"asset_model_type": "Account"
}{
"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.extended_token_info import ExtendedTokenInfo
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.WalletsApi(api_client)
token_id = "ETH_USDT"
try:
# Get token information
api_response = api_instance.get_token_by_id(token_id)
print("The response of WalletsApi->get_token_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WalletsApi->get_token_by_id: %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.WalletsApi;
import com.cobo.waas2.model.*;
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>");
WalletsApi apiInstance = new WalletsApi();
String tokenId = "ETH_USDT";
try {
ExtendedTokenInfo result = apiInstance.getTokenById(tokenId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WalletsApi#getTokenById");
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() {
tokenId := "ETH_USDT"
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.WalletsAPI.GetTokenById(ctx, tokenId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WalletsAPI.GetTokenById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTokenById`: ExtendedTokenInfo
fmt.Fprintf(os.Stdout, "Response from `WalletsAPI.GetTokenById`: %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.WalletsApi();
const token_id = "ETH_USDT";
apiInstance.getTokenById(token_id).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.
Path Parameters
The token ID, which is the unique identifier of a token.
Response
The request was successful.
The token information, including whether the token can be deposited or withdrawn.
The token ID, which is the unique identifier of a token.
"ETH_USDT"
The ID of the chain on which the token operates.
"ETH"
Whether deposits are enabled for this token.
true
Whether withdrawals are enabled for this token.
true
(This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
"USDT"
The token symbol, which is the abbreviated name of a token.
"USDT"
The token name, which is the full name of a token.
"Tether USDT"
The token decimal.
18
The URL of the token icon.
"https://d.cobo.com/public/logos/USDT.png"
The token address, if applicable.
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
The fee token ID. A fee token is the token with which you pay transaction fees.
"ETH"
The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events.
Note: Cobo Looptransfers do not have this limitation.
"0.0001"
The asset model type. Possible values include:
-
Account: The account model. This model tracks the balances of user accounts, similar to the traditional banking system. -
UTXO: The UTXO model. This model tracks individual outputs of a transaction rather than account balances. Each transaction consists of inputs (previous UTXOs) and outputs (new UTXOs).
Account, UTXO "Account"
Was this page helpful?
