Fetching options chain using ibrokers

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fetching options chain using ibrokers

amol gupta
Hi

I need help to fetch option chain and pricing for active(+-1/2/3 sigma) for
an index. It would be nice if you could show this with an example. Here
<https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y>
is
the link for looking up the contract at interactive brokers

Here is what I have tried
________________________________________________
> c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency = "INR")
> d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
Warning messages:
1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
  Connectivity between IB and Trader Workstation has been lost.
2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
  No security definition has been found for the request
3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
  error in contract details
____________________________________________________

Since I want to fetch a chain there is no local name.

--
Regards
Amol
+91-9897860992

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Fetching options chain using ibrokers

amol gupta
Someone, please help.

On Wed, Sep 19, 2018 at 6:45 PM amol gupta <[hidden email]> wrote:

> Hi
>
> I need help to fetch option chain and pricing for active(+-1/2/3 sigma)
> for an index. It would be nice if you could show this with an example.
> Here
> <https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y> is
> the link for looking up the contract at interactive brokers
>
> Here is what I have tried
> ________________________________________________
> > c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency = "INR")
> > d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
> Warning messages:
> 1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
>   Connectivity between IB and Trader Workstation has been lost.
> 2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
>   No security definition has been found for the request
> 3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
>   error in contract details
> ____________________________________________________
>
> Since I want to fetch a chain there is no local name.
>
> --
> Regards
> Amol
> +91-9897860992
>
>

--
Regards
Amol
+91-9897860992

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Fetching options chain using ibrokers

prof.amit.mittal
Available on r-bloggers.org using jsonlite and quant.stackexchange

Nse/Nifty does not share the data freely unless you want to crawl every few
months to collate the data. Available data is anyway able in CSV and should
not be a problem for R

On Wed 26 Sep, 2018, 11:52 amol gupta, <[hidden email]> wrote:

> Someone, please help.
>
> On Wed, Sep 19, 2018 at 6:45 PM amol gupta <[hidden email]> wrote:
>
> > Hi
> >
> > I need help to fetch option chain and pricing for active(+-1/2/3 sigma)
> > for an index. It would be nice if you could show this with an example.
> > Here
> > <
> https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y>
> is
> > the link for looking up the contract at interactive brokers
> >
> > Here is what I have tried
> > ________________________________________________
> > > c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency = "INR")
> > > d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
> > Warning messages:
> > 1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> >   Connectivity between IB and Trader Workstation has been lost.
> > 2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> >   No security definition has been found for the request
> > 3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
> >   error in contract details
> > ____________________________________________________
> >
> > Since I want to fetch a chain there is no local name.
> >
> > --
> > Regards
> > Amol
> > +91-9897860992
> >
> >
>
> --
> Regards
> Amol
> +91-9897860992
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
--

______________________________

Amit Mittal
Pursuing Ph.D. in Finance and Accounting
Indian Institute of Management, Lucknow
Visit my SSRN author page:
http://ssrn.com/author=2665511
* Top 10% Downloaded Author on SSRN
Mob: +91 7525023664

This message has been sent from a mobile device. I may contact you again.

_________________

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Fetching options chain using ibrokers

Ganesh Sonawane
Hi,

Have you tried scraping the page ? Because as said by Amit, NSE is not
sharing free data in .csv or xlsx format.

I am not sure by scraping the page you will get the data but you may try.

Regards
Ganesh S.


On Wed, Sep 26, 2018, 4:10 PM Amit Mittal <[hidden email]>
wrote:

> Available on r-bloggers.org using jsonlite and quant.stackexchange
>
> Nse/Nifty does not share the data freely unless you want to crawl every few
> months to collate the data. Available data is anyway able in CSV and should
> not be a problem for R
>
> On Wed 26 Sep, 2018, 11:52 amol gupta, <[hidden email]> wrote:
>
> > Someone, please help.
> >
> > On Wed, Sep 19, 2018 at 6:45 PM amol gupta <[hidden email]>
> wrote:
> >
> > > Hi
> > >
> > > I need help to fetch option chain and pricing for active(+-1/2/3 sigma)
> > > for an index. It would be nice if you could show this with an example.
> > > Here
> > > <
> >
> https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y
> >
> > is
> > > the link for looking up the contract at interactive brokers
> > >
> > > Here is what I have tried
> > > ________________________________________________
> > > > c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency =
> "INR")
> > > > d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
> > > Warning messages:
> > > 1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> > >   Connectivity between IB and Trader Workstation has been lost.
> > > 2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> > >   No security definition has been found for the request
> > > 3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
> > >   error in contract details
> > > ____________________________________________________
> > >
> > > Since I want to fetch a chain there is no local name.
> > >
> > > --
> > > Regards
> > > Amol
> > > +91-9897860992
> > >
> > >
> >
> > --
> > Regards
> > Amol
> > +91-9897860992
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> >
> --
>
> ______________________________
>
> Amit Mittal
> Pursuing Ph.D. in Finance and Accounting
> Indian Institute of Management, Lucknow
> Visit my SSRN author page:
> http://ssrn.com/author=2665511
> * Top 10% Downloaded Author on SSRN
> Mob: +91 7525023664
>
> This message has been sent from a mobile device. I may contact you again.
>
> _________________
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Fetching options chain using ibrokers

amol gupta
I am inclined to use ibrokers. Is that possible?

On Wed, Sep 26, 2018, 5:07 PM Ganesh Sonawane <[hidden email]>
wrote:

> Hi,
>
> Have you tried scraping the page ? Because as said by Amit, NSE is not
> sharing free data in .csv or xlsx format.
>
> I am not sure by scraping the page you will get the data but you may try.
>
> Regards
> Ganesh S.
>
>
> On Wed, Sep 26, 2018, 4:10 PM Amit Mittal <[hidden email]>
> wrote:
>
> > Available on r-bloggers.org using jsonlite and quant.stackexchange
> >
> > Nse/Nifty does not share the data freely unless you want to crawl every
> few
> > months to collate the data. Available data is anyway able in CSV and
> should
> > not be a problem for R
> >
> > On Wed 26 Sep, 2018, 11:52 amol gupta, <[hidden email]> wrote:
> >
> > > Someone, please help.
> > >
> > > On Wed, Sep 19, 2018 at 6:45 PM amol gupta <[hidden email]>
> > wrote:
> > >
> > > > Hi
> > > >
> > > > I need help to fetch option chain and pricing for active(+-1/2/3
> sigma)
> > > > for an index. It would be nice if you could show this with an
> example.
> > > > Here
> > > > <
> > >
> >
> https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y
> > >
> > > is
> > > > the link for looking up the contract at interactive brokers
> > > >
> > > > Here is what I have tried
> > > > ________________________________________________
> > > > > c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency =
> > "INR")
> > > > > d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
> > > > Warning messages:
> > > > 1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> > > >   Connectivity between IB and Trader Workstation has been lost.
> > > > 2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
> > > >   No security definition has been found for the request
> > > > 3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
> > > >   error in contract details
> > > > ____________________________________________________
> > > >
> > > > Since I want to fetch a chain there is no local name.
> > > >
> > > > --
> > > > Regards
> > > > Amol
> > > > +91-9897860992
> > > >
> > > >
> > >
> > > --
> > > Regards
> > > Amol
> > > +91-9897860992
> > >
> > >         [[alternative HTML version deleted]]
> > >
> > > _______________________________________________
> > > [hidden email] mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > > -- Subscriber-posting only. If you want to post, subscribe first.
> > > -- Also note that this is not the r-help list where general R questions
> > > should go.
> > >
> > --
> >
> > ______________________________
> >
> > Amit Mittal
> > Pursuing Ph.D. in Finance and Accounting
> > Indian Institute of Management, Lucknow
> > Visit my SSRN author page:
> > http://ssrn.com/author=2665511
> > * Top 10% Downloaded Author on SSRN
> > Mob: +91 7525023664
> >
> > This message has been sent from a mobile device. I may contact you again.
> >
> > _________________
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Fetching options chain using ibrokers

