# WALLET

## ~~Wallet Address-Deprecated~~

{% hint style="info" %}
Call this interface to place an order for wallet recharge. It will return the order number, and the amount to be deposit.
{% endhint %}

```
POST /merchant/core/mcb/account/walletDeposit
```

**Request**

<table><thead><tr><th>Param</th><th>Type</th><th>Required</th><th width="273">Remark</th></tr></thead><tbody><tr><td>chain</td><td>String</td><td>false</td><td>Network chain. default: TRC20<br><code>TRC20</code>  <code>BEP20</code></td></tr><tr><td>amount</td><td>BigDecimal</td><td>true</td><td>Deposit amount</td></tr></tbody></table>

**Response**

<table><thead><tr><th width="221.4215087890625">Param</th><th width="114.247314453125">Type</th><th width="114.2613525390625">Required</th><th>Remark</th></tr></thead><tbody><tr><td>orderNo</td><td>String</td><td>true</td><td>Transaction id</td></tr><tr><td>userInputDepositAmount</td><td>BigDecimal</td><td>true</td><td>The deposit amount input by the user</td></tr><tr><td>actualDepositAmount</td><td>BigDecimal</td><td>true</td><td>The actual amount to be recharged. A decimal may be generated based on userInputDepositAmount</td></tr><tr><td>currency</td><td>String</td><td>true</td><td>currency</td></tr><tr><td>chain</td><td>String</td><td>true</td><td>Network chain</td></tr><tr><td>toAddress</td><td>String</td><td>true</td><td>Wallet deposit address</td></tr><tr><td>createTime</td><td>Long</td><td>true</td><td>Order time. Timestamp</td></tr><tr><td>expireSecond</td><td>Long</td><td>true</td><td>Validity period (unit: seconds)</td></tr></tbody></table>

**Example Response**

```json
{
    "success": true,
    "code": 200,
    "msg": "Success",
    "data":
    {
        "orderNo": "CND1896547520597221376",
        "userInputDepositAmount": 20,
        "actualDepositAmount": 20.0377,
        "currency": "USDT",
        "chain": "TRC20",
        "toAddress": "TF9fZHD27TmEznSRHcirWkXj2asg24kl3jg",
        "createTime": 1741007139000,
        "expireSecond": 10800
    }
}
```

## ~~Wallet Deposit Transaction-Deprecated~~

**Note:**\
that if status=fail is not considered the final state, we can manually enter the final status=success (this is a possibility).

```
POST /merchant/core/mcb/account/walletDepositTransaction
```

**Request**

<table><thead><tr><th width="163.6500244140625">Param</th><th width="132.62713623046875">Type</th><th width="103.809326171875">Required</th><th width="346.80712890625">Remark</th></tr></thead><tbody><tr><td>pageNum</td><td>Long</td><td>true</td><td>Current page. Default: 1</td></tr><tr><td>pageSize</td><td>Long</td><td>true</td><td>Number of pages per page. Default: 10; Maximum: 100</td></tr><tr><td>orderNo</td><td>String</td><td>false</td><td>Transaction id</td></tr><tr><td>fromAddress</td><td>String</td><td>false</td><td>Source address</td></tr><tr><td>toAddress</td><td>String</td><td>false</td><td>Target address</td></tr><tr><td>txId</td><td>String</td><td>false</td><td>Tx hash</td></tr><tr><td>status</td><td>String</td><td>false</td><td><p>Status <br><code>wait_process</code>: Wait process; </p><p><code>processing</code>: Processing;<br><code>success</code>: Success; <br><code>fail</code>: Failed; </p></td></tr><tr><td>startTime</td><td>Long</td><td>false</td><td>Order start time. Millisecond timestamp</td></tr><tr><td>endTime</td><td>Long</td><td>false</td><td>Order end time. Millisecond timestamp</td></tr></tbody></table>

Response

