NAV
go php js java

Deposit

Top-up list

Request example:

POST <base_path>/v2/receive/list HTTP/1.1
Host: api.xxxx.com
Content-Type: application/json
X-Cbc-App-Id: hxgmau9imt86qky9
X-Cbc-Key-Version: admin
X-Cbc-Timestamp: 1792382460
X-Cbc-Nonce: 7c1e9a3b5d7f9b1d3f5a7c9e1b3d5f7a
X-Cbc-Sign-Alg: RSA-SHA256
X-Cbc-Signature: <base64>

{"page":1,"page_size":20,"coin":"eth","order_id":"20200803220112662436","status":1,"start_time":1578736053,"end_time":1578836053,"sort_num":2}

resp, err := client.Post("/v2/receive/list", map[string]any{
    "page":       1,
    "page_size":  20,
    "coin":       "eth",
    "order_id":   "20200803220112662436",
    "status":     1,
    "start_time": 1578736053,
    "end_time":   1578836053,
    "sort_num":   2,
})
$resp = $client->post('/v2/receive/list', [
    'page' => 1,
    'page_size' => 20,
    'coin' => 'eth',
    'order_id' => '20200803220112662436',
    'status' => 1,
    'start_time' => 1578736053,
    'end_time' => 1578836053,
    'sort_num' => 2,
]);
const resp = await client.post('/v2/receive/list', {
  page: 1,
  page_size: 20,
  coin: 'eth',
  order_id: '20200803220112662436',
  status: 1,
  start_time: 1578736053,
  end_time: 1578836053,
  sort_num: 2,
});
String resp = client.post("/v2/receive/list", Map.of(
        "page", 1,
        "page_size", 20,
        "coin", "eth",
        "order_id", "20200803220112662436",
        "status", 1,
        "start_time", 1578736053,
        "end_time", 1578836053,
        "sort_num", 2));

Example of return result:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 4bf92f3577b34da6a3ce929d0e0e4736
X-Cbc-Timestamp: 1792382461
X-Cbc-Nonce: 3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a
X-Cbc-Sign-Alg: RSA-SHA256
X-Cbc-Signature: <base64>

