which is buy or sell price

ayyaz
ayyaz edited February 2018 in Java client
I am using tickers to fetch current price of stock at which i can sell or buy, there are many values in output i need which is that value which i can consider to buy or sell a stock ?
which among following is price at which i can buy or sell stocks
double lastTradedPrice = ticks.get(i).getLastTradedPrice();
double close=ticks.get(i).getClosePrice();
what is difference between
getTickTimestamp and getLastTradedTime
i have refered example mentioned in github but i dont see either
function tickerUsage or main gets into infinite loop as we need to keep fetching realtime value , do i need to put an infinite loop explicitly as program might exit after a while if not put.
Example:
 try {
tickerUsage(kiteConnect,tokens);
} catch (IOException ex) {
Logger.getLogger(TickerPrice.class.getName()).log(Level.SEVERE, null, ex);
}
while (true)
{
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
Logger.getLogger(TickerPrice.class.getName()).log(Level.SEVERE, null, ex);
}
}

how many tokens i can pass to so that i can fetch in single tick by tick , is it possible to fetch tick by tick info for 200 to 500 stocks , if so please point me to some example.

  • ayyaz
    which among following is price at which i can buy or sell stocks
    double lastTradedPrice = ticks.get(i).getLastTradedPrice();
    double close=ticks.get(i).getClosePrice();

    please let me know fast which one is buy and sell price considered
  • sujith
    Hi,
    A close price in Kite Ticker corresponds to the previous day's close price.
    The last traded price is the price at which last trade has happened which denotes that the latest trade took place at this price.
  • ayyaz
    if i want to sell or buy a stock which is latest one , last trade i beleive same is shown in zerodha dashboard ,
  • ayyaz
    if i want sell or buy which price should i consider , can it be last traded price ?
  • sujith
    Yes, you can use last traded price. It is the same value displayed on all our platforms.
  • ayyaz
    so based on discussion , i am again confirming last traded value can be used for selling or buy stocks
  • ayyaz
    please confirm
  • sujith
    A last traded price is the price at which last trade has happened.
  • ayyaz
    How can I get market depth? I mean offers and bidders in Java client I would appreciate a clear example as I used example from git UT for some reason not able to fetch
Sign In or Register to comment.