Special offer: 50% discount ($1440) for ODataDB Enterprise until May 31, 2024
Knowledge Base | How to Load Option Chains from Google Finance to Databases

How to Load Option Chains from Google Finance to Databases

Google Finance allows viewing option chain data online but has no download links.

So available solutions load and parse option chain JSON data from the Google Finance website.

You can try a ready-to-use solution described below to solve this task.

RTD.DB allows using Microsoft SQL Server, SQL Server Compact, Oracle Database, IBM DB2, MySQL, PostgreSQL, and NuoDB.

The download package includes SQL codes and batch files to create ready-to-use databases in a couple of minutes.

Loading Option Chains to Databases Using RTD.DB

You can install RTD.DB using a standalone setup package:

  1. Download and install RTD.DB.
  2. Run RTD.DB using the link from 'Start,  All Programs, Gartle, RTD.DB'.

You will see the following application screen:

RTD.DB Screenshot

RTD.DB will start updating the preconfigured local Microsoft SQL Server Compact database with data from Yahoo Finance for currencies, stocks, and options.

For example, you can see the OptionDayHistoryYahoo row.

Click the Stop button.

Further, you have to make the following steps:

  1. Create an RTD database on your server.
  2. Configure a connection to your server.
  3. Configure updated database tables.
  4. Configure a list of option contracts to refresh.

Creating RTD Database


  1. Open the folder of the unzipped download package.
  2. Open the RTD Database folder and open a folder for the target database platform.
  3. Run the 1-edit-config.cmd batch file and edit the connection strings to your database server.
  4. Run the 2-create-database.cmd batch file.
  5. Run the 3-rtd-setup.cmd batch file.
  6. Run the 4-rtd-list.cmd batch file.
  7. Run the 5-rtd-grant.cmd batch file.

As a result, you will have the RTD database on your target server.

If the files have other names, please, read the readme.txt in the setup folder.

Configuring Connections


  1. Run RTD.DB if it is not started.
  2. Click the Connections button.
  3. Edit and enable the connection string to your server and disable the default SQL Server Compact database.
  4. Click the Save button and close the application.
  5. Click the RTD.DB Stop button and then click the Start button.

Here is a screenshot of the gConnectionManager application used for editing connecting strings.

Configuring RTD.DB connections using gConnectionManager

Configuring Updated Database Tables

The RTD database contains preconfigured tables for loading various data from various data sources with various time frames.

Steps to activate or deactivate loading data:

  1. Open the RTD database in your database manager.
  2. Open the rtd.RealTimeTables (rtd.real_time_tables) table in edit mode.
  3. Set 1 into the IS_DISABLED column to disable loading and set the value to NULL to enable loading.
  4. Save changes.
  5. Click the RTD.DB Stop button and then click the Start button.

Here is an example of the table for Microsoft SQL Server: 

RTD.DB Configuration Table for Microsoft SQL Server

See RTD.DB Database Configuration about configuration tables.

Editing Configuration Tables in Microsoft Excel

You can use Microsoft Excel to edit configuration tables if you have SaveToDB add-in installed.

Preparation steps:

  1. Open Microsoft Excel.
  2. Open the RTD Workbooks folder in the downloaded package.
  3. Open the workbook for your target server. For example, rtd-mysql.xlsx for MySQL.
  4. Open the SaveToDB tab, click Wizards menu, Change Connection Wizard.
  5. Specify a server, a database, and database credentials for your database. Click Next.
  6. Click Finish to change connections for the selected tables.
  7. Save the workbook to your location.

Configuration steps:

  1. Open the prepared workbook connected to your database.
  2. Open the RealTimeTables worksheet.
  3. Open the SaveToDB tab and click the Reload button.
  4. Set 1 into the IS_DISABLED column to disable loading and clear the value to enable loading.
  5. Open the SaveToDB tab and click the Save button.

Configuring List of Option Contracts to Refresh

As you can see above, option tables for Google Finance are configured with the following code in the LOAD_CODE field:

SELECT Code FROM rtd.OptionListGoogle

You can change this SQL code for loading option codes from your existing table.

Or you can use the preconfigured rtd.OptionListGoogle table.

The rtd.OptionListGoogle table contains test option codes:

Option list for loading from Google Finance

You can insert required option codes into the table using any available method.

Note that you can use the workbook prepared in the previous step.
Copy the OptionListYahoo worksheet to a new one, rename it to OptionListGoogle, click SaveToDB, Wizards, Data Connection Wizard, and connect to the rtd.OptionListGoogle table.

Note that you have to remove expired option codes from the table also.

Different editions of RTD.DB have different limits for a number of updated option codes.

The Personal edition ($100) allows updating option codes for up to 1000 stocks.

See RTD.DB Edition Comparison for details.

Getting Option Codes

RTD.DB loads option data for specified option codes. It does not load entire option chains automatically.


Products for Traders and Investors
The app saves data from trading platforms like Thinkorswim to databases
Version: 5.25 | 04/30/2024 | 12.8MB | Getting Started | What's New | Edition Comparison


Google Finance is a logo and registered trademark of Google Inc.