Export Stock data, provided by IEX Cloud to Prometheus
- Price
- Dividents
- Keystats
make
./iexcloud_exporter [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 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"
]
}
}
]
}
Parameters | Description |
---|---|
symbols | List of symbols |
Metric | Labels | Description |
---|---|---|
iexcloud_price | symbol | Current stock price |
Parameters | Description | Example |
---|---|---|
symbols | List of symbols | AAPL |
range | Date range | 1y |
Date ranges format can be found in API documentation
Metric | Description |
---|---|
iexcloud_dividends | Dividends |
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 |