TradeViaPython / a3_aliceblue

Apache License 2.0
12 stars 4 forks source link

How to subscribe Option Instruments #3

Closed devbbsr123 closed 2 years ago

devbbsr123 commented 2 years ago

Dear Sir,

Ho do I subscribe and unsubscribe options instruments? Like Banknifty 25Aug22 39500 CE for LTP.

Kindly Share the examples.

Thanks

TradeViaPython commented 2 years ago

import datetime

instrument= alice.get_instrument_for_fno("NFO", "BANKNIFTY", is_fut=False, expiry_date=datetime.date(2022, 8, 25), strike=39000, is_CE=True)

alice.subscribe([ instrument ]) alice.unsubscribe([ instrument ])

devbbsr123 commented 2 years ago

Thanks Sir,