are you referring to "timestamp"? i believe its epoch of exchange... ltt is actual traded time. If you could brief a bit we can give you some suggestion.
fyi this broker dont provide full and partial updates like other data providers. If you could give clarity on why ltt is important then we can figure out a workaround. If your script is not "latency sensitive" you should be able to process full quote in few micro seconds.
i am interested in forming candles of one min. That may not be very correct, as I think we dont get all ticks. The algorithm is something like this, I hv thought: (1) Get ticks on on_ticks: into some variable. (2) Dump it to a table (3) Let the first tick be Open and last be close. High and low of tick for one min range can be obtained.
@satya12345 ,Thanks. Candle is useless,utter waste of time and computation, API is a powerful tool and using candles is disrespecting its sole purpose.
Since you would like to start with Graphs->Candles, Graph or candles doesn't mean that value should be changing in all instances(time intervals),if this is for real time display just carry over last updated value(whatever the tick you have) as current value until a new update comes from tick.This is how all graphs work.
If you could brief a bit we can give you some suggestion.
Mode_FULL
{'tradable': True,
'mode': 'full',
'instrument_token': 13176834,
'last_price': 28874.65,
'last_quantity': 20,
'average_price': 0.0,
'volume': 0,
'buy_quantity': 0,
'sell_quantity': 0,
'ohlc': {'open': 29440.0, 'high': 29724.0, 'low': 28218.0, 'close': 28874.65},
'change': 0.0,
'last_trade_time': datetime.datetime(2019, 10, 1, 15, 29, 59),
'oi': 1513360,
'oi_day_high': 0,
'oi_day_low': 0,
'timestamp': datetime.datetime(1970, 1, 1, 5, 30),
'depth':
{'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}],
'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]
}
}
MODE QUOTE
{'tradable': True,
'mode': 'quote',
'instrument_token': 341249,
'last_price': 1248.8,
'last_quantity': 5,
'average_price': 0.0
, 'volume': 0,
'buy_quantity': 0,
'sell_quantity': 0,
'ohlc': {'open': 1231.5, 'high': 1255.0, 'low': 1221.1, 'close': 1248.8},
'change': 0.0}
MODE_LTP
{'tradable': True,
'mode': 'ltp',
'instrument_token': 7670273,
'last_price': 690.75}
The 'last_trade_time': was however not correct Hence the question...
this broker dont provide full and partial updates like other data providers.
If you could give clarity on why ltt is important then we can figure out a workaround.
If your script is not "latency sensitive" you should be able to process full quote in few micro seconds.
That may not be very correct, as I think we dont get all ticks.
The algorithm is something like this, I hv thought:
(1) Get ticks on on_ticks: into some variable.
(2) Dump it to a table
(3) Let the first tick be Open and last be close. High and low of tick for one min range can be obtained.
That was what I was working on, fyi
Candle is useless,utter waste of time and computation,
API is a powerful tool and using candles is disrespecting its sole purpose.
Since you would like to start with Graphs->Candles,
Graph or candles doesn't mean that value should be changing in all instances(time intervals),if this is for real time display just carry over last updated value(whatever the tick you have) as current value until a new update comes from tick.This is how all graphs work.