Private Message Push
Private message push includes order and account changes. Send login message first, then subscribe to private stream.
Subscribe URL
wss://stream.bittap.com/endpoint?format=JSON
Subscribe Parameters
Stream Name: s_private
Data Update
| Name | Type | Description |
|---|
Subscribe Example
{
"id":"id",
"method": "LOGIN",
"params":
[
"3se60fJU9oJ3nCRnDHFiiFK2G1sxm3EqKZDYV5aKrUKa4smXaGxwbUS0Hm3Vhudo", // apiKey
"1762509526408", // timestamp cannot be later than server time by 5 minutes cannot be earlier than server time by 1 minute
"0270e250ffce18e605f95737d69c14a6f38909a7d727ae3f13ca374b94ec9a60" // signature encrypted with api_secret using timestamp
]
}
{
"method": "SUBSCRIBE",
"params": [
"s_private"
]
}Subscribe Success Example
{
"code": 0, // 0 means success, non-0 means failure
"msg":"", // failure reason, null when success
"topic": ["", ""], // topics that failed to subscribe
"id": 1
}Data Update Example
Account Change Response Example
{
"E": 1762226153952, // Event time
"T": 1762226153952, // Creation time
"a": "USDT", //Asset
"c": "BALANCE_UPDATE", // Event type
"d": "-0.00000000000923464", // Balance change
"e": "s_private", // topic
"f": "846365.30981895727648403853272", // Available balance f = previous f + d (can be negative)
"l": "100529.8", // Locked balance
"v": 3224 // Version number, the version number applies to the same currency
}Normal Order Change Response Example
{
"e": "s_private", // topic
"c":"ORDER_UPDATE", // Event type
"E": 1499405658658, // Event time
"s": "ETH-BTC", // Symbol
"C": "mUvoqJxFIILMdfAW5iGSOW", // clientOrderId
"S": "BUY", // Side
"o": "LIMIT", // Order type
"f": "GTC", // Time in force
"q": "1.00000000", // Total quantity of the order
"Q": "1.1.00000000", // Total amount of the order
"p": "0.10264410", // Original price of the order
"X": "NEW", // Current status of the order
"r": "NONE", // Reason for order cancellation
"i": 4293153, // orderId
"z": "0.00000000", // Cumulative filled quantity of the order
"n": "0", // Fee quantity
"N": "ETH", // Fee currency
"w": true, // Is the order on the order book
"O": 1499405658657, // Order creation time
"Z": "0.00000000", // Cumulative filled amount of the order
"V": "NONE", // SelfTradePreventionMode
"po": true, // post only
"a": "1.00000000", //cancellation quantity
"A": "1.00000000", // cancellation amount
"se": 123243 //sequence
}Unsubscribe Example
{
"id":"id",
"method": "LOGIN",
"params":
[
"3se60fJU9oJ3nCRnDHFiiFK2G1sxm3EqKZDYV5aKrUKa4smXaGxwbUS0Hm3Vhudo", // apiKey
"1762509526408", // timestamp cannot be later than server time by 5 minutes cannot be earlier than server time by 1 minute
"0270e250ffce18e605f95737d69c14a6f38909a7d727ae3f13ca374b94ec9a60" // signature encrypted with api_secret using timestamp
]
}
{
"method": "UNSUBSCRIBE",
"params": [
"s_private"
]
}Error Codes
No information available
Code Example
Last updated on: