Jumat, 15 Juni 2018

[smf_addin] Digest Number 4344

3 Messages

Digest #4344
1a
Re: Barcharts Most Active Options Table by "Randy Harmelink" rharmelink
1c
Re: Barcharts Most Active Options Table by "Randy Harmelink" rharmelink

Messages

Thu Jun 14, 2018 11:10 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

I think I've got it working. Try this new ZIP file:

http://ogres-crypt.com/SMF/RCH_Stock_Market_Functions-2.1.2018.06.14.zip

Remember that you should exit EXCEL before updating add-in files.

If the first "Ticker" symbol is "&list=options.mostActive.us", then it will
grab the tickers that belong to that Barchart list class. For example:

=smfGetBarchartPortfolioView("&list=options.mostActive.us","001009",,1)

....would return the ticker symbol and last traded price for the tickers in
that list:

Symbol Last
BAC 29.53
NFLX 393.42
MU 59.26
TWTR 46.54
Let me know how that works for you (or if it doesn't).

It only takes a few seconds in EXCEL for me. When I visit the URL you cited
my browser, it times out as "unresponsive" twice before I finally get a web
page displayed. Apparently the JSON file is retrieved quickly, but their
processing of it takes a lot more time?

On Wed, Jun 13, 2018 at 9:19 PM, a330pete@
​...
wrote:

> I'd like to extract either specific data or the entire table from the
> Barcharts Most Active Options webpage.
>
> https://www.barchart.com/options/most-active?page=all
>
> It appears that the table is dynamically built using a json call.
>
> Is there a method for doing this with an smf function?
>
> Alternatively, there is a csv download link for those with a Barcharts..com
> account, which I have. Is there any method for automating the download of
> this csv table into excel?
>
> Thanks for any advice you can provide.
>
>
>

Thu Jun 14, 2018 11:22 am (PDT) . Posted by:

"Pete Guy" yvrflyguy

Hi Randy,

Thanks for the pointers on where to look for what I'm after.

After a bit of poking around I found that the field names for the options data I wanted are:

totalOptionsVolume, percentCallOptions, percentPutOptions

These fields don't seem to appear on any of the symbol quote pages but are shown on the options.mostActive.us list page.

I played around a bit with your module code for smfGetBarchartPorfolioView_ and was able to modify the aUseWhich(), aFieldName() and aHeading() Dim statements to add these fields with headings of:

Options Volume, % Calls, % Puts

Changing the max number of columns in the Select Case s1 statement from 294 to 297 made room for the extra fields and now all is good and I can pull this data for any symbol using smfGetBarchartPorfolioView.

Thanks,

Peter

________________________________
From: smf_addin@yahoogroups.com <smf_addin@yahoogroups.com> on behalf of Randy Harmelink rharmelink@gmail.com [smf_addin] <smf_addin@yahoogroups.com>
Sent: June 14, 2018 7:52 AM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Barcharts Most Active Options Table

Let me take a look at it. The Barchart API just uses a "&list=" parameter instead of the normal "&symbols=" parameter. I know of a handful of such "&list" items. I think a (minor?) change to the smfGetBarchartPortfolioView() function could process the "&list=" output.

For example, this is the API call that gets the JSON file:

https://core-api.barchart.com/v1/quotes/get?list=options.mostActive.us&fields=symbol%2ClastPrice%2CpriceChange%2CpercentChange%2CopenPrice%2ChighPrice%2ClowPrice%2Cvolume%2CtradeTime%2CdividendExDate%2Cdividend%2CnextEarningsDate%2CweightedAlpha%2CsymbolCode%2CsymbolType%2ChasOptions&meta=field.shortName%2Cfield.type%2Cfield.description&hasOptions=true&raw=1

On Wed, Jun 13, 2018 at 9:19 PM, a330pete@
....
wrote:

I'd like to extract either specific data or the entire table from the Barcharts Most Active Options webpage.

https://www.barchart.com/options/most-active?page=all

It appears that the table is dynamically built using a json call.

Is there a method for doing this with an smf function?

Alternatively, there is a csv download link for those with a Barcharts.com account, which I have. Is there any method for automating the download of this csv table into excel?

Thu Jun 14, 2018 1:14 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Thanks. I wasn't seeing those on my web page because my default custom view
doesn't have those fields.

I added the three new fields as well, so they will be in any future
releases.

In playing around with a few things, I discovered a number of other
Barchart APIs. smfGetBarchartPortfolioView() uses their quotes API, but
there is also an options API, as well as a few other specialized ones
(covered calls, naked puts, etc).

Although Barchart apparently doesn't use option symbols, their options API
can select options using things like base ticker symbol, volatility,
moneyness, date to expiration, and similar items.

I just wish they updated their options data more often than once an hour...

On Thu, Jun 14, 2018 at 11:22 AM, Pete Guy a330pete@
​...
wrote:

>
> Thanks for the pointers on where to look for what I'm after.
>
>
> After a bit of poking around I found that the field names for the options
> data I wanted are:
>
>
> totalOptionsVolume, percentCallOptions, percentPutOptions
>
>
> These fields don't seem to appear on any of the symbol quote pages but are
> shown on the options.mostActive.us list page.
>
>
> I played around a bit with your module code for
> smfGetBarchartPorfolioView_ and was able to modify the aUseWhich(),
> aFieldName() and aHeading() Dim statements to add these fields
> with headings of:
>
>
> Options Volume, % Calls, % Puts
>
>
> Changing the max number of columns in the Select Case s1 statement from
> 294 to 297 made room for the extra fields and now all is good and I can
> pull this data for any symbol using smfGetBarchartPorfolioView.
>
>
>
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar