-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntrust.h
More file actions
90 lines (78 loc) · 1.79 KB
/
Entrust.h
File metadata and controls
90 lines (78 loc) · 1.79 KB
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
82
83
84
85
86
87
88
89
90
#ifndef ENTRUST_H
#define ENTRUST_H
#include <string>
#include <utility>
const int FORBID_UPDATE = 0;
const int CAN_UPDATE = 1;
typedef std::string String;
struct AmendContext {
String orderId;
double price{};
double ordQty{};
};
class Entrust {
public:
String m_orderId;
String m_clOrdId;
String m_origClOrdId;
String m_msgType;
double m_orderQty;
double m_price;
public:
Entrust(String order_id,
String cl_ord_id,
String orig_cl_ord_id,
String msg_type,
double order_qty,
double price) : m_orderId(std::move(order_id)), m_clOrdId(std::move(cl_ord_id)),
m_origClOrdId(std::move(orig_cl_ord_id)),
m_msgType(std::move(msg_type)), m_orderQty(order_qty), m_price(price) {};
~Entrust() = default;
};
class Order {
public:
int update{0};
String beginString;
String sendCompId;
String targetCompId;
String orderId;
String inMarket;
String onRoad;
String symbol;
double ordQty;
char side;
char ordType;
double price;
String tradingSessionId;
String exchange;
String account;
String securityType;
char positionEffect;
double cumQty = 0;
double leavesQty = 0;
char ordStatus;
public:
Order(/* args */) = default;
~Order() = default;
};
class ClientExecutionReport {
public:
String order_id;
String msg_seq_num;
String symbol;
String side;
double last_px{};
double last_share{};
double cum_qty{};
double leaves_qty{};
String exec_type;
String ord_status;
String text;
String cl_ord_id;
String orig_cl_ord_id;
String exec_id;
public:
ClientExecutionReport(/* args */) = default;
~ClientExecutionReport() = default;
};
#endif