iexcloud_exporter

command module
v0.0.0-...-1e59015 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 20 Imported by: 0

README

IEX Cloud Prometheus Exporter

Docker Pulls Go Report Card GitHub Actions

Export Stock data, provided by IEX Cloud to Prometheus

Supported metric groups

  • Price
  • Dividents
  • Keystats

Build and run locally:

make
./iexcloud_exporter [flags]

Flags

Name Default Description Required
--web.listen-address :9107 Address to listen on for web interface and telemetry No
--web.telemetry-path /metrics Path under which to expose metrics No
--kv.prefix "" Prefix from which to expose key/value pairs No
--kv.filter .* Regex that determines which keys to expose No
--iexcloud.api_token None API Token for IEX Cloud account Yes
--iexcloud.endpoint sandbox.iexapis.com IEX Cloud API endpoint No
--iexcloud.api_version stable IEX Cloud API version No
--iexcloud.config $(pwd)/config.json Config path Yes

Config

Config file is in json format, which consists of json array of metric groups (according to IEX Cloud API specs) with input parameters. Example:

{
  "metrics": [
    {
      "price": {
        "symbols": [
          "aapl"
        ]
      }
    },
    {
      "dividends": {
        "symbols": [
          "aapl"
        ],
        "range": [
          "1y"
        ]
      }
    },
    {
      "keystats": {
        "symbols": [
          "aapl"
        ]
      }
    }
  ]
}

Current stock price

Parameters
Parameters Description
symbols List of symbols
Metrics
Metric Labels Description
iexcloud_price symbol Current stock price

Dividends for the given stock symbol and the given date range

Parameters
Parameters Description Example
symbols List of symbols AAPL
range Date range 1y

Date ranges format can be found in API documentation

Metrics
Metric Description
iexcloud_dividends Dividends
Labels
Label Format Description
declaredDate Date Dividend declaration date
declaredDate Date Dividend ex-date
paymentDate Date Dividend payment date
paymentDate Date Dividend payment date
range String Date range
recordDate Date Dividend record date
symbol String Stock symbol

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL