Pri-openapi
  • 中文文档
    • 文档说明
    • 返回码类型
    • 枚举类型
    • 现货交易
    • 合约交易
    • Websocket推送
    • SDK开发库
    • 常见问题
  • OpenApi Doc
    • Documentation description
    • Return Code Type
    • Enum Type
    • Spot Trading API
    • Futures Trading API
    • Websocket
    • Official SDK
    • Common Problem
Powered by GitBook
On this page
  • Public
  • Security: None
  • Test Connectivity
  • Check Server Time
  • Contracts List
  • Market
  • Security: None
  • Depth
  • 24hrs ticker
  • Obtain index/tag price
  • Kline/candlestick data
  • Trade
  • Security: TRADE
  • Create new order
  • Create condition order
  • Cancel order
  • Order Information
  • Current order information
  • Historical commission records
  • Profit and loss record
  • Transaction Record
  • Change position mode
  • Change margin mode
  • Change leverage
  • Obtain the current trigger order
  • Cancel trigger order
  • Account
  • Security: USER_DATA
  • Account Information
  1. OpenApi Doc

Futures Trading API

Public

Security: None

Public section can be accessed freely without requiring any API-key or signatures.


Test Connectivity

GET https://futuresopenapi.xxx.com/fapi/v1/ping

This interface checks connectivity to the host

{}

Check Server Time

GET https://futuresopenapi.xxx.com/fapi/v1/time

{
    "timezone": "China Standard Time",
    "serverTime": 1704962055664
}
Parameter
Type
Example
Describe

timezone

string

China Standard Time

Server time zone

serverTime

long

1607702400000

Server timestamp


Contracts List

GET https://futuresopenapi.xxx.com/fapi/v1/contracts

[
    {
        "symbol": "E-ETC-USDT",
        "pricePrecision": 3,
        "side": 1,
        "maxMarketVolume": 200000,
        "multiplier": 1.0000000000000000,
        "minOrderVolume": 1,
        "maxMarketMoney": 500000.0000000000000000,
        "type": "E",
        "maxLimitVolume": 300000,
        "maxValidOrder": 10,
        "multiplierCoin": "ETC",
        "minOrderMoney": 1.0000000000000000,
        "maxLimitMoney": 500000.0000000000000000,
        "status": 1
    },
    {
        "symbol": "E-ATOM-USDT",
        "pricePrecision": 3,
        "side": 1,
        "maxMarketVolume": 100000,
        "multiplier": 1.0000000000000000,
        "minOrderVolume": 1,
        "maxMarketMoney": 200000.0000000000000000,
        "type": "E",
        "maxLimitVolume": 200000,
        "maxValidOrder": 10,
        "multiplierCoin": "ATOM",
        "minOrderMoney": 20.0000000000000000,
        "maxLimitMoney": 2000000.0000000000000000,
        "status": 1
    }
]
Parameter
Type
Example
Describe

symbol

string

E-BTC-USDT

Uppercase contract name

pricePrecision

number

4

Price accuracy

status

number

1

Contract status (0: not tradable, 1: tradable)

type

string

S

Contract type (E: Perpetual contract, S: Simulated contract, others are mixed contracts)

side

number

1

Contract direction (0: reverse, 1: forward)

multiplier

number

0.50

Contract value

minOrderVolume

number

10

Minimum order quantity

minOrderMoney

number

10

Minimum order amount

maxMarketVolume

number

100000

Maximum order quantity for market orders

maxMarketMoney

number

100000.00

Maximum order amount at market price

maxLimitVolume

number

100000

Maximum order quantity for limit orders

maxLimitMoney

number

100000.00

Limit price maximum order amount

maxValidOrder

number

100000

The maximum number of valid orders


Market

Security: None

Market section can be accessed freely without requiring any API-key or signatures.

Depth

GET https://futuresopenapi.xxx.com/fapi/v1/depth

Market detpth data

Query Parameters

Name
Type
Description

limit

integer

Default 100; Maximum 100

contractName

string

Uppercase contract name E.g. E-BTC-USDT

