marcopaganini / quotes-exporter

Quotes exporter for prometheus (Supports stocks, ETFs and funds)
9 stars 3 forks source link

Export volume metrics #2

Closed umatare5 closed 3 years ago

umatare5 commented 3 years ago

Hi @marcopaganini

This PR allows to export the volume.

Summary

$ ./quotes-exporter --help
Usage of ./quotes-exporter:
  -port int
        Port to listen for HTTP requests. (default 9340)
  -quote.volume
        Exports volume.
& curl -sS 'http://localhost:9340/price?symbols=AMZN,GOOG,SNAP' | grep quotes_exporter_volume
# HELP quotes_exporter_volume Asset Volume.
# TYPE quotes_exporter_volume gauge
quotes_exporter_volume{name="Alphabet Inc.",symbol="GOOG"} 1.648353e+06
quotes_exporter_volume{name="Amazon.com, Inc.",symbol="AMZN"} 5.7799e+06
quotes_exporter_volume{name="Snap Inc.",symbol="SNAP"} 2.1831525e+07
umatare5 commented 3 years ago

Thank you for your reviewing.

I fixed them. Please check it when you have a time.

marcopaganini commented 3 years ago

Merged. Thanks for the contribution!

umatare5 commented 3 years ago

Likewise!