add dependency in package.json

  "dependencies": {
    "cobo-custody": ""


yarn build
yarn test -env=develop/prod -secretKey=<yourApiSecret>



Generate Key Pair

const { LocalSigner } = require("cobo-custody");

const keyPair = LocalSigner.newKeyPair();

Please refer to the link for how to use apiKey

Initialize RestClient

const { Client } = require("cobo-custody");
const { LocalSigner } = require("cobo-custody");
const { DEVELOP, PROD } = require("cobo-custody");
const client = new Client(API_SIGNER, DEVELOP, true);

Initialize ApiSigner

ApiSigner can be instantiated through

const { LocalSigner } = require("cobo-custody");
const signer = new LocalSigner(

In some cases, your private key cannot be exported, for example, your private key is in aws kms, you should pass in your own implementation by implements ApiSigner interface


Check Account Details

const res = await client.getAccountInfo();

Get Coin Details

const res = await client.getCoinInfo("ETH");

Get New Deposit Address

const res = await client.newDepositAddress("BTC", true);

Batch New Deposit Address

const res = await client.batchNewDepositAddress("ETH", 4, true);

Verify Deposit Address

const res = await client.verifyDepositAddress(

Batch Verify Deposit Address

const res = await client.batchVerifyDepositAddress(

Verify Valid Address

let res = await client.verifyValidAddress(

Get Address History List

const res = await client.getAddressHistory("ETH", 0, 50, 0);

Loop Alliance

Check Loop Address Details

const res = await client.checkLoopAddressDetails(

Verify Loop Address List

const res = await client.verifyLoopAddressList(

Loop Transaction Explorer

To help your user to check the Loop transaction, we offer you an explorer, you may insert the following URL in your platform:[Loop_ID] e.g.


Get Transaction Details

const res = await client.getTransactionDetail(

Get Transactions By Txid

const res = await client.getTransactionsByTxId(

Obtain the list of confirmed transactions through ID query(deposit&withdraw)

const res = await client.getTransactionsById({});

Obtain the list of confirmed transactions through time query(deposit&withdraw)

const res = await client.getTransactionsByTime({});

Get Pending Transactions

const res = await client.getPendingTransactions({});

Get Pending Deposit Details

const res = await client.getPendingDepositDetails(


Submit Withdraw Request

const res = await client.withdraw({
  coin: "TETH",
  request_id: "request_id_" + String(new Date().getTime()),
  address: "0xb744adc8d75e115eec8e582eb5e8d60eb0972037",
  amount: "1",
  memo: "cobo",

Get Withdraw Information

const res = await client.getWithdrawInfo("teth29374893624");


Get a Staking Product Details

let res = await client.getStakingProductList(productId, "en");

Get All Staking Product List

const res = await client.getStakingProductList();


res = await client.stake(productId, "1000000");


res = await client.unstake(productId, "1000000");

Get Staking Data

const res = await client.getStakingData();

Get Unstaking Data

const res = await client.getStakingHistory({});

Get All Staking History