Account is used to subscribe to real-time updates about user's account changes. Before receiving real-time updates about your account changes through the "myaccount" channel, it's essential to subscribe to Authorize channel.
Upon sending a subscribe/unsubscribe message, you will receive a message indicating whether the subscription was successful or if there was an error. Additionally, the response will include the same ID that you included in your subscribe message, allowing you to match the response message to the specific subscribe request.
This channel delivers real-time update messages triggered by five key events: order match, place order, cancel order, deposit, and withdraw.Event Types
1.
ORDER_MATCH: Indicates when an order has been matched with another in the market.
2.
PLACE_ORDER: Triggered when a user places a new order.
3.
CANCEL_ORDER: Indicates the cancellation of an existing order.
4.
DEPOSIT: Occurs when a user initiates a deposit to their account.
5.
WITHDRAW: Indicates a withdrawal request from the user's account.
The meassge of "PLACE_ORDER" and "CANCEL_ORDER" include information about the newly placed or canceled order, its status, and the impact on the user's asset balances.
1.
type: Specifies the type of WebSocket message. For "mybalance" channel, "init" means initialization, and "update" means an update.
1.
Type: String
2.
Value: "update"
2.
channel: Indicates the type of data to subscribe to.
1.
Type: String
2.
Value: "myaccount"
3.
timestamp: Specifies the timestamp of the channel is subscribed.
1.
Type: String (UNIX timestamp in milliseconds & UTC)
2.
Example: "1705642544624"
4.
event: Specifies the type of event that triggered the update message
1.
Type: String
2.
Value: "PLACE_ORDER" or "CANCEL_ORDER"
5.
assets: An array containing information about the user's assets that changed due to the "PLACE_ORDER" or "CANCEL_ORDER" event.
1.
assetName: The name of the asset(e.g., "USDT", or "WBTC").
1.
Type: String
2.
avalibale: The updated available balance of the asset after the event.
1.
Type: String
3.
inUse: The balance in use or reserved for open orders after the event.
1.
Type: String
4.
preAvailable: The available balance of the asset before the event occurred.
1.
Type: String
5.
preInUse: The balance in use or reserved for open orders before the event occurred.
1.
Type: String
6.
orders: An array containing details of the newly placed or canceled order.
1.
clientOrderId: The client-assigned unique identifier for the order.
1.
Type: String
2.
cumulativeQuoteQty: The updated available balance of the asset after the event.
1.
Type: String
3.
executedQty: The quantity of the order that has been executed.
1.
Type: String
4.
orderId: The unique identifier for the order.
1.
Type: String
5.
orderTime: The timestamp when the order was placed.
1.
Type: String (UNIX timestamp in milliseconds & UTC)
6.
origQty: The original quantity specified in the order.
1.
Type: String
7.
price: The price specified in the order.
1.
Type: String
8.
side: The side of the order (BUY or SELL).
1.
Type: String
9.
status: The current status of the order (NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED, EXPIRED).
1.
Type: String
10.
symbol: The trading pair symbol.
1.
Type: String
11.
timeInForce: The time in force for the order (GTC, FOK, IOC).
1.
Type: String
12.
workingTime: The timestamp when the order last processing.
1.
Type: String (UNIX timestamp in milliseconds & UTC)
The message informs the user that their trading fee rate has changed. User should use the updated fee rate to place their orders or the signature verification will failed.
1.
type: Specifies the type of WebSocket message. For "mybalance" channel, "init" means initialization, and "update" means an update.
1.
Type: String
2.
Value: "update"
2.
channel: Indicates the type of data to subscribe to.
1.
Type: String
2.
Value: "myaccount"
3.
timestamp: Specifies the timestamp of the channel is subscribed.
1.
Type: String (UNIX timestamp in milliseconds & UTC)
2.
Example: "1705642544624"
4.
event: Specifies the type of event that triggered the update message.
1.
Type: String
2.
Value: "UPDATE_USER_FEE_RATE"
5.
feeLevel: Indicates the user's fee tier, which in this example is "VIP_5".
1.
Type: String
2.
Example: "VIP_5"
6.
makerFeeRate: Specifies the fee rate applicable for maker orders in current fee level.
1.
Type: String
2.
Value: "0.000000"
7.
takerFeeRate: Specifies the fee rate applicable for taker orders in current fee level.