<table><thead><tr><th width="204.882080078125">Param</th><th width="129.0220947265625">Type</th><th width="91.4913330078125">Required</th><th width="320.908935546875">Remark</th></tr></thead><tbody><tr><td>orderNo</td><td>String</td><td>true</td><td>Transaction id</td></tr><tr><td>needDepositTxAmount</td><td>BigDecimal</td><td>true</td><td>Order Amount</td></tr><tr><td>txAmount</td><td>BigDecimal</td><td>false</td><td>On-chain deposit amount</td></tr><tr><td>feeRate</td><td>BigDecimal</td><td>true</td><td>Deposit fee rate. Example: 1 = 1%</td></tr><tr><td>feeRateAmount</td><td>BigDecimal</td><td>true</td><td>Deposit fee rate amount</td></tr><tr><td>fixedFee</td><td>BigDecimal</td><td>true</td><td>Fixed deposit fee amount</td></tr><tr><td>currency</td><td>String</td><td>true</td><td>Currency. Example: USDT</td></tr><tr><td>receivedAmount</td><td>BigDecimal</td><td>false</td><td>Received amount</td></tr><tr><td>receivedCurrency</td><td>String</td><td>false</td><td>Received currency</td></tr><tr><td>chain</td><td>String</td><td>true</td><td>Chain. Example: TRC20</td></tr><tr><td>fromAddress</td><td>String</td><td>false</td><td>Source address</td></tr><tr><td>toAddress</td><td>String</td><td>true</td><td>Target address</td></tr><tr><td>txId</td><td>String</td><td>false</td><td>Tx hash</td></tr><tr><td>block</td><td>Integer</td><td>false</td><td>Block Height</td></tr><tr><td>confirmTime</td><td>Long</td><td>false</td><td>Transaction confirmation time on the chain. Millisecond timestamp</td></tr><tr><td>type</td><td>String</td><td>true</td><td>Type<br><code>chain_deposit</code>: On-chain deposit</td></tr><tr><td>status</td><td>String</td><td>true</td><td><p>Status <br><code>wait_process</code>: Pending; </p><p><code>processing</code>: Processing;<br><code>success</code>: Success; <br><code>fail</code>: Failed; </p></td></tr><tr><td>remark</td><td>String</td><td>false</td><td>Remark</td></tr><tr><td>createTime</td><td>Long</td><td>true</td><td><p>Order create time. </p><p>Millisecond timestamp</p></td></tr><tr><td>updateTime</td><td>Long</td><td>true</td><td><p>Order update time. </p><p>Millisecond timestamp</p></td></tr></tbody></table>

**Example Response**

```json
{
    "success": true,
    "code": 200,
    "msg": "SUCCESS",
    "data":
    {
        "total": 25,
        "records":
        [
            {
                "orderNo": "CND1985645689502720000",
                "needDepositTxAmount": 20,
                "txAmount": 20,
                "feeRate": 1.5,
                "fee": 0.3,
                "fixedFee": 0,
                "currency": "USDT",
                "receivedAmount": 19.7,
                "receivedCurrency": "USD",
                "chain": "TRC20",
                "fromAddress": "TVwdXFHzD5mJP52xkxtRfVCLrWNaLGiiaB",
                "toAddress": "TF9fZHk27TmEznSRHiirWkX23zbZJC299M",
                "txId": "b5eccb05e227fab979182905e3ff1ec8a0995f43bc407aaaaaaaaaaaaaaa",
                "block": 65567635,
                "confirmTime": 1727351235000,
                "type": "chain_deposit",
                "status": "success",
                "remark": "Chain deposit",
                "createTime": 1762249798000,
                "updateTime": 1762249920000
            }
        ]
    }
}
```

## Wallet Flow Chart-v2

{% stepper %}
{% step %}

### [Call Coin list](#coin-list-v2)

Query supported coins
{% endstep %}

{% step %}

### [Create wallet address](#create-wallet-address-v2)

Create wallet address
{% endstep %}

{% step %}

### [Query wallet address list](#wallet-address-list-v2)

Query wallet address list
{% endstep %}
{% endstepper %}

<figure><img src="https://83277272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK4pYjaHDLD6kKvvd7mig%2Fuploads%2F7hCOZsouMIpHi67EAlzZ%2Fwhiteboard_exported_image%20(2).png?alt=media&#x26;token=c608c2ef-426f-49d7-b221-9c114c119cdc" alt=""><figcaption></figcaption></figure>

## Coin List-v2

```
POST /merchant/core/mcb/wallet/v2/coins
```

