Unable to find nse_quote_meta API

Unable to find nse_quote_meta API

https://aeron7.github.io/nsepython/

Install the latest version.

Let me know exactly what problem You’re facing

Trying to use bn_info=nse_quote_meta(“BANKNIFTY”,“latest”,“Fut”). Gives me error as below

NameError Traceback (most recent call last)
in
----> 1 bn_info=nse_quote_meta(“BANKNIFTY”,“latest”,“Fut”)

NameError: name ‘nse_quote_meta’ is not defined

Is this API supported by nsepython?

1 Like

Yes. You can see the usage here - NSEPython Documentation - #87 by dexter

You are using the word latest here.

BankNIFTY has weekly expiry. So when you’re doing futures. It is not returning any data.

So, for indexes, You can not use the term latest, try -

print(nse_quote_ltp("BANKNIFTY","24-Jun-2021","Fut"))

Another trick is using Reliance’s latest expiry -

print(nse_quote_ltp("BANKNIFTY",expiry_list("RELIANCE","list")[0],"Fut"))

Reliance’s latest expiry will be BankNIFTY’s monthly expiry.

Please forgive me. I just noticed You were asking about nse_quote_meta and not nse_quote_ltp.

The function was created on the fly when I made content for the course https://www.udemy.com/course/coding-a-algo-trading-bot-banknifty-golden-ratio-strategy/

I just added it back. It will stay added.

Sorry again!

This assholic trick is not needed. It will auto check if anyone asks for BANKNIFTY’s latest Fut’s LTP.

If a human has to think of how to work it out, we must code machine to do the same stupid work.

print(nse_quote_ltp("BANKNIFTY","latest","Fut"))
print(nse_quote_meta("BANKNIFTY","latest","Fut"))

Both works!

Getting this…
`
print(nse_quote_meta(“BANKNIFTY”,“latest”,“Fut”))

NameError                                 Traceback (most recent call last)
<ipython-input-23-496c54b9c3b1> in <module>
----> 1 print(nse_quote_meta("BANKNIFTY","latest","Fut"))

NameError: name 'nse_quote_meta' is not defined

https://aeron7.github.io/nsepython/documentation/#installation

Update NSEPython-

pip install --upgrade nsepython