-
Notifications
You must be signed in to change notification settings - Fork 17
/
qifi.proto
150 lines (139 loc) · 3.41 KB
/
qifi.proto
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
syntax = "proto3";
message Account {
string user_id = 1;
string currency = 2;
float pre_balance = 3;
float deposit =4;
float withdraw =5;
float WithdrawQuota =6;
float close_profit =7;
float commission =8;
float premium =9;
float static_balance =10;
float position_profit =11;
float float_profit =12;
float balance =13;
float margin =14;
float frozen_margin =15;
float frozen_commission=16;
float frozen_premium =17;
float available =18;
float risk_ratio =19;
}
message Trade {
int32 seqno=1;
string user_id=2;
string trade_id = 3;
string exchange_id =4;
string instrument_id=5;
string order_id=6;
string exchange_trade_id=7;
string direction=8;
float offset=9;
float volume=10;
float price=11;
int64 trade_date_time=12;
}
message Order {
int32 seqno=1;
string user_id=2;
string order_id=3;
string exchange_id=4;
string instrument_id=5;
string direction=6;
string offset=7;
float volume_orign=8;
string price_type=9;
float limit_price=10;
string time_condition=11;
string volume_condition=12;
int64 insert_date_time=13;
string exchange_order_id=14;
string status=15;
float volume_left=16;
string last_msg=17;
}
message Position{
string user_id=1;
string exchange_id=2;
string instrument_id=3;
float volume_long_today=4;
float volume_long_his=5;
float volume_long =6;
float volume_long_frozen_today=7;
float volume_long_frozen_his=8;
float volume_long_frozen=9;
float volume_short_today=10;
float volume_short_his=11;
float volume_short=12;
float volume_short_frozen_today=13;
float volume_short_frozen_his=14;
float volume_short_frozen=15;
float volume_long_yd=16;
float volume_short_yd=17;
float pos_long_his= 18;
float pos_long_today=19;
float pos_short_his=20;
float pos_short_today=21;
float open_price_long =22;
float open_price_short =23;
float open_cost_long=24;
float open_cost_short=25;
float position_price_long=26;
float position_price_short=27;
float position_cost_long=28;
float position_cost_short=29;
float last_price=30;
float float_profit_long=31;
float float_profit_short=32;
float float_profit=33;
float position_profit_long=34;
float position_profit_short=35;
float position_profit=36;
float margin_long=37;
float margin_short=38;
float margin=39;
}
message Transfer{
int64 datetime=1;
string currency=2;
float amount=3;
int32 error_id=4;
string error_msg=5;
}
message Bank{
string id = 1;
string name =2 ;
string bank_account =3;
float fetch_amount =4;
}
message QIFI{
string databaseip=1;
string account_cookie=2;
string password =3;
string portfolio=4;
string broker_name=5;
string capital_password=6;
string bank_password =7;
string bankid=8;
string investor_name=9;
float money=10;
string pub_host=11;
map<string, string> settlement=12;
string taskid=13;
string trade_host=14;
string updatetime=15;
string wsuri=16;
string bankname=17;
string trading_day=18;
int32 status=19;
Account accounts=20;
map<string, Bank> banks=21;
map<string, string> event=22;
map<string, Order> orders=23;
map<string, Position> positons=24;
map<string, Trade> trades=25;
map<string, Transfer> transfers=26;
int32 ping_gap=27;
string eventmq_ip = 28;
}