**Request**

<table><thead><tr><th>Param</th><th>Type</th><th>Required</th><th width="273">Remark</th></tr></thead><tbody><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

**Response**

<table><thead><tr><th width="221.4215087890625">Param</th><th width="114.247314453125">Type</th><th width="114.2613525390625">Required</th><th>Remark</th></tr></thead><tbody><tr><td>coinKey</td><td>String</td><td>true</td><td>Coin key</td></tr><tr><td>chain</td><td>String</td><td>true</td><td>Chain</td></tr><tr><td>coinFullName</td><td>String</td><td>true</td><td>Coin full name</td></tr><tr><td>coinName</td><td>String</td><td>true</td><td>Coin name</td></tr><tr><td>showCoinDecimal</td><td>Integer</td><td>true</td><td>Coin show decimal</td></tr><tr><td>coinDecimal</td><td>Integer</td><td>true</td><td>Coin transaction decimal</td></tr><tr><td>blockChainShowName</td><td>String</td><td>true</td><td>Block chain show name</td></tr><tr><td>browser</td><td>String</td><td>true</td><td>Wallet address redirect link url</td></tr><tr><td>txRefUrl</td><td>String</td><td>true</td><td>Transaction redirect link url</td></tr><tr><td>contractAddress</td><td>String</td><td>true</td><td>Contract</td></tr><tr><td>enableDeposit</td><td>Boolean</td><td>true</td><td>Enable deposit.<br><code>true</code>  <code>false</code></td></tr><tr><td>enableWithdraw</td><td>Boolean</td><td>true</td><td>Enable withdraw.<br><code>true</code>  <code>false</code></td></tr><tr><td>confirmations</td><td>Integer</td><td>true</td><td>Block confirmation count</td></tr><tr><td>enabled</td><td>Boolean</td><td>true</td><td>Enable Coin<br><code>true</code>  <code>false</code></td></tr></tbody></table>

**Example Response**

```json
{
  "success": true,
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "coinKey": "USDT_BEP20",
      "chain": "BEP20",
      "coinFullName": "Tether",
      "coinName": "USDT",
      "showCoinDecimal": 8,
      "coinDecimal": 18,
      "blockChainShowName": "BNB Smart Chain (BEP20)",
      "browser": "https://bscscan.com/token/0x55d398326f99059ff775485246999027b3197955?a={address}",
      "txRefUrl": "https://bscscan.com/tx/{txHash}",
      "contractAddress": "0x55d398326f99059ff775485246999027b3197955",
      "enableDeposit": true,
      "enableWithdraw": true,
      "confirmations": 15,
      "enabled": true
    },
    {
      "coinKey": "USDT_TRC20",
      "chain": "TRC20",
      "coinFullName": "Tether",
      "coinName": "USDT",
      "showCoinDecimal": 6,
      "coinDecimal": 6,
      "blockChainShowName": "Tron (TRC20)",
      "browser": "https://tronscan.org/#/address/{address}",
      "txRefUrl": "https://tronscan.org/#/transaction/{txHash}",
      "contractAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      "enableDeposit": true,
      "enableWithdraw": true,
      "confirmations": 38,
      "enabled": true
    }
  ]
}
```

## Create Wallet Address-v2

This function is only supported when the parameter enabled=true.  ***Also, You can also automatically generate a wallet address after selecting the coin and chain in the dashboard.***

```
POST /merchant/core/mcb/wallet/v2/create
```

**Request**

<table><thead><tr><th>Param</th><th>Type</th><th>Required</th><th width="273">Remark</th></tr></thead><tbody><tr><td>coinKey</td><td>String</td><td>true</td><td>Coin key</td></tr></tbody></table>

**Response**

<table><thead><tr><th width="221.4215087890625">Param</th><th width="114.247314453125">Type</th><th width="114.2613525390625">Required</th><th>Remark</th></tr></thead><tbody><tr><td>coinKey</td><td>String</td><td>true</td><td>Coin key</td></tr><tr><td>chain</td><td>String</td><td>true</td><td>Chain</td></tr><tr><td>coinName</td><td>String</td><td>true</td><td>Coin name</td></tr><tr><td>address</td><td>String</td><td>true</td><td>Address</td></tr></tbody></table>

