Skip to content

081margin_account

张帅磊 edited this page Mar 20, 2021 · 2 revisions

Inquire Margin Account Info

  • Request description: Inquire margin account asset constructure.

  • Request type: GET

  • Signature required: Yes

  • Request Header:
    authorization:"xxxx"(32-digit capital letters, see generating method in <API invocation instruction>)

  • Request Url:https://api.coinex.com/v1/margin/account

  • Request parameter:

    name type required description
    access_id String Yes access_id
    tonce Integer Yes Tonce is a timestamp with a positive Interger that represents the number of milliseconds from Unix epoch to the current time. Error between tonce and server time can not exceed plus or minus 60s
    market String Yes Market Name
  • Return value description:

    name type description
    account_id Integer market account ID, See < Inquire Margin Account Market Info>
    leverage Integer maximum leverage
    market_type String <API invocation description·market>
    sell_asset_type String sell coin name, equal "sell_type"
    buy_asset_type String buy coin name, equal "buy_type"
    balance Object balance
    frozen Object amount frozen(not available)
    loan Object amount loaned info
    interest Object interest info
    can_transfer Object available transfer amount
    warn_rate String warn rate
    liquidation_price String burst price
  • Example:

# Request
GET https://api.coinex.com/v1/margin/account?access_id=4DA36FFC61334695A66F8D29020EB589&tonce=1513746038205
# Response
{
 "code": 0,
 "data": {
       "account_id": 1,
       "leverage": 5,
       "market_type": "BTCUSDT",
       "sell_asset_type": "BTC",
       "buy_asst_type": "USDT",
       "balance": {                 
         "sell_type": "13.60109",   
         "buy_type": "2590.16"
       },
       "frozen": {                 
         "sell_type": "0",   
         "buy_type": "90.01"
       },
       "loan": {                    # loaned amount info
         "sell_type": "3.60109",    # sell coin loaned amount
         "buy_type": "590.16"       # buy coin loaned amount
       },
       "interest": {                # interest amount
         "sell_type": "0.16",       # sell coin interested amount
         "buy_type": "0.01"         # buy coin interested amount
       },
       "can_transfer": {                 
         "sell_type": "0",   
         "buy_type": "0"
       },
       "warn_rate": "1.21",
       "liquidation_price": "7078,831",
   }
 },
 "message": "Ok"
}

HTTP API Introduction

Common API

Market API

Account API

Trading API

Margin API

Contract API

WebSocket API Introduction

Clone this wiki locally