Welcome to the new WEEX API documentation. Looking for the previous version?Switch to the legacy docs
WEEX
WEEX Futures REST API

Account

Endpoint

Get Account Balance (USER_DATA)

Get Account Balance (USER_DATA).

GET
/capi/v3/account/balance
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight5

Get Account Balance (USER_DATA) › Responses

200

Successful response

​object[]
asset
​string

Asset name

balance
​string

Total balance

availableBalance
​string

Available balance

frozen
​string

Frozen amount

unrealizePnl
​string

Unrealized Profit and Loss


Get Commission Rate (USER_DATA)

Get Commission Rate (USER_DATA).

GET
/capi/v3/account/commissionRate
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight5

Get Commission Rate (USER_DATA) › query Parameters

symbol
​string · required

Trading pair

Get Commission Rate (USER_DATA) › Responses

200

Successful response

symbol
​string

Trading pair

makerCommissionRate
​string

Maker commission rate applicable to orders manually placed by the current user, e.g. "0.0002" means 0.02%

takerCommissionRate
​string

Taker commission rate applicable to orders manually placed by the current user, e.g. "0.0004" means 0.04%

apiMakerCommissionRate
​string

Maker commission rate applicable to orders placed via API by the current user, e.g. "0.0002" means 0.02%

apiTakerCommissionRate
​string

Taker commission rate applicable to orders placed via API by the current user, e.g. "0.0004" means 0.04%


Get Account Configuration (USER_DATA)

Get Account Configuration (USER_DATA).

GET
/capi/v3/account/accountConfig
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight5

Get Account Configuration (USER_DATA) › Responses

200

Successful response

canTrade
​boolean

Whether trading is enabled

canDeposit
​boolean

Whether deposits are enabled

canWithdraw
​boolean

Whether withdrawals are enabled

dualSidePosition
​boolean

Whether dual-side position mode is enabled true: Can hold both long and short positions simultaneously false: One-way position mode

updateTime
​integer

Update time Unix millisecond timestamp


Get Symbol Configuration (USER_DATA)

Get Symbol Configuration (USER_DATA).

GET
/capi/v3/account/symbolConfig
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight5

Get Symbol Configuration (USER_DATA) › query Parameters

symbol
​string

Trading pair If not provided, all will be returned by default

Get Symbol Configuration (USER_DATA) › Responses

200

Successful response

​object[]
symbol
​string

Trading pair

marginType
​string

Margin mode CROSSED: Cross Mode ISOLATED: Isolated Mode

separatedType
​string

Position segregation mode COMBINED: Combined mode SEPARATED: Separated mode

crossLeverage
​string

Cross margin leverage

isolatedLongLeverage
​string

Isolated long position leverage

isolatedShortLeverage
​string

Isolated short position leverage


Get Account Income (USER_DATA)

Get Account Income (USER_DATA).

POST
/capi/v3/account/income
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight2

Get Account Income (USER_DATA) › query Parameters

asset
​string

Asset name

symbol
​string

Trading pair

incomeType
​string

Business typedeposit : Depositwithdraw : Withdrawaltransfer_in : Transfer between different accounts (in)transfer_out : Transfer between different accounts (out)margin_move_in : Collateral transferred within the same account due to opening/closing positions, manual/auto additionmargin_move_out : Collateral transferred out within the same account due to opening/closing positions, manual/auto additionposition_open_long : Collateral change from opening long positions (buying decreases collateral)position_open_short : Collateral change from opening short positions (selling increases collateral)position_close_long : Collateral change from closing long positions (selling increases collateral)position_close_short : Collateral change from closing short positions (buying decreases collateral)position_funding : Collateral change from position funding fee settlementorder_fill_fee_income : Order fill fee income (specific to fee account)order_liquidate_fee_income : Order liquidation fee income (specific to fee account)start_liquidate : Start liquidationfinish_liquidate : Finish liquidationorder_fix_margin_amount : Compensation for liquidation losstracking_follow_pay : Copy trading payment, pre-deducted from followers after position closing if profitabletracking_system_pre_receive : Pre-received commission, commission system account receives pre-deducted amount from followerstracking_follow_back : Copy trading commission refundtracking_trader_income : Lead trader incometracking_third_party_share : Profit sharing (shared by lead trader with others)

startTime
​integer

Start timestamp Unit: milliseconds.If only endTime is provided, the system defaults startTime to 30 days before endTime (not earlier than current time).

endTime
​integer

End timestamp Unit: milliseconds.If only startTime is provided, endTime defaults to the current time.When both are provided, the range must not exceed 100 days.

limit
​integer

Return record limit, default: 20 Minimum: 1Maximum: 100

nextKeyId
​integer

Cursor ID returned from the previous page.

nextKeyTime
​integer

Cursor time returned from the previous page.

Get Account Income (USER_DATA) › Responses

200

Successful response

hasNextPage
​boolean

Whether there is a next page

​object

Cursor for the next page.

​object[]

Data list


Get All Positions (USER_DATA)

Get All Positions (USER_DATA).

GET
/capi/v3/account/position/allPosition
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight10

Get All Positions (USER_DATA) › Responses

200

Successful response

​object[]
id
​integer

Position ID

asset
​string

Associated collateral asset

symbol
​string

Trading pair

side
​string

Position direction such as LONG or SHORT

marginType
​string

Margin mode of current position CROSSED: Cross ModeISOLATED: Isolated Mode

separatedMode
​string

Current position's separated mode COMBINED: Combined mode SEPARATED: Separated mode

separatedOpenOrderId
​integer

Opening order ID of separated position

leverage
​string

Position leverage

size
​string

Current position size

openValue
​string

Initial value at position opening

openFee
​string

Opening fee

fundingFee
​string

Funding fee

marginSize
​string

Margin amount (margin coin)

isolatedMargin
​string

Isolated margin

isAutoAppendIsolatedMargin
​boolean

Whether the auto-adding of funds for the isolated margin is enabled (only for isolated mode)

cumOpenSize
​string

Accumulated opened positions

cumOpenValue
​string

Accumulated value of opened positions

cumOpenFee
​string

Accumulated fees paid for opened positions

cumCloseSize
​string

Accumulated closed positions

cumCloseValue
​string

Accumulated value of closed positions

cumCloseFee
​string

Accumulated fees paid for closing positions

cumFundingFee
​string

Accumulated settled funding fees

cumLiquidateFee
​string

Accumulated liquidation fees

createdMatchSequenceId
​integer

Matching engine sequence ID at creation

updatedMatchSequenceId
​integer

Matching engine sequence ID at last update

createdTime
​integer

Creation time Unix millisecond timestamp

updatedTime
​integer

Update time Unix millisecond timestamp

unrealizePnl
​string

Unrealized PnL

liquidatePrice
​string

Estimated liquidation price If the value = 0, it means the position is at low risk and there is no liquidation price at this time


Get Single Position (USER_DATA)

Get Single Position (USER_DATA).

GET
/capi/v3/account/position/singlePosition
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight2

Get Single Position (USER_DATA) › query Parameters

symbol
​string · required

Trading pair

Get Single Position (USER_DATA) › Responses

200

Successful response

​object[]
id
​integer

Position ID

asset
​string

Associated collateral asset

symbol
​string

Trading pair

side
​string

Position direction such as LONG or SHORT

marginType
​string

Margin mode of current position CROSSED: Cross ModeISOLATED: Isolated Mode

separatedMode
​string

Current position's separated mode COMBINED: Combined mode SEPARATED: Separated mode

separatedOpenOrderId
​integer

Opening order ID of separated position

leverage
​string

Position leverage

size
​string

Current position size

openValue
​string

Initial value at position opening

openFee
​string

Opening fee

fundingFee
​string

Funding fee

marginSize
​string

Margin amount (margin coin)

isolatedMargin
​string

Isolated margin

isAutoAppendIsolatedMargin
​boolean

Whether the auto-adding of funds for the isolated margin is enabled (only for isolated mode)

cumOpenSize
​string

Accumulated opened positions

cumOpenValue
​string

Accumulated value of opened positions

cumOpenFee
​string

Accumulated fees paid for opened positions

cumCloseSize
​string

Accumulated closed positions

cumCloseValue
​string

Accumulated value of closed positions

cumCloseFee
​string

Accumulated fees paid for closing positions

cumFundingFee
​string

Accumulated settled funding fees

cumLiquidateFee
​string

Accumulated liquidation fees

createdMatchSequenceId
​integer

Matching engine sequence ID at creation

updatedMatchSequenceId
​integer

Matching engine sequence ID at last update

createdTime
​integer

Creation time Unix millisecond timestamp

updatedTime
​integer

Update time Unix millisecond timestamp

unrealizePnl
​string

Unrealized PnL

liquidatePrice
​string

Estimated liquidation price If the value = 0, it means the position is at low risk and there is no liquidation price at this time


Change Margin Mode (TRADE)

Change Margin Mode (TRADE).

POST
/capi/v3/account/marginType
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight20

Change Margin Mode (TRADE) › query Parameters

symbol
​string · required

Trading pair

marginType
​string · required

Margin mode.Supported values: CROSSED (cross margin), ISOLATED (isolated margin).

separatedType
​string

Position mode.COMBINED keeps both long and short in one position.SEPARATED splits positions.

Change Margin Mode (TRADE) › Responses

200

Successful response

code
​string

Response code

msg
​string

Response message

requestTime
​integer

TimestampUnix millisecond timestamp


Update Leverage Settings (TRADE)

Update Leverage Settings (TRADE).

POST
/capi/v3/account/leverage
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight10

Update Leverage Settings (TRADE) › query Parameters

symbol
​string · required

Trading pair

marginType
​string

Target margin mode.Supported values: CROSSED (cross margin), ISOLATED (isolated margin).

crossLeverage
​string

Cross leverage to apply when marginType is CROSSED.

isolatedLongLeverage
​string

Isolated long leverage. Required when updating the isolated long position.

isolatedShortLeverage
​string

Isolated short leverage. Required when updating the isolated short position.

Update Leverage Settings (TRADE) › Responses

200

Successful response

symbol
​string

Trading pair

marginType
​string

Applied margin modeCROSSED or ISOLATED

crossLeverage
​string

Resulting cross leverage

isolatedLongLeverage
​string

Resulting isolated long leverage

isolatedShortLeverage
​string

Resulting isolated short leverage


Adjust Isolated Margin (TRADE)

Adjust Isolated Margin (TRADE).

POST
/capi/v3/account/positionMargin
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight15

Adjust Isolated Margin (TRADE) › query Parameters

isolatedPositionId
​integer · required

Isolated position ID. Obtain via Get Single Position.

amount
​string · required

Margin amount to adjust. Must be greater than 0.

type
​integer · required

Adjustment direction. 1 = increase isolated margin; 2 = decrease isolated margin.

Adjust Isolated Margin (TRADE) › Responses

200

Successful response

code
​string

Response code

msg
​string

Response message

requestTime
​integer

TimestampUnix millisecond timestamp


Modify Auto-Append Margin (TRADE)

Modify Auto-Append Margin (TRADE).

POST
/capi/v3/account/modifyAutoAppendMargin
https://api-contract.weex.com
Request weight
This endpoint consumes IP-based request weight. Heavier endpoints consume more of your IP rate-limit capacity.
Learn more in the Access Restrictions section.
IP weight15

Modify Auto-Append Margin (TRADE) › query Parameters

positionId
​integer · required

Isolated position ID

autoAppendMargin
​boolean · required

Whether to enable automatic isolated margin top-up

Modify Auto-Append Margin (TRADE) › Responses

200

Successful response

code
​string

Response code

msg
​string

Response message

requestTime
​integer

TimestampUnix millisecond timestamp