中文
NAV
java

ChainUp MPC Wallet

ChainUp Custody ensures the overall implementation and application of MPC technology, providing the highest level of market security for your investment assets. User private keys are jointly managed by users and ChainUp Custody, granting you complete control over your assets without limitations of time and location. This technology facilitates easy backup and recovery of assets, eliminating single-point failures in private key management and enhancing the security of self-managed assets.

The nature of the MPC protocol allows users to know which private key shares participate in signing without requiring participants to disclose their identities externally. This ensures the confidentiality of each party's input. Additionally, MPC guarantees that the signature generation party remains private and invisible on the network, ensuring personal data privacy while maintaining the trustworthiness of multi-party cooperation and transactions.

ChainUp Custody MPC provides a simple and efficient integration component and API, enabling developers to quickly connect to the system. This allows you to automate the management of your wallet and transaction processes. Furthermore, we offer transaction message notifications to promptly alert you of events.

The API primarily offers the following functions:

Please contact your dedicated Business Manager or email to custody@chainup.com for API information.

Integration Guide

Developers can quickly integrate the ChainUp Custody - MPC Wallet API according to the following process.

Open an Account

To use the ChainUp MPC Wallet, you need to open an account. Clients can complete the account opening process independently.

Download the App

Users can obtain the app through the following methods:

