The framework's response into your callback function will be a message object containing the following properties:
| Property | Description |
| result | FXB.Result object describing whether your request succeeded |
| requestId | ID of the candle request, either allocated automatically or set by you in your request definition. This can be used to terminate streaming requests. |
| candles[] | If your request was successful, an array of initial or changed candles |
| timezone | Time zone used for the candle request. See below. Either repeats a |
For example:
Framework.RequestCandles(requestDef, function (MsgCandles) {
if (MsgCandles.result.isOkay) {
// MsgCandles will contain a candles[] array
} else {
// Some problem with the request; see MsgCandles.result.code
}
});
Each item in a candle array has the following properties:
| Candle property | Type | Description |
| i | Integer (millisecond time value) | Unique time-based index value for the candle. Not necessarily the same as |
| ts | Integer (millisecond time value) | Start time of the candle - see notes below about time zones. Depending on the back-end system, this is not necessarily the exact start of a timeframe-based period. For example, if you have requested hourly data, then it is possible when connected to some back-end systems for the |
| o | Number | Open price |
| h | Number | High price |
| l | Number | Low price |
| c | Number | Close price (current price for current candle) |
| v | Number | Volume. Not available on all platforms. |
The
In a streaming request, the following will happen:
Your callback function will receive an initial call with an array of, say, 1000 candles
Each time the price changes, the current candle will update, and your callback function will receive a
When the price changes and enters a new time period, you will receive a