This content applies to WaaS 1.0 only. We highly recommend that you upgrade to WaaS 2.0.
View Response - Custodial Wallet
View Response - Custodial Wallet
View Response - MPC Wallet
View Response - MPC Wallet
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
from cobo_custody.client import Client
from cobo_custody.config import DEV_ENV
from cobo_custody.signer.local_signer import LocalSigner
api_secret = "your_api_secret" # your wallet api secret
# init cobo client
client = Client(signer=LocalSigner(api_secret), env=DEV_ENV, debug=False)
# get account balance
response = client.get_account_info()
print(f"Account balance: {response.result}")
package com.cobo.custody.api.client.impl;
import java.util.List;
import com.cobo.custody.api.client.CoboApiClientFactory;
import com.cobo.custody.api.client.CoboApiRestClient;
import com.cobo.custody.api.client.config.Env;
import com.cobo.custody.api.client.domain.ApiResponse;
import com.cobo.custody.api.client.domain.account.OrgInfo;
public class CoboApiExample {
public static void main(String[] args) {
String apiSecret = "your_api_secret"; // your wallet api secret
// init cobo client
CoboApiRestClient client = CoboApiClientFactory.newInstance(
new LocalSigner(apiSecret),
Env.DEV,
false).newRestClient();
// get account balance
ApiResponse<OrgInfo> getOrgInfo = client.getOrgInfo();
System.out.println("Addresses History:" + getAddressHistory.getResult());
}
}
View Response - Custodial Wallet
{
"success": true,
"result": {
"name": "test",
"assets": [
{
"coin": "ETH",
"display_code": "ETH",
"description": "Ethereum",
"decimal": 18,
"can_deposit": true,
"can_withdraw": true,
"balance": "0",
"abs_balance": "0",
"fee_coin": "ETH",
"abs_estimate_fee": "0.0003648",
"confirming_threshold": 12,
"dust_threshold": 1,
"token_address": "",
"require_memo": false
},
{
"coin": "BTC",
"display_code": "BTC",
"description": "Bitcoin",
"decimal": 8,
"can_deposit": true,
"can_withdraw": true,
"balance": "102730",
"abs_balance": "0.0010273",
"fee_coin": "BTC",
"abs_estimate_fee": "0.00013513",
"confirming_threshold": 3,
"dust_threshold": 546,
"token_address": "",
"require_memo": false
}
]
}
}
from cobo_custody.config import DEV_ENV
from cobo_custody.signer.local_signer import LocalSigner
from cobo_custody.client.mpc_client import MPCClient
api_secret = "your api secret" # your wallet api secret
# init cobo client
mpc_client = MPCClient(signer=LocalSigner(api_secret), env=DEV_ENV, debug=False)
# get balance list
response = client.list_balances("ETH",0,50)
print(f"Address History: {response.result}")
package com.cobo.custody.api.client.impl;
import java.math.BigDecimal;
import java.math.BigInteger;
import com.cobo.custody.api.client.CoboApiClientFactory;
import com.cobo.custody.api.client.CoboMPCApiRestClient;
import com.cobo.custody.api.client.config.Env;
import com.cobo.custody.api.client.domain.ApiResponse;
import com.cobo.custody.api.client.domain.account.MPCListBalances;
public class CobоCustodyApiClientExample {
public static void main(String[] args) {
String apiSecret = "your_api_secret"; // your wallet api secret
String coin = "ETH"; // Your testing coin
// init client
CoboMPCApiRestClient mpcClient = CoboApiClientFactory.newInstance(
new LocalSigner(apiSecret),
Env.DEV,
false).newMPCRestClient();
// get balance list
ApiResponse<MPCListBalances> listBalances = client.listBalances(coin,0,50);
System.out.println("Balance List: " + generateAddressResponse.getResult());
}
}
View Response - MPC Wallet
{
"success": true,
"result": {
"total": 2,
"coin_data": [
{
"address": "0xe0cc496b3d9b0f8019b678066b9db81261d827bc",
"coin": "ETH",
"chain_code": "ETH",
"display_code": "ETH",
"description": "Ethereum",
"balance": "49999999999999999986",
"decimal": 18
}
],
"nft_data": [
{
"nft_code": "NFT_ETH_BLUE_CHURCH",
"token_id": "200",
"address": "0xcc656c94b8ec881ddd9611e8ad4a4eca9f859e7b",
"chain_code": "ETH",
"contract_address": "0x357fd2942e8ee435d7d21859ecae99bd597d8779",
"balance": "1"
}
]
}
}
Was this page helpful?