Subscribe to data of account-related changes

account

Signature verification: Yes

Interface permission: Read

Rate Limit: WebSocket private order transaction push interface (API KEY verification is required) A UID can establish up to 30 private order transaction push WS links at the same time. The user only needs to maintain one order push WS link on one product (including all periodic contracts of the product). A single link is 50 requests per second, and a single IP link is 100 requests per second. Note: The frequency limit of the order push WS is separate from the frequency limit of the user's RESTFUL private interface and does not affect each other.

Interface description: When changes occur in the static amount of the account, such as margin freezing or releasing, funding rate settlements, and realized PnLs, the following account-related information will be pushed.

Subscription Address

Environment
Address

Online

wss://api.sunx.io/ws/v1/notification

Online (preferred by aws customers)

wss://api.sunx.io/ws/v1/notification

Request Parameter

Field Name
Type
Description

op

string

Must. Use sub or unsub

cid

string

Optional. The unique ID of the client

topic

string

Must. account

Rule description

Subscribe(sub)
Unsubscribe( unsub )
Rule

account

account

yes

account.contract_code1

account.*

no

Data Update

Parameter
Data Type
Required
Description
Value Range

op

string

true

Operation name, with a fixed value of "notify"

topic

string

true

Push topic

ts

long

true

Timestamp of server response

event

string

true

Account-related change explanation

Event Type: snapshot: Snapshot of the first push message cancel_order: Order cancellation delivered: Contract delivered; transferred: Assets transferred; filled: Order executed; liquidation: Forced liquidation; adl: Auto deleveraging; funding_fee: Funding fees; set_leverage: Set leverage ; auto_exchange:Auto exchange

uid

string

true

User UID

<data>

false

state

string

true

Account status 1(NORMAL): The account is functioning normally for trading and transfers. 3 (LIQUIDATING): The account is under liquidation, and trading, transfers, and the receipt of funding fees are unavailable. 5(ADL): The account is under auto deleveraging, and trading, transfers, and the receipt of funding fees are unavailable. 6(OPEN_LIMIT): Orders are being canceled for risk management. Only ADL orders are allowed for futures trading; transfers in are permitted, but transfers out are not allowed.

equity

string

true

Account Equity

initial_margin

string

true

Initial margin

maintenance_margin

string

true

Maintenance margin

maintenance_margin_rate

string

true

Maintenance margin ratio

profit_unreal

string

true

Unrealized PnL

available_margin

string

true

Available collateral

voucher_value

String

true

voucher value(usdt)

created_time

string

true

Account creation time

updated_time

string

true

Account update time

details

string

true

currency

string

true

Cryptocurrency

equity

string

true

Equity of a cryptocurrency

available

string

true

Available balance of a cryptocurrency

withdraw_available

String

true

Transferable balance of a cryptocurrency

profit_unreal

string

true

Unrealized PnL

initial_margin

string

true

Initial margin of a cryptocurrency

maintenance_margin

string

true

Maintenance margin of a cryptocurrency

maintenance_margin_rate

string

true

Maintenance margin ratio of a cryptocurrency

initial_margin_rate

string

true

Initial margin ratio of a cryptocurrency

voucher

String

true

voucher

voucher_value

String

true

voucher value(usdt)

created_time

string

true

Creation time

updated_time

string

true

Update time

<data>

true

Subscription Example

Example of a Successful Subscription

Example of a Data Update

Last updated