> ## 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.

# Endpoints

> Margin API: endpoints.

## Get symbol list

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

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [],
  "result": [{
       "symbolId": 123,          //Spot symbol id
       "symbol": "btc_usdt",     //Spot symbol
       "buyCurrencyId": 123,     //Buy currency id
       "buyCurrency": "btc",     //Buy currency
       "sellCurrencyId": 234,    //Sell currency id
       "sellCurrency": "usdt",   //Sell currency
       "maxLoanAmountBuy": "",   //The maximum amount of buy currency that can be borrowed
       "maxLoanAmountSell": "",  //The maximum amount of sell currency that can be borrowed
       "maxLeverage": "",        //Maximum loan multiple
       "dailyInterestRate": "",  //Daily interest rate
       "liquidationRate": "",    //Liquidation risk rate
       "tipsRate": ""            //Reminder coefficient
  }]
}
```

## Create order

`POST` `/v4/lever/order`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| marketName | string | true | | trading pair eg:BTC\_USDT | |
| coinName | string | true | | coin name,lower case. e.g. btc | |
| amount | number | true | | eg: 8000 | |
| type | string | true | | [type](#marginOrderType), LOAN/REPAY | |
| media | string | false | | media eg:btok | |
| mediaChannel | string | false | | media channel | |

### Limit Flow Rules

30/s/apikey

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

## Get balance by symbol

`GET` `/v4/lever/balance`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | | symbol eg:BTC\_USDT | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "btcLoanAmount": 0,               //convert BTC loan assets
      "btcNetAmount": 0,                //Convert BTC net assets
      "symbol": "string",               //symbol
      "symbolId": 0,                    //symbol id
      "usdtLoanAmount": 0,              //convert USDT loan assets
      "usdtNetAmount": 0                //convert USDT net assets
      "base":{
         "availableAmount": "string",   //available amount
         "capitalAmount": "string",     //capital amount
         "currency": "string",          //currency
         "currencyId": 0,               //currency id
         "frozenAmount": "string",      //frozen amount
         "interestAmount": "string",    //interest amount outstanding
         "loanAmount": "string",        //loan amount
         "totalAmount": "string",       //total amount
         "updatedTime": 0               //update time
      },
      "quote":{
          "availableAmount": "string",  //available amount
          "capitalAmount": "string",    //capital amount
          "currency": "string",         //currency
          "currencyId": 0,              //currency id
          "frozenAmount": "string",     //frozen amount
          "interestAmount": "string",   //interest amount outstanding
          "loanAmount": "string",       //loan amount
          "totalAmount": "string",      //total amount
          "updatedTime": 0              //update time
      }
  }
}
```

## Get loan list

`GET` `/v4/lever/loan`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | | | |
| startTime | long | true | | start time | |
| endTime | long | true | | end time | |
| fromId | long | false | | page from id | |
| direction | string | true | | page direction NEXT/PREV | |
| limit | int | false | 20 | page limit | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //whether has next page
      "hasPrev": true,               //whether has previous page
      "items":[{
           "id": "string",           //id
           "amount": 0,              //amount
           "currency": "string",     //currency
           "currencyId": 0,          //currency id
           "symbol": "string",       //symbol
           "symbolId": 0,            //symbol id
           "createTime": 0           //create time
      }]
  }
}
```

## Get repay list

`GET` `/v4/lever/repay`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | false | | | |
| startTime | long | true | | start time | |
| endTime | long | false | | end time | |
| fromId | long | false | | page from id | |
| direction | string | true | | page direction NEXT/PREV | |
| limit | int | false | 20 | page limit | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //whether has next page
      "hasPrev": true,               //whether has previous page
      "items":[{
           "id": "string",           //id
           "amount": 0,              //amount
           "currency": "string",     //currency
           "currencyId": 0,          //currency id
           "symbol": "string",       //symbol
           "symbolId": 0,            //symbol id
           "interestAmount": 0,      //interest amount
           "type": "MANUAL",         //type, MANUAL/SYSTEM
           "createTime": 0           //create time
      }]
  }
}
```

## Get interest list

`GET` `/v4/lever/interest`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | false | | | |
| startTime | long | true | | start time | |
| endTime | long | true | | end time | |
| fromId | long | false | | page from id | |
| direction | string | true | | page direction NEXT/PREV | |
| limit | int | false | 20 | page limit | |

```json Response theme={null}
{
  "rc": 0,
  "mc": "SUCCESS",
  "ma": [{}],
  "result": {
      "hasNext": true,               //whether has next page
      "hasPrev": true,               //whether has previous page
      "items":[{
           "id": "string",           //id
           "amount": 0,              //amount
           "currency": "string",     //currency
           "currencyId": 0,          //currency id
           "symbol": "string",       //symbol
           "symbolId": 0,            //symbol id
           "dailyInterestRate": 0,   //daily interest rate
           "source": "FIX_JOB",      //source, FIX_JOB/USER
           "createTime": 0           //create time
      }]
  }
}
```


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