**Example Response**

```json
{
  "success": true,
  "code": 200,
  "msg": "SUCCESS",
  "data": {
    "coinKey": "USDT_BEP20",
    "chain": "BEP20",
    "coinName": "USDT",
    "address": "0xAAac5f0d8133424d86D5Ef3f170E0420e561125f"
  }
}
```

## Wallet Address List-v2

```
POST /merchant/core/mcb/wallet/v2/addressList
```

**Request**

<table><thead><tr><th>Param</th><th>Type</th><th>Required</th><th width="273">Remark</th></tr></thead><tbody><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

**Response**

<table><thead><tr><th width="221.4215087890625">Param</th><th width="114.247314453125">Type</th><th width="114.2613525390625">Required</th><th>Remark</th></tr></thead><tbody><tr><td>coinKey</td><td>String</td><td>true</td><td>Coin key</td></tr><tr><td>chain</td><td>String</td><td>true</td><td>Chain</td></tr><tr><td>coinName</td><td>String</td><td>true</td><td>Coin name</td></tr><tr><td>address</td><td>String</td><td>true</td><td>Address</td></tr></tbody></table>

**Example Response**

```json
{
  "success": true,
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "coinKey": "USDT_BEP20",
      "chain": "BEP20",
      "coinName": "USDT",
      "address": "0xAAac5f0d8133424d86D5Ef3f170E0420e561125f"
    }
  ]
}
```

## Wallet Transaction History-v2

