Other
Coin query
Request example:
POST <base_path>/v2/coin/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>
{"coin":"eth","chain":"eth","page":1,"page_size":20}
resp, err := client.Post("/v2/coin/list", map[string]any{
"coin": "eth",
"chain": "eth",
"page": 1,
"page_size": 20,
})
$resp = $client->post('/v2/coin/list', [
'coin' => 'eth',
'chain' => 'eth',
'page' => 1,
'page_size' => 20,
]);
const resp = await client.post('/v2/coin/list', {
coin: 'eth',
chain: 'eth',
page: 1,
page_size: 20,
});
String resp = client.post("/v2/coin/list", Map.of(
"coin", "eth",
"chain", "eth",
"page", 1,
"page_size", 20));
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,
"max_page": 2,
"count": 20,
"list": [
{
"coin": "eth",
"chain": "eth",
"contract_address": "",
"status": "1",
"open_in": 1,
"open_out": 1,
"open_address": "1",
"confirm_count": "6",
"min_transfer_in_amount": "0.00000001",
"min_transfer_out_amount": "0"
},
{
"coin": "hc",
"chain": "hc",
"contract_address": "",
"status": "1",
"open_in": 1,
"open_out": 1,
"open_address": "1",
"confirm_count": "1",
"min_transfer_in_amount": "0",
"min_transfer_out_amount": "0.0001"
},
...
]
},
"date_time": "2020-08-04 15:19:56",
"time_stamp": 1596525596
}
Coin related api for the merchant
HTTP Request
POST /v2/coin/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 |
|---|---|---|---|
| coin | No | string | coin name (eg: eth) |
| chain | No | string | Main chain name (query main chain and its tokens, such as: eth) |
| page | No | integer, default is 1 | 1<= N <=Max, N>Max ? N=Max ; N<1 ? N=1 |
| page_size | No | integer | number of pages per page (20 ~ 500), default 20 |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | state description |
| data | object | For details, see "data details" below. |
| data.page | integer | page number |
| data.max_page | integer | total number of pages |
| data.count | integer | number of records on the current page |
| data.list | array | specific record |
| data.list.coin | string | currency |
| data.list.chain | string | main chain name |
| data.list.status | integer | status: 1 on; 0 off |
| data.list.open_in | integer | deposit status: 1 on; 0 off |
| data.list.open_out | integer | Withdrawal status: 1 on; 0 off |
| data.list.open_address | integer | Assign address status: 1 on; 0 off |
| data.list.confirm_count | integer | deposit confirmation count (default 6, the actual credit is subject to the order status) |
| data.list.min_transfer_in_amount | string | Minimum transfer amount (0 means no limit) |
| data.list.min_transfer_out_amount | string | Minimum withdrawal amount (0 means no limit) |
| data.list.contract_address | string | The contract address of a contract coin. |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Coin exchange rate
Request example:
POST <base_path>/v2/rate/index 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>
{"source_coin":"eth","target_coin":"usdt"}
resp, err := client.Post("/v2/rate/index", map[string]any{
"source_coin": "eth",
"target_coin": "usdt",
})
$resp = $client->post('/v2/rate/index', [
'source_coin' => 'eth',
'target_coin' => 'usdt',
]);
const resp = await client.post('/v2/rate/index', {
source_coin: 'eth',
target_coin: 'usdt',
});
String resp = client.post("/v2/rate/index", Map.of("source_coin", "eth", "target_coin", "usdt"));
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":{
"rate":"19490.64944834"
},
"date_time":"2020-01-14 00:50:27"
}
The exchange rate of various coins corresponding to usdt (this is use for coin price calculation, please go to the coin exchange rate API for coin exchange). Currently supported (btc eth hc eos trx xrp)
HTTP Request
POST /v2/rate/index
Request Parameters
For the common headers see Signature Regulations; the table below lists only the business parameters in the body.
| Parameter | Required | Type | Description |
|---|---|---|---|
| source_coin | Yes | string | exchange coin |
| target_coin | Yes | string | target coin currently only supports usdt |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | state description |
| data | object | For details, see "data details" below. |
| data.rate | string | exchange rate such as 1btc= 19490.64944834 usdt |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Coin to fiat currency rate
Request example:
POST <base_path>/v2/rate/fiatCurrency 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>
{"source_coin":"eth","target_currency":"usd"}
resp, err := client.Post("/v2/rate/fiatCurrency", map[string]any{
"source_coin": "eth",
"target_currency": "usd",
})
$resp = $client->post('/v2/rate/fiatCurrency', [
'source_coin' => 'eth',
'target_currency' => 'usd',
]);
const resp = await client.post('/v2/rate/fiatCurrency', {
source_coin: 'eth',
target_currency: 'usd',
});
String resp = client.post("/v2/rate/fiatCurrency", Map.of("source_coin", "eth", "target_currency", "usd"));
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":{
"rate":"2166.81",
"source_coin": "eth",
"target_currency": "usd"
},
"date_time":"2020-01-14 00:50:27"
}
HTTP Request
POST /v2/rate/fiatCurrency
Request Parameters
For the common headers see Signature Regulations; the table below lists only the business parameters in the body.
| Parameter | Required | Type | Description |
|---|---|---|---|
| source_coin | Yes | string | source coin |
| target_currency | Yes | string | target fiat currency, default value usd. support usd,cny,aed,sgd,jpy,krw. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | state description |
| data | object | For details, see "data details" below. |
| data.rate | string | coin to fiat currency rate. eg: 1eth= 2166.81 usd |
| data.source_coin | string | source coin |
| data.target_currency | string | target fiat currency |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Collection fee calculation
Request example:
POST <base_path>/v2/balance/transactionFee 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":"eth"}
resp, err := client.Post("/v2/balance/transactionFee", map[string]any{
"coin": "eth",
})
$resp = $client->post('/v2/balance/transactionFee', [
'coin' => 'eth',
]);
const resp = await client.post('/v2/balance/transactionFee', {
coin: 'eth',
});
String resp = client.post("/v2/balance/transactionFee", Map.of("coin", "eth"));
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 successful",
"data":{
"fee":"0.01386",
"coin":"eth"
},
"date_time":"2020-10-20 15:58:53",
"time_stamp":1603180733
}
- Function: Calculation of deposit order collection fee
- Currently only eth and usdt_erc20 are supported, and other currencies will continue to expand in the future.
HTTP Request
POST /v2/balance/transactionFee
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 is provided by the platform |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | status description |
| data | object | |
| data.fee | string | Fee |
| data.coin | string | Coin name (unit of handling fee) |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Withdrawal gas fee estimate query
Request example:
POST <base_path>/v2/transfer/transactionFee 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":"eth"}
resp, err := client.Post("/v2/transfer/transactionFee", map[string]any{
"coin": "eth",
})
$resp = $client->post('/v2/transfer/transactionFee', [
'coin' => 'eth',
]);
const resp = await client.post('/v2/transfer/transactionFee', {
coin: 'eth',
});
String resp = client.post("/v2/transfer/transactionFee", Map.of("coin", "eth"));
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": [
{
"coin": "fil", //coin name
"fee": "0.00379379", //Current coin (coin) transaction fee
"unit": "fil"//Unit of handling fee
}, {
"coin": "eth",
"fee": "0.000231",
"unit": "eth"
}, {
"coin": "mof",
"fee": "0.00000005",
"unit": "eth"
}
],
"date_time": "2021-06-17 16:58:52",
"time_stamp": 1623920332
}
Withdrawal fee estimate API, returns the fee for withdrawal of the supported currency. (Currently only supports eth and its contract, fil)
HTTP Request
POST /v2/transfer/transactionFee
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 | No | string | The coin name is provided by the platform |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | status description |
| data | object | |
| data.coin | string | coin name |
| data.fee | string | handling fee |
| data.unit | string | Handling fee unit |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Refund order list
Request example:
POST <base_path>/v2/refund/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}
resp, err := client.Post("/v2/refund/list", map[string]any{
"page": 1,
})
$resp = $client->post('/v2/refund/list', [
'page' => 1,
]);
const resp = await client.post('/v2/refund/list', {
page: 1,
});
String resp = client.post("/v2/refund/list", Map.of("page", 1));
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": "success",
"data": {
"page": 1,
"max_page": 1,
"count": 1,
"list": [{
"block_number": 69471385,
"block_time": 1742882698,
"coin": "pol",
"contract": "pol",
"contract_address": "",
"created_at": 1742882633,
"creator": "CS007",
"end_time": 1742882749,
"from_address": "0xDCE6e20FfC7b651Cd5d7ad922b8B77691E999dB2",
"gas_fee": "0.00062635",
"method": 0,
"order_id": "20250101123456",
"receive_amount": "0.03",
"receive_order_id": "",
"receive_txid": "0xb6042b5eac8a9b7fbc538ad9564b2ada7d59cbc39a462d2da784494562556590",
"refund_amount": "0.029",
"remark": "",
"status": 1,
"to_address": "0xb4bd96957e7b078566cd1e40de2c131d1f4374e4",
"txid": "0xc3b148c2ede826bbadf68682486fce8fabe5a5c53e3973c45b9e5578787ff359",
"type": 1
}]
},
"date_time": "2022-07-22 18:36:36",
"time_stamp": 1658486196
}
HTTP Request
POST /v2/refund/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 |
| page_size | No | integer | number of pages per page (20 ~ 500), default 20 |
| sort_num | No | integer | default list sorting is ascanding order of record creation time ( 1 positive order; 2 reverse order) |
| status | No | string | status of refund order, default return all statuses, 0 pending; 1 succeeded; 2 failed; 5 to be audit; 6 audit rejected; 10 wait platform audit; 11 platform rejected; 25 refunding; 26 lacking gas fee; |
| start_time | No | integer | start time (creation time) format: timestamp |
| end_time | No | integer | end time (creation time) format: timestamp |
| contract | No | string | main chain name |
| coin | No | string | coin name |
| receive_order_id | No | string | related recharge order_id |
| receive_txid | No | string | related recharge tx hash |
| txid | No | string | the refund order tx hash |
| from_address | No | string | transaction from address, as well the recharge user address |
| to_address | No | string | transaction from address, as well the cold wallet address, or the recharge transaction from address |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status code |
| msg | string | status description |
| data | object | |
| data.page | integer | page number |
| data.count | integer | record total count |
| data.list | array | |
| data.list.block_number | integer | refund transaction block number |
| data.list.block_time | integer | refund transaction block time |
| data.list.coin | string | refund coin name |
| data.list.contract | string | refund chain name |
| data.list.contract_address | string | refund coin token address |
| data.list.created_at | integer | create time |
| data.list.creator | string | refund order creator |
| data.list.end_time | integer | end time |
| data.list.from_address | string | transaction from address, as well the recharge user address |
| data.list.gas_fee | string | transaction gas fee |
| data.list.method | integer | refund method, 0: refund back to the recharge from address, 1: cold wallet address |
| data.list.order_id | string | refund order_id |
| data.list.receive_amount | string | related recharge transaction amount |
| data.list.receive_order_id | string | related recharge order_id |
| data.list.receive_txid | string | related recharge transaction hash |
| data.list.refund_amount | string | actual refund amount |
| data.list.remark | string | remark |
| data.list.status | integer | status of refund order, default return all statuses, 0 pending; 1 succeeded; 2 failed; 5 to be audit; 6 audit rejected; 10 wait platform audit; 11 platform rejected; 25 refunding; 26 lacking gas fee; |
| data.list.to_address | string | transaction from address, as well the cold wallet address, or the recharge transaction from address |
| data.list.txid | string | related recharge tx hash |
| data.list.type | integer | refund type, 0: relate recharge 1:supported coin with out recharge 2: not support coin 3: not support chain |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Check whether the number of currencies recorded in its ledger is consistent with the data in its on-chain wallet
Request example:
POST <base_path>/v2/reconcile/balances 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>
{"list":[{"chain":"eth","coin":"usdt_erc20","ledger_balance":"100"},{"chain":"btc","coin":"btc","ledger_balance":"10"}]}
resp, err := client.Post("/v2/reconcile/balances", map[string]any{
"list": []map[string]any{
{"chain": "eth", "coin": "usdt_erc20", "ledger_balance": "100"},
{"chain": "btc", "coin": "btc", "ledger_balance": "10"},
},
})
$resp = $client->post('/v2/reconcile/balances', [
'list' => [
['chain' => 'eth', 'coin' => 'usdt_erc20', 'ledger_balance' => '100'],
['chain' => 'btc', 'coin' => 'btc', 'ledger_balance' => '10'],
],
]);
const resp = await client.post('/v2/reconcile/balances', {
list: [
{ chain: 'eth', coin: 'usdt_erc20', ledger_balance: '100' },
{ chain: 'btc', coin: 'btc', ledger_balance: '10' },
],
});
String resp = client.post("/v2/reconcile/balances", Map.of(
"list", List.of(
Map.of("chain", "eth", "coin", "usdt_erc20", "ledger_balance", "100"),
Map.of("chain", "btc", "coin", "btc", "ledger_balance", "10"))));
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": {
"list": [
{
"chain": "eth",
"coin": "usdt_erc20",
"ledger_balance": "100",
"onchain_balance": "100",
"matched": true,
"note": "",
"difference": "0"
},
{
"chain": "btc",
"coin": "btc",
"ledger_balance": "10",
"onchain_balance": "9",
"matched": false,
"note": "",
"difference": "-1"
}
]
},
"date_time": "2022-07-22 18:36:36",
"time_stamp": 1658486196
}
HTTP Request
POST /v2/reconcile/balances
Request Parameters
For the common headers see Signature Regulations; the table below lists only the business parameters in the body.
| Parameter | Required | Type | Description |
|---|---|---|---|
| list.chain | No | string | chain name |
| list.coin | Yes | string | token coin name |
| list.ledger_balance | No | string | ledger balance |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status |
| msg | string | message |
| data | object | data |
| data.list | array | list |
| data.list.chain | string | chain name |
| data.list.coin | string | coin name |
| data.list.ledger_balance | string | ledger balance |
| data.list.onchain_balance | string | onchain balance |
| data.list.difference | string | balance difference |
| data.list.matched | boolean | is balance matched |
| data.list.note | string | note |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Check whether the number of coins in an account address is consistent with the number on the chain
Request example:
POST <base_path>/v2/reconcile/addressBalance 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>
{"list":[{"chain":"eth","coin":"usdt_erc20","address":"0x111...2222","ledger_balance":"100"},{"chain":"btc","coin":"btc","address":"1bcd...zxc","ledger_balance":"10"}]}
resp, err := client.Post("/v2/reconcile/addressBalance", map[string]any{
"list": []map[string]any{
{"chain": "eth", "coin": "usdt_erc20", "address": "0x111...2222", "ledger_balance": "100"},
{"chain": "btc", "coin": "btc", "address": "1bcd...zxc", "ledger_balance": "10"},
},
})
$resp = $client->post('/v2/reconcile/addressBalance', [
'list' => [
['chain' => 'eth', 'coin' => 'usdt_erc20', 'address' => '0x111...2222', 'ledger_balance' => '100'],
['chain' => 'btc', 'coin' => 'btc', 'address' => '1bcd...zxc', 'ledger_balance' => '10'],
],
]);
const resp = await client.post('/v2/reconcile/addressBalance', {
list: [
{ chain: 'eth', coin: 'usdt_erc20', address: '0x111...2222', ledger_balance: '100' },
{ chain: 'btc', coin: 'btc', address: '1bcd...zxc', ledger_balance: '10' },
],
});
String resp = client.post("/v2/reconcile/addressBalance", Map.of(
"list", List.of(
Map.of("chain", "eth", "coin", "usdt_erc20", "address", "0x111...2222", "ledger_balance", "100"),
Map.of("chain", "btc", "coin", "btc", "address", "1bcd...zxc", "ledger_balance", "10"))));
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": {
"list": [
{
"chain": "eth",
"coin": "usdt_erc20",
"address": "0x111...2222",
"matched": true,
"ledger_amount": "100",
"onchain_balance": "100",
"note": "",
"difference": "0"
},
{
"chain": "btc",
"coin": "btc",
"address": "1bcd...zxc",
"matched": false,
"ledger_amount": "10",
"onchain_balance": "9",
"note": "",
"difference": "-1"
}
]
},
"date_time": "2022-07-22 18:36:36",
"time_stamp": 1658486196
}
HTTP Request
POST /v2/reconcile/addressBalance
Request Parameters
For the common headers see Signature Regulations; the table below lists only the business parameters in the body.
| Parameter | Required | Type | Description |
|---|---|---|---|
| list.chain | No | string | chain name |
| list.coin | Yes | string | token coin name |
| list.ledger_balance | No | string | ledger balance |
| list.address | Yes | string | chain account address |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status |
| msg | string | message |
| data | object | data |
| data.list | array | list |
| data.list.chain | string | chain name |
| data.list.coin | string | coin name |
| data.list.address | string | chain account address |
| data.list.ledger_balance | string | ledger balance |
| data.list.onchain_balance | string | onchain balance |
| data.list.difference | string | balance difference |
| data.list.matched | boolean | is balance matched |
| data.list.note | string | note |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |
Check whether the withdrawal data recorded in the internal ledger is consistent with the data on its wallet chain
Request example:
POST <base_path>/v2/reconcile/withdrawal 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>
{"list":[{"trade_id":"W20250001","chain":"eth","coin":"usdt_erc20","from_address":"0x111...222","to_address":"0x111...333","txid":"0x123...321","ledger_amount":"100"},{"trade_id":"W20250002","chain":"btc","coin":"btc","from_address":"bc1q...3cyx","to_address":"bc1q...0cur","txid":"dd8a...7ff8","ledger_amount":"100"}]}
resp, err := client.Post("/v2/reconcile/withdrawal", map[string]any{
"list": []map[string]any{
{"trade_id": "W20250001", "chain": "eth", "coin": "usdt_erc20", "from_address": "0x111...222", "to_address": "0x111...333", "txid": "0x123...321", "ledger_amount": "100"},
{"trade_id": "W20250002", "chain": "btc", "coin": "btc", "from_address": "bc1q...3cyx", "to_address": "bc1q...0cur", "txid": "dd8a...7ff8", "ledger_amount": "100"},
},
})
$resp = $client->post('/v2/reconcile/withdrawal', [
'list' => [
['trade_id' => 'W20250001', 'chain' => 'eth', 'coin' => 'usdt_erc20', 'from_address' => '0x111...222', 'to_address' => '0x111...333', 'txid' => '0x123...321', 'ledger_amount' => '100'],
['trade_id' => 'W20250002', 'chain' => 'btc', 'coin' => 'btc', 'from_address' => 'bc1q...3cyx', 'to_address' => 'bc1q...0cur', 'txid' => 'dd8a...7ff8', 'ledger_amount' => '100'],
],
]);
const resp = await client.post('/v2/reconcile/withdrawal', {
list: [
{ trade_id: 'W20250001', chain: 'eth', coin: 'usdt_erc20', from_address: '0x111...222', to_address: '0x111...333', txid: '0x123...321', ledger_amount: '100' },
{ trade_id: 'W20250002', chain: 'btc', coin: 'btc', from_address: 'bc1q...3cyx', to_address: 'bc1q...0cur', txid: 'dd8a...7ff8', ledger_amount: '100' },
],
});
String resp = client.post("/v2/reconcile/withdrawal", Map.of(
"list", List.of(
Map.of("trade_id", "W20250001", "chain", "eth", "coin", "usdt_erc20", "from_address", "0x111...222", "to_address", "0x111...333", "txid", "0x123...321", "ledger_amount", "100"),
Map.of("trade_id", "W20250002", "chain", "btc", "coin", "btc", "from_address", "bc1q...3cyx", "to_address", "bc1q...0cur", "txid", "dd8a...7ff8", "ledger_amount", "100"))));
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": {
"list": [
{
"trade_id": "W20250001",
"chain": "eth",
"coin": "usdt_erc20",
"from_address": "0x111...222",
"to_address": "0x111...333",
"txid": "0x123...321",
"matched": true,
"ledger_amount": "100.00",
"onchain_amount": "100.00",
"difference": "0",
"note": ""
},
{
"trade_id": "W20250002",
"chain": "btc",
"coin": "btc",
"from_address": "bc1q...3cyx",
"to_address": "bc1q...0cur",
"txid": "dd8a...7ff8",
"matched": false,
"onchain_amount": "99.12",
"ledger_amount": "100.00",
"difference": "-0.88",
"note": ""
}
]
},
"date_time": "2022-07-22 18:36:36",
"time_stamp": 1658486196
}
HTTP Request
POST /v2/reconcile/withdrawal
Request Parameters
For the common headers see Signature Regulations; the table below lists only the business parameters in the body.
| Parameter | Required | Type | Description |
|---|---|---|---|
| list.trade_id | Yes | string | merchant withdraw order no |
| list.chain | No | string | chain name, echoed back as is and not used for reconciliation |
| list.coin | No | string | coin name |
| list.ledger_amount | No | string | withdraw amount |
| list.from_address | No | string | withdraw from address |
| list.to_address | No | string | withdraw to address |
| list.txid | No | string | transaction hash |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | status |
| msg | string | message |
| data | object | data |
| data.list | array | list |
| data.list.trade_id | string | merchant withdraw order no |
| data.list.chain | string | chain name |
| data.list.coin | string | coin name |
| data.list.from_address | string | withdraw from address |
| data.list.to_address | string | withdraw to address |
| data.list.ledger_amount | string | withdraw ledger amount |
| data.list.onchain_amount | string | withdraw onchain amount |
| data.list.difference | string | amount difference |
| data.list.matched | boolean | is amount matched |
| data.list.note | string | note |
| date_time | string | response time |
| time_stamp | integer | unix timestamp in second |