# Market Data Event Type

| Field          | Value                                                                                       | Type                                                                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**       | Either `Quote` or `Candle`                                                                  | [Account code](https://sway-technologies.gitbook.io/sway-charts-api-documentation/rest-api-specification/cash-transaction/account-details), **required** |
| **format**     | Always `COMPACT`                                                                            | String, *optional*                                                                                                                                       |
| **candleType** | Type of the candle, only for candle queries                                                 | String, *optional*                                                                                                                                       |
| **fromTime**   | Required for *Candle* type. UTC time to get history from.                                   | Timestamp, *optional*                                                                                                                                    |
| **toTime**     | Required for *Candle* type. UTC time to get history till.                                   | Timestamp, *optional*                                                                                                                                    |
| **count**      | Maximum count of candles in response. If not defined, used value predefined on server side. | [Number](https://sway-technologies.gitbook.io/sway-charts-api-documentation/rest-api-specification/getting-started/data-types-and-formats), *optional*   |

## *<mark style="color:blue;">**string**</mark>***&#x20;candleType**

Possible values:

* `m` (1 min)
* `5m` (5 min)
* `15m` (15 minutes)
* `30m` (30 minutes)
* `h` (1 hour)
* `2h` (2 hours)
* `4h` (4 hours)
* `d` (Day)
* `w` (Week)
* `mo` (Month)

## *<mark style="color:blue;">**number**</mark>***&#x20;count**

If the number of candles in the \[fromTime, toTime] period is more than the `count` value, exactly the `count` candles will be returned in response. Older candles will be filtered.
