How can I get the top 20 most liquid F&O stocks from NSE?

I have updated my existing NSEPython but still got this error.

NameError: name ‘nse_most_active’ is not defined

How to import the function from NSEpython?

Update again following - https://aeron7.github.io/nsepython/

Oh God. Go through - Coding a Algo Trading Bot: BankNIFTY Golden Ratio Strategy - Unofficed

Run -

from nsepython import *

print(nse_most_active())

It’s working after restarting the system.

But it is giving most active NSE stocks, not most active F&O stocks.

Hire a coder.

NFO is subset of NSE.

Already told how to do it.

I can code it myself, in fact, without using this function from the option chain scrapper. Asking if that ready-made function is available because coding is not my primary job but I know how to do that. Thanks for your suggestion anyway.

Before You started replying like oversmart golden assface, acknowledge the fact that coding is not my primary fucking job either.

Despite that, I coded a function because you were seeking something and using that function it can be done. From option chain scrapper You will code most active “stonks”? Where will futures’ data will go? I am sure You’re fucked in coding! Because that needs common sense.

Now code it yourself!

1 Like

How can I get the top 20 most liquid F&O stocks from NSE?

nse_most_active() Function

There are two ways -

  • Most Active Securities by Volume
  • Most Active Securities by Values

If You want the first type print(nse_most_active())

Make sure You have upgraded NSEPython to the latest version. Now cross-reference that output’s instruments with FNOs. The output is in pandas. It is easy to cross-reference a Pandas Column against a List of FNO Symbols

The full function is -

nse_most_active(type="securities",sort="value")

Here are the types -

type = "securities" (default)
type = "etf"
type = "sme"

sort = "volume"
sort = "value" (default)