hedgequantx 1.8.49 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/bin/cli.js +13 -7
- package/dist/algo/copy-engine.js +3 -0
- package/dist/algo/copy-engine.jsc +0 -0
- package/dist/algo/engine.js +3 -0
- package/dist/algo/engine.jsc +0 -0
- package/dist/algo/market-data-rithmic.js +3 -0
- package/dist/algo/market-data-rithmic.jsc +0 -0
- package/dist/algo/market-data.js +3 -0
- package/dist/algo/market-data.jsc +0 -0
- package/dist/algo/rithmic/connection.js +3 -0
- package/dist/algo/rithmic/connection.jsc +0 -0
- package/dist/algo/rithmic/constants.js +3 -0
- package/dist/algo/rithmic/constants.jsc +0 -0
- package/dist/algo/rithmic/index.js +3 -0
- package/dist/algo/rithmic/index.jsc +0 -0
- package/dist/algo/rithmic/market-data.js +3 -0
- package/dist/algo/rithmic/market-data.jsc +0 -0
- package/dist/algo/rithmic/pnl.js +3 -0
- package/dist/algo/rithmic/pnl.jsc +0 -0
- package/dist/algo/rithmic/pool.js +3 -0
- package/dist/algo/rithmic/pool.jsc +0 -0
- package/dist/algo/rithmic/trading.js +3 -0
- package/dist/algo/rithmic/trading.jsc +0 -0
- package/dist/algo/rithmic-decoder.js +3 -0
- package/dist/algo/rithmic-decoder.jsc +0 -0
- package/dist/algo/strategies/ultra-scalping-v2.js +3 -0
- package/dist/algo/strategies/ultra-scalping-v2.jsc +0 -0
- package/dist/algo/strategies/ultra-scalping.js +3 -0
- package/dist/algo/strategies/ultra-scalping.jsc +0 -0
- package/dist/algo/trading-api-rithmic.js +3 -0
- package/dist/algo/trading-api-rithmic.jsc +0 -0
- package/dist/algo/trading-api.js +3 -0
- package/dist/algo/trading-api.jsc +0 -0
- package/dist/algo/utils/smart-logger.js +3 -0
- package/dist/algo/utils/smart-logger.jsc +0 -0
- package/dist/algo/utils/smart-logs.js +3 -0
- package/dist/algo/utils/smart-logs.jsc +0 -0
- package/package.json +33 -10
- package/protos/rithmic/account_pnl_position_update.proto +59 -0
- package/protos/rithmic/base.proto +7 -0
- package/protos/rithmic/best_bid_offer.proto +39 -0
- package/protos/rithmic/exchange_order_notification.proto +140 -0
- package/protos/rithmic/instrument_pnl_position_update.proto +50 -0
- package/protos/rithmic/last_trade.proto +53 -0
- package/protos/rithmic/request_account_list.proto +20 -0
- package/protos/rithmic/request_cancel_all_orders.proto +15 -0
- package/protos/rithmic/request_front_month_contract.proto +10 -0
- package/protos/rithmic/request_heartbeat.proto +13 -0
- package/protos/rithmic/request_login.proto +28 -0
- package/protos/rithmic/request_login_info.proto +10 -0
- package/protos/rithmic/request_logout.proto +10 -0
- package/protos/rithmic/request_market_data_update.proto +42 -0
- package/protos/rithmic/request_new_order.proto +84 -0
- package/protos/rithmic/request_pnl_position_snapshot.proto +14 -0
- package/protos/rithmic/request_pnl_position_updates.proto +20 -0
- package/protos/rithmic/request_product_codes.proto +9 -0
- package/protos/rithmic/request_rithmic_system_info.proto +8 -0
- package/protos/rithmic/request_show_order_history.proto +16 -0
- package/protos/rithmic/request_show_order_history_dates.proto +10 -0
- package/protos/rithmic/request_show_order_history_summary.proto +14 -0
- package/protos/rithmic/request_show_orders.proto +14 -0
- package/protos/rithmic/request_subscribe_for_order_updates.proto +14 -0
- package/protos/rithmic/request_tick_bar_replay.proto +48 -0
- package/protos/rithmic/request_trade_routes.proto +11 -0
- package/protos/rithmic/response_account_list.proto +18 -0
- package/protos/rithmic/response_front_month_contract.proto +13 -0
- package/protos/rithmic/response_heartbeat.proto +14 -0
- package/protos/rithmic/response_login.proto +18 -0
- package/protos/rithmic/response_login_info.proto +24 -0
- package/protos/rithmic/response_logout.proto +11 -0
- package/protos/rithmic/response_market_data_update.proto +9 -0
- package/protos/rithmic/response_new_order.proto +18 -0
- package/protos/rithmic/response_pnl_position_snapshot.proto +11 -0
- package/protos/rithmic/response_pnl_position_updates.proto +11 -0
- package/protos/rithmic/response_product_codes.proto +12 -0
- package/protos/rithmic/response_rithmic_system_info.proto +12 -0
- package/protos/rithmic/response_show_order_history.proto +11 -0
- package/protos/rithmic/response_show_order_history_dates.proto +13 -0
- package/protos/rithmic/response_show_order_history_summary.proto +11 -0
- package/protos/rithmic/response_show_orders.proto +11 -0
- package/protos/rithmic/response_subscribe_for_order_updates.proto +11 -0
- package/protos/rithmic/response_tick_bar_replay.proto +40 -0
- package/protos/rithmic/response_trade_routes.proto +19 -0
- package/protos/rithmic/rithmic_order_notification.proto +124 -0
- package/src/app.js +136 -89
- package/src/config/index.js +27 -8
- package/src/config/settings.js +155 -0
- package/src/pages/algo/copy-trading.js +293 -200
- package/src/pages/algo/one-account.js +1 -1
- package/src/security/encryption.js +81 -46
- package/src/security/index.js +12 -8
- package/src/security/rateLimit.js +68 -65
- package/src/security/validation.js +93 -79
- package/src/services/hqx-server.js +538 -206
- package/src/services/projectx/index.js +327 -204
- package/src/services/rithmic/index.js +288 -285
- package/src/services/session.js +184 -114
- package/src/services/tradovate/index.js +286 -297
- package/src/utils/http.js +236 -0
- package/src/utils/index.js +11 -2
- package/src/utils/logger.js +64 -33
- package/src/utils/prompts.js +79 -71
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message LastTrade
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
// below enum is just for reference only, not used in this message
|
|
9
|
+
enum PresenceBits {
|
|
10
|
+
LAST_TRADE = 1;
|
|
11
|
+
NET_CHANGE = 2;
|
|
12
|
+
PRECENT_CHANGE = 4;
|
|
13
|
+
VOLUME = 8;
|
|
14
|
+
VWAP = 16;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
enum TransactionType {
|
|
18
|
+
BUY = 1;
|
|
19
|
+
SELL = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
23
|
+
optional string symbol = 110100; // PB_OFFSET + MNM_SYMBOL
|
|
24
|
+
optional string exchange = 110101; // PB_OFFSET + MNM_EXCHANGE
|
|
25
|
+
|
|
26
|
+
optional uint32 presence_bits = 149138; // PB_OFFSET + MNM_PRICING_INDICATOR
|
|
27
|
+
optional uint32 clear_bits = 154571; // PB_OFFSET + MNM_DISPLAY_INDICATOR
|
|
28
|
+
optional bool is_snapshot = 110121; // PB_OFFSET + MNM_UPDATE_TYPE
|
|
29
|
+
|
|
30
|
+
optional double trade_price = 100006; // PB_OFFSET + MNM_TRADE_PRICE
|
|
31
|
+
optional int32 trade_size = 100178; // PB_OFFSET + MNM_TRADE_SIZE
|
|
32
|
+
optional TransactionType aggressor = 112003; // PB_OFFSET + MNM_TRANSACTION_TYPE
|
|
33
|
+
|
|
34
|
+
optional string exchange_order_id = 149238; // PB_OFFSET + MNM_EXCH_ORD_ID
|
|
35
|
+
optional string aggressor_exchange_order_id = 154641; // PB_OFFSET + MNM_AGGRESSOR_EXCH_ORD_ID
|
|
36
|
+
|
|
37
|
+
optional double net_change = 100011; // PB_OFFSET + MNM_NET_CHANGE
|
|
38
|
+
optional double percent_change = 100056; // PB_OFFSET + MNM_PERCENT_CHANGE
|
|
39
|
+
optional uint64 volume = 100032; // PB_OFFSET + MNM_TRADE_VOLUME
|
|
40
|
+
optional double vwap = 101379; // PB_OFFSET + MNM_VWAP
|
|
41
|
+
|
|
42
|
+
optional string trade_time = 100379;
|
|
43
|
+
|
|
44
|
+
optional int32 ssboe = 150100; // PB_OFFSET + MNM_SECONDS_SINCE_BOE
|
|
45
|
+
optional int32 usecs = 150101; // PB_OFFSET + MNM_USECS
|
|
46
|
+
|
|
47
|
+
optional int32 source_ssboe = 150400; // PB_OFFSET + MNM_SOURCE_SSBOE
|
|
48
|
+
optional int32 source_usecs = 150401; // PB_OFFSET + MNM_SOURCE_USECS
|
|
49
|
+
optional int32 source_nsecs = 150404; // PB_OFFSET + MNM_SOURCE_NSECS
|
|
50
|
+
|
|
51
|
+
optional int32 jop_ssboe = 150600; // PB_OFFSET + MNM_JOP_SSBOE
|
|
52
|
+
optional int32 jop_nsecs = 150604; // PB_OFFSET + MNM_JOP_NSECS
|
|
53
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestAccountList
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
enum UserType {
|
|
9
|
+
USER_TYPE_FCM = 1;
|
|
10
|
+
USER_TYPE_IB = 2;
|
|
11
|
+
USER_TYPE_TRADER = 3;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
15
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
16
|
+
|
|
17
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
18
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
19
|
+
optional UserType user_type = 154036; // PB_OFFSET + MNM_USER_TYPE
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestCancelAllOrders
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
// Template ID: 346
|
|
8
|
+
|
|
9
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
10
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
11
|
+
|
|
12
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
13
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
14
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package rti;
|
|
4
|
+
|
|
5
|
+
message RequestFrontMonthContract {
|
|
6
|
+
int32 template_id = 154467; // Template ID = 113
|
|
7
|
+
string symbol = 110100; // Base symbol (e.g., "MNQ", "ES")
|
|
8
|
+
string exchange = 110101; // Exchange (e.g., "CME")
|
|
9
|
+
string user_msg = 132760; // User message for tracking
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestHeartbeat
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
|
|
11
|
+
optional int32 ssboe = 150100; // PB_OFFSET + MNM_SECONDS_SINCE_BOE
|
|
12
|
+
optional int32 usecs = 150101; // PB_OFFSET + MNM_USECS
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestLogin
|
|
5
|
+
{
|
|
6
|
+
enum SysInfraType {
|
|
7
|
+
TICKER_PLANT = 1;
|
|
8
|
+
ORDER_PLANT = 2;
|
|
9
|
+
HISTORY_PLANT = 3;
|
|
10
|
+
PNL_PLANT = 4;
|
|
11
|
+
REPOSITORY_PLANT = 5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
required int32 template_id = 154467;
|
|
15
|
+
optional string template_version = 153634;
|
|
16
|
+
repeated string user_msg = 132760;
|
|
17
|
+
|
|
18
|
+
optional string user = 131003;
|
|
19
|
+
optional string password = 130004;
|
|
20
|
+
optional string app_name = 130002;
|
|
21
|
+
optional string app_version = 131803;
|
|
22
|
+
optional string system_name = 153628;
|
|
23
|
+
optional SysInfraType infra_type = 153621;
|
|
24
|
+
repeated string mac_addr = 144108;
|
|
25
|
+
optional string os_version = 144021;
|
|
26
|
+
optional string os_platform = 144020;
|
|
27
|
+
optional bool aggregated_quotes = 153644; // applicable only for TICKER_PLANT infra_type
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestMarketDataUpdate
|
|
5
|
+
{
|
|
6
|
+
// update bits and Request enum defined here is also referred in request_subscribe_by_underlying.proto
|
|
7
|
+
// make sure both these proto files are always same.
|
|
8
|
+
|
|
9
|
+
// bit constants are defined using enum
|
|
10
|
+
enum UpdateBits {
|
|
11
|
+
LAST_TRADE = 1;
|
|
12
|
+
BBO = 2;
|
|
13
|
+
ORDER_BOOK = 4;
|
|
14
|
+
OPEN = 8;
|
|
15
|
+
OPENING_INDICATOR = 16;
|
|
16
|
+
HIGH_LOW = 32;
|
|
17
|
+
HIGH_BID_LOW_ASK = 64;
|
|
18
|
+
CLOSE = 128;
|
|
19
|
+
CLOSING_INDICATOR = 256;
|
|
20
|
+
SETTLEMENT = 512;
|
|
21
|
+
MARKET_MODE = 1024;
|
|
22
|
+
OPEN_INTEREST = 2048;
|
|
23
|
+
MARGIN_RATE = 4096;
|
|
24
|
+
HIGH_PRICE_LIMIT = 8192;
|
|
25
|
+
LOW_PRICE_LIMIT = 16384;
|
|
26
|
+
PROJECTED_SETTLEMENT = 32768;
|
|
27
|
+
ADJUSTED_CLOSE = 65536;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
enum Request {
|
|
31
|
+
SUBSCRIBE = 1;
|
|
32
|
+
UNSUBSCRIBE = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
required int32 template_id = 154467;
|
|
36
|
+
repeated string user_msg = 132760;
|
|
37
|
+
|
|
38
|
+
optional string symbol = 110100;
|
|
39
|
+
optional string exchange = 110101;
|
|
40
|
+
optional Request request = 100000;
|
|
41
|
+
optional uint32 update_bits = 154211;
|
|
42
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestNewOrder
|
|
5
|
+
{
|
|
6
|
+
enum TransactionType {
|
|
7
|
+
BUY = 1;
|
|
8
|
+
SELL = 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enum OrderPlacement {
|
|
12
|
+
MANUAL = 1;
|
|
13
|
+
AUTO = 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
enum Duration {
|
|
17
|
+
DAY = 1;
|
|
18
|
+
GTC = 2;
|
|
19
|
+
IOC = 3;
|
|
20
|
+
FOK = 4;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
enum PriceType {
|
|
24
|
+
LIMIT = 1;
|
|
25
|
+
MARKET = 2;
|
|
26
|
+
STOP_LIMIT = 3;
|
|
27
|
+
STOP_MARKET = 4;
|
|
28
|
+
MARKET_IF_TOUCHED = 5;
|
|
29
|
+
LIMIT_IF_TOUCHED = 6;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
enum PriceField {
|
|
33
|
+
BID_PRICE = 1;
|
|
34
|
+
OFFER_PRICE = 2;
|
|
35
|
+
TRADE_PRICE = 3;
|
|
36
|
+
LEAN_PRICE = 4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
enum Condition {
|
|
40
|
+
EQUAL_TO = 1;
|
|
41
|
+
NOT_EQUAL_TO = 2;
|
|
42
|
+
GREATER_THAN = 3;
|
|
43
|
+
GREATER_THAN_EQUAL_TO = 4;
|
|
44
|
+
LESSER_THAN = 5;
|
|
45
|
+
LESSER_THAN_EQUAL_TO = 6;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
required int32 template_id = 154467;
|
|
50
|
+
repeated string user_msg = 132760;
|
|
51
|
+
optional string user_tag = 154119;
|
|
52
|
+
optional string window_name = 154629;
|
|
53
|
+
|
|
54
|
+
optional string fcm_id = 154013;
|
|
55
|
+
optional string ib_id = 154014;
|
|
56
|
+
optional string account_id = 154008;
|
|
57
|
+
|
|
58
|
+
optional string symbol = 110100;
|
|
59
|
+
optional string exchange = 110101;
|
|
60
|
+
|
|
61
|
+
optional int32 quantity = 112004;
|
|
62
|
+
optional double price = 110306;
|
|
63
|
+
optional double trigger_price = 149247;
|
|
64
|
+
|
|
65
|
+
optional TransactionType transaction_type = 112003;
|
|
66
|
+
optional Duration duration = 112005;
|
|
67
|
+
optional PriceType price_type = 112008;
|
|
68
|
+
|
|
69
|
+
optional string trade_route = 112016;
|
|
70
|
+
optional OrderPlacement manual_or_auto = 154710;
|
|
71
|
+
|
|
72
|
+
optional int32 release_at_ssboe = 154487;
|
|
73
|
+
optional int32 release_at_usecs = 154549;
|
|
74
|
+
|
|
75
|
+
optional int32 cancel_at_ssboe = 157085;
|
|
76
|
+
optional int32 cancel_at_usecs = 157086;
|
|
77
|
+
optional int32 cancel_after_secs = 154488;
|
|
78
|
+
|
|
79
|
+
optional string if_touched_symbol = 154451;
|
|
80
|
+
optional string if_touched_exchange = 154452;
|
|
81
|
+
optional Condition if_touched_condition = 154453;
|
|
82
|
+
optional PriceField if_touched_price_field = 154454;
|
|
83
|
+
optional double if_touched_price = 153632;
|
|
84
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestPnLPositionSnapshot
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
|
|
11
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
12
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
13
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestPnLPositionUpdates
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
enum Request {
|
|
9
|
+
SUBSCRIBE = 1;
|
|
10
|
+
UNSUBSCRIBE = 2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
14
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
15
|
+
optional Request request = 100000; // PB_OFFSET + MNM_REQUEST
|
|
16
|
+
|
|
17
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
18
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
19
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestShowOrderHistory
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
// Based on igorrivin/rithmic repo - NO date field in this message!
|
|
8
|
+
|
|
9
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
10
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
11
|
+
|
|
12
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
13
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
14
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
15
|
+
optional string basket_id = 110300; // PB_OFFSET + MNM_BASKET_ID
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestShowOrderHistorySummary
|
|
5
|
+
{
|
|
6
|
+
// CORRECT field IDs from rundef/async_rithmic (verified Dec 2025)
|
|
7
|
+
// PB_OFFSET = 100000
|
|
8
|
+
optional int32 template_id = 154467;
|
|
9
|
+
repeated string user_msg = 132760;
|
|
10
|
+
optional string fcm_id = 154013;
|
|
11
|
+
optional string ib_id = 154014;
|
|
12
|
+
optional string account_id = 154008;
|
|
13
|
+
optional string date = 110615; // YYYYMMDD format - REQUIRED!
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestShowOrders
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
|
|
11
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
12
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
13
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestSubscribeForOrderUpdates
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
|
|
11
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
12
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
13
|
+
optional string account_id = 154008; // PB_OFFSET + MNM_ACCOUNT_ID
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestTickBarReplay
|
|
5
|
+
{
|
|
6
|
+
enum BarType {
|
|
7
|
+
TICK_BAR = 1;
|
|
8
|
+
RANGE_BAR = 2;
|
|
9
|
+
VOLUME_BAR = 3;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
enum BarSubType {
|
|
13
|
+
REGULAR = 1;
|
|
14
|
+
CUSTOM = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
enum Direction {
|
|
18
|
+
FIRST = 1;
|
|
19
|
+
LAST = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum TimeOrder {
|
|
23
|
+
FORWARDS = 1;
|
|
24
|
+
BACKWARDS = 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
required int32 template_id = 154467;
|
|
29
|
+
repeated string user_msg = 132760;
|
|
30
|
+
|
|
31
|
+
optional string symbol = 110100;
|
|
32
|
+
optional string exchange = 110101;
|
|
33
|
+
optional BarType bar_type = 119200;
|
|
34
|
+
optional BarSubType bar_sub_type = 119208;
|
|
35
|
+
optional string bar_type_specifier = 148162;
|
|
36
|
+
|
|
37
|
+
optional int32 start_index = 153002;
|
|
38
|
+
optional int32 finish_index = 153003;
|
|
39
|
+
optional int32 user_max_count = 154020;
|
|
40
|
+
|
|
41
|
+
optional int32 custom_session_open_ssm = 119209;
|
|
42
|
+
optional int32 custom_session_close_ssm = 119210;
|
|
43
|
+
|
|
44
|
+
optional Direction direction = 149253;
|
|
45
|
+
optional TimeOrder time_order = 149307;
|
|
46
|
+
|
|
47
|
+
optional bool resume_bars = 153642;
|
|
48
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message RequestTradeRoutes
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
optional bool subscribe_for_updates = 154352; // PB_OFFSET + MNM_SUBSCRIBE_FLAG
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseAccountList
|
|
5
|
+
{
|
|
6
|
+
required int32 template_id = 154467;
|
|
7
|
+
repeated string user_msg = 132760;
|
|
8
|
+
repeated string rq_handler_rp_code = 132764;
|
|
9
|
+
repeated string rp_code = 132766;
|
|
10
|
+
|
|
11
|
+
optional string fcm_id = 154013;
|
|
12
|
+
optional string ib_id = 154014;
|
|
13
|
+
optional string account_id = 154008;
|
|
14
|
+
optional string account_name = 154002;
|
|
15
|
+
optional string account_currency = 154383;
|
|
16
|
+
optional string account_auto_liquidate = 131035;
|
|
17
|
+
optional string auto_liq_threshold_current_value = 131040;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package rti;
|
|
4
|
+
|
|
5
|
+
message ResponseFrontMonthContract {
|
|
6
|
+
int32 template_id = 154467; // Template ID = 114
|
|
7
|
+
repeated string rp_code = 132766; // Response code
|
|
8
|
+
string symbol = 110100; // Full contract symbol (e.g., "MNQH6")
|
|
9
|
+
string exchange = 110101; // Exchange
|
|
10
|
+
string trading_symbol = 157095; // Trading symbol
|
|
11
|
+
string description = 110114; // Contract description
|
|
12
|
+
string user_msg = 132760; // Echo of user message
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseHeartbeat
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
11
|
+
|
|
12
|
+
optional int32 ssboe = 150100; // PB_OFFSET + MNM_SECONDS_SINCE_BOE
|
|
13
|
+
optional int32 usecs = 150101; // PB_OFFSET + MNM_USECS
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseLogin
|
|
5
|
+
{
|
|
6
|
+
required int32 template_id = 154467;
|
|
7
|
+
optional string template_version = 153634;
|
|
8
|
+
repeated string user_msg = 132760;
|
|
9
|
+
repeated string rp_code = 132766;
|
|
10
|
+
|
|
11
|
+
optional string fcm_id = 154013;
|
|
12
|
+
optional string ib_id = 154014;
|
|
13
|
+
optional string country_code = 154712;
|
|
14
|
+
optional string state_code = 154713;
|
|
15
|
+
|
|
16
|
+
optional string unique_user_id = 153428;
|
|
17
|
+
optional double heartbeat_interval = 153633;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseLoginInfo
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
enum UserType {
|
|
9
|
+
USER_TYPE_ADMIN = 0;
|
|
10
|
+
USER_TYPE_FCM = 1;
|
|
11
|
+
USER_TYPE_IB = 2;
|
|
12
|
+
USER_TYPE_TRADER = 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
16
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
17
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
18
|
+
|
|
19
|
+
optional string fcm_id = 154013; // PB_OFFSET + MNM_FCM_ID
|
|
20
|
+
optional string ib_id = 154014; // PB_OFFSET + MNM_IB_ID
|
|
21
|
+
optional string first_name = 154216; // PB_OFFSET + MNM_FIRST_NAME
|
|
22
|
+
optional string last_name = 154217; // PB_OFFSET + MNM_LAST_NAME
|
|
23
|
+
optional UserType user_type = 154036; // PB_OFFSET + MNM_USER_TYPE
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseLogout
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000 , is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponseNewOrder
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
optional string user_tag = 154119; // PB_OFFSET + MNM_USER_ORIGIN
|
|
11
|
+
repeated string rq_handler_rp_code = 132764; // PB_OFFSET + MNM_REQUEST_HANDLER_RESPONSE_CODE
|
|
12
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
13
|
+
|
|
14
|
+
optional string basket_id = 110300; // PB_OFFSET + MNM_BASKET_ID
|
|
15
|
+
|
|
16
|
+
optional int32 ssboe = 150100; // PB_OFFSET + MNM_SECONDS_SINCE_BOE
|
|
17
|
+
optional int32 usecs = 150101; // PB_OFFSET + MNM_USECS
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponsePnLPositionSnapshot
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
package rti;
|
|
3
|
+
|
|
4
|
+
message ResponsePnLPositionUpdates
|
|
5
|
+
{
|
|
6
|
+
// PB_OFFSET = 100000, is the offset added for each MNM field id
|
|
7
|
+
|
|
8
|
+
required int32 template_id = 154467; // PB_OFFSET + MNM_TEMPLATE_ID
|
|
9
|
+
repeated string user_msg = 132760; // PB_OFFSET + MNM_USER_MSG
|
|
10
|
+
repeated string rp_code = 132766; // PB_OFFSET + MNM_RESPONSE_CODE
|
|
11
|
+
}
|