{
  "asks": [
    [
      "4.00000200",  // Price
      "12.00000000"  // Volume
    ],
    [
      "5.10000000",
      "28.00000000"
    ]
  ],
  "bids": [
    [
      "3.90000000",   // Price
      "431.00000000"  // Volume
    ],
    [
      "4.00000000",
      "431.00000000"
    ]
  ],
  "time":1704962463000
}
Parameter
Type
Example
Describe

time

long

1595563624731

Current timestamp (ms)

bids

list

[[2100,13],[1990,3]]

Order book buying information, the array length is 2, subscript one is the price, type is float; subscript two is the quantity corresponding to the current price, type is float

asks

list

[[2100,13],[1990,3]]

Order book selling information, the array length is 2, subscript one is the price, type is float; subscript two is the quantity corresponding to the current price, type is float

The information corresponding to bids and asks represents all the prices in the order book and the quantity information corresponding to the prices, arranged from top to bottom from the best price


24hrs ticker

GET https://futuresopenapi.xxx.com/fapi/v1/ticker

24-hour price change data

Query Parameters

Name
Type
Description

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

{
    "high": "2500",
    "vol": "0",
    "last": "2500",
    "low": "2500",
    "buy": 2100,
    "sell": 0,
    "rose": "0",
    "time": 1704966225000
}
Parameter
Type
Example
Describe

time

long

1595563624731

Timestamp

high

float

9900

Highest price

low

float

8800.34

Lowest price

last

float

8900.23

The last price

vol

float

4999

Trade volume

rose

string

+0.05

Range of increase and decrease, + is increase, - is decrease, +0.05 means increase by 5%

buy

float

2100.01

The price in the buying book order at the first one

sell

float

2050.01

The price in the selling book order at the first one


Obtain index/tag price

GET https://futuresopenapi.xxx.com/fapi/v1/index

Query Parameters

Name
Type
Description

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

limit

string

Default 100; Maximum 1000

{
    "currentFundRate": -0.0037500000000000,
    "indexPrice": 27905.9800000000000000,
    "tagPrice": 27824.4422146875000000,
    "nextFundRate": -0.0037500000000000
}
Parameter
Type
Example
Describe

indexPrice

float

0.055

Index price

tagPrice

float

0.0578

Tag price

nextFundRate

float

0.343

Funding rate price

currentFundRate

float

0.123

Funding rate price for the previous period (used for settlement in this period)


Kline/candlestick data

GET https://futuresopenapi.xxx.com/fapi/v1/klines

Query Parameters

Name
Type
Description

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

interval*

string

Interval of the Kline. Possible values include: 1min,5min,15min,30min,1h,1day,1week,1month

limit

integer

Default 100; Maximum 300

[
    {
        "high": "6228.77",
        "vol": "111",
        "low": "6228.77",
        "idx": 1594640340,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "222",
        "low": "6228.77",
        "idx": 1587632160,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "333",
        "low": "6228.77",
        "idx": 1587632100,
        "close": "6228.77",
        "open": "6228.77"
    }
]
Parameter
Type
Example
Describe

idx

long

1538728740000

Open time (timestamp,ms)

open

float

36.00000

Open price

close

float

33.00000

Close price

high

float

36.00000

Highest price

low

float

30.00000

Lowest price

vol

float

2456.00000

Trad volume


Trade

Security: TRADE

The interface in Trade requires API-key and signature for access.

Create new order

POST https://futuresopenapi.xxx.com/fapi/v1/order

Create a new single order

Headers

Name
Type
Description

X-CH-TS*

string

Timestamp

X-CH-APIKEY*

string

Use rAPI-KEY

X-CH-SIGN*

string

Sign

Request Body

Name
Type
Description

volume*

number

The number of orders placed has a precision limit. The precision is set by the administrator. When opening a position at market price, the unit here is value.

price

number

Order price. This field is required for limit orders. There is a precision limit. The precision is set by the administrator.

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

type*

string

Order type : LIMIT/MARKET

side*

string

Order side: BUY/SELL

open*

string

