java.lang.Object
com.binance.connector.client.impl.spot.Margin

public class Margin extends Object

Margin Endpoints

All endpoints under the Margin Account/Trade Endpoint section of the API documentation will be implemented in this class.
Response will be returned in String format.
  • Constructor Details

    • Margin

      public Margin(String baseUrl, String apiKey, String secretKey, boolean showLimitUsage)
  • Method Details

    • crossMarginTransfer

      public String crossMarginTransfer(LinkedHashMap<String,​Object> parameters)
      Execute transfer between spot account and cross margin account.

      POST /sapi/v1/margin/transfer
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string -- The asset being transferred, e.g., BTC
      amount -- mandatory/decimal -- The amount to be transferred
      type -- mandatory/int -- 1: transfer from main account to cross margin account 2: transfer from cross margin account to main account
      recvWindow -- optional/long
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#cross-margin-account-transfer-margin
    • borrow

      public String borrow(LinkedHashMap<String,​Object> parameters)
      Apply for a loan.

      POST /sapi/v1/margin/loan
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      symbol -- optional/string -- isolated symbol
      amount -- mandatory/decimal
      recvWindow -- optional/long
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin
    • repay

      public String repay(LinkedHashMap<String,​Object> parameters)
      Repay loan for margin account.

      POST /sapi/v1/margin/repay
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      symbol -- optional/string -- isolated symbol
      amount -- mandatory/decimal
      recvWindow -- optional/long
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin
    • asset

      public String asset(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/asset
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-asset-market_data
    • pair

      public String pair(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/pair
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-pair-market_data
    • allAssets

      public String allAssets()
      GET /sapi/v1/margin/allAssets
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-all-margin-assets-market_data
    • allPairs

      public String allPairs()
      GET /sapi/v1/margin/allPairs
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-all-cross-margin-pairs-market_data
    • priceIndex

      public String priceIndex(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/priceIndex
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-priceindex-market_data
    • newOrder

      public String newOrder(LinkedHashMap<String,​Object> parameters)
      Post a new order for margin account.

      POST /sapi/v1/margin/order
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      side -- mandatory/enum
      type -- mandatory/enum
      quantity -- optional/decimal
      quoteOrderQty -- optional/decimal
      price -- optional/decimal
      stopPrice -- optional/decimal -- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
      newClientOrderId -- optional/string -- A unique id among open orders. Automatically generated if not sent.
      icebergQty -- optional/deciaml -- Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
      newOrderRespType -- optional/enum -- Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK.
      sideEffectType -- optional/enum -- NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
      timeInForce -- optional/enum -- GTC,IOC,FOK
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-order-trade
    • cancelOrder

      public String cancelOrder(LinkedHashMap<String,​Object> parameters)
      Cancel an active order for margin account.

      DELETE /sapi/v1/margin/order
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      orderId -- optional/long
      origClientOrderId -- optional/string
      newClientOrderId -- optional/string -- Used to uniquely identify this cancel. Automatically generated by default.
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade
    • cancelOpenOrders

      public String cancelOpenOrders(LinkedHashMap<String,​Object> parameters)
      Cancels all active orders on a symbol for margin account. This includes OCO orders.

      DELETE /sapi/v1/margin/openOrders
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE, default "FALSE"
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade
    • transferHistory

      public String transferHistory(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/transfer
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- optional/string
      type -- optional/string -- Transfer Type: ROLL_IN, ROLL_OUT
      startTime -- optional/long
      endTime -- optional/long
      current -- optional/long -- Currently querying page. Start from 1. Default:1
      size -- optional/long -- Default:10 Max:100
      archived -- optional/string -- Default: false. Set to true for archived data from 6 months ago
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-cross-margin-transfer-history-user_data
    • loanRecord

      public String loanRecord(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/loan
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isolatedSymbol -- optional/string
      txId -- optional/long -- the tranId in POST /sapi/v1/margin/loan
      startTime -- optional/long
      endTime -- optional/long
      current -- optional/long -- Currently querying page. Start from 1. Default:1
      size -- optional/long -- Default:10 Max:100
      archived -- optional/string -- Default: false. Set to true for archived data from 6 months ago
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-loan-record-user_data
    • repayRecord

      public String repayRecord(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/repay
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isolatedSymbol -- optional/string
      txId -- optional/long -- the tranId in POST /sapi/v1/margin/loan
      startTime -- optional/long
      endTime -- optional/long
      current -- optional/long -- Currently querying page. Start from 1. Default:1
      size -- optional/long -- Default:10 Max:100
      archived -- optional/string -- Default: false. Set to true for archived data from 6 months ago
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-repay-record-user_data
    • interestHistory

      public String interestHistory(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/interestHistory
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- optional/string
      isolatedSymbol -- optional/string
      startTime -- optional/long
      endTime -- optional/long
      current -- optional/long -- Currently querying page. Start from 1. Default:1
      size -- optional/long -- Default:10 Max:100
      archived -- optional/string -- Default: false. Set to true for archived data from 6 months ago
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-interest-history-user_data
    • forceLiquidationRec

      public String forceLiquidationRec(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/forceLiquidationRec
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      startTime -- optional/long
      endTime -- optional/long
      isolatedSymbol -- optional/string
      current -- optional/long -- Currently querying page. Start from 1. Default:1
      size -- optional/long -- Default:10 Max:100
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-force-liquidation-record-user_data
    • account

      public String account(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/account
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data
    • getOrder

      public String getOrder(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/order
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      orderId -- optional/long
      origClientOrderId -- optional/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-order-user_data
    • getOpenOrders

      public String getOpenOrders(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/openOrders
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- optional/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
    • getAllOrders

      public String getAllOrders(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/allOrders
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      orderId -- optional/long
      startTime -- optional/long
      endTime -- optional/long
      limit -- optional/int -- Default 500; max 500.
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data
    • ocoOrder

      public String ocoOrder(LinkedHashMap<String,​Object> parameters)
      Send in a new OCO for a margin account.

      POST /sapi/v1/margin/order/oco
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      listClientOrderId -- optional/string -- A unique Id for the entire orderList
      side -- mandatory/enum
      quantity -- mandatory/decimal
      limitClientOrderId -- optional/string -- A unique Id for the limit order
      price -- mandatory/decimal
      limitIcebergQty -- optional/decimal
      stopClientOrderId -- optional/string -- A unique Id for the stop loss/stop loss limit leg
      stopPrice -- optional/decimal -- Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
      stopLimitPrice -- optional/decimal -- If provided, stopLimitTimeInForce is required.
      stopIcebergQty -- optional/enum -- NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
      stopLimitTimeInForce -- optional/enum -- GTC,IOC,FOK
      newOrderRespType -- optional/enum -- Set the response JSON.
      sideEffectType -- optional/enum -- NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-oco-trade
    • cancelOcoOrder

      public String cancelOcoOrder(LinkedHashMap<String,​Object> parameters)
      Cancel an entire Order List for a margin account.

      DELETE /sapi/v1/margin/orderList
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE", default "FALSE"
      orderListId -- optional/long -- Either orderListId or listClientOrderId must be provided
      listClientOrderId -- optional/string -- Either orderListId or listClientOrderId must be provided
      newClientOrderId -- optional/string -- Used to uniquely identify this cancel. Automatically generated by default
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-oco-trade
    • getOcoOrder

      public String getOcoOrder(LinkedHashMap<String,​Object> parameters)
      Retrieves a specific OCO based on provided optional parameters.

      GET /sapi/v1/margin/orderList
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- optional/string -- mandatory for isolated margin, not supported for cross margin
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      orderListId -- optional/long -- Either orderListId or listClientOrderId must be provided
      listClientOrderId -- optional/string -- Either orderListId or listClientOrderId must be provided
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-oco-user_data
    • getAllOcoOrders

      public String getAllOcoOrders(LinkedHashMap<String,​Object> parameters)
      Retrieves all OCO for a specific margin account based on provided optional parameters.

      GET /sapi/v1/margin/allOrderList
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- optional/string -- mandatory for isolated margin, not supported for cross margin
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE",default "FALSE"
      fromId -- optional/long -- If supplied, neither startTime or endTime can be provided
      startTime -- optional/long
      endTime -- optional/long
      limit -- optional/int -- Default Value: 500; Max Value: 1000
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-oco-user_data
    • getOcoOpenOrders

      public String getOcoOpenOrders(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/openOrderList
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- optional/string -- mandatory for isolated margin, not supported for cross margin
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE", default "FALSE"
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-oco-user_data
    • trades

      public String trades(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/myTrades
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string -- mandatory for isolated margin, not supported for cross margin
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE,default "FALSE"
      startTime -- optional/long
      endTime -- optional/long
      fromId -- optional/long -- TradeId to fetch from. Default gets most recent trades.
      limit -- optional/int -- Default Value: 500; Max Value: 1000
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data
    • maxBorrow

      public String maxBorrow(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/maxBorrowable
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE,default "FALSE"
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-max-borrow-user_data
    • maxTransferable

      public String maxTransferable(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/maxTransferable
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string
      isIsolated -- optional/string -- for isolated margin or not, "TRUE", "FALSE,default "FALSE"
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-max-transfer-out-amount-user_data
    • isolatedTransfer

      public String isolatedTransfer(LinkedHashMap<String,​Object> parameters)
      POST /sapi/v1/margin/isolated/transfer
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string -- asset,such as BTC
      symbol -- mandatory/string
      transFrom -- mandatory/string -- "SPOT", "ISOLATED_MARGIN"
      transTo -- mandatory/string -- "SPOT", "ISOLATED_MARGIN"
      amount -- mandatory/decimal
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#isolated-margin-account-transfer-margin
    • getIsolatedTransfer

      public String getIsolatedTransfer(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/isolated/transfer
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- optional/string -- asset,such as BTC
      symbol -- mandatory/string
      transFrom -- optional/string -- "SPOT", "ISOLATED_MARGIN"
      transTo -- optional/string -- "SPOT", "ISOLATED_MARGIN"
      startTime -- optional/long
      endTime -- optional/long
      current -- optional/long -- Current page, default 1
      size -- optional/decimal
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-isolated-margin-transfer-history-user_data
    • isolatedAccount

      public String isolatedAccount(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/isolated/account
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbols -- optional/string -- Max 5 symbols can be sent; separated by ",". e.g. "BTCUSDT,BNBUSDT,ADAUSDT"
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-account-info-user_data
    • disableIsolatedAccount

      public String disableIsolatedAccount(LinkedHashMap<String,​Object> parameters)
      DELETE /sapi/v1/margin/isolated/account
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#disable-isolated-margin-account-trade
    • enableIsolatedAccount

      public String enableIsolatedAccount(LinkedHashMap<String,​Object> parameters)
      Enable isolated margin account for a specific symbol.

      POST /sapi/v1/margin/isolated/account
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#enable-isolated-margin-account-trade
    • getIsolatedAccountLimit

      public String getIsolatedAccountLimit(LinkedHashMap<String,​Object> parameters)
      Query enabled isolated margin account limit.

      GET /sapi/v1/margin/isolated/accountLimit
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-enabled-isolated-margin-account-limit-user_data
    • getIsolatedSymbol

      public String getIsolatedSymbol(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/isolated/pair
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data
    • getAllIsolatedSymbols

      public String getAllIsolatedSymbols(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/isolated/allPairs
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-all-isolated-margin-symbol-user_data
    • bnbBurn

      public String bnbBurn(LinkedHashMap<String,​Object> parameters)
      POST /sapi/v1/bnbBurn
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      spotBNBBurn -- optional/string -- "true" or "false"; Determines whether to use BNB to pay for trading fees on SPOT
      interestBNBBurn -- optional/string -- "true" or "false"; Determines whether to use BNB to pay for margin loan's interest
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#toggle-bnb-burn-on-spot-trade-and-margin-interest-user_data
    • getBnbBurn

      public String getBnbBurn(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/bnbBurn
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#get-bnb-burn-status-user_data
    • interestRateHistory

      public String interestRateHistory(LinkedHashMap<String,​Object> parameters)
      GET /sapi/v1/margin/interestRateHistory
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      asset -- mandatory/string -- asset,such as BTC
      vipLevel -- optional/int -- Default: user's vip level
      startTime -- optional/long -- Default: 7 days ago
      endTime -- optional/long -- Default: present. Maximum range: 3 months.
      limit -- optional/int -- Default: 20. Maximum: 100
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-margin-interest-rate-history-user_data
    • crossMarginData

      public String crossMarginData(LinkedHashMap<String,​Object> parameters)
      Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee.

      GET /sapi/v1/margin/crossMarginData
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      vipLevel -- optional/int -- User's current specific margin data will be returned if vipLevel is omitted
      coin -- optional/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-fee-data-user_data
    • isolatedMarginData

      public String isolatedMarginData(LinkedHashMap<String,​Object> parameters)
      Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee.

      GET /sapi/v1/margin/isolatedMarginData
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      vipLevel -- optional/int -- User's current specific margin data will be returned if vipLevel is omitted
      symbol -- optional/string
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data
    • isolatedMarginTier

      public String isolatedMarginTier(LinkedHashMap<String,​Object> parameters)
      Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data.

      GET /sapi/v1/margin/isolatedMarginTier
      Parameters:
      parameters - LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter

      symbol -- mandatory/string
      tier -- optional/string -- All margin tier data will be returned if tier is omitted
      recvWindow -- optional/long -- The value cannot be greater than 60000
      Returns:
      String
      See Also:
      https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-tier-data-user_data