# How to configure getChart for Range? \[Resolved\]

**URL:** <https://community.tradovate.com/t/how-to-configure-getchart-for-range-resolved/3294>\
**Category:** Community Support\
**Created:** [November 3, 2021, 9:26pm UTC](https://community.tradovate.com/t/how-to-configure-getchart-for-range-resolved/3294 "2021-11-03T21:26:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.Cage](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Mr.Cage](https://community.tradovate.com/u/Mr.Cage)\
**Post date:** [November 3, 2021, 9:26pm UTC](https://community.tradovate.com/t/how-to-configure-getchart-for-range-resolved/3294/1 "2021-11-03T21:26:31Z")

</div>

I pulled down the WebSockets example from GitHub and have been playing with EX-10a-Chart-Data-Solution. In the Tradovate application i use a time period of Range 17

```auto
unsubscribe = await socket.subscribe({
            url: 'md/getchart',
            body: { 
                symbol: 'NQZ1',
                chartDescription: {
                    underlyingType: 'Custom',
                    elementSize: 17,
                    elementSizeUnit: 'Range',
                    withHistogram: false,
                },
                timeRange: {
                    asMuchAsElements: 1000
                }
            },

```

The code above is what I tried but I’m getting a promise not returned error. What is the correct way to subscribe to getChart with Range?

---

<div class="post-metadata">

**Author:** ![Mr.Cage](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Mr.Cage](https://community.tradovate.com/u/Mr.Cage)\
**Post date:** [November 4, 2021, 1:16am UTC](https://community.tradovate.com/t/how-to-configure-getchart-for-range-resolved/3294/2 "2021-11-04T01:16:45Z")

</div>

I got it sorted. The underlyingType is Tick. elementSize is the range length and the elementSizeUnit is Range.

the working solution is

```auto
unsubscribe = await socket.subscribe({
            url: 'md/getchart',
            body: { 
                symbol: 'NQZ1',
                chartDescription: {
                    underlyingType: 'Tick',
                    elementSize: 17,
                    elementSizeUnit: 'Range',
                    withHistogram: false,
                },
                timeRange: {
                    asMuchAsElements: 1000
                }
            },

```