Position side: OPEN/CLOSE

positionType

number

Position type: 1:Cross Margin/2:Isolated Margin

clientOrderId

string

Client order ID, a string less than 32 characters in length

timeInForce

string

IOC, FOK, POST_ONLY

{
    "orderId": 256609229205684228
}
Parameter
Type
Example
Describe

orderId

string

256609229205684228

Order ID


Create condition order

POST https://futuresopenapi.xxx.com/fapi/v1/conditionOrder/

Headers

Name
Type
Description

X-CH-TS*

string

Timestamp

X-CH-APIKEY*

string

API-KEY

X-CH-SIGN*

string

Sign

Request Body

Name
Type
Description

triggerType

string

Type of condition, 1: stop loss/2: take profit/3: chase the rise/4: kill the fall

triggerPrice

string

Trigger price

clientOrderId

string

Client order identification, a string less than 32 characters in length

positionType

number

Position type: 1.Cross Margin/2.Isolated Margin

open

string

Position side: OPEN/CLOSE

side

string

Order side: BUY/SELL

type

string

Order type: LIMIT/MARKET

contractName

string

Uppercase contract name E.g. E-BTC-USDT

price

number

The order price has precision limits, and the precision is set by the administrator.

volume

number

The order quantity. When opening a position at market price, the unit here is value. There is a precision limit. The precision is set by the administrator.

{
    "orderId": 256609229205684228
}

If this interface(/fapi/v1/conditionOrder) return does not meet expectations, please contact the technical team and we will provide you with relevant assistance.


Cancel order

POST https://futuresopenapi.xxx.com/fapi/v1/cancel

Rate Limit: 20times/2s

Headers

Name
Type
Description

X-CH-SIGN*

string

Sign

X-CH-APIKEY*

string

User API-KEY

X-CH-TS*

integer

Timestamp

Request Body

Name
Type
Description

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

orderId*

string

Order ID

{
    "orderId": 256609229205684228
}

Order Information

GET https://futuresopenapi.xxx.com/fapi/v1/order

Query Parameters

Name
Type
Description

contractName*

string

Uppercase contract name E.g.E-BTC-USDT

orderId*

string

Order ID

clientOrderId*

string

Client unique identifier, default is 0

{
    "side": "BUY",
    "executedQty": 0,
    "orderId": 2006628907041292645,
    "price": 2000.0000000000000000,
    "origQty": 2.0000000000000000,
    "avgPrice": 0E-8,
    "transactTime": 1704967622000,
    "action": "OPEN",
    "contractName": "E-BTC-USDT",
    "type": "LIMIT",
    "timeInForce": "",
    "status": "NEW"
}
Parameter
Type
Example
Describe

orderId

long

150695552109032492

Order ID (system generated)

contractName

string

E-BTC-USDT

Uppercase contract name

price

float

10.50

Commission price

origQty

float

10.50

Commission volume

executedQty

float

10.10

Deal volume

avgPrice

float

10.50

Deal average price

status

string

NEW

Order Status. Possible values are: NEW (new order, no transaction), PARTIALLY_FILLED (partial transaction), FILLED (all transactions), CANCELED (cancelled) and REJECTED (order rejected)

side

string

NEW

Order direction: BUY (buy long) and SELL (sell short)

action

string

OPEN

Position side: OPEN/CLOSE

transactTime

long

1607702400000

Order creation time

type

string

LIMIT

Order type:

LIMIT/MARKET

timeInForce

integer

2

Effective method of conditional order : 1 limit, 2 market,3 IOC,4 FOK,5 POST_ONLY


Current order information

GET https://futuresopenapi.xxx.com/fapi/v1/openOrders

Get the current contract and the user’s current order

Query Parameters

Name
Type
Description

contractName

string

Uppercase contract name E.g.E-BTC-USDT

Headers

Name
Type
Description

X-CH-SIGN

string

Sign

X-CH-APIKEY

string

User API-KEY

X-CH-TS

string

Timestamp