Method 1: Visit the official website (https://custody.chainup.com/download) using a mobile browser or scan the QR code with a mobile device.

Method 2: Download from the App Store

Register and Login

The system supports registration and login via email or mobile number. Registration and login are combined into one function. The first login will automatically complete the registration.

Create a Wallet

After logging in, switch to MPC and create a wallet for your team in the app. The wallet creation will generate one private key share locally in the app. It is crucial to promptly back up the private key share, as some functions will be unavailable without it.

Currently, there are two backup methods: "Manual Copy" and "Upload to Cloud Server."

Wallets include both a Main Wallet and Sub Wallets. A main wallet can create multiple sub-wallets.

Use Cases:

The Private Key Password is used for encrypting and decrypting private key shares and is crucial for your asset security. Please ensure timely backup. The backup methods and password are essential for the secure use of the MPC wallet.

If the wallet configuration does not meet your requirements, please contact your dedicated Business Manager or email to custody@chainup.com for support.

Preparation

Before system development, the wallet needs to complete the following preparations.

Create API

The wallet creator should log in to the ChainUp Console System and create an API on the API Management page.

About RSA Public Key

To ensure secure data transmission, ChainUp uses the RSA-2048 PKCS#8 key format for asymmetric encryption of API request and response data. The public key is used to decrypt request data and needs to be uploaded to ChainUp, while the private key is used to encrypt data and is configured by the client on the corresponding server and securely stored.

Explanation of RSA Public-Private Key Pairs

Callback Notifications

The system currently supports three types of callback services: Transaction Status Callback, Signature Callback, and Transaction Approval Callback.

Configure Co-Signer

Co-Signer is commonly used for automated signing of OpenAPI-initiated transactions and automatic consolidation of transactions.

Co-Signer Server Selection

Co-Signer supports deployment on a regular server or supports SGX server. For security reasons, it is recommended to use a server with SGX support, preferably from Microsoft cloud services. View Co-Signer Server Configuration Requirements

Co-Signer Configuration

Co-Signer provides a callback handler, which is an optional component:

Create Co-Signer Private Key Shares

After configuring API and Co-Signer programs, create private key shares for Co-Signer in the app.

The wallet creator can create Co-Signer private key shares on the MPC Wallet Security - Co-Signer page. The created Co-Signer private key shares will be encrypted and synchronized to the Co-Signer server using the Co-Signer RSA public key configured by the client on the ChainUp platform.

Enable Automatic Consolidation

To enhance assets security and utilization, some main chains need to be configured for consolidation and refueling functions. ChainUp provides a set of automated consolidation solutions for clients. The specific operation process is as follows:

Login to the ChainUp management platform and create it on the Co-Signer page;

Application Consolidation Scope

Configure the sub-wallets for which assets consolidation should be performed.

Consolidation Strategy

Configure the currencies for which assets consolidation should be performed, along with the consolidation threshold. Assets consolidation will be automatically triggered when the threshold is exceeded and the miner fee is set below the configured level. Users can customize the consolidation threshold and maximum miner fee through the Console or API.

Refueling Strategy

Configure the replenishment of miner fees for the consolidated currencies. Since token consolidation requires the use of the main coin as a miner fee, when the token in the address meets the consolidation strategy and the address does not have the main coin, replenishment of miner fees will be triggered from the refueling wallet to the address to be consolidated. The quantity of replenished miner fees can be customized, and it is essential to ensure that the replenished miner fee is lower than the consolidation threshold.

It is recommended for clients to configure insufficient miner fee alerts to replenish in a timely manner and avoid affecting user transfers (withdrawals).

Integration Testing

To facilitate clients in quickly and conveniently integrating the system, ChainUp has outlined the core processes based on past client integration experiences, focusing on the integration solutions for [Get Receiving(Deposit) Address] , [User Receiving(Deposit)] and [User Transfer (Withdrawal]. The details are as follows:

Get Receiving Address

Addresses support two types: system addresses and user addresses. The system address is used for assets consolidation or change, and cannot be assigned to users.

User Receiving (Deposit)

User Transfer (Withdrawal)

If the transaction miner fee is too low, the transaction can be accelerated for quick confirmation. Users can perform this operation through the console or use the API /api/mpc/billing/withdraw_pending.

Supported blockchains for acceleration can be obtained through the API /api/mpc/wallet/open_coin.

API Interface

Overview

Domain and API Key

Production Environment Domain (Not applicable to the testing environment): https://openapi.hicoin.vip/
app_id: Obtain after creating a wallet
rsa_wallet_pub: Custody system public key; Obtain from Custody system after creating a wallet
rsa_third_prv: Client private key; Generated and saved independently
rsa_third_pub: Client public key; Generated independently; Configure in Custody system after creating a wallet
rsa_co_signer_pri: Co-Signer private key; Generated using Co-Signer or generated and saved independently
rsa_co_signer_pub: Co-Signer public key; Generated using Co-Signer or generated independently; Configure in Custody system after creating a wallet

RSA Public-Private Key Format

RSA Public-Private Key Generator

Password Length: 2048

Key Format: PKCS#8

Interface Rules

Transmission Method: https (temporary use of http in the testing environment)
Response Status Code: 0 indicates processing success, non-0 indicates request error or system exception
Request Address: Domain + Interface Address
Encryption Algorithm: RSA

Request Example:

POST /api/mpc/sub_wallet/assets

app_id=2128eb8de9e932a4376909f3d69424cc&data=SWYYr-LBVAmaS0eq8n-CUT_nHkM3OBxyWOsImMTe41UaqAoYI2ZghmaphXHov-7hsRsVmOhyPqC-JFuRGvonJKFd2Jirxv6Vn_8V40r_MMYTkhqcviQbZWYW5xX8Ai8CIpqas9fIWVDIYA_NKBl0UCJpwGxscxLNpjq5Z8-BTyIYDsVBquM9zEQGBCfcA7szD9n2fN_loSkoexlwqV8wg9HIZO5yQ6utZ_Kt0lNDQQb8zn8BwfAvsEsbJlOINUAqhxh1vV_AJ4bXn2uYx8TaYcBht-n_ZcBdxIDt975dbOFUiH-oCzIuDi1oLDtb4EylfCvhU5E4ozel_lQ-6cyIG0Dqiiyx0RFFOCJzPSXIoV031pvoa8pTCpkWklh8mRw1rylBgeZtqSxpnJO2_u2RIlXq6Hs8Yly9CmhIXaSrUgPir0h6xVxlf4VC6PFVCkiiTlp0kZ_H_UbKm0nUis3v3U2sflWJ2C449waSrikhuxVrFAQ6PQmrFVCAE6MYXNrFXJQuam2HAIQNSGbFQjspw8b_bXyfyZMGZ3K2oBC4I_v3eETTdPe0pfSNJb-5g37K0tOAr_UFbWK8pkC8yl56fSjn8tcR3yCRWwoi8jxTcUBiswTtvXZtzgG4dyzkaHXjsZjSGiywXSqP76VZWlyOmAx6IDSViLcPLPISdU3ruCI

Common Request Parameters

Param Type Required Description
app_id String Required Merchant unique identifier
data String Optional Encrypted string; encrypted with the Client's RSA private key, specific encryption information is described in the Request Parameter Data Structure of each interface

Common Response Parameters

Param Type Required Description
data String Required Encrypted string; encrypted with Custody's RSA private key, specific encryption information is described in the Response Result Data Decryption Format

Response Example:

{
    "data": "SWYYr-LBVAmaS0eq8n-CUT_nHkM3OBxyWOsImMTe41UaqAoYI2ZghmaphXHov
        -7hsRsVmOhyPqC-JFuRGvonJKFd2Jirxv6Vn_8V40r_MMYTkhqcviQbZWYW5xX8Ai8CIpqas9fIWVDIYA
        _NKBl0UCJpwGxscxLNpjq5Z8-BTyIYDsVBquM9zEQGBCfcA7szD9n2fN_loSkoexlwqV8wg9HIZO5yQ6utZ_
        Kt0lNDQQb8zn8BwfAvsEsbJlOINUAqhxh1vV_AJ4bXn2uYx8TaYcBht-n_ZcBdxIDt975dbOFUiH-
        oCzIuDi1oLDtb4EylfCvhU5E4ozel_lQ-6cyIG0Dqiiyx0RFFOCJzPSXIoV031pvoa8pTCpkWklh8mRw1rylBgeZtqSxpnJO2
        _u2RIlXq6Hs8Yly9CmhIXaSrUgPir0h6xVxlf4VC6PFVCkiiTlp0kZ
        _H_UbKm0nUis3v3U2sflWJ2C449waSrikhuxVrFAQ6PQmrFVCAE6MYXNrFXJQuam2HAIQNSGbFQjspw8b_
        bXyfyZMGZ3K2oBC4I_v3eETTdPe0pfSNJb-5g37K0tOAr_UFbWK8pkC8yl56fSjn8tcR3yCRWwoi8jxTcUBiswTtvXZtzgG4dyzka
        HXjsZjSGiywXSqP76VZWlyOmAx6IDSViLcPLPISdU3ruCI"
}

Decrypted Response Parameters

Param Type Required Description
code String Yes Status code, e.g., 100002
msg String Yes Explanation of the response result, e.g., Request parameter error
data String No Specific response data; data structure defined in the Response Parameter Data Structure of each interface

Encryption and Decryption

The values of the request parameter data and the response field data are both encrypted with RSA and then encrypted with base64urlsafe.

Wallet

Get Supported Main Chains

Get the supported MPC main chain coins and the MPC main chain coins opened in ChainUp Custody.

HTTP Request

GET /api/mpc/wallet/open_coin

Request Parameters

Param Type Required Description
time long Yes Current timestamp
charset String Yes Encoding format, typically "utf-8"

Response:

{
    "open_main_chain":[
        {
            "coin_net":"BTC",
            "symbol":"BTC",
            "symbol_alias":"BTC",
            "support_acceleration" : false
        },
        {
            "coin_net":"ETH",
            "symbol":"ETH",
            "symbol_alias":"ETH",
            "support_acceleration" : true
        }
    ],
    "support_main_chain":[
        {
            "coin_net":"BTC",
            "if_open_chain":true,
            "symbol":"BTC",
            "symbol_alias":"BTC",
            "support_acceleration" : false
        },
        {
            "coin_net":"ETH",
            "if_open_chain":false,
            "symbol":"ETH",
            "symbol_alias":"ETH",
            "support_acceleration" : true
        }
    ]
}

Response Data Parameters

Param Type Required Description
open_main_chain Array No Opened main chains in the wallet
coin_net String No Coin network, e.g., ETH
symbol String Yes Unique identifier for the coin, used for transfers
symbol_alias String No Real name of the coin, e.g., USDT
support_acceleration Boolean Yes Indicates if acceleration is supported (true/false)
support_main_chain Array No Supported main chains in MPC
coin_net String No Coin network, e.g., ETH
symbol String Yes Unique identifier for the coin, used for transfers
symbol_alias String No Real name of the coin, e.g., USDT
if_open_chain Boolean Yes Indicates if the main chain is opened (false/true)
support_acceleration Boolean Yes Indicates if acceleration is supported (true/false)

Get MPC Coin Details

Get the details of MPC wallet main chain coins and tokens supported by ChainUp Custody

HTTP Request

GET /api/mpc/coin_list

Request Parameters

Param Type Required Description
time Long Yes Current timestamp
charset String Yes Encoding format, pass utf-8 in general cases
coin_symbol String No Unique identifier for the coin, used in transfers, e.g., USDTERC20
base_coin String No Name of the base coin on the main chain, unique identifier for the coin, used in transfers, e.g., ETH
open_chain Boolean No Main chain coin, default to getting all, true to get opened coins, false to get unopened coins

Response:

[
    {
        "address_regex":".*",
        "address_tag_regex":"",
        "base_symbol":"BSC",
        "coin_net":"BSC",
        "contract_address":"0xe9e7cea3dedca5984780bafc599bd69add087d56",
        "decimals":"18",
        "deposit_confirmation":"1",
        "address_link":"https://www.bscscan.com/address/",
        "tx_link":"https://www.bscscan.com/tx/",
        "icon":"",
        "if_open_chain":true,
        "name":"BUSD Token;BSC;BUSD",
        "real_symbol":"BUSD",
        "support_memo":"0",
        "support_token":"0",
        "symbol":"BUSD",
        "symbol_alias":"BUSD",
        "support_acceleration": true,
        "support_multi_addr" : true
    },
    {
        "address_regex":".*",
        "address_tag_regex":"",
        "base_symbol":"ETH",
        "coin_net":"ETH",
        "contract_address":"0xdac17f958d2ee523a2206206994597c13d831ec7",
        "decimals":"18",
        "deposit_confirmation":"1",
        "address_link":"https://etherscan.io/address/",
        "tx_link":"https://etherscan.io/tx/",
        "icon":"",
        "if_open_chain":false,
        "name":"USDTERC20;ETH;USDT",
        "real_symbol":"USDTERC20",
        "support_memo":"0",
        "support_token":"0",
        "symbol":"USDTERC20",
        "symbol_alias":"USDT",
        "support_acceleration": true,
        "support_multi_addr" : true
    }
]

Response Data Parameters

Param Type Required Description
symbol String Yes Unique identifier of the coin, used for transfers, e.g., BUSD
symbol_alias String Yes Alias of the coin in Custody
real_symbol String Yes Name of the coin on the blockchain
base_symbol String Yes Unique identifier of the base coin of the main chain, used for transfers, e.g., BSC
coin_net String No Coin network
contract_address String No Contract address supported by MPC main chain
deposit_confirmation String Yes Number of confirmations for deposits
explorer String No Blockchain explorer URL
icon String Yes Coin icon
if_open_chain Boolean Yes Indicates if the main chain is open (false/true)
decimals String Yes Coin precision
support_memo String Yes Indicates if memo is supported (0:not supported, 1:supported)
support_token String Yes Indicates if token coins are supported (0:not supported, 1:supported for main chain coins, empty for tokens)
address_tag_regex String Yes Address tag regex pattern
address_regex String Yes Address regex pattern
support_acceleration Boolean Yes Indicates if acceleration is supported
support_multi_addr Boolean Yes Support for multiple addresses, true: supported, false: not supported
merge_address_symbol String No Merged address main chain coin, unique identifier for the coin

Get Latest Block Height

Get the latest block height of the specified main chain.

HTTP Request

GET /api/mpc/chain_height

Request Parameters

Param Type Required Description
base_symbol String Yes Unique identifier for the coin, e.g., ETH

Response

{
    "height": 10023412
}

Response Data Parameters

Param Type Required Description
height Long Yes Latest block height of the main chain

Sub-wallet

Create a Sub-wallet

Pass in the specified sub-wallet name to create a new sub-wallet for the main wallet

HTTP Request

POST /api/mpc/sub_wallet/create

Decrypted Request Parameters

Param Type Requried Description
sub_wallet_name String Yes Name of sub-wallet, up to 50 characters. No duplicate names. Example: mpc mining pool
sub_wallet_type Integer No Type of sub-wallet. 1: Asset sub-wallet, 2: web3 sub-wallet (if not specified, the default sub-wallet type is web3)

Response:

{
    "sub_wallet_id": 10234122
}

Response Data Parameters

Param Type Requried Description
sub_wallet_id Integer Yes Sub wallet id

Sub-wallet Address Creation

Create an address for a specified sub-wallet and coin; the same sub-wallet can have multiple addresses, and Memo types may create multiple memos.

HTTP Request

POST /api/mpc/sub_wallet/create/address

Request Parameters Data Structure

Param Type Required Description
sub_wallet_id Integer Yes Sub-wallet ID
symbol String Yes coin unique identifier, e.g., USDTERC20

Response

{
    "address": "0xd5b688639ef10ac7fb8ad0156eb0ae025dd03b86",
    "addr_type": 1,
    "memo": ""
}

Response Data Parameters

Param Type Required Description
address String Yes Created address
addr_type Integer Yes Address type, 1: User address, 2: System address (including Consolidation address, change address). System addresses cannot be assigned to users for use; change in UTXO transactions will be directed to the change address
memo String No Memo assigned for Memo types under the main chain

Query Sub-Wallet Address

List of sub-wallet addresses

HTTP Request

POST /api/mpc/sub_wallet/get/address/list

Request Parameters

Param Type Required Description
sub_wallet_id Integer Yes Sub-wallet id
symbol String Yes Unique coin identifier, e.g., USDTERC20
max_id Integer Yes Starting address id, default is 0

Response

[
    {
        "address":"12ZzzA48sYnE12fdkmKmaxkR3Rz5j7Gjac",
        "addr_type": 1,
        "memo": ""
    },
    {
        "address":"139cRprA9siBDbScbjtCZTcESUgZ1rm9fr",
        "addr_type": 2,
        "memo": ""
    }
]

Response Data Parameters

Param Type Required Description
address String Yes Created address
addr_type Integer Yes Address type, 1: regular address, 2: change address ( occurs when a user uses an input that is worth more than the transaction cost, the extra funds are sent back to the users as change through a newly generated address.)
memo String No

Get Sub-wallet Assets

Get the account assets under the specified sub-wallet and coin.

HTTP Request

GET /api/mpc/sub_wallet/assets

Decrypted Request Parameters

Param Type Requried Description
symbol String Yes The unique identifier of the coin, example: USDTERC20
sub_wallet_id Integer Yes Sub wallet id

Response

{
    "collecting_balance":"3.23",
    "normal_balance":"1.23",
    "lock_balance":"0.77"
}

Response Data Parameters

Param Type Requried Description
normal_balance String Yes Available balance
lock_balance String Yes Freeze balance
collecting_balance String Yes Balance for awaiting consolidation assets

Modify the Display Status

The display of the specified sub-wallet in the App and web portal is essential for initiating transactions. If it is not displayed, transactions cannot be initiated in the app.

HTTP Request

POST /api/mpc/sub_wallet/change_show_status

Decrypted Request Parameters

Param Type Requried Description
sub_wallet_ids String Yes A string of multiple sub-wallet ids, separated by commas
app_show_status String Yes 1 show ,2 don't show

Response Data Parameters

None

Transfer (Withdrawal)

Initiate a Transfer

HTTP Request

POST /api/mpc/billing/withdraw

Decrypted Request Parameters

Param Type Requried Description
sub_wallet_id Integer Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
address_to String Yes transfer address
memo String No transfer address memo, Memo type can be filled in if available, example: 123321
amount String Yes transfer amount
request_id String Yes The unique identifier for transferring coins
remark String No transfer remarks
fee_rate String No Fee rate for BTC series; Note: Do not pass along with other series parameters
size String No Size in bytes for BTC series; Note: Do not pass along with other series parameters
gas_price String No Gas recommended price for ETH series; Note: Do not pass along with other series parameters
gas_limit String No Gas limit for ETH series; Note: Do not pass along with other series parameters
fee String No Fee for other series such as DOT and TRX; Note: Do not pass along with other series parameters ;except for gas_limit, e.g., ATOM`
sign String No RSA private key signature. Parameters involved in the signature: "request_id", "sub_wallet_id", "symbol", "address_to", "amount", "memo". For signature rules, refer to Co-Signer Transaction Signature Verification.

Response

{
    "withdraw_id": 12345
}

Response Data Parameters

Param Type Requried Description
withdraw_id Integer Yes transfer id

Estimated Gas Fee

Obtain the estimated miner fee required for transfer.

HTTP Request

GET /api/mpc/billing/gas_estimate

Decrypted Request Parameters

Param Type Requried Description
from String No Withdrawal address, either 'from' or 'sub_wallet_id' must be passed
sub_wallet_id Integer No When withdrawing from multiple UTXO addresses, this parameter must be passed
to String Yes Destination address (to account address)
memo String No Memo for the destination address, should be filled in when the transfer type is Memo
symbol String Yes Unique coin identifier, e.g., USDTERC20
amount String Yes Amount

Response

{
    "gas_limit":0,
    "fee_unit":"Gwei",
    "gas_price1":"0",
    "fee":"0.00159",
    "gas_price2":"0",
    "gas_price3":"0",
    "trans_fee":"0.00159"
}

Response Data Parameters

Param Type Required Description
fee_unit String Yes Fee unit, e.g., Gwei
fee_rate1 String No Fee rate tier 1 for BTC series
fee_rate2 String No Fee rate tier 2 for BTC series
fee_rate3 String No Fee rate tier 3 for BTC series
size Long Yes Size in bytes for BTC series (parameter value cannot be modified)
gas_limit Long No Gas limit for ETH series (also available for some other series like ATOM)
gas_price1 Long No Gas recommended price tier 1 for ETH series
gas_price2 Long No Gas recommended price tier 2 for ETH series
gas_price3 Long No Gas recommended price tier 3 for ETH series
fee String No Fee for other series such as DOT and TRX, using the 'fee' field for transaction fees
fee_changeable Boolean No For other series such as DOT and TRX, indicates whether the 'fee' parameter value can be changed. Set to true for modifiable and false for non-modifiable values
trans_fee String No Reference transaction fee, unit is the base coin of the main chain

Speed Up Transfer

After the transfer signature is completed, if the transaction fee has not been process on the chain for a long time due to insufficient gas fee, you can re-specify a higher gas fee to speed up the process on the blockchain.

HTTP Request

POST /api/mpc/billing/withdraw_pending

Decrypted Request Parameters

Param Type Required Description
withdraw_id Integer Yes Transfer ID
fee_rate String No Fee rate for BTC series; Note: Do not pass along with other series parameters
size String No Size in bytes for BTC series; Note: Do not pass along with other series parameters
gas_price String No Gas recommended price for ETH series; Note: Do not pass along with other series parameters
gas_limit String No Gas limit for ETH series; Note: Do not pass along with other series parameters
fee String No Fee for other series such as DOT and TRX; Note: Do not pass along with other series parameters except for gas_limit, e.g., ATOM

Response Data Parameters

None

Get Transfer Records

Get all sub-wallet transfer records under the main wallet, and return up to 100 records

HTTP Request

GET /api/mpc/billing/withdraw_list

Decrypted Request Parameters

Param Type Requried Description
ids String Yes many request_idstring,separated by commas

Response

[
    {
        "symbol":"ETH",
        "amount":"0.0000111",
        "real_fee":"0",
        "withdraw_source":2,
        "fee":"0.0002782353",
        "address_to":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
        "memo": "",
        "created_at":1672304978000,
        "txid":"0x8e6beba81b90835fc9fcd40a2bdca33243c7c3b81ac765c240837d4810874a55",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0x5EDc9177997Bf6B4db559A5C184051858B3B3704",
        "fee_symbol":"ETH",
        "updated_at":1672318660000,
        "base_symbol":"",
        "id":242,
        "request_id":"57fdc296-1e14-47fa-a99d-5e86f8e51008",
        "status":1200,
        "tx_height":3120013
    },
    {
        "symbol":"TRX",
        "amount":"0.001",
        "real_fee":"0",
        "withdraw_source":1,
        "fee":"27.4",
        "address_to":"TYQJcpoH2zeZ2pnpRokwBeRZ16yqyNZPR4",
        "memo": "",
        "created_at":1672304978000,
        "txid":"dee604ca778aee55ef0d17260ee4a96d69dfbc965228288598dce0cf9c829542",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"TC1rbTinyRyNC5sBJdxGcADbVXh9xcHwwQ",
        "fee_symbol":"TRX",
        "updated_at":1672318660000,
        "base_symbol":"",
        "id":242,
        "request_id":"57fdc296-1e14-47fa-a99d-5e86f8e51008",
        "status":2000,
        "tx_height":56207376
    }
]

Response Data Parameters

Param Type Requried Description
id Integer Yes transfer id
request_id String Yes The unique identifier for transferring coins
sub_wallet_id Integer Yes Sub wallet id
symbol String Yes The unique identifier of the coin
amount String Yes transfer amount
fee_symbol String Yes gas fee coins
fee String Yes gas fee
real_fee String Yes The actual gas fee consumed
created_at Long Yes Creation time timestamp
updated_at Long Yes Modification time timestamp
address_from String Yes from account address
address_to String Yes to account address
memo String No to account address memo
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations,example:10
status Integer Yes transfer status: 1000 awaiting approval, 1100 Approved while awaiting signature, 1200 Payment in progress, 2000Payment completed, 2100 Not Approved, 2200 Rejected, 2300 Transaction discarded, 2400Payment failed
transfer_source Integer Yes transfer Type: 1app, 2openapi
base_symbol String No The unique identifier of the main chain of the coin to be transferred, for example: ETH
contract_address String No transfer coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Synchronize Transfer Records

Get all sub-wallet transfer records under the main wallet, and return up to 100 records

HTTP Request

GET /api/mpc/billing/sync_withdraw_list

Decrypted Request Parameters

Param Type Requried Description
max_id String Yes transfer record initial id, example: 12345

Response

[
    {
        "symbol":"ETH",
        "amount":"0.0000111",
        "real_fee":"0",
        "withdraw_source":2,
        "fee":"0.0002782353",
        "address_to":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
        "memo": "",
        "created_at":1672304978000,
        "txid":"0x8e6beba81b90835fc9fcd40a2bdca33243c7c3b81ac765c240837d4810874a55",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0x5EDc9177997Bf6B4db559A5C184051858B3B3704",
        "fee_symbol":"ETH",
        "updated_at":1672318660000,
        "base_symbol":"",
        "id":242,
        "request_id":"57fdc296-1e14-47fa-a99d-5e86f8e51008",
        "status":1200,
        "tx_height":3120013
    },
    {
        "symbol":"TRX",
        "amount":"0.001",
        "real_fee":"0",
        "withdraw_source":1,
        "fee":"27.4",
        "address_to":"TYQJcpoH2zeZ2pnpRokwBeRZ16yqyNZPR4",
        "memo": "",
        "created_at":1672304978000,
        "txid":"dee604ca778aee55ef0d17260ee4a96d69dfbc965228288598dce0cf9c829542",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"TC1rbTinyRyNC5sBJdxGcADbVXh9xcHwwQ",
        "fee_symbol":"TRX",
        "updated_at":1672318660000,
        "base_symbol":"",
        "id":242,
        "request_id":"57fdc296-1e14-47fa-a99d-5e86f8e51008",
        "status":2000,
        "tx_height":56207376
    }
]

Response Data Parameters

Param Type Requried Description
id Integer Yes transfer id
request_id String Yes The unique identifier for transferring coins
sub_wallet_id Integer Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
amount String Yes transfer amount
fee_symbol String Yes gas fee coins
fee String Yes gas fee
real_fee String Yes The actual gas fee consumed
created_at Long Yes Created time timestamp
updated_at Long Yes Modified time timestamp
address_from String Yes from account address
address_to String Yes to account address
memo String No to account address memo
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations
status Integer Yes transfer status: 1000 awaiting approval, 1100 Approved while awaiting signature, 1200 Payment in progress, 2000Payment completed, 2100 Not Approved, 2200 Rejected, 2300 Transaction discarded, 2400Payment failed
transfer_source Integer Yes transfer Type: 1app, 2openapi
base_symbol String No The unique identifier of the main chain of the coin to be transferred, for example: ETH
contract_address String No transfer coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Receiving (Deposit)

Get Receiving records

Get all sub-wallet receiving records under the main wallet, and return up to 100 records

HTTP Request

GET /api/mpc/billing/deposit_list

Decrypted Request Parameters

Param Type Requried Description
ids String Yes A string of multiple ids, separated by commas, example: 123,345

Response

[
    {
        "symbol":"ETH",
        "amount":"1",
        "address_to":"0x33648fACAD6CECA85cf717841Ddd87c40B12438F",
        "memo": "",
        "created_at":1672107533000,
        "txid":"0xfd0b04024bd1d849ba69e301733194154cb42a05c1dd32065367d8c6336af711",
        "confirmations":20,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
        "updated_at":1672323030000,
        "base_symbol":"ETH",
        "id":43,
        "status":2000,
        "tx_height":3120013
    },
    {
        "symbol":"ETH",
        "amount":"1",
        "address_to":"0x525208dd0b56c27bd10703bd675fca0509a17154",
        "memo": "",
        "created_at":1672107533000,
        "txid":"0x97cccb68595182d8df439fe17d33376d4bb69abf49d56e08d46fa5f281e095fb",
        "confirmations":5,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0xe897Fd38f319cB343ffD03Ba2f7426BA99bb97c4",
        "updated_at":1672323030000,
        "base_symbol":"ETH",
        "id":45,
        "status":2000,
        "tx_height":13238654
    }
]

Response Data Parameters

Param Type Requried Description
id Integer Yes Receiving id
sub_wallet_id Integer Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
amount String Yes receiving amount
created_at Long Yes Created time timestamp
updated_at Long Yes Modified time timestamp
address_from String Yes transfer from address
address_to String Yes receiving address
memo String No receiving address memo,example:123321
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations,example:10
status Integer Yes receiving status: 1000 unconfirmed, 1100 confirmed (transaction block confirmed), 2000 completed (shown at account), 3000 abnormal
base_symbol String No The unique identifier of the main chain of the coin to be received, example:ETH
contract_address String No received coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Sync Receiving record

Get all sub-wallet receiving records under the main wallet, and return up to 100 records

HTTP Request

GET /api/mpc/billing/sync_deposit_list

Decrypted Request Parameters

Param Type Requried Description
max_id String Yes receiving record initial id,example:100

Response

[
    {
        "symbol":"ETH",
        "amount":"1",
        "address_to":"0x33648fACAD6CECA85cf717841Ddd87c40B12438F",
        "memo": "",
        "created_at":1672107533000,
        "txid":"0xfd0b04024bd1d849ba69e301733194154cb42a05c1dd32065367d8c6336af711",
        "confirmations":20,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
        "updated_at":1672323030000,
        "base_symbol":"ETH",
        "id":43,
        "status":2000,
        "tx_height":3120013
    },
    {
        "symbol":"ETH",
        "amount":"1",
        "address_to":"0x525208dd0b56c27bd10703bd675fca0509a17154",
        "memo": "",
        "created_at":1672107533000,
        "txid":"0x97cccb68595182d8df439fe17d33376d4bb69abf49d56e08d46fa5f281e095fb",
        "confirmations":5,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0xe897Fd38f319cB343ffD03Ba2f7426BA99bb97c4",
        "updated_at":1672323030000,
        "base_symbol":"ETH",
        "id":45,
        "status":2000,
        "tx_height":13238654
    }
]

Response Data Parameters

Param Type Requried Description
id Integer Yes receivingid
sub_wallet_id Integer Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
amount String Yes receiving amount
created_at Long Yes Created time timestamp
updated_at Long Yes Modified time timestamp
address_from String Yes transfer from address
address_to String Yes receiving address
memo String No receiving address memo,example:123321
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations,example:10
status Integer Yes receiving status: 1000 unconfirmed, 1100 confirmed (transaction block confirmed), 2000 completed (shown at account), 3000 abnormal
base_symbol String No The unique identifier of the main chain of the coin to be received, example:ETH
contract_address String No received coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Auto-Consolidation

Get Auto-Consolidation Sub-Wallets

Retrieve the auto-consolidation sub-wallet and refueling sub-wallet for a specific coin.

HTTP Request

GET /api/mpc/auto_collect/sub_wallets

Request Data Parameters

Param Type Required Description
symbol String Yes Unique identifier for the coin, e.g., USDTERC20

Response

{
    "collect_sub_wallet_id": 10241,
    "fueling_sub_wallet_id": 20482
}

Response Data Parameters

Param Type Required Description
collect_sub_wallet_id Integer No Auto-consolidation sub-wallet, obtained after configuring the coin
fueling_sub_wallet_id Integer No Refueling sub-wallet, obtained after configuring the coin

Configure Auto-Consolidation for Coin

Set the minimum auto-consolidation amount and the maximum miner fee for refueling.

HTTP Request

POST /api/mpc/auto_collect/symbol/set

Request Parameters

Param Type Required Description
symbol String Yes Unique identifier for the coin, e.g., USDTERC20
collect_min String Yes Minimum amount for auto-consolidation; up to 6 decimal places, not exceeding 9999999999999999
fueling_limit String Yes Maximum miner fee amount for auto-consolidation; up to 6 decimal places, not exceeding 9999999999999999

Response

{
    "symbol": "USDTERC20  "
}

Response Parameter

Param Type Required Description
symbol String Yes Unique identifier for the configured coin

Sync Consolidation Records

Retrieve up to 100 consolidation records for all sub-wallets under a wallet.

HTTP Request

GET /api/mpc/billing/sync_auto_collect_list

Request Parameter Data Structure

Param Type Required Description
max_id String Yes Starting ID for consolidation records

Response

[
    {
        "symbol":"ETH",
        "amount":"0.0000111",
        "real_fee":"0",
        "trans_type":10,
        "fee":"0.0002782353",
        "address_to":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
        "memo": "",
        "created_at":1672304978000,
        "txid":"0x8e6beba81b90835fc9fcd40a2bdca33243c7c3b81ac765c240837d4810874a55",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123",
        "address_from":"0x5EDc9177997Bf6B4db559A5C184051858B3B3704",
        "fee_symbol":"ETH",
        "updated_at":1672318660000,
        "base_symbol":"",
        "id":242,
        "status":1200
    },
    {
        "symbol":"HECO",
        "amount":"0.0000111",
        "real_fee":"0",
        "trans_type":11,
        "fee":"0.0024040607337957",
        "address_to":"0x0AabA82E4ba9c2Fdf80B9F8E1AcE885f092B64F0",
        "memo": "",
        "created_at":1672304978000,
        "txid":"",
        "confirmations":0,
        "contract_address":"",
        "sub_wallet_id":"123975",
        "address_from":"0xE76a3d30dAc35C4b9A17E690cd250d8Bec649b65",
        "fee_symbol":"HECO",
        "updated_at":1672318660000,
        "base_symbol":"HECO",
        "id":315,
        "status":2400
    }
]

Response Parameter Data Structure

Param Type Required Description
id Integer Yes Consolidation ID
sub_wallet_id Integer Yes Sub-wallet ID
symbol String Yes Unique identifier for the coin, used during transfers, e.g., USDTERC20
amount String Yes Consolidation amount
fee_symbol String Yes Fee currency, e.g., ETH
fee String Yes Fee amount, e.g., 0.00123
real_fee String Yes Actual consumed fee, e.g., 0.00111
created_at Long Yes Creation timestamp
updated_at Long Yes Modification timestamp
address_from String Yes Sender's address
address_to String Yes Consolidation address
memo String No Memo for the receiving address during consolidation
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations, e.g., 10
status Integer Yes Consolidation status: 1000 Unapproved, 1100 Approved, Pending Signature, 1200 In Progress, 2000 Completed, 2100 Rejected, 2200 Rejected, 2201 System Rejected, 2202 Auto Cancelled, 2300 Transaction Discarded, 2400 Payment Failed
trans_type Integer Yes Consolidation type: 10. Consolidation Transaction, 11. Consolidation Gas Transaction
base_symbol String No Base currency unique identifier on the main chain, e.g., ETH
contract_address String No Contract address for the consolidation currency

Web3 Transaction

Create Web3 Transaction

Create a Web3 transaction.

HTTP Request

POST /api/mpc/web3/trans/create

Request Parameters

Param Type Required Description
request_id String Yes Unique identifier for the transaction
main_chain_symbol String Yes Main chain coin symbol (unique identifier)
sub_wallet_id Integer Yes Sub-wallet ID
interactive_contract String Yes Interactive contract
amount String Yes Transaction amount (-1 for infinite)
gas_price String Yes Gas fee,unit:Gwei
gas_limit String Yes Gas limit fee
input_data String Yes Hexadecimal data for contract transaction
trans_type Integer Yes 0: Authorization transaction, 1: Other transaction. If 0, the amount field is invalid.
dapp_name String No Dapp name
dapp_url String No Dapp URL
dapp_img String No Dapp image
sign String No RSA private key signature. Parameters involved in the signature: "request_id", "sub_wallet_id", "main_chain_symbol", "interactive_contract", "amount", "input_data". Refer to Co-Signer Transaction Signature Verification for detailed signing rules.

Response

{
     "trans_id": 198012
}

Response Data Parameters

Parameter Type Required Description
trans_id Integer Yes Web3 transaction ID

Web3 Transaction Acceleration

When a transfer is signed but has not been confirmed on the blockchain for a long time due to insufficient fees, it can be accelerated by specifying a higher fee.

HTTP Request

POST /api/mpc/web3/pending

Request Parameters

Param Type Required Description
trans_id Integer Yes Web3 transaction ID
gas_price String Yes Gas price, unit:Gwei
gas_limit String Yes Gas limit

Response Data Parameters

None

Get Web3 Transaction Records

Get all Web3 transaction records under a wallet, maximum of 100 records.

HTTP Request

GET /api/mpc/web3/trans_list

Request Parameters

Param Type Required Description
ids String Yes Comma-separated request_id strings

Response

[
    {
        "id":435,
        "request_id":"0000000003",
        "sub_wallet_id":1000895,
        "txid":"0xbc87e486d28df91fe715436415bab38cc1cf5e4b23fbb8497ff688b823c08ba7",
        "symbol":"",
        "main_chain_symbol":"HECO",
        "amount":"0",
        "fee_symbol":"HECO",
        "fee":"0.00018",
        "real_fee":"0.000107277",
        "created_at":1684220373000,
        "updated_at":1684222558000,
        "address_from":"0xd5c2d98BF2d205039F62ee40c9A7ab1B36125d6d",
        "address_to":"",
        "confirmations":4,
        "input_data":"0xca718c65",
        "interactive_contract":"0xe012F3957226894B1a2a44b3ef5070417a069dC2",
        "status":2400,
        "trans_source":2,
        "tx_height":3120013
    },
    {
        "id":436,
        "request_id":"0000000003",
        "sub_wallet_id":1000895,
        "txid":"0xeab40bf0072c25514bc61fe58e5e36cc082ea7f50ae33f33013dd365beba9438",
        "symbol":"",
        "main_chain_symbol":"HECO",
        "amount":"0",
        "fee_symbol":"HECO",
        "fee":"0.00018",
        "real_fee":"0.000107277",
        "created_at":1684220373000,
        "updated_at":1684222558000,
        "address_from":"0xBDeBecf1fEDc622Cc50dE2F2aD6925D1EE15fCf9",
        "address_to":"",
        "confirmations":4,
        "input_data":"0xca718c65",
        "interactive_contract":"0x0AabA82E4ba9c2Fdf80B9F8E1AcE885f092B64F0",
        "status":2400,
        "trans_source":2,
        "tx_height":3120113
    }
]

Response Data Parameters

Parameter Type Required Description
id Integer Yes Web3 transaction ID
request_id String Yes Unique identifier for the transaction
sub_wallet_id Integer Yes Sub-wallet ID
txid String No Transaction hash
symbol String No Transaction coin
main_chain_symbol String Yes Main chain coin symbol (unique identifier), e.g., ETH
amount String Yes Transaction amount. -1 indicates infinite
fee_symbol String Yes Fee currency, e.g., ETH
fee String Yes Fee
real_fee String Yes Actual fee consumed
created_at String Yes Creation timestamp
updated_at String Yes Modification timestamp
address_from String Yes Transaction source address
address_to String Yes Transaction destination address
interactive_contract String Yes Interactive contract
confirmations Integer Yes Confirmations
input_data String Yes Hexadecimal data for contract transaction
status Integer Yes Transaction status: 1100 Pending Signature, 1200 Payment Processing, 2000 Payment Complete, 2100 Approval Rejected, 2200 Rejected, 2300 Transaction Discarded, 2400 Payment Failed
trans_source Integer Yes Transaction type: 1. App, 2. Open API
tx_height Long Yes Block height at which the transaction is completed

Sync Web3 Transaction Records

Get all Web3 transaction records under a wallet, maximum of 100 records.

HTTP Request

GET /api/mpc/web3/sync_trans_list

Request Parameters

Parameter Type Required Description
max_id String Yes Starting ID of Web3 transactions

Response

[
    {
        "id":437,
        "request_id":"0000000003",
        "sub_wallet_id":1000895,
        "txid":"0xbc87e486d28df91fe715436415bab38cc1cf5e4b23fbb8497ff688b823c08ba7",
        "symbol":"",
        "main_chain_symbol":"HECO",
        "amount":"0",
        "fee_symbol":"HECO",
        "fee":"0.00018",
        "real_fee":"0.000107277",
        "created_at":1684220373000,
        "updated_at":1684222558000,
        "address_from":"0xd5c2d98BF2d205039F62ee40c9A7ab1B36125d6d",
        "address_to":"",
        "confirmations":4,
        "input_data":"0xca718c65",
        "interactive_contract":"0xe012F3957226894B1a2a44b3ef5070417a069dC2",
        "status":2400,
        "trans_source":2,
        "tx_height":3120013
    },
    {
        "id":438,
        "request_id":"0000000003",
        "sub_wallet_id":1000895,
        "txid":"0xeab40bf0072c25514bc61fe58e5e36cc082ea7f50ae33f33013dd365beba9438",
        "symbol":"",
        "main_chain_symbol":"HECO",
        "amount":"0",
        "fee_symbol":"HECO",
        "fee":"0.00018",
        "real_fee":"0.000107277",
        "created_at":1684220373000,
        "updated_at":1684222558000,
        "address_from":"0xBDeBecf1fEDc622Cc50dE2F2aD6925D1EE15fCf9",
        "address_to":"",
        "confirmations":4,
        "input_data":"0xca718c65",
        "interactive_contract":"0x0AabA82E4ba9c2Fdf80B9F8E1AcE885f092B64F0",
        "status":2400,
        "trans_source":2,
        "tx_height":3120113
    }
]

Response Data Parameters

Parameter Type Required Description
id Integer Yes Web3 transaction ID
request_id String Yes Unique identifier for the transaction
sub_wallet_id Integer Yes Sub-wallet ID
txid String No Transaction hash
symbol String No Transaction coin
main_chain_symbol String Yes Main chain coin symbol (unique identifier), e.g., ETH
amount String Yes Transaction amount. -1 indicates infinite
fee_symbol String Yes Fee coin, e.g., ETH
fee String Yes Fee
real_fee String Yes Actual fee consumed
created_at String Yes Creation timestamp
updated_at String Yes Modification timestamp
address_from String Yes Transaction source address
address_to String Yes Transaction destination address
interactive_contract String Yes Interactive contract
confirmations Integer Yes Confirmations
input_data String Yes Hexadecimal data for contract transaction
status Integer Yes Transaction status: 1100 Pending Signature, 1200 Payment Processing, 2000 Payment Complete, 2100 Approval Rejected, 2200 Rejected, 2300 Transaction Discarded, 2400 Payment Failed
trans_source Integer Yes Transaction type: 1. App, 2. Open API
tx_height Long Yes Block height at which the transaction is completed

NFT

Get NFT Information

Retrieve NFT data such as images and names.

HTTP Request

POST /api/nft/info

Request Data Parameter

Param Type Required Description
base_symbol String Yes Base chain symbol
contract_address String Yes NFT contract address
token_id String Yes NFT token ID

Response

{
     "base_symbol": "bsc",
     "contract_address": "0xC2A19349D5f451071C3085B90f531D19F190FF21",
     "token_id": "75000000000000000281",
     "nft_name": "#75000000000000000281",
     "image": "https://ipfs.io/ipfs/QmXCaMVmRWviaFtRpEH7dJXrJav8dsJdGcsj7M8NpgAgPW",
     "image_type": ".svg",
     "is_video": false,
}

Response Parameter

Param Type Required Description
base_symbol String Yes Base chain symbol
contract_address String Yes NFT contract address
token_id String Yes NFT token ID
nft_name String Yes NFT name, when absent, use "# + tokenId"
image String Yes URL or base64 of NFT image or video
image_type String Yes NFT image or video type, e.g., ".png", ".mp4"
is_video bool Yes Indicates if it's a video. true if it's a video, false otherwise

Transaction Notification

Overview

POST /user callback notification address

Request Example

app_id=2128eb8de9e932a4376909f3d69424cc&data=SWYYr-LBVAmaS0eq8n-CUT_nHkM3OBxyWOsImMTe41UaqAoYI2ZghmaphXHov-7hsRsVmOhyPqC-JFuRGvonJKFd2Jirxv6Vn_8V40r_MMYTkhqcviQbZWYW5xX8Ai8CIpqas9fIWVDIYA_NKBl0UCJpwGxscxLNpjq5Z8-BTyIYDsVBquM9zEQGBCfcA7szD9n2fN_loSkoexlwqV8wg9HIZO5yQ6utZ_Kt0lNDQQb8zn8BwfAvsEsbJlOINUAqhxh1vV_AJ4bXn2uYx8TaYcBht-n_ZcBdxIDt975dbOFUiH-oCzIuDi1oLDtb4EylfCvhU5E4ozel_lQ-6cyIG0Dqiiyx0RFFOCJzPSXIoV031pvoa8pTCpkWklh8mRw1rylBgeZtqSxpnJO2_u2RIlXq6Hs8Yly9CmhIXaSrUgPir0h6xVxlf4VC6PFVCkiiTlp0kZ_H_UbKm0nUis3v3U2sflWJ2C449waSrikhuxVrFAQ6PQmrFVCAE6MYXNrFXJQuam2HAIQNSGbFQjspw8b_bXyfyZMGZ3K2oBC4I_v3eETTdPe0pfSNJb-5g37K0tOAr_UFbWK8pkC8yl56fSjn8tcR3yCRWwoi8jxTcUBiswTtvXZtzgG4dyzkaHXjsZjSGiywXSqP76VZWlyOmAx6IDSViLcPLPISdU3ruCI

Common Request Parameters

Param Type Requried Description
app_id String Yes merchant unique identifier
data String Yes encrypted String, decrypted format is defined as Decrypted Request Parameters

Common Response

Return string: SUCCESS means SUCCESS, FAILURE means FAILURE (note that the return parameter does not need to be encrypted here)

Transfer (Withdrawal)

Decrypted Request Parameters

Param Type Requried Description
charset String Yes Encoding format, no special circumstances, pass parameter utf-8
side String Yes Notification type: Receive notification: deposit, Transfer notification: withdraw, Web3 transaction notification: web3-trans
notify_time String Yes Notification time,example:2022-11-02 11:04:05
id String Yes transfer id, example: 12345
request_id String Yes The unique identifier for transferring coins
sub_wallet_id String Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
amount String Yes transfer amount, for example: 1.23
fee_symbol String Yes gas fee coins,example:ETH
fee String Yes gas fee,example:0.00123
real_fee String Yes The actual gas fee consumed,example:0.00111
created_at Long Yes Created time timestamp, example: 2006-01-02 15:04:05
updated_at Long Yes Modified time timestamp, example: 2006-01-02 15:04:05
address_from String Yes from account address
address_to String Yes to account address
memo String No to account address memo,example:123321
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations,example:10
status Integer Yes transfer status: 1000 awaiting approval, 1100 Approved while awaiting signature, 1200 Payment in progress, 2000Payment completed, 2100 Not Approved, 2200 Rejected, 2300 Transaction discarded, 2400Payment failed
transfer_source Integer Yes transfer Type:1app, 2openapi
base_symbol String No The unique identifier of the main chain of the coin to be transferred, for example: ETH
contract_address String No transfer coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Receiving (Deposit)

Decrypted Request Parameters

Param Type Requried Description
charset String Yes Encoding format, no special circumstances, pass parameter utf-8
side String Yes Notification type: Receive notification: deposit, Transfer notification: withdraw, Web3 transaction notification: web3-trans
notify_time String Yes Notification time,example:2022-11-02 11:04:05
id String Yes receiving id
sub_wallet_id String Yes Sub wallet id
symbol String Yes The unique identifier of the coin, example: USDTERC20
amount String Yes receiving amount
created_at Long Yes Created time timestamp, example: 2006-01-02 15:04:05
updated_at Long Yes Modified time timestamp, example: 2006-01-02 15:04:05
address_from String Yes from account address
address_to String Yes to account address
memo String No to account address memo,example:123321
txid String Yes Transaction hash
confirmations Integer Yes Number of block confirmations,example:10
status Integer Yes receiving status: 1000 unconfirmed, 1100 confirmed (transaction block confirmed), 2000 completed (shown at account), 3000 abnormal
base_symbol String No The unique identifier of the main chain of the coin to be received, example:ETH
contract_address String No received coin's contract address
tx_height Long Yes Block height at which the transaction is completed

Web3 Transaction

Request Parameters

Param Type Required Description
charset String Yes Character encoding format. Use utf-8 unless specified otherwise.
side String Yes Notification type: Receive notification: deposit, Transfer notification: withdraw, Web3 transaction notification: web3-trans
notify_time String Yes Notification time in the format: "YYYY-MM-DD HH:mm:ss"
id String Yes Deposit ID
request_id String Yes Unique identifier for the transfer
sub_wallet_id String Yes Sub-wallet ID
main_chain_symbol String Yes Main chain coin symbol (unique identifier), e.g., ETH
symbol String No coin symbol (unique identifier), e.g., USDTERC20
amount String Yes Transaction amount
created_at String Yes Creation time in the format: "YYYY-MM-DD HH:mm:ss"
updated_at String Yes Modification time in the format: "YYYY-MM-DD HH:mm:ss"
address_from String Yes Sender address
address_to String Yes Recipient address
txid String Yes Transaction hash
confirmations String Yes Number of confirmations
status String Yes Transfer status: 1000: Not approved, 1100: Approved, waiting for signature, 1200: Payment in progress, 2000: Payment completed, 2100: Approval rejected, 2200: Rejected, 2300: Transaction dropped, 2400: Payment failed
interactive_contract String Yes Interactive contract
fee_symbol String Yes Fee currency symbol, e.g., ETH
fee String Yes Fee amount
real_fee String Yes Actual fee consumed
input_data String Yes Hexadecimal data representing the parameters of the contract transaction
trans_type String Yes Transaction type: 0: Authorization transaction, 1: Transfer transaction
dapp_img String Yes Dapp image
dapp_name String Yes Dapp name
dapp_url String Yes Dapp access URL
tx_height Long Yes Block height at which the transaction is completed

Co-Signer

Overview

Co-Signer can help you quickly integrate with the API and needs to be deployed separately on a server. Co-Signer needs to bind the shard private key of your wallet for creating addresses and signing transactions.

Integration Process

Co-Signer mainly implements two functions: creating addresses and automatic signing. The calling relationship is as shown in the following diagram:

Creating an Address:

Automatic Signature (Callback Method):

Automatic Signature (Signature Sign Verification Method):

Co-Signer Callback

To ensure the security of transactions, you need to configure a callback address for the business system in Co-Signer and authorize it before transaction signing.

The authorized transaction data is transmitted in plaintext, and you need to ensure the communication security between the business system and Co-Signer in the application service.

Transfer(Withdrawal) Callback

HTTP Request

POST /{url}

Content-Type application/json;charset=UTF-8

Request

POST /callback/example

{
    "type":"sign_start",
    "transfer_id":321456,
    "request_id":"c70d1eebb7c687ec8d56bead73f104",
    "pending_round":false,
    "from":"0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
    "to":"0x5EDc9177997Bf6B4db559A5C184051858B3B3704",
    "memo": "123321",
    "amount":167230.4978,
    "symbol":"BTC"
}

Callback Request Parameters

Param Type Requried Description
type String Yes Callback type, sign_startstart signing,sign_successsuccessfully signed.
transfer_id Integer Yes transfer id, example: 12345
request_id String Yes The unique identifier for initiating transfer
pending_round Bool Yes Speed Up status, false means in transferring transaction , true means speeding up the transaction
from String Yes from account address
to String Yes to account address
memo String No to account address memo,example:123321
amount Decimal Yes Transaction amount
symbol String Yes The unique identifier of the coin, example: USDTERC20
txid String No Transaction hash. Returned when the signature is successful.

Web3 Transaction Callback

HTTP Request

POST /{url}

Content-Type: application/json;charset=UTF-8

Callback Parameter Example

POST /callback/example

{
    "type": "sign_start",
    "trans_id": 432,
    "request_id": "0000000003",
    "pending_round": false,
    "from": "0xc70d1eebb7c687ec8d56bead73f104d41e6e0bda",
    "to": "0x5EDc9177997Bf6B4db559A5C184051858B3B3704",
    "amount": 0,
    "main_chain_symbol": "HECO",
    "input_data": "0xca718c65",
    "interactive_contract": "0xe012F3957226894B1a2a44b3ef5070417a069dC2",
    "txid": ""
}

Callback Parameter Format:

Param Type Required Description
type String Yes Callback type: sign_start for signature initiation, sign_success for successful signature
trans_id Integer Yes Transaction ID
request_id String Yes Unique identifier for the transaction
pending_round Boolean Yes Acceleration status: true for accelerated transactions, false for regular transactions
from String Yes Sender address of the transaction
to String Yes Recipient address of the transaction
amount Decimal Yes Transaction amount. Use -1 for infinity
main_chain_symbol String Yes Main chain symbol (unique identifier), e.g., "ETH"
input_data String Yes Input data for the transaction
interactive_contract String Yes Interactive contract
txid String No Transaction hash. Returned when the signature is successful

Common Response for Callback

Return string: SUCCESS means SUCCESS, FAILURE means FAILURE

Co-Signer Transaction Signature Verification

Co-Signer provides a more secure dual-verification feature for transactions.

In addition to the Co-Signer callback mechanism, Clients can simultaneously pass the sign field when initiating a transaction. Co-Signer will additionally verify whether the sign is legal.

Error Code

Code Message
0 Success
100001 System Error
100004 Invalid Request Parameters
100005 Signature Verification Failed
100007 Invalid IP
100011 Insufficient Balance
100015 Invalid Merchant ID
100016 Expired Merchant Information
110055 Invalid Transfer Address
110088 Duplicate Request
110160 Registration Failed
110161 Exceeded Maximum Precision
110227 Transfer Suspended for coin
120202 Unsupported coin
120204 Failed to Build Transaction
200004 No Permission to Perform Action
200005 Wallet Does Not Exist
200007 Creating Sub-wallet, Please Wait
200008 Exceeded Maximum Number of Sub-wallets
200011 coin Address Already Exists
200013 Node Configuration Error, Please Contact Customer Service
200015 Signature Failed
200025 Processing, Please Wait
200040 Wallet Has Expired
200066 Maximum 1000 Transactions Allowed
200067 Name Exceeds Maximum Length
210003 Order Does Not Exist
3040006 Cannot Transfer to Yourself
200071 Acceleration is not supported on this main chain.
200072 Transaction type is not supported by the sub-wallet type.
200073 Multisig address does not exist, please check your input
200074 This address is not a multisig wallet you are part of, please check and operate again
200075 Failed to estimate transaction fee
200076 This transaction is currently not supported