Finance + Steampipe
Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.
Financial data is queried from multiple sources including Yahoo Finance, US SEC Edgar and the IEX Cloudservice.
For example:
select symbol, short_name, regular_market_price, regular_market_change_percent, regular_market_timefrom finance_quotewhere symbol in ('GME', 'BTC-USD', 'DOGE-USD', 'ETH-USD');
+----------+----------------------+----------------------+-------------------------------+---------------------+| symbol | short_name | regular_market_price | regular_market_change_percent | regular_market_time |+----------+----------------------+----------------------+-------------------------------+---------------------+| GME | GameStop Corporation | 168.74 | -0.05330589 | 2021-05-20 13:51:33 || BTC-USD | Bitcoin USD | 41959.867 | 18.85597 | 2021-05-20 13:51:02 || DOGE-USD | Dogecoin USD | 0.41606605 | 16.540815 | 2021-05-20 13:51:03 || ETH-USD | Ethereum USD | 2917.209 | 20.443544 | 2021-05-20 13:51:02 |+----------+----------------------+----------------------+-------------------------------+---------------------+
Documentation
Get started
Install
Download and install the latest Finance plugin:
steampipe plugin install finance
Configuration
Installing the latest finance plugin will create a config file (~/.steampipe/config/finance.spc
) with a single connection named finance
:
connection "finance" { plugin = "finance"
iex_api_token = "pk_3746625324373hrf7fa44d2983d34e"}
iex_api_token
(Optional) - An additional header name and it's corresponding value to be sent to the server. If the header name is configured, the value must not be empty.
Get involved
- Open source: https://github.com/turbot/steampipe-plugin-finance
- Community: Join #steampipe on Slack →
Postgres FDW
This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- finance
The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.
To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.
CREATE EXTENSION IF NOT EXISTS steampipe_postgres_finance;CREATE SERVER steampipe_finance FOREIGN DATA WRAPPER steampipe_postgres_finance OPTIONS (config '<your_config>');CREATE SCHEMA finance;IMPORT FOREIGN SCHEMA finance FROM SERVER steampipe_finance INTO finance;
SQLite Extension
This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- finance
The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.
To configure the SQLite extension, load the extension module and then run the steampipe_configure_finance
function to configure it with plugin-specific options.
$ sqlite3sqlite> .load ./steampipe_sqlite_extension_finance.sosqlite> select steampipe_configure_finance('<your_config>');
Export
This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- finance
You can pass the configuration to the command with the --config
argument:
steampipe_export_finance --config '<your_config>' <table_name>