[
    {
       "side": "BUY",
       "executedQty": 0,
       "orderId": 259396989397942275,
       "price": 10000.0000000000000000,
       "origQty": 1.0000000000000000,
       "avgPrice": 0E-8,
       "transactTime": "1607702400000",
       "action": "OPEN",
       "contractName": "E-BTC-USDT",
       "type": "LIMIT",
       "status": "INIT"
    }
]
Parameter
Type
Example
Describe

orderId

long

150695552109032492

Order ID (system generated)

contractName

string

E-BTC-USDT

Uppercase contract name

price

float

4765.29

Order price

origQty

float

1.01

Order volume

executedQty

float

1.01

The number of already deal order

avgPrice

float

4754.24

The average price of already deal order

type

string

LIMIT

Order type:

LIMIT/MARKET

side

string

BUY

Order side:BUY/SELL

status

string

NEW

Order Status. Possible values are: NEW (new order, no transaction), PARTIALLY_FILLED (partial transaction), FILLED (all transactions), CANCELED (cancelled) and REJECTED (order rejected)

action

string

OPEN

Position side: OPEN/CLOSE

transactTime

long

1607702400000

Order creation time


Historical commission records

POST https://futuresopenapi.xxx.com/fapi/v1/orderHistorical

Headers

Name
Type
Description

X-CH-SIGN

string

Sign

X-CH-APIKEY

string

User API-KEY

X-CH-TS

string

Timestamp

Request Body

Name
Type
Description

contractName

string

Uppercase contract name E.g. E-BTC-USDT

limit

string

Default 100; Maximum 1000

fromId

long

Start searching from this record

[
    {
        "side":"BUY",
        "clientId":"0",
        "ctimeMs":1632903411000,
        "positionType":2,
        "orderId":777293886968070157,
        "avgPrice":41000,
        "openOrClose":"OPEN",
        "leverageLevel":26,
        "type":4,
        "closeTakerFeeRate":0.00065,
        "volume":2,
        "openMakerFeeRate":0.00025,
        "dealVolume":1,
        "price":41000,
        "closeMakerFeeRate":0.00025,
        "contractId":1,
        "ctime":"2021-09-29T16:16:51",
        "contractName":"E-BTC-USDT",
        "openTakerFeeRate":0.00065,
        "dealMoney":4.1,
        "status":4
    }
]

If the interface (/fapi/v1/orderHistorical) return does not meet expectations, please contact the technical team and we will provide you with relevant assistance.


Profit and loss record

POST https://futuresopenapi.xxx.com/fapi/v1/profitHistorical

Headers

Name
Type
Description

X-CH-SIGN

string

Sign

X-CH-APIKEY

string

USER API-key

X-CH-TS

string

Timestamp

Request Body

Name
Type
Description

contractName

string

Uppercase contract name E.g.E-BTC-USDT

limit

string

Default 100; Maximum 1000

fromId

long

Start searching from this record

[
    {
        "side":"SELL",
        "positionType":2,
        "tradeFee":-5.23575,
        "realizedAmount":0,
        "leverageLevel":26,
        "openPrice":44500,
        "settleProfit":0,
        "mtime":1632882739000,
        "shareAmount":0,
        "openEndPrice":44500,
        "closeProfit":-45,
        "volume":900,
        "contractId":1,
        "historyRealizedAmount":-50.23575,
        "ctime":1632882691000,
        "id":8764,
        "capitalFee":0
    }
]

If the interface (/fapi/v1/profitHistorical) return does not meet expectations, please contact the technical team and we will provide you with relevant assistance.


Transaction Record

GET https://futuresopenapi.xxx.com/fapi/v1/myTrades

Rate Limited: 20times/2s

Query Parameters

Name
Type
Description

contractName*

string

Uppercase contract name E.g. E-BTC-USDT

limit

string

Default 100; Maximum 1000

fromId

long

Start retrieval from this tradeId

Headers

Name
Type
Description

X-CH-SIGN

string

Sign

X-CH-APIKEY

string

User API-KEY

X-CH-TS

integer

Timestamp

