Skip to main content

Real-time Data

Vezgo Real-time Data enables client applications to receive real-time events via Webhooks.

Currently Real-time Data feature is enabled on request only. Contact us if you'd like to enable it. We would need the url where you would like to receive the webhook events.

Account Events

A webhook event is sent to your receiving endpoint via a POST when there is any update from account. The request payload would have the following schema :

{
"institution_id": "603522490d2b02001233a5d6",
"app_id": "your_app_id",
"websocket_id": 8267675,
"message": {
// Event information that triggered webhook
},
"hook" : "newAccountEvent",
}

Event Details

AttributeTypeFormatDescription
institution_idStringIDThe Vezgo account id.
app_idStringIDYour app id.
websocket_idNumberIDA unique websocket id
messageObjectMessageEvent details
hookStringEventName of event

Event

ValueDescription
newAccountEventWhenever there is an update from account.

Supported Exchanges

You can find the webhook event's message field format for different exchanges below :

Binance

Currently, we send events for spot wallet updates only. The events triggered are as follows :

message: outboundAccountPosition

This event is sent any time an account balance has changed and contains the assets that were possibly changed by the event that generated the balance change.

outboundAccountPosition

{
"institution_id": "603522490d2b02001233a5d6",
"app_id": "your_app_id",
"websocket_id": 8298322,
"message": {
"e": "outboundAccountPosition", // Event type
"E": 1564034571105, // Event Time
"u": 1564034571073, // Time of update
"B": [ // Balances Array
{
"a": "ETH", // Asset
"f": "10000.000000", // Free
"l": "0.000000" // Locked
}
]
},
"hook": "newAccountEvent",
}

message: balanceUpdate

Balance Update occurs during the following:

  • Deposits or withdrawals from the account
  • Transfer of funds between accounts (e.g. Spot to Margin)

balanceUpdate

{
"institution_id": "603522490d2b02001233a5d6",
"app_id": "your_app_id",
"websocket_id": 8298322,
"message": {
"e": "balanceUpdate", // Event Type
"E": 1573200697110, // Event Time
"a": "BTC", // Asset
"d": "100.00000000", // Balance Delta
"T": 1573200697068 // Clear Time
},
"hook": "newAccountEvent",
}

message: executionReport

Orders are updated with the executionReport event.

executionReport

{
"institution_id": "603522490d2b02001233a5d6",
"app_id": "your_app_id",
"websocket_id": 1862227,
"message": {
"e": "executionReport", // Event type
"E": 1499405658658, // Event time
"s": "ETHBTC", // Symbol
"c": "mUvoqJxFIILMdfAW5iGSOW", // Client order ID
"S": "BUY", // Side
"o": "LIMIT", // Order type
"f": "GTC", // Time in force
"q": "1.00000000", // Order quantity
"p": "0.10264410", // Order price
"P": "0.00000000", // Stop price
"d": 4, // Trailing Delta; This is only visible if the order was a trailing stop order.
"F": "0.00000000", // Iceberg quantity
"g": -1, // OrderListId
"C": "", // Original client order ID; This is the ID of the order being canceled
"x": "NEW", // Current execution type
"X": "NEW", // Current order status
"r": "NONE", // Order reject reason; will be an error code.
"i": 4293153, // Order ID
"l": "0.00000000", // Last executed quantity
"z": "0.00000000", // Cumulative filled quantity
"L": "0.00000000", // Last executed price
"n": "0", // Commission amount
"N": null, // Commission asset
"T": 1499405658657, // Transaction time
"t": -1, // Trade ID
"v": 3, // Prevented Match Id; This is only visible if the order expire due to STP trigger.
"I": 8641984, // Ignore
"w": true, // Is the order on the book?
"m": false, // Is this trade the maker side?
"M": false, // Ignore
"O": 1499405658657, // Order creation time
"Z": "0.00000000", // Cumulative quote asset transacted quantity
"Y": "0.00000000", // Last quote asset transacted quantity (i.e. lastPrice * lastQty)
"Q": "0.00000000", // Quote Order Quantity
"D": 1668680518494, // Trailing Time; This is only visible if the trailing stop order has been activated.
"j": 1, // Strategy ID; This is only visible if the strategyId parameter was provided upon order placement
"J": 1000000, // Strategy Type; This is only visible if the strategyType parameter was provided upon order placement
"W": 1499405658657, // Working Time; This is only visible if the order has been placed on the book.
"V": "NONE", // selfTradePreventionMode
"u":1, // TradeGroupId; This is only visible if the account is part of a trade group and the order expired due to STP trigger.
"U":37, // CounterOrderId; This is only visible if the order expired due to STP trigger.
"A":"3.000000", // Prevented Quantity; This is only visible if the order expired due to STP trigger.
"B":"3.000000" // Last Prevented Quantity; This is only visible if the order expired due to STP trigger.
},
"hook": "newAccountEvent",
}