quantillinois / plutus-kite

The data-fetch API for https://kite.trade
GNU General Public License v3.0
0 stars 4 forks source link

Filtering Tokens and QR Decisions #8

Open sumukshashidhar opened 2 years ago

sumukshashidhar commented 2 years ago

When I took a look at the result of the following API endpoint:

https://api.kite.trade/instruments

I realized that there are over a 100,000 instrument_tokens that kite offers. However, due to the large amount of binary data that our socket pulls every second, we'll need to somehow limit these to only tokens that we want to trade, or are profitable, limit streaming duplicate tokens, etc.

Some approaches that I can think of are:

  1. Removing duplicates from exchanges. Some tickers are listed on both exchanges, in this case, we can disregard streaming the data for the BSE and only focus on the NSE.
  2. F&O tickers with expiry dates way into the future.
  3. Perhaps a few illiquid stocks?

Please submit a well documented PR for your approach. You must condense these 100,000 tokens into 3000 tokens or lesser.

@Vaibhav-Sahai @abhinav-chinta.

sumukshashidhar commented 2 years ago

The data that I can see is of the following format:

instrument_token,exchange_token,tradingsymbol,name,last_price,expiry,strike,tick_size,lot_size,instrument_type,segment,exchange
275855110,1077559,EURINR22APRFUT,"EURINR",0,2022-04-27,0,0.0025,1,FUT,BCD-FUT,BCD
278434566,1087635,EURINR22AUGFUT,"EURINR",0,2022-08-26,0,0.0025,1,FUT,BCD-FUT,BCD
256503558,1001967,EURINR22DECFUT,"EURINR",0,2022-12-28,0,0.0025,1,FUT,BCD-FUT,BCD

The URL above has a public API call.

Please do use external data sources to perhaps remove illiquid stocks if need be.

sumukshashidhar commented 2 years ago

It may also be wise to consult the QR decision in this choice process.