[
    {
        "amount": 0.30000000000000000000000000000000,
        "side": "BUY",
        "fee": "0.000075",
        "isMaker": true,
        "isBuyer": true,
        "bidId": 1874564572563538130,
        "bidUserId": 10034,
        "price": 10.0000000000000000,
        "qty": 3,
        "askId": 1954072405852309104,
        "contractName": "E-ETH-USDT",
        "time": 1701419186000,
        "tradeId": 1528,
        "askUserId": 10378
    },
    {
        "amount": 1.00000000000000000000000000000000,
        "side": "BUY",
        "fee": "0.00025",
        "isMaker": true,
        "isBuyer": true,
        "bidId": 1874564572563538059,
        "bidUserId": 10034,
        "price": 10.0000000000000000,
        "qty": 10,
        "askId": 1954072405852309104,
        "contractName": "E-ETH-USDT",
        "time": 1701419186000,
        "tradeId": 1527,
        "askUserId": 10378
    }
]
Parameter
Type
Example
Describe

tradeId

number

28457

Trade ID

bidId

long

150695552109032492

Buy side order ID

askId

long

150695552109032493

Sell side order ID

bidUserId

integer

10024

Buy side user ID

askUserId

integer

10025

Sell side user ID

price

float

4.01

Deal price

qty

float

12

Deal volume

amount

float

5.38

Deal amount

time

number

1499865549590

Trade timestamp

fee

number

0.001

Trading fee

side

string

buy

Order side: BUY/SELL

contractName

string

E-BTC-USDT

Uppercase contract name

isMaker

boolean

true

Maker Or Taker: True : Maker,

False: Taker

isBuyer

boolean

true

Whether is buyer: true: buyer,false: seller


Change position mode

POST https://futuresopenapi.xxx.com/fapi/v1/edit_user_position_model

Headers

Name
Type
Description

X-CH-SIGN*

String

Sign

X-CH-TS*

Integer

Timestamp

X-CH-APIKEY*

String

User API-KEY

Request Body

Name
Type
Description

contractName*

String

Uppercase contract name E.g. E-BTC-USDT

positionModel*

Integer

The model of position(1.Net position 2. Two-way position) Input 1 or 2

{ 
    "code": "0", 
    "msg": "成功", 
    "data": null 
}

Change margin mode

POST https://futuresopenapi.xxx.com/fapi/v1/edit_user_margin_model

Headers

Name
Type
Description

X-CH-SIGN*

String

Sign

X-CH-TS*

Integer

Timestamp

X-CH-APIKEY*

String

User API-KEY

Request Body

Name
Type
Description

contractName*

String

Uppercase contract name E.g. E-BTC-USDT

marginModel*

integer

Margin mode (1. Cross position 2. Isolated position) input 1 or 2

{ 
    "code": "0", 
    "msg": "成功", 
    "data": null 
}

Change leverage

POST https://futuresopenapi.xxx.com/fapi/v1/edit_lever

Headers

Name
Type
Description

X-CH-SIGN*

String

Sign

X-CH-TS*

String

Timestamp

X-CH-APIKEY*

String

User API-KEY

Request Body

Name
Type
Description

contractName*

String

Uppercase contract name E.g.E-BTC-USDT

nowLevel*

String

Leverage multiple to be modified E.g. 50

{ 
    "code": "0", 
    "msg": "成功", 
    "data": null 
}

Obtain the current trigger order

POST https://futuresopenapi.xxx.com/fapi/v1/trigger_order_list

Headers

Name
Type
Description

X-CH-SIGN*

String

Sign

X-CH-TS*

Integer

Timestamp

X-CH-APIKEY*

String

User API-KEY

Request Body

Name
Type
Description

contractName*

String

Uppercase contract name E.g. E-BTC-USDT

page

Integer

Current page number, Default 1

limit

Integer

Total data per page, Default 1000