{ "status":200, "msg":"Processing successful", "data":{ "page":1, "count":9, "list":[ { "coin":"hc", "txid":"b064a252228105d7be10fefabf02fcdfbb863a071304298f7c3c1c1ace471e2b", "total":"0.30000000", "chain":"hc", "confirm_count":"6", "order_id":"20200803220112662436", "status":"0", "address":"0", #Add address, "from_address":"0", #from address "time":"1583922327", #Add the time with status=1 if there is no time with status=0 "type": "1" } ] }, "date_time":"2020-03-11 18:25:27", "time_stamp":1583922327 }

Query order status through the batch query interface

HTTP Request

POST /v2/receive/list

Request Parameters

For the common headers see Signature Regulations; the table below lists only the business parameters in the body.

Parameter Required Type Description
page No integer, default is 1 1<= N <=Max, N>Max ? N=Max ; N<1 ? N=1
coin No string coin name (eg: eth)
txid No string On-chain txid. When txid is set, the query matches txid exactly and ignores coin and address; letters and digits only, at most 70 characters, otherwise 569 is returned
address No string Deposit address, filters by address
order_id No string platform order number
status No integer 0 pending review 1 transfer successful
start_time No integer start time (creation time) format: timestamp
end_time No integer end time (creation time) format: timestamp
page_size No integer number of pages per page (20-100), default 20
sort_num No integer default list sorting is ascanding order of record creation time ( 1 positive order; 2 reverse order)

Response Parameters

Parameter Type Description
status integer status code
msg string state description
data object
data.page integer page number
data.count integer number of records on this page
data.list array specific record
data.list.coin string currency
data.list.txid string on-chain txid
data.list.total string total amount
data.list.chain string main chain coin name
data.list.confirm_count string number of confirmations
data.list.order_id string order number
data.list.status string 0 credited but not confirmed 1 confirmed successful 5 failed 8 waiting for refund 10 refunding 20 refunded
data.list.address string forwarding address
data.list.from_address string from address
data.list.time string The default is the time of status=1, if status=0 is the time of status=0
data.list.type string 1 on-site deposit 2 on-chain deposit
date_time string response time
time_stamp integer unix timestamp in second

Account balance query

Request example:

POST <base_path>/v2/balance HTTP/1.1
Host: api.xxxx.com
Content-Type: application/json
X-Cbc-App-Id: hxgmau9imt86qky9
X-Cbc-Key-Version: admin
X-Cbc-Timestamp: 1792382460
X-Cbc-Nonce: 7c1e9a3b5d7f9b1d3f5a7c9e1b3d5f7a
X-Cbc-Sign-Alg: RSA-SHA256
X-Cbc-Signature: <base64>

{"coin":"etc"}
resp, err := client.Post("/v2/balance", map[string]any{
    "coin": "etc",
})
$resp = $client->post('/v2/balance', [
    'coin' => 'etc',
]);
const resp = await client.post('/v2/balance', {
  coin: 'etc',
});
String resp = client.post("/v2/balance", Map.of("coin", "etc"));

Example of return result:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: 4bf92f3577b34da6a3ce929d0e0e4736
X-Cbc-Timestamp: 1792382461
X-Cbc-Nonce: 3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a
X-Cbc-Sign-Alg: RSA-SHA256
X-Cbc-Signature: <base64>

{
  "status": 200,
  "msg": "Request succeeded",
  "data": {
    "chain_hot_amount": "0",
    "amount": "0",
    "freeze_amount": "0",
    "total": "0",
    "waiting_collect_amount": "0"
  },
  "date_time": "2022-07-22 19:03:08",
  "time_stamp": 1658487788
}

Currency balance query interface, which returns the total remaining balance of on-chain deposit of a single currency.

HTTP Request

POST /v2/balance

Request Parameters

For the common headers see Signature Regulations; the table below lists only the business parameters in the body.

Parameter Required Type Description
coin Yes string coin name within 20 characters, the coin name provided by the platform shall prevail

Response Parameters

Parameter Type Description
status integer status code
msg string state description
data object balance information
data.amount string total available balance
data.freeze_amount string Freeze balance
data.total string frozen + available balance
data.chain_hot_amount string On-chain hot wallet balance
date_time string response time
time_stamp integer unix timestamp in second

Deposit result callback notification

Notification request example:

POST <callback URL provided by the merchant>
Content-Type: application/json
X-Cbc-Timestamp: 1792382460
X-Cbc-Nonce: 9f2c4e6a8b0d1f3e5a7c9e1b3d5f7a9c
X-Cbc-Sign-Alg: RSA-SHA256
X-Cbc-Signature: <base64>

{
  "data": {
    "order_id": "2020010211153423123456",
    "coin": "usdt_erc20",
    "chain": "eth",
    "address": "0x038B8E7406dED2Be112B6c7E4681Df5316957cad",
    "from_address": "0xf854AC319A546ae11e367ef80a203AaC923ca6A3",
    "txid": "0x735dc8becd0d5dc0023b526584b75c8772551fc9268668991608dadc69facb39",
    "amount": "10.0089",
    "fee": "0",
    "total": "10.0089",
    "status": 1,
    "confirm_count": 12,
    "time": 1650011196,
    "type": 2
  }
}
http.HandleFunc("/notify/deposit", func(w http.ResponseWriter, r *http.Request) {
    body, _ := io.ReadAll(r.Body)
    if err := cbc.VerifyBody(r.Header, body, client.PlatformKey, true); err != nil {
        http.Error(w, "invalid signature", http.StatusUnauthorized)
        return
    }
    // Signature verified: de-duplicate by X-Cbc-Nonce, then parse the body and handle data
    w.Header().Set("Content-Type", "application/json")
    w.Write([]byte(`{"status":200,"data":{"success_data":"success"}}`))
})
$body = file_get_contents('php://input');
$headers = array_change_key_case(getallheaders(), CASE_LOWER);
try {
    CbcClient::verifyBody($headers, $body, $platformPublicKeyPem, true);
} catch (RuntimeException $e) {
    http_response_code(401);
    exit;
}
// Signature verified: de-duplicate by X-Cbc-Nonce, then parse the body and handle data
$notify = json_decode($body, true);
header('Content-Type: application/json');
echo '{"status":200,"data":{"success_data":"success"}}';
app.post('/notify/deposit', express.raw({ type: 'application/json' }), (req, res) => {
  try {
    verifyBody((name) => req.get(name), req.body, platformPublicKeyPem, true);
  } catch (e) {
    return res.status(401).end();
  }
  // Signature verified: de-duplicate by X-Cbc-Nonce, then parse the body and handle data
  const notify = JSON.parse(req.body);
  res.type('application/json').send('{"status":200,"data":{"success_data":"success"}}');
});
@PostMapping(value = "/notify/deposit", produces = "application/json")
public ResponseEntity<String> notify(@RequestHeader HttpHeaders headers, @RequestBody byte[] body) {
    Map<String, String> sig = new HashMap<>();
    for (String name : new String[]{"X-Cbc-Timestamp", "X-Cbc-Nonce", "X-Cbc-Sign-Alg", "X-Cbc-Signature"}) {
        sig.put(name, headers.getFirst(name));
    }
    try {
        CbcClient.verifyBody(sig, body, platformKey, true);
    } catch (Exception e) {
        return ResponseEntity.status(401).build();
    }
    // Signature verified: de-duplicate by X-Cbc-Nonce, then parse the body and handle data
    return ResponseEntity.ok("{\"status\":200,\"data\":{\"success_data\":\"success\"}}");
}

Merchant reply example:

{
  "status": 200,
  "data": {
    "success_data": "success"
  }
}

User's deposit arrival notification callback, a platform initiates a request, and the merchant responds

HTTP Request

POST: The specific callback URL is provided by the merchant to the platform side

Request Parameters

For the request headers and the receiver verification steps see Notification and review signature. Verify the signature with the platform public key before parsing the body; the table below lists the fields in the body.

Parameter Required Type Description
data No string callback notification carries data structure
data.order_id Yes string order number
data.coin Yes string coin name
data.chain Yes string main chain coin name
data.address Yes string account address
data.from_address Yes string from address, product environment return this field only for merchant, who created after 2023-05-05.
data.txid Yes string on-chain txid
data.total Yes string actual credit total = amount - fee
data.fee Yes string platform fee
data.amount No string on-chain amount (this field is for reference only)
data.status Yes integer 0 credited but not confirmed 1 confirmed successful 5 failed 8 waiting for refund 10 refunding 20 refunded
data.confirm_count Yes integer Confirmation count is for reference only, with status=1 as successful entry
data.time Yes integer order confirmation time
data.type Yes integer 1 on-site deposit 2 on-chain deposit
data.reject_reason No string The rejection reason selected during merchant review. See the following table for value description. This parameter does not exist by default. If you need to return it, please contact us.
data.user_id No string User ID linked to the address. Enabled on request; contact your business representative
data.is_black No integer Whether the source address is a risk address: 1 yes, 0 no. Enabled on request
data.black_tag No string Risk tags. Enabled on request
data.black_source No string Risk source: HBC, SLOW_MIST, OK_LINK, BEOSIN, ELLIPTIC. Enabled on request
data.black_score No string Risk score, sent only for the OK_LINK and BEOSIN sources. Enabled on request
data.black_level No string Risk level, sent only for the OK_LINK and BEOSIN sources. Enabled on request
data.is_frozen_by_tr No boolean Sent as true when the deposit is frozen by Travel Rule
data.transfer_id No string Travel Rule transfer ID, sent when the deposit is frozen by Travel Rule; empty string if no transfer is matched

Response Parameters

Parameter Required Type Description
status Yes integer status code
data Yes object returns the data object
data.success_data Yes string success Received successfully

request parameter data.reject_reason description

value description
no-shop-coin Shop coin not supported
shop-coin-no-recharge Shop coin not support recharge
aml-slow-mist Slow Mist aml risk address
aml-ok-link OKLink aml risk address
other other