diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2021-05-31 06:11:22 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2021-05-31 06:11:22 -0700 |
commit | 18bde7391efb9c6bd6ea7846891ab5d16276a809 (patch) | |
tree | 237cc152edbdf934ed32e4c8c54c5ce97535e57f /tda.h | |
download | stonks-18bde7391efb9c6bd6ea7846891ab5d16276a809.tar.gz stonks-18bde7391efb9c6bd6ea7846891ab5d16276a809.tar.xz |
A bit messy and missing error handling in some places.
Diffstat (limited to 'tda.h')
-rw-r--r-- | tda.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#ifndef TDA_H +#define TDA_H + +#include "assets.h" +#include "quotes.h" + +extern char *tda_refresh_token; + +struct tda_session { + char *client_id, *account_id, *access_token, *refresh_token; +}; + +struct tda_session *tda_init(const char *, const char *, const char *); +void tda_cleanup(struct tda_session *); +int tda_load_assets(struct tda_session *, struct asset **assets); + +int tda_get_quote_symbols(struct asset **assets, int n, char **bufptr); +int tda_get_quotes(struct tda_session *, const char *, struct quote ***); + +#endif |