{
    "code":"0",
    "msg":"成功",
    "data":{
        "count":2,
        "trigOrderList":[
            {
                "mtime":1706513208000,
                "price":0,
                "ctime":1706513208000,
                "contractName":"BTCUSDT",
                "id":"895",
                "triggerOrderId":"1322738336974712829",
                "pricePrecision":3,
                "side":"BUY",
                "triggerPrice":11111,
                "multiplier":0.0001,
                "marginCoin":"USDT",
                "volume":100,
                "expireTime":1707722808000,
                "contractId":127,
                "triggerType":4,
                "open":"OPEN",
                "status":0
            },
            {
                "mtime":1705978532000,
                "price":0,
                "ctime":1705978532000,
                "contractName":"BTCUSDT",
                "id":"782",
                "triggerOrderId":"1322738336974712828",
                "pricePrecision":3,
                "side":"SELL",
                "triggerPrice":10000,
                "multiplier":0.0001,
                "marginCoin":"USDT",
                "volume":10,
                "expireTime":1707188132000,
                "contractId":127,
                "triggerType":1,
                "open":"CLOSE",
                "status":0
            }
        ]
    }
}
Parameter
Type
Example
Describe

id

long

782

Trigger order collection table id

triggerOrderId

long

1322738336974712828

Trigger order id

contractId

long

127

Contract id

contractName

string

BTCUSDT

Contract name

marginCoin

string

USDT

Margin currency

multiplier

float

0.0001

Contract value

triggerPrice

float

10000

Trigger price

price

float

0

Order price

pricePrecision

integer

3

Price accuracy

volume

float

100

Order volume

open

string

OPEN

Direction of opening and closing positions (OPEN/CLOSE)

side

string

BUY

Order side (BUY/SELL)

status

integer

0

Valid status 0 valid 1 invalid

expireTime

long

1707722808000

Order expiration time

ctime

long

1705978532000

Create time

mtime

long

1705978532000

Modify time

triggerType

integer

1

Trigger order type : 1 stop loss,2 take profit,3 stop loss limit,4 take profit limit


Cancel trigger order

POST https://futuresopenapi.xxx.com/v1/inner/trigger_order_cancel

Headers

Name
Type
Description

X-CH-SIGN*

String

Sign

X-CH-TS*

Integer

Timestamp

X-CH-APIKEY*

String

User API-KEY

Request Body

Name
Type
Description

contractName*

String

Uppercase contract name E.g. E-BTC-USDT

orderId*

long

1322738336974712828

{ 
    "code": "0", 
    "msg": "成功", 
    "data": null 
}

Account

Security: USER_DATA

The interface in Trade requires API-key and signature for access.

Account Information

GET https://futuresopenapi.xxx.com/fapi/v1/account

Rate Limited: 20times/2s

Headers

Name
Type
Description

X-CH-SIGN

string

Sign

X-CH-APIKEY

string

User API-KEY

X-CH-TS

integer

时间戳

{
    "account": [
        {
            "marginCoin": "USDT",
            "accountNormal": 999.5606,
            "accountLock": 23799.5017,
            "partPositionNormal": 9110.7294,
            "totalPositionNormal": 0,
            "achievedAmount": 4156.5072,
            "unrealizedAmount": 650.6385,
            "totalMarginRate": 0,
            "totalEquity": 99964804.560,
            "partEquity": 13917.8753,
            "totalCost": 0,
            "sumMarginRate": 873.4608,
            "positionVos": [
                {
                    "contractId": 1,
                    "contractName": "E-BTC-USDT",
                    "contractOtherName": "BTC-USDT",
                    "contractSymbol": "BTC-USDT",
                    "positions": [
                        {
                            "id": 13603,
                            "uid": 10023,
                            "contractId": 1,
                            "positionType": 2,
                            "side": "BUY",
                            "volume": 69642.0,
                            "openPrice": 11840.2394,
                            "avgPrice": 11840.3095,
                            "closePrice": 12155.3005,
                            "leverageLevel": 24,
                            "openAmount": 0.0600000000000000,
                            "holdAmount": 7014.2111,
                            "closeVolume": 40502.0,
                            "pendingCloseVolume": 0,
                            "realizedAmount": 8115.9125,
                            "historyRealizedAmount": 1865.3985,
                            "tradeFee": -432.0072,
                            "capitalFee": 2891.2281,
                            "closeProfit": 8117.6903,
                            "shareAmount": 0.1112,
                            "freezeLock": 0,
                            "status": 1,
                            "ctime": "2020-12-11T17:42:10",
                            "mtime": "2020-12-18T20:35:43",
                            "brokerId": 21,
                            "lockTime": "2023-12-05T13:53:04",
                            "marginRate": 0.2097,
                            "reducePrice": 9740.8083,
                            "returnRate": 0.3086,
                            "unRealizedAmount": 2164.5289,
                            "openRealizedAmount": 2165.0173,
                            "positionBalance": 82458.2839,
                            "settleProfit": 0.4883,
                            "totalMargin": 0.8351780179968750,
                            "indexPrice": 12151.1175,
                            "keepRate": 0.005,
                            "maxFeeRate": 0.0025
                        }
                    ]
                }
            ]
        }
    ]
}
Parameter
Type
Describe

