Margin
Account Margin
- GET 
https://api.poloniex.com/margin/accountMargin 
Get account margin information
| Request Parameter | Data Type | Required | Description | 
|---|---|---|---|
| accountType | String | true | The account type. Currently only SPOT is supported | 
| Response Field | Data Type | Description | 
|---|---|---|
| totalAccountValue | String | the sum of the usd value of all balances plus unrealized pnl, including the value of non-collateral holdings | 
| totalMargin | String | collateral that can be used for margin | 
| usedMargin | String | amount of margin that has been used; cannot open new positions if total margin falls below this value | 
| freeMargin | String | available free margin | 
| maintenanceMargin | String | minimum amount needed to keep account in good standing; enters liquidation mode if total margin falls below this value | 
| marginRatio | String | is calculated as total margin / maintenance Margin; account enters liquidation mode if this value < 100% | 
| time | Long | time the record was created | 
Example output:
{
    "totalAccountValue": "24121.5",
    "totalMargin": "21421.5",
    "usedMargin": "2323.32",
    "freeMargin": "2323.32",
    "maintenanceMargin": "1231.4",
    "marginRatio": "1739.61%",
    "time": 1668542860395
}
Borrow Status
- GET 
https://api.poloniex.com/margin/borrowStatus 
Get borrow status of currencies
| Request Parameter | Data Type | Required | Description | 
|---|---|---|---|
| currency | String | false | currency name | 
| Response Field | Data Type | Description | 
|---|---|---|
| currency | String | currency name | 
| available | String | amount of available currency | 
| borrowed | String | borrowed amount | 
| hold | String | frozen amount | 
| maxAvailable | String | amount that can be withdrawn, including what's borrowable with margin | 
| hourlyBorrowRate | String | borrow rate per hour | 
| version | String | current version of the currency | 
Example output:
[
  {
    "currency": "BTC",
    "available": "0.0",
    "borrowed": "-10.0",
    "hold": "0.0",
    "maxAvailable": "20.0",
    "hourlyBorrowRate": "0.000045",
    "version": "111"
  },
  {
    "currency": "ETH",
    "available": "100",
    "borrowed": "0.0",
    "hold": "0.0",
    "maxAvailable": "200",
    "hourlyBorrowRate": "0.000045",
    "version": "122"
  }
]
Maximum Buy/Sell Amount
- GET 
https://api.poloniex.com/margin/maxSize 
Get maximum and available buy/sell amount for a given symbol.
| Request Parameter | Data Type | Required | Description | 
|---|---|---|---|
| symbol | String | true | symbol name | 
| Response Field | Data Type | Description | 
|---|---|---|
| symbol | String | symbol name | 
| maxLeverage | Integer | max leverage for the symbol | 
| availableBuy | String | available amount for the quote currency that can be bought | 
| maxAvailableBuy | String | maximum amount in quote currency that can be bought including margin | 
| availableSell | String | available amount for the base currency that can be sold | 
| maxAvailableSell | String | maximum amount in base currency that can be sold including margin | 
Example output:
{
    "symbol": "BTC_USDT",
    "maxLeverage": 3,
    "availableBuy": "10000.0",
    "maxAvailableBuy": "10000.0",
    "availableSell": "1.0",
    "maxAvailableSell": "2.0",
}