From 18bde7391efb9c6bd6ea7846891ab5d16276a809 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 31 May 2021 06:11:22 -0700 Subject: initial import A bit messy and missing error handling in some places. --- tda.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tda.h (limited to 'tda.h') diff --git a/tda.h b/tda.h new file mode 100644 index 0000000..8a0dcaf --- /dev/null +++ b/tda.h @@ -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 -- cgit v1.2.3-70-g09d2