account

[]

Collection of balance

Parameter
Type
Example
Describe

marginCoin

string

USDT

Margin currency

accountNormal

float

10.05

Account balance

accountLock

float

10.07

Margin frozen account

partPositionNormal

float

10.07

Isolated margin balance

totalPositionNormal

float

10.07

Initial margin occupied by full position

achievedAmount

float

10.07

Realized profit and loss

unrealizedAmount

float

10.05

Unrealized profit or loss

totalMarginRate

float

10.05

Cross Margin Rate

totalEquity

float

10.07

Cross Margin Interest

partEquity

float

10.07

Isolated interest

totalCost

float

10.07

Cost of occupying the entire warehouse

sumMarginRate

float

10.07

Margin rate for all accounts

positionVos

[ ]

Position contract records

名称
类型
例子
描述

contractId

integer

2

Contract id

contractName

string

E-BTC-USDT

Uppercase contract name

contractOtherName

string

BTC-USDT

Currency alias

contractSymbol

string

BTC-USDT

Contract currency pair

positions

[ ]

Position detail information

Parameter
Type
Example
Describe

id

integer

2

Position id

uid

integer

10023

User ID

contractId

integer

1

Contract ID

positionType

integer

1

Position type (1: Cross position, 2: isolated position)

side

string

SELL

Position side (BUY: long position, SELL: short position

volume

float

1.05

Position quantity

openPrice

float

1.05

Opening price

avgPrice

float

1.05

Average position price

closePrice

float

1.05

Average closing price

leverageLevel

float

1.05

Leverage multiple

openAmount

float

1.05

Opening margin

holdAmount

float

1.05

Position margin

closeVolume

float

1.05

Quantity of positions closed

pendingCloseVolume

float

1.05

The volume of place closing orders

realizedAmount

float

1.05

Realized profit and loss

historyRealizedAmount

float

1.05

Historical accumulated profit and loss

tradeFee

float

1.05

Transaction Fees

capitalFee

float

1.05

Funding charges

closeProfit

float

1.05

Position closing profit and loss

shareAmount

float

1.05

Sharing amount

freezeLock

integer

0

Position frozen status (0: normal, 1: liquidation frozen, 2: delivery frozen)

status

integer

0

Position validity (0: invalid, 1: valid)

ctime

time

2023-12-05T13:53:04

Creation time

mtime

time

2023-12-05T13:53:04

Update time

brokerId

integer

1023

Broker id

lockTime

time

Liquidation lock time

marginRate

float

1.05

margin rate

reducePrice

float

1.05

Forced price reduction

returnRate

float

1.05

rate of return (yield)

unRealizedAmount

float

1.05

unrealized profit or loss

openRealizedAmount

float

1.05

Unrealized profit and loss on opening a position

positionBalance

float

1.05

Position value

settleProfit

float

1.05

Position settlement

indexPrice

float

1.05

Latest index price

keepRate

float

1.05

Tiered Minimum Maintenance Margin Rate

maxFeeRate

float

1.05

Maximum handling fee for closing the position

PreviousSpot Trading APINextWebsocket

Last updated 11 months ago