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.
I think Custom will be OK ,but I do not know what param will invalid.
I send
{
"symbol": "MNQM2",
"chartDescription": {
"underlyingType": "Custom",
"elementSize": 1,
"elementSizeUnit": "UnderlyingUnits",
"withHistogram": false
},
"timeRange": {
"asMuchAsElements": 10
}
}
back error:
{
"violations": [
{
"constraint": "customUnderlying",
"value": "None",
"description": "Custom Underlying should be specified"
}
]
}
I use chrome find in TR web client ,the sub second chart request is:
{
"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:
Try this and tell me what it gives you:
//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 }
}
1 Like
thanks alex,I get the wright input param by use web TR client,copy form the consol log
1 Like
Although this work for me, how about getting data for regular bar data like underlying type?
"chartDescription": {
"underlyingType": "MinuteBar",
"elementSize": 5,
"elementSizeUnit": "UnderlyingUnits" || 'Seconds' (where does seconds go)?
},