> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monochrome.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# 接口

> 杠杆 API：接口。

## 获取交易对列表

`GET` `/v4/public/lever/symbol`

```json Response theme={null}
{
   "rc": 0,
   "mc": "SUCCESS",
   "ma": [],
   "result": [{
        "symbolId": 123,          //现货市场ID
        "symbol": "btc_usdt",     //现货市场名称
        "buyCurrencyId": 123,     //买方币种ID
        "buyCurrency": "btc",     //买方币种名称
        "sellCurrencyId": 234,    //卖方币种ID
        "sellCurrency": "usdt",   //卖房币种名称
        "maxLoanAmountBuy": "",   //买方币种最大可借数量
        "maxLoanAmountSell": "",  //卖方币种最大可借数量
        "maxLeverage": "",        //最大借贷倍数
        "dailyInterestRate": "",  //日利率
        "liquidationRate": "",    //爆仓风险率
        "tipsRate": ""            //提醒系数
   }]
}           
```

## 下单

`POST` `/v4/lever/order`

**Parameters**

| 参数 | 数据类型 | 是否必须 | 默认值 | 描述 | 取值范围 |
| - | - | - | - | - | - |
| marketName | string | true | | 交易对  例如：BTC\_USDT | |
| coinName | string | true | | 币种，小写。 例如：btc | |
| amount | number | true | | 数量 | |
| type | string | true | | 类型, LOAN/REPAY | |
| media | string | false | | 媒体 例如：btok | |
| mediaChannel | string | false | | 媒体渠道 | |

### 限流规则

30/s/apikey

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [],
  "result": {}
}
```

## 获取杠杆单个资产

`GET` `/v4/lever/balance`

**Parameters**

| 参数 | 数据类型 | 是否必须 | 默认值 | 描述 | 取值范围 |
| - | - | - | - | - | - |
| symbol | string | true | | 市场  例如：BTC\_USDT | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "btcLoanAmount": 0,               //折算BTC借贷资产
      "btcNetAmount": 0,                //折算BTD总资产
      "symbol": "string",               //市场
      "symbolId": 0,                    //市场 id
      "usdtLoanAmount": 0,              //折算USDT借贷资产
      "usdtNetAmount": 0                //折算USDT总资产
      "base":{
         "availableAmount": "string",   //可用数量
         "capitalAmount": "string",     //本金数量
         "currency": "string",          //币种
         "currencyId": 0,               //币种 id
         "frozenAmount": "string",      //冻结数量
         "interestAmount": "string",    //未还利息数量
         "loanAmount": "string",        //借款数量
         "totalAmount": "string",       //总数量
         "updatedTime": 0               //更新时间
      },
      "quote":{
          "availableAmount": "string",  //可用数量
          "capitalAmount": "string",    //本金数量
          "currency": "string",         //币种
          "currencyId": 0,              //币种 id
          "frozenAmount": "string",     //冻结数量
          "interestAmount": "string",   //未还利息数量
          "loanAmount": "string",       //借款数量
          "totalAmount": "string",      //总数量
          "updatedTime": 0              //更新时间
      }
  }
}
```

## 获取杠杆借贷列表

`GET` `/v4/lever/loan`

**Parameters**

| 参数 | 数据类型 | 是否必须 | 默认值 | 描述 | 取值范围 |
| - | - | - | - | - | - |
| symbol | string | true | | 市场 | |
| startTime | long | true | | 开始时间 | |
| endTime | long | true | | 结束时间 | |
| fromId | long | false | | 分页开始id | |
| direction | string | true | | 分页方向  NEXT/PREV | |
| limit | int | false | 20 | 页数 | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //是否有下一页
      "hasPrev": true,               //是否有上一页
      "items":[{
           "id": "string",           //id
           "amount": 0,              //数量
           "currency": "string",     //币种
           "currencyId": 0,          //币种 id
           "symbol": "string",       //市场
           "symbolId": 0,            //市场 id
           "createTime": 0           //创建时间
      }]
  }
}
```

## 获取杠杆还款列表

`GET` `/v4/lever/repay`

**Parameters**

| 参数 | 数据类型 | 是否必须 | 默认值 | 描述 | 取值范围 |
| - | - | - | - | - | - |
| symbol | string | false | | 市场 例如：btc\_usdt | |
| startTime | long | true | | 开始时间 | |
| endTime | long | true | | 结束时间 | |
| fromId | long | false | | 分页开始id | |
| direction | string | true | | 分页方向  NEXT/PREV | |
| limit | int | false | 20 | 页数 | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //是否有下一页
      "hasPrev": true,               //是否有上一页
      "items":[{
           "id": "string",           //id
           "amount": 0,              //数量
           "currency": "string",     //币种
           "currencyId": 0,          //币种 id
           "symbol": "string",       //市场
           "symbolId": 0,            //市场 id
           "interestAmount": 0,      //利息数量
           "type": "MANUAL",         //类型, MANUAL/SYSTEM
           "createTime": 0           //创建时间
      }]
  }
}
```

## 获取杠杆利息列表

`GET` `/v4/lever/interest`

**Parameters**

| 参数 | 数据类型 | 是否必须 | 默认值 | 描述 | 取值范围 |
| - | - | - | - | - | - |
| symbol | string | false | | 市场 | |
| startTime | long | true | | 开始时间 | |
| endTime | long | true | | 结束时间 | |
| fromId | long | false | | 分页开始id | |
| direction | string | true | | 分页方向  NEXT/PREV | |
| limit | int | false | 20 | 页数 | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //是否有下一页
      "hasPrev": true,               //是否有上一页
      "items":[{
           "id": "string",           //id
           "amount": 0,              //数量
           "currency": "string",     //币种
           "currencyId": 0,          //币种 id
           "symbol": "string",       //市场
           "symbolId": 0,            //市场 id
           "dailyInterestRate": 0,   //日利率
           "source": "FIX_JOB",      //来源, FIX_JOB（定时任务）/USER（用户借贷）
           "createTime": 0           //创建时间
      }]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.