[**Webhook link**](https://wsb.gitbook.io/wasabicard-doc/webhooks#wallet-transaction-event-v2)

```
POST /merchant/core/mcb/wallet/v2/transaction
```

**Request**

<table><thead><tr><th width="188.99298095703125">Param</th><th width="100.75213623046875">Type</th><th width="103.809326171875">Required</th><th width="346.80712890625">Remark</th></tr></thead><tbody><tr><td>pageNum</td><td>Long</td><td>true</td><td>Current page. Default: 1</td></tr><tr><td>pageSize</td><td>Long</td><td>true</td><td>Number of pages per page. Default: 10; Maximum: 100</td></tr><tr><td>coinKey</td><td>String</td><td>false</td><td>Coin key</td></tr><tr><td>coinName</td><td>String</td><td>false</td><td>Coin name</td></tr><tr><td>txHash</td><td>String</td><td>false</td><td>Tx hash</td></tr><tr><td>sourceAddress</td><td>String</td><td>false</td><td>Source address</td></tr><tr><td>destinationAddress</td><td>String</td><td>false</td><td>Destination address</td></tr><tr><td>orderNo</td><td>String</td><td>false</td><td>Wasabi transaction id</td></tr><tr><td>type</td><td>String</td><td>false</td><td>Type<br><code>DEPOSIT</code>  <code>WITHDRAW</code></td></tr><tr><td>status</td><td>String</td><td>false</td><td><p>Status <br><code>wait_process</code>: Pending; </p><p><code>processing</code>: Processing;<br><code>success</code>: Success; <br><code>fail</code>: Failed; </p></td></tr><tr><td>startTime</td><td>Long</td><td>false</td><td>Order start time. Millisecond timestamp<br><br>The start and end time range cannot exceed 90 days. The default query will retrieve data from the most recent 90 days.</td></tr><tr><td>endTime</td><td>Long</td><td>false</td><td>Order end time. Millisecond timestamp<br><br>The start and end time range cannot exceed 90 days. The default query will retrieve data from the most recent 90 days.</td></tr></tbody></table>

Response

<table><thead><tr><th width="175.142578125">Param</th><th width="119.9813232421875">Type</th><th width="107.4461669921875">Required</th><th width="320.908935546875">Remark</th></tr></thead><tbody><tr><td>orderNo</td><td>String</td><td>true</td><td>Wasabi transaction id</td></tr><tr><td>coinKey</td><td>String</td><td>true</td><td>Coin key</td></tr><tr><td>block</td><td>Integer</td><td>false</td><td>Block Height</td></tr><tr><td>sourceAddress</td><td>String</td><td>true</td><td>Source address</td></tr><tr><td>destinationAddress</td><td>String</td><td>true</td><td>Destination address</td></tr><tr><td>txHash</td><td>String</td><td>false</td><td>Tx hash</td></tr><tr><td>txAmount</td><td>BigDecimal</td><td>false</td><td>On-chain transaction amount</td></tr><tr><td>transactionTime</td><td>Long</td><td>false</td><td>Transaction time on the chain. Millisecond timestamp</td></tr><tr><td>confirmTime</td><td>Long</td><td>false</td><td>Transaction confirmation time on the chain. Millisecond timestamp</td></tr><tr><td>coinName</td><td>String</td><td>true</td><td>Coin name</td></tr><tr><td>feeRate</td><td>BigDecimal</td><td>true</td><td>Platform fee rate. Example: 1 = 1%</td></tr><tr><td>fee</td><td>BigDecimal</td><td>true</td><td>Platform fee rate amount</td></tr><tr><td>fixedFee</td><td>BigDecimal</td><td>true</td><td>Platform Fixed fee amount</td></tr><tr><td>receivedAmount</td><td>BigDecimal</td><td>true</td><td><p>Received amount<br>type = DEPOSIT: Amount deposit after deducting platform fees;</p><p>type = WITHDRAW: Amount withdraw after deducting platform fees;</p></td></tr><tr><td>receivedCurrency</td><td>String</td><td>true</td><td>Received currency</td></tr><tr><td>type</td><td>String</td><td>true</td><td>Type<br><code>DEPOSIT</code>  <code>WITHDRAW</code></td></tr><tr><td>status</td><td>String</td><td>true</td><td><p>Status <br><code>wait_process</code>: Pending; </p><p><code>processing</code>: Processing;<br><code>success</code>: Success; <br><code>fail</code>: Failed; </p></td></tr><tr><td>message</td><td>String</td><td>false</td><td>Remark</td></tr><tr><td>createTime</td><td>Long</td><td>true</td><td><p>Order create time. </p><p>Millisecond timestamp</p></td></tr><tr><td>updateTime</td><td>Long</td><td>true</td><td><p>Order update time. </p><p>Millisecond timestamp</p></td></tr></tbody></table>

**Example Response**

```json
{
    "success": true,
    "code": 200,
    "msg": "SUCCESS",
    "data":
    {
        "total": 5,
        "records":
        [
            {
                "orderNo": "CNW2031691897031385088",
                "coinKey": "USDC_BEP20_BINANCE_SMART_CHAIN_MAINNET",
                "block": 85966815,
                "sourceAddress": "0x8B368f7299e4010a1Cf88677e01012dD91a13BB1",
                "destinationAddress": "0xec472ff5dba2a732ed9cbf875a672fb746844982",
                "txHash": "0x5e3ab80d0d43da5f6481fae23f39767889442d83bbc37be987a26387b8208fde",
                "transactionTime": 1773231202000,
                "confirmTime": 1773231276000,
                "coinName": "USDC",
                "txAmount": "6",
                "feeRate": "1",
                "fee": "0.06",
                "fixedFee": "1",
                "receivedAmount": "6",
                "receivedCurrency": "USD",
                "type": "WITHDRAW",
                "status": "success",
                "createTime": 1773228069000,
                "updateTime": 1773231300000
            },
            {
                "orderNo": "CND2031235349498847232",
                "coinKey": "USDT_TRC20",
                "block": 80817428,
                "sourceAddress": "TK4ykR48cQQoyFcZ5N4xZCbsBaHcg6n3gJ",
                "destinationAddress": "TReJ9YfvmpPTXuq3kzQneXDco1fQprqZ9v",
                "txHash": "1c19a9635e8c11c6b7be0e402017e81e64e9f7f1ad1a10e1ea1304955745b434",
                "transactionTime": 1773119090000,
                "confirmTime": 1773119194000,
                "coinName": "USDT",
                "txAmount": "9",
                "feeRate": "1.5",
                "fee": "0.135",
                "fixedFee": "0",
                "receivedAmount": "8.86",
                "receivedCurrency": "USD",
                "type": "DEPOSIT",
                "status": "success",
                "createTime": 1773119220000,
                "updateTime": 1773119220000
            }
        ]
    }
}
```
