# Wallet

#### Wallet address mapping

## Wallet address mapping

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/wallet/addressMapping`

#### Query Parameters

| Name                                         | Type   | Description                                              |
| -------------------------------------------- | ------ | -------------------------------------------------------- |
| walletType<mark style="color:red;">\*</mark> | number | wallet type（1 custody 2 wapi 3 fireblocks 4 custody mpc） |
| symbol<mark style="color:red;">\*</mark>     | String | chainup symbol name                                      |
| uid                                          | number | uid (not required)                                       |
| page<mark style="color:red;">\*</mark>       | number | Paging parameters (page number)                          |
| pageSize<mark style="color:red;">\*</mark>   | number | Paging parameters (page size)                            |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-type | String | application/json |

#### Request Body

| Name                                      | Type   | Description          |
| ----------------------------------------- | ------ | -------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | app\_id              |
| time<mark style="color:red;">\*</mark>    | String | timestamp            |
| sign<mark style="color:red;">\*</mark>    | String | sign                 |
| data<mark style="color:red;">\*</mark>    | String | Cryptographic string |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": "", //code	
    "msg": "", //message	
    "data": "",
    "sign": ""
}

The decrypted structure in data:

{
    "count":50, // total record number
    "page":1, // Paging parameters (page number)
    "pageSize":2, // Paging parameters (page size)
    "symbol":"BTCTEST1760", // chainup symbol
    "walletSymbol":"BTC_TEST", //wallet symbol 
    "list":[
      {
        "address":"1K1zD7ypt6oiXH4z54NoohddEV7JwQKCEo", // user deposit address
        "tag":"4567", // tag
        "uid":1234, // chainup uid
        "walletUid":2 // wallet uid or fireblocks vault id
      },
      {
        "address":"1K1zD7ypt6oiXH4z54Noo", // user deposit address
        "tag":"4567", // tag
        "uid":4567, // chainup uid
        "walletUid":3 // wallet uid or fireblocks vault id
      }
    ]
}
```

{% endtab %}
{% endtabs %}

#### Wallet symbol mapping

## Wallet symbol mapping

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/wallet/symbolMapping`

#### Query Parameters

| Name                                          | Type   | Description                                              |
| --------------------------------------------- | ------ | -------------------------------------------------------- |
| walletType	<mark style="color:red;">\*</mark> | number | wallet type（1 custody 2 wapi 3 fireblocks 4 custody mpc） |
| symbol                                        | String | chainup symbol name(not required)                        |
| walletSymbol                                  | String | wallet symbol name(not required)                         |
| page<mark style="color:red;">\*</mark>        | number | Paging parameters (page number)                          |
| pageSize<mark style="color:red;">\*</mark>    | number | Paging parameters (page size)                            |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-type | String | application/json |

#### Request Body

| Name                                      | Type   | Description          |
| ----------------------------------------- | ------ | -------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | app\_id              |
| time<mark style="color:red;">\*</mark>    | String | timestamp            |
| sign<mark style="color:red;">\*</mark>    | String | sign                 |
| data<mark style="color:red;">\*</mark>    | String | Cryptographic string |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": "", //code	
    "msg": "", //message
    "data": "",
    "sign": ""
}

The decrypted structure in data:

{
    "count":50, // total record number
    "page":1, // Paging parameters (page number)
    "pageSize":2, // Paging parameters (page size)
    "walletType":3 //1 custody 2 wapi 3 fireblocks 4 custody mpc
    "list":[
      {
        "symbol":"BTCTEST1760", // chainup symbol name
        "walletSymbol":"BTC_TEST" // wallet symbol name
      },
      {
        "symbol":"ETHTEST1760", // chainup symbol name
        "walletSymbol":"ETH_TEST5" // wallet symbol name
      }
    ]
}
```

{% endtab %}
{% endtabs %}

#### Company account asset

## Company account asset

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/wallet/companyAsset`

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| symbol<mark style="color:red;">\*</mark> | String | chainup symbol name |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description          |
| ----------------------------------------- | ------ | -------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | app\_id              |
| time<mark style="color:red;">\*</mark>    | String | timestamp            |
| sign<mark style="color:red;">\*</mark>    | String | sign                 |
| data<mark style="color:red;">\*</mark>    | String | Cryptographic string |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": "", //code	
    "msg": "", //message	
    "data": "",
    "sign": ""
}

The decrypted structure in data:

{
    "accounts":[
      {
        "companyId": 1760, // company id
        "balance": "1000", // account balance
        "type": "113"  // account type,see the table below for a detailed description
      },
      {
        "companyId": 1760, // company id
        "balance": "1000", // account balance
        "type": "112" // account type,see the table below for a detailed description
      }
    ]
}
```

{% endtab %}
{% endtabs %}

#### Company account type description

| type | description                                                       |
| ---- | ----------------------------------------------------------------- |
| 113  | Company: recharging account of the administrator                  |
| 112  | Company: gift coin account                                        |
| 105  | Company: Withdrawal Fee Income & Miner Fee Expense Account        |
| 114  | Company: dividend return account                                  |
| 116  | Company: lockup account                                           |
| 130  | Company:Lock-up Token Distribution (Released to user's lock-up)V2 |
| 121  | Company:IEO Income Account (Raising Income)                       |
| 122  | Company:IEO Spending Account (Released to user's available)       |
| 181  | Company: (Spot & Margin) Transaction Fee Income Account           |
| 187  | Company: C2CTransaction Fee Income Account                        |
| 118  | Company: (Spot & Futures) Agent Rewards Account                   |
| 115  | Company: dividend account                                         |
| 149  | Company: contract bonus expense / recovery account                |
| 150  | Company: Financial account                                        |
| 152  | Rewards account of invitation to register                         |
| 153  | Mortgage loan interest sharing account                            |

Currency and contract transfer records

## Currency and contract transfer records

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/wallet/futuresTransferRecord`

#### Query Parameters

| Name                                       | Type   | Description                       |
| ------------------------------------------ | ------ | --------------------------------- |
| symbol                                     | String | chainup symbol name(not required) |
| uid                                        | number | uid(not required)                 |
| page<mark style="color:red;">\*</mark>     | number | Paging parameters (page number)   |
| pageSize<mark style="color:red;">\*</mark> | number | Paging parameters (page size)     |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                      | Type   | Description          |
| ----------------------------------------- | ------ | -------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | app\_id              |
| time<mark style="color:red;">\*</mark>    | String | timestamp            |
| sign<mark style="color:red;">\*</mark>    | String | sign                 |
| data<mark style="color:red;">\*</mark>    | String | Cryptographic string |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": "", //code	
    "msg": "", //message	
    "data": "",
    "sign": ""
}

The decrypted structure in data:

{
    "count":50, // total record number
    "page":1, // Paging parameters (page number)
    "pageSize":2, // Paging parameters (page size)
    "list":[
      {
        "uid":12345,
        "symbol":"USDT1760", // chainup symbol name
        "transferType":"contract_to_wallet", // Fixed value: contract_to_wallet(Transfer the Futures to Spot)、wallet_to_contract（Spot transfer to the Futures）
        "transferTime":1691388963422, // transfer time
        "amount":"1000"
      },
      {
        "uid":12345,
        "symbol":"USDT1760", // chainup symbol name
        "transferType":"wallet_to_contract", // Fixed value: contract_to_wallet(Transfer the Futures to Spot)、wallet_to_contract（Spot transfer to the Futures）
        "transferTime":1691388963966, // transfer time
        "amount":"500"
      }
    ]
}
```

{% endtab %}
{% endtabs %}
