Guide to using google URL to get options chain data? - google-finance

I'd like to enter a URL into google and get all options chain data for a particular stock. Is there a guide that shows you how to use it, like if I wanted to grab all options that expire in the next year without knowing the individual expiration dates, or if I just wanted a particular strike price? I found another question that gives me the basic outline, but doesn't specify the details:
Finance historical options data (with strikes etc) on google finance API

Here is an example on how to do this using the ImportHTML function, although there is a delay in the data of course.
=importhtml("http://finance.yahoo.com/q/op?s=QQQ&m=2013-12","table",0)

Related

Cloud Data Fusion - Input HTTP Post Body from BQ rows

I am a new cloud data fusion user and have run into a problem I cant find a solution for.
I have a table in BQ with ~150 rows of latitude and longitude points. For each row, I want to pass the lat and lng into an HTTP post request to get a result from TravelTime API. Ultimately I want to have a table with all my original rows with a column with the response for each one/
Where I am stuck is that so far I have only been able to hard-code the body of the post request into the HTPP Source plugin and successfully write the response to a file in gcs. However, I expect the rows will change over time, so I would like to dynamically generate and pass in the POST request body from my BQ data.
Is this possible with data fusion? Is this an advisable approach? Or is there a better way?
As #Albert Shau and #user3750486 agreed in the comments:
There is no out-of-the-box way to pass data from BQ rows dynamically in a POST HTTP request.
A possible workaround is to have an HTTP transform plugin that sits in the middle of the pipeline and can be configured to make calls based on the input data. Then you would have a BQ source followed by that plugin followed by the GCS sink. I think your best bet would be to write a custom transform.
This can be done by following this link that #Albert Shau provided or to do a custom code using GCP's Cloud Function as OP did.
Posting the answer as community wiki for the benefit of the community that might encounter this use case in the future.
Feel free to edit this answer for additional information.

How do I turn on cost controls at user level on BigQuery?

Felipe Hoffa wrote this very helpful guide on how to turn on custom cost control for a project in BigQuery. However, according to the doc, it should be possible to configure custom cost control as user level as well. I really need to do this for my production data warehouse project because I can't let one person's mishap stop all the other users from using the data warehouse. Please help!
Go to console.cloud.google.com > I&AM > Quotas. Then filter by bigquery in the services dropdown. You will find a row like the one bellow:
You are looking to edit the Query usage per day per user. To calculate the number of Bytes you can use a service like: https://convertlive.com/u/convert/terabytes/to/bytes#1

How to create a drill down graph using apache superset?

Is it possible to create a drill down graph with apache superset?
Say for example - population of all countries and onclick of a country, population of all states within that country should be drawn and onclick of state, population of state should be drawn.
Can someone help me with steps/tips to create this using apache superset as I did not find any example/option to create the same.
There is a walkthrough on this from ApacheCon Asia 2022 on youtube - https://www.youtube.com/watch?v=7YnpKLZ1PRM
More than I can summarize here for you
Please see the response of mistercrunch (one of the creators of Apache Superset) below or here: https://github.com/apache/incubator-superset/issues/2890.
Drill down assumes the framework is aware of hierarchies which Superset isn't at the moment. We encourage our users to slice and dice by entering the explore mode, applying filters and altering the "Group By" field which is pretty easy and very flexible. It's an open field instead of a guided flow.
Preset, which uses Apache Superset, has implemented a feature for Drilling to Chart details. You can find more information about it here:
https://docs.preset.io/docs/drilling-to-chart-details
There is also a pull request for a drill down prototype but I don't think it was integrated to Superset, according to the comments.
https://github.com/apache/superset/pull/14688
Including this article link here in case anyone finds it helpful: https://www.tetranyde.com/blog/embedding-superset
It is possible by using custom JavaScript and charts.

Google Finance API Time Period

I am using a C# class to get the prices of a given stock from Google Finance.
The communication between the class and the Web Service is working well.
I am using the following url:
http://www.google.com/finance/historical?output=csv&q=BBAS3
The problem is that the returned prices are only from about 1 year ago.
I need to get all the available prices records.
If I search for stock ticker "BBAS3" in the Google webpage, it shows me a graph that goes until 2003.
As far I could find, there is no official documentation about the API.
I found some more info in this site:
Google's Undocumented Finance API
As it shows, I can use the following parameter:
p - Period. (A number followed by a "d" or "Y", eg. Days or years. Ex: 40Y = 40 years.)
Then I tried (&p=5Y):
http://www.google.com/finance/historical?output=csv&p=5Y&q=BBAS3
But the result was the same.
Does anyone knows another way to achieve what I need?
Google is changed Now.
I've been playing around with the undocumented Google Finance API. It provides intra-day data for the past 10 days and day-granularity data going back for years. Handy!
There are lots of web pages that attempt to describe how this thing works. I've pulled together a bunch of data from them, as well as a few of my own observations. You can watch this thing in action by popping open FireBug while messing about on with the google finance chart. It will make AJAX requests to this API.
Here's an example URL to pull all historical data for GOOG at daily granularity:
http://www.google.com/finance/getprices?q=GOOG&x=NASD&i=86400&p=40Y&f=d,c,v,k,o,h,l&df=cpct&auto=0&ei=Ef6XUYDfCqSTiAKEMg
Visit this Documentation
As You Search is Available at
https://www.google.com/finance/getprices?q=BBAS3&x=BVMF

Retrieving "businesses" with Google Maps API?

This is an example of a Business on Google Maps
It has elements attached such as:
Reviews from various sites (qype, viewlondon, etc...)
Details provided by various sites
Photos and other content
I don't know how to go on about retrieving such Business and associate any items generated on my website.
What I have implemented up to date is a system using geocoding (geopy) which once given an address, it gives back Latitude and Longitude, but such system does not help me with this dilemma.
What you want is this API:
http://code.google.com/apis/ajaxsearch/local.html
Also check this:
http://googleajaxsearchapi.blogspot.com/2007/06/local-search-control-for-maps-api.html
By writing a relay server script you could do things like this, which obtains most of that information with a different layout. I don't know if it's legal to do that.