[Chicago-talk] Getting quotes from the CBOE

Jay Strauss me at heyjay.com
Fri Jul 10 05:45:18 PDT 2009


Hypothetically speaking, of course, suppose one had the code below.  And
that person was having difficulty retrieving the file that would normally
popup in a download window when using a browser.

When one looks at the $response->content from the bottom of the code it only
contains the HTML from the page.

How would one fix the code and retrieve the download file?

Thanks
Jay

#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTML::Form;
use Data::Dumper;

my $url = 'http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx';
my $browser  = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';
my $symbol = "QQQQ";

my $ua = LWP::UserAgent->new;

$ua->agent($browser);
push @{ $ua->requests_redirectable }, 'POST';

my $response = $ua->get($url);

my @forms = HTML::Form->parse($response);

my $form = $forms[0];

$form->value('ucQuoteTableDownloadCtl:txtTicker' => $symbol);

$response = $ua->request($form->click);


On Mon, Jul 6, 2009 at 10:40 PM, Jay Strauss <me at heyjay.com> wrote:

> Hi,
>
> I want to download equity option data (like price, strike, expiration...)
>
> On the CBOE's web page for delayed quotes they have the following
> disclaimer:
>
> "PLEASE NOTE: IT IS STRICTLY PROHIBITED TO DOWNLOAD DELAYED QUOTE TABLE
> DATA FROM THIS WEB SITE BY USING AUTO-EXTRACTION PROGRAMS/QUERIES AND/OR
> SOFTWARE. CBOE WILL BLOCK IP ADDRESSES OF ALL PARTIES WHO ATTEMPT TO DO SO.
> THIS DATA IS PROPERTY OF THOMSON FINANCIAL/ILX. DOWNLOADING THIS DATA IN ANY
> OTHER WAY THAN BY MANUAL TICKER SYMBOL ENTRY IS STRICTLY PROHIBITED"
>
> Once they put it on the web isn't the data public domain?  Isn't this
> really just scare language?
>
> Thanks
> Jay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20090710/9a0110c4/attachment.html>


More information about the Chicago-talk mailing list