Ganesh Sonawane
I don't think so.

On Wed, Sep 26, 2018, 11:04 PM amol gupta <[hidden email]> wrote:

> I am inclined to use ibrokers. Is that possible?
>
> On Wed, Sep 26, 2018, 5:07 PM Ganesh Sonawane <[hidden email]>
> wrote:
>
>> Hi,
>>
>> Have you tried scraping the page ? Because as said by Amit, NSE is not
>> sharing free data in .csv or xlsx format.
>>
>> I am not sure by scraping the page you will get the data but you may try.
>>
>> Regards
>> Ganesh S.
>>
>>
>> On Wed, Sep 26, 2018, 4:10 PM Amit Mittal <[hidden email]>
>> wrote:
>>
>> > Available on r-bloggers.org using jsonlite and quant.stackexchange
>> >
>> > Nse/Nifty does not share the data freely unless you want to crawl every
>> few
>> > months to collate the data. Available data is anyway able in CSV and
>> should
>> > not be a problem for R
>> >
>> > On Wed 26 Sep, 2018, 11:52 amol gupta, <[hidden email]> wrote:
>> >
>> > > Someone, please help.
>> > >
>> > > On Wed, Sep 19, 2018 at 6:45 PM amol gupta <[hidden email]>
>> > wrote:
>> > >
>> > > > Hi
>> > > >
>> > > > I need help to fetch option chain and pricing for active(+-1/2/3
>> sigma)
>> > > > for an index. It would be nice if you could show this with an
>> example.
>> > > > Here
>> > > > <
>> > >
>> >
>> https://pennies.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Advanced%20Search&entityId=a31749936&lang=en&wlId=IB&showEntities=Y
>> > >
>> > > is
>> > > > the link for looking up the contract at interactive brokers
>> > > >
>> > > > Here is what I have tried
>> > > > ________________________________________________
>> > > > > c<-twsOPT(local="",symbol = "NIFTY50", exch = "NSE", currency =
>> > "INR")
>> > > > > d<-reqContractDetails(conn = tws, Contract = c, verbose = TRUE )
>> > > > Warning messages:
>> > > > 1: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,
>> :
>> > > >   Connectivity between IB and Trader Workstation has been lost.
>> > > > 2: In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,
>> :
>> > > >   No security definition has been found for the request
>> > > > 3: In reqContractDetails(conn = tws, Contract = c, verbose = TRUE) :
>> > > >   error in contract details
>> > > > ____________________________________________________
>> > > >
>> > > > Since I want to fetch a chain there is no local name.
>> > > >
>> > > > --
>> > > > Regards
>> > > > Amol
>> > > > +91-9897860992
>> > > >
>> > > >
>> > >
>> > > --
>> > > Regards
>> > > Amol
>> > > +91-9897860992
>> > >
>> > >         [[alternative HTML version deleted]]
>> > >
>> > > _______________________________________________
>> > > [hidden email] mailing list
>> > > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > > -- Subscriber-posting only. If you want to post, subscribe first.
>> > > -- Also note that this is not the r-help list where general R
>> questions
>> > > should go.
>> > >
>> > --
>> >
>> > ______________________________
>> >
>> > Amit Mittal
>> > Pursuing Ph.D. in Finance and Accounting
>> > Indian Institute of Management, Lucknow
>> > Visit my SSRN author page:
>> > http://ssrn.com/author=2665511
>> > * Top 10% Downloaded Author on SSRN
>> > Mob: +91 7525023664
>> >
>> > This message has been sent from a mobile device. I may contact you
>> again.
>> >
>> > _________________
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > [hidden email] mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> > should go.
>> >
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.