# How can I sub a secondBar chart

**URL:** <https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379>\
**Category:** API Developers\
**Created:** [April 6, 2022, 5:19pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379 "2022-04-06T17:19:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangdc007](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/zhangdc007/32/1792_2.png) [@zhangdc007](https://community.tradovate.com/u/zhangdc007)\
**Post date:** [April 6, 2022, 5:19pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/1 "2022-04-06T17:19:03Z")

</div>

I found the md/getChart input only has MinuteBar,how can I get a SecondBar char,And is there has the example about the Custom ,and the Volume, Range, UnderlyingUnits, Renko, MomentumRange, PointAndFigure, OFARange in elementSizeUnit, for let me know the different detail.

---

<div class="post-metadata">

**Author:** ![zhangdc007](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/zhangdc007/32/1792_2.png) [@zhangdc007](https://community.tradovate.com/u/zhangdc007)\
**Post date:** [April 6, 2022, 5:35pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/2 "2022-04-06T17:35:29Z")

</div>

I think Custom will be OK ,but I do not know what param will invalid.  
I send

```auto
{
    "symbol": "MNQM2",
    "chartDescription": {
        "underlyingType": "Custom",
        "elementSize": 1,
        "elementSizeUnit": "UnderlyingUnits",
        "withHistogram": false
    },
    "timeRange": {
        "asMuchAsElements": 10
    }
}

```

back error:

```auto
{
    "violations": [
        {
            "constraint": "customUnderlying",
            "value": "None",
            "description": "Custom Underlying should be specified"
        }
    ]
}

```

---

<div class="post-metadata">

**Author:** ![zhangdc007](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/zhangdc007/32/1792_2.png) [@zhangdc007](https://community.tradovate.com/u/zhangdc007)\
**Post date:** [April 6, 2022, 5:50pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/3 "2022-04-06T17:50:33Z")

</div>

I use chrome find in TR web client ，the sub second chart request is:

```auto
{
    "symbol": "2553027",
    "chartDescription": {
        "underlyingType": "Tick",
        "elementSizeUnit": "Seconds",
        "elementSize": 1,
        "withHistogram": false
    },
    "timeRange": {
        "asMuchAsElements": 300
    }
}

```

why underlyingType is ‘Tick’?  
and the elementSizeUnit is ‘Seconds’ is not write in API doc:

> **[Tradovate API](https://api.tradovate.com/#section/Request-Reference/Get-Chart)**
>
> Documentation for the Tradovate API.

---

<div class="post-metadata">

**Author:** ![Alexander](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/alexander/32/988_2.png) [@Alexander](https://community.tradovate.com/u/Alexander)\
**Post date:** [April 8, 2022, 1:37pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/4 "2022-04-08T13:37:59Z")

</div>

Try this and tell me what it gives you:

```auto
//JSON for 30s bars
{
  "chartDescription": {
    "elementSize": 30, 
    "underlyingType": "Tick",
    "elementSizeUnit": "Seconds", 
    "withHistogram": true //or false, depends on what you want
  }
  "symbol": "MNQM2",
  "timeRange": { "asMuchAsElements": 300 }
}

```

---

<div class="post-metadata">

**Author:** ![zhangdc007](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/zhangdc007/32/1792_2.png) [@zhangdc007](https://community.tradovate.com/u/zhangdc007)\
**Post date:** [April 10, 2022, 4:44pm UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/5 "2022-04-10T16:44:31Z")

</div>

thanks alex,I get the wright input param by use web TR client,copy form the consol log

---

<div class="post-metadata">

**Author:** ![Supreme\_Sorcerer](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@Supreme\_Sorcerer](https://community.tradovate.com/u/Supreme_Sorcerer)\
**Post date:** [July 15, 2022, 2:15am UTC](https://community.tradovate.com/t/how-can-i-sub-a-secondbar-chart/4379/6 "2022-07-15T02:15:49Z")

</div>

Although this work for me, how about getting data for regular bar data like underlying type?

```auto
"chartDescription": {
    "underlyingType": "MinuteBar",
    "elementSize": 5,
    "elementSizeUnit": "UnderlyingUnits" || 'Seconds' (where does seconds go)?
  },

```
