-
Notifications
You must be signed in to change notification settings - Fork 0
/
stockMarket.h
30 lines (25 loc) · 997 Bytes
/
stockMarket.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//Inside stockmarket.h
#ifndef STOCKMARKET_H
#define STOCKMARKET_H
#include <Adafruit_ST7735.h>
#include <SparkJson.h>
extern Adafruit_ST7735 tft;
extern float exchange_rate;
extern bool earlyHours;
extern bool afterHours;
extern bool marketOpen;
void initDisplay();
void tftDisplay(int cursorPos, const String& label, const String& value, int textSize, bool isIncreaseValue, bool isWhiteValue);
float fetchFloatData(const char* data, const char* key);
String fetchStringData(const char* data, const char* key);
void fetchExchangeRateData(const char* data);
void fetchPriceData(const char* data);
void fetchMarketStatusData(const char* data);
void handleStockWebhookResponse(const char* event, const char* data);
void handleExchangeRateWebhookResponse(const char* event, const char* data);
void handleMarketStatusWebhookResponse(const char* event, const char* data);
void fetchStockPrice();
void fetchExchangeRate();
void fetchMarketStatus();
void trackingScreen();
#endif // STOCKMARKET_H