-
Notifications
You must be signed in to change notification settings - Fork 6
/
definitions.hpp.in
81 lines (76 loc) · 1.95 KB
/
definitions.hpp.in
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef BINANCE_DEFINITIONS_HPP
#define BINANCE_DEFINITIONS_HPP
#include <string>
constexpr auto BINANCE_DEFAULT_URL = "https://fapi.binance.com";
constexpr auto BINANCE_WS_HOST = "fstream.binance.com";
#define BINANCE_FUTURES_VERSION "@binance_futures_VERSION@"
#define BINANCE_VERSION_STRING "binance-futures-sdk/@binance_futures_VERSION@"
namespace binance
{
std::string order_side_string[] = {"BUY", "SELL"};
enum order_side
{
BUY = 0,
SELL = 1,
};
std::string order_status_string[] = {"NEW", "PARTIALLY_FILLED", "FILLED",
"CANCELED", "REJECTED", "EXPIRED"};
enum order_status
{
NEW = 0,
PARTIALLY_FILLED = 1,
FILLED = 2,
CANCELED = 3,
REJECTED = 4,
EXPIRED = 5
};
std::string order_type_string[] = {"LIMIT",
"MARKET",
"STOP",
"STOP_MARKET",
"TAKE_PROFIT",
"TAKE_PROFIT_MARKET",
"TRAILING_STOP_MARKET"};
enum order_type
{
LIMIT = 0,
MARKET = 1,
STOP = 2,
STOP_MARKET = 3,
TAKE_PROFIT = 4,
TAKE_PROFIT_MARKET = 5,
TRAILING_STOP_MARKET = 6
};
std::string position_side_string[] = {"BOTH", "LONG", "SHORT"};
enum position_side
{
BOTH = 0,
LONG = 1,
SHORT = 2
};
std::string time_in_force_string[] = {"GTC", "IOC", "FOK", "GTX"};
enum time_in_force
{
// Good Till Cancel
GTC = 0,
// Immediate or Cancel
IOC = 1,
// Fill or Kill
FOK = 2,
// Good Till Crossing (Post only)
GTX = 3
};
std::string working_type_string[] = {"MARK_PRICE", "CONTRACT_PRICE"};
enum working_type
{
MARK_PRICE = 0,
CONTRACT_PRICE = 1
};
std::string response_type_string[] = {"ACK", "RESULT"};
enum response_type
{
ACK = 0,
RESULT = 1
};
} // namespace binance
#endif