Bookmap L0 API connection for Zerodha Kite

Custom indicators, trading strategies, data export and recording and more...
swetha
Posts: 4
Joined: Wed Mar 25, 2020 10:05 am

Re: Bookmap L0 API connection for Zerodha Kite

Post by swetha » Tue Mar 31, 2020 7:06 am

Hi Trademaniac,
Please let me know this works - will other Indian traders be able to access your adaptor? I am really interested in using orderflow visualisation for my trades. Please let me know how we can proceed. I am absolutely okay with paying for your tool.

trademaniac
Posts: 7
Joined: Thu Mar 12, 2020 6:50 pm
Been thanked: 1 time

Re: Bookmap L0 API connection for Zerodha Kite

Post by trademaniac » Wed Apr 01, 2020 3:14 am

swetha wrote:
Tue Mar 31, 2020 7:06 am
Hi Trademaniac,
Please let me know this works - will other Indian traders be able to access your adaptor? I am really interested in using orderflow visualisation for my trades. Please let me know how we can proceed. I am absolutely okay with paying for your tool.
Hi, my code is still under review by BM team. Shall keep you posted once ready. 
 

swetha
Posts: 4
Joined: Wed Mar 25, 2020 10:05 am

Re: Bookmap L0 API connection for Zerodha Kite

Post by swetha » Mon Apr 06, 2020 2:06 pm

Thank you!

trademaniac
Posts: 7
Joined: Thu Mar 12, 2020 6:50 pm
Been thanked: 1 time

Re: Bookmap L0 API connection for Zerodha Kite

Post by trademaniac » Thu Apr 09, 2020 6:47 am

Hi Andrey,

Have a bit of confusion regarding the bestBid and bestAsk.
As far as I understand, the datalistener gets the best bid/ask from the onTrade api call? I seem to be passing the correct values into the listener but the best bid/ask lines look constant frozen in time.

https://imgur.com/fprRzsg

Though the logs are printing the up to date best bid/asks. Can you please enlighten why this is happening?
 

Code: Select all

 
int size = (int) tradeRecord.get(0).getLastTradedQuantity();
int bestBid = (int) Math.ceil(tradeRecord.get(0).getMarketDepth().get("buy").get(0).getPrice()/TICK_SIZE);
int bestAsk = (int) Math.floor(tradeRecord.get(0).getMarketDepth().get("sell").get(0).getPrice()/TICK_SIZE);

if (isBidAggressor) {
dataListeners.forEach(l -> l.onTrade(String.valueOf(tradeRecord.get(0).getInstrumentToken()),
bestAsk, size, new TradeInfo(isOtc, isBidAggressor)));
} else {
dataListeners.forEach(l -> l.onTrade(String.valueOf(tradeRecord.get(0).getInstrumentToken()),
bestBid , size, new TradeInfo(isOtc, isBidAggressor)));

}

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Bookmap L0 API connection for Zerodha Kite

Post by Andry API support » Thu Apr 09, 2020 8:31 am

Hi trademaniac!
Let's distinguish bestBids/bestAsks and prices which trades are performed at.
onTrade(...) method reports a price of execution. Ideally, it is a bestBid/bestAsk but we can not be absolutely sure.

Bookmap fills and updates an instrument orderBook from depth updates (those happen when .onDepth(...) is called). BestBids/bestAsks (green/red lines at the chart) are taken from this orderBook. It looks like the bestBid line is at the top and the bestAsk line is at the bottom of the depth. Something might be going wrong with depth updates. To figure that out you may want to create an OrderBook.class instance then update it with your depth updates and check a bestBid/bestAsk once a, say, 2 sec or so (getBestBidPriceOrNone()/getBestAskPriceOrNone() methods) or check a number of levels above beskAsk/below bestBid...
We would appreciate full-sized screenshots next time.

swetha
Posts: 4
Joined: Wed Mar 25, 2020 10:05 am

Re: Bookmap L0 API connection for Zerodha Kite

Post by swetha » Mon May 18, 2020 2:17 pm

Hi,
Is there any update on the status of the adapter?

Thanks.

Sohammaradi
Posts: 1
Joined: Fri Jul 10, 2020 7:14 pm

Re: Bookmap L0 API connection for Zerodha Kite

Post by Sohammaradi » Fri Jul 10, 2020 7:15 pm

Hi Sir,
Any Update?

TradingPanda
Posts: 1
Joined: Sat Sep 19, 2020 11:12 am

Re: Bookmap L0 API connection for Zerodha Kite

Post by TradingPanda » Sat Sep 19, 2020 11:59 am

Hey,

That's great to see some activity happening there to have Bookmap work for Indian Stocks Market. Being from a coding background and wanting this to happen, I can contribute to this objective. Basically I work on Java so using the same with Kite APIs for my own data analysis program which I started developing during this lockdown. I somewhat used Python too for webscraping NSE website.
We can use any of these tech to develop our wrapper/interface for Bookmap depending on the compatibility and extensibility. Hope to see it in action soon.

Thanks & Regards...

Post Reply