-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
parameters.h
55 lines (43 loc) · 1.11 KB
/
parameters.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef PARAMETERS_H
#define PARAMETERS_H
#include <time.h>
#include <string>
#include <vector>
#include <jansson.h>
// this structure contains the exchanges and
// the strategy parameters
struct Parameters {
// exchanges information
std::vector<std::string> exchName;
std::vector<double> fees;
std::vector<bool> hasShort;
std::vector<std::string> tickerUrl;
// strategy parameters
double spreadEntry;
double spreadExit;
unsigned maxLength;
// verbose or non-verbose mode
bool verbose;
// credentials
const char *bitfinexApi;
const char *bitfinexSecret;
const char *okCoinApi;
const char *okCoinSecret;
const char *bitstampClientId;
const char *bitstampApi;
const char *bitstampSecret;
// email
bool sendEmail;
const char *senderAddress;
const char *senderUsername;
const char *senderPassword;
const char *smtpServerAddress;
const char *receiverAddress;
// constructor
Parameters(json_t *root);
// adds a new exchange
void addExchange(std::string n, double f, bool h);
// returns the number of exchange analyzed
unsigned nbExch() const;
};
#endif