#stock #finance #refresh-token #api #api-server #default-config #questrade

nightly app qtmon

An async monitor for the Questrade api, with its own small API server for your own projects

2 releases

0.1.1 Nov 23, 2020
0.1.0 Nov 23, 2020

#936 in HTTP server

26 downloads per month

MIT license

86KB
2K SLoC

qtmon

Version: 0.1.1

Installation

The project has been uploaded to crates.io and can be downloaded with:

# Default encoding (RON).
cargo install qtmon
# Yaml encoding.
cargo install qtmon --no-default-features --features yaml
# Bincode encoding.
cargo install qtmon --no-default-features --features bincode

Configuration

Instructions on configuration of the application can be found here.

Usage

The program uses Rusty-Object-Notation or RON for it's default data storage. You may optionally enable a Yaml or Bincode encoding by disabling default and including either feature.

The default config location is $XDGCONFIGDIR/qtmon/config.ron or $HOME/.config/qtmon/config.ron and you can override it with the -c option. By default the program will generate a default config file the first time it is run. To connect the first time you will need to provide a Questrade API Refresh Token as the -r arguement to the program. Instructions on enabling the API for your account and generating a new token can be found here.

Once you've run the program once with your initial token it should be able to manage authentication from there. All you need to do is query your localhost at the port you selected in your config to get the up-to-date details on your account.

API

Documentation for the REST API can be found here.

TODO

  • Go back and comment throughout the project, most specifically in the storage module.
  • Add examples to the REST Api README.

DONE

  • Add statusbar api.
  • REST Api to actually get info.
  • Add license. Probably just MIT.
  • Fill out config README more completely.
  • Fill out general README more completely.
  • Fill out REST Api README more completely.
  • Fix the way that Config loading parses non-root paths provided.
  • Add a string encoded default config to produce on first run if needed.
  • Split storage module into seperate modules, file is over 400 lines of code..
  • Review dependencies to see if there is anything I can strip off of the dependency chart.
  • Implement real event loop with error handling so all these Results I'm making are useful.

Author

By: Curtis Jones <mail@curtisjones.ca>

Dependencies

~18–32MB
~521K SLoC