ctrader-x 0.1.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/LICENSE +21 -0
- package/README.md +177 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +23 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/spotware-oauth-client.d.ts +31 -0
- package/dist/auth/spotware-oauth-client.d.ts.map +1 -0
- package/dist/auth/spotware-oauth-client.js +65 -0
- package/dist/auth/spotware-oauth-client.js.map +1 -0
- package/dist/auth/spotware-oauth-endpoints.d.ts +3 -0
- package/dist/auth/spotware-oauth-endpoints.d.ts.map +1 -0
- package/dist/auth/spotware-oauth-endpoints.js +8 -0
- package/dist/auth/spotware-oauth-endpoints.js.map +1 -0
- package/dist/auth/spotware-oauth-error.d.ts +6 -0
- package/dist/auth/spotware-oauth-error.d.ts.map +1 -0
- package/dist/auth/spotware-oauth-error.js +15 -0
- package/dist/auth/spotware-oauth-error.js.map +1 -0
- package/dist/auth/spotware-oauth-scope.enum.d.ts +5 -0
- package/dist/auth/spotware-oauth-scope.enum.d.ts.map +1 -0
- package/dist/auth/spotware-oauth-scope.enum.js +9 -0
- package/dist/auth/spotware-oauth-scope.enum.js.map +1 -0
- package/dist/auth/spotware-oauth-token.model.d.ts +7 -0
- package/dist/auth/spotware-oauth-token.model.d.ts.map +1 -0
- package/dist/auth/spotware-oauth-token.model.js +3 -0
- package/dist/auth/spotware-oauth-token.model.js.map +1 -0
- package/dist/auth/spotware-socket-auth-error.d.ts +5 -0
- package/dist/auth/spotware-socket-auth-error.d.ts.map +1 -0
- package/dist/auth/spotware-socket-auth-error.js +13 -0
- package/dist/auth/spotware-socket-auth-error.js.map +1 -0
- package/dist/auth/spotware-socket-authenticator.d.ts +21 -0
- package/dist/auth/spotware-socket-authenticator.d.ts.map +1 -0
- package/dist/auth/spotware-socket-authenticator.js +80 -0
- package/dist/auth/spotware-socket-authenticator.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +19 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/spotware-client.d.ts +56 -0
- package/dist/client/spotware-client.d.ts.map +1 -0
- package/dist/client/spotware-client.js +172 -0
- package/dist/client/spotware-client.js.map +1 -0
- package/dist/client/spotware-request-error.d.ts +5 -0
- package/dist/client/spotware-request-error.d.ts.map +1 -0
- package/dist/client/spotware-request-error.js +13 -0
- package/dist/client/spotware-request-error.js.map +1 -0
- package/dist/example/example.d.ts +2 -0
- package/dist/example/example.d.ts.map +1 -0
- package/dist/example/example.js +187 -0
- package/dist/example/example.js.map +1 -0
- package/dist/example/market-data-example.d.ts +2 -0
- package/dist/example/market-data-example.d.ts.map +1 -0
- package/dist/example/market-data-example.js +32 -0
- package/dist/example/market-data-example.js.map +1 -0
- package/dist/example/shared/create-authenticated-client.d.ts +9 -0
- package/dist/example/shared/create-authenticated-client.d.ts.map +1 -0
- package/dist/example/shared/create-authenticated-client.js +154 -0
- package/dist/example/shared/create-authenticated-client.js.map +1 -0
- package/dist/example/trading-example.d.ts +2 -0
- package/dist/example/trading-example.d.ts.map +1 -0
- package/dist/example/trading-example.js +78 -0
- package/dist/example/trading-example.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/market-data/index.d.ts +3 -0
- package/dist/market-data/index.d.ts.map +1 -0
- package/dist/market-data/index.js +19 -0
- package/dist/market-data/index.js.map +1 -0
- package/dist/market-data/spotware-market-data.d.ts +31 -0
- package/dist/market-data/spotware-market-data.d.ts.map +1 -0
- package/dist/market-data/spotware-market-data.js +68 -0
- package/dist/market-data/spotware-market-data.js.map +1 -0
- package/dist/market-data/spotware-symbol-catalog.d.ts +19 -0
- package/dist/market-data/spotware-symbol-catalog.d.ts.map +1 -0
- package/dist/market-data/spotware-symbol-catalog.js +52 -0
- package/dist/market-data/spotware-symbol-catalog.js.map +1 -0
- package/dist/shared/sleep.d.ts +5 -0
- package/dist/shared/sleep.d.ts.map +1 -0
- package/dist/shared/sleep.js +17 -0
- package/dist/shared/sleep.js.map +1 -0
- package/dist/shared/spotware-scale.d.ts +3 -0
- package/dist/shared/spotware-scale.d.ts.map +1 -0
- package/dist/shared/spotware-scale.js +12 -0
- package/dist/shared/spotware-scale.js.map +1 -0
- package/dist/shared/typed-event-emitter.d.ts +13 -0
- package/dist/shared/typed-event-emitter.d.ts.map +1 -0
- package/dist/shared/typed-event-emitter.js +28 -0
- package/dist/shared/typed-event-emitter.js.map +1 -0
- package/dist/trading/index.d.ts +2 -0
- package/dist/trading/index.d.ts.map +1 -0
- package/dist/trading/index.js +18 -0
- package/dist/trading/index.js.map +1 -0
- package/dist/trading/spotware-trading.d.ts +59 -0
- package/dist/trading/spotware-trading.d.ts.map +1 -0
- package/dist/trading/spotware-trading.js +97 -0
- package/dist/trading/spotware-trading.js.map +1 -0
- package/dist/transport/frame-codec.d.ts +6 -0
- package/dist/transport/frame-codec.d.ts.map +1 -0
- package/dist/transport/frame-codec.js +35 -0
- package/dist/transport/frame-codec.js.map +1 -0
- package/dist/transport/index.d.ts +4 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +20 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/rate-limiter.d.ts +11 -0
- package/dist/transport/rate-limiter.d.ts.map +1 -0
- package/dist/transport/rate-limiter.js +48 -0
- package/dist/transport/rate-limiter.js.map +1 -0
- package/dist/transport/reconnect-backoff.d.ts +12 -0
- package/dist/transport/reconnect-backoff.d.ts.map +1 -0
- package/dist/transport/reconnect-backoff.js +20 -0
- package/dist/transport/reconnect-backoff.js.map +1 -0
- package/dist/transport/spotware-host.enum.d.ts +6 -0
- package/dist/transport/spotware-host.enum.d.ts.map +1 -0
- package/dist/transport/spotware-host.enum.js +10 -0
- package/dist/transport/spotware-host.enum.js.map +1 -0
- package/dist/transport/spotware-rate-limiter.d.ts +8 -0
- package/dist/transport/spotware-rate-limiter.d.ts.map +1 -0
- package/dist/transport/spotware-rate-limiter.js +29 -0
- package/dist/transport/spotware-rate-limiter.js.map +1 -0
- package/dist/transport/spotware-transport.d.ts +63 -0
- package/dist/transport/spotware-transport.d.ts.map +1 -0
- package/dist/transport/spotware-transport.js +237 -0
- package/dist/transport/spotware-transport.js.map +1 -0
- package/dist/types/generated/OpenApiCommonMessages.d.ts +49 -0
- package/dist/types/generated/OpenApiCommonMessages.d.ts.map +1 -0
- package/dist/types/generated/OpenApiCommonMessages.js +285 -0
- package/dist/types/generated/OpenApiCommonMessages.js.map +1 -0
- package/dist/types/generated/OpenApiCommonModelMessages.d.ts +40 -0
- package/dist/types/generated/OpenApiCommonModelMessages.d.ts.map +1 -0
- package/dist/types/generated/OpenApiCommonModelMessages.js +140 -0
- package/dist/types/generated/OpenApiCommonModelMessages.js.map +1 -0
- package/dist/types/generated/OpenApiMessages.d.ts +964 -0
- package/dist/types/generated/OpenApiMessages.d.ts.map +1 -0
- package/dist/types/generated/OpenApiMessages.js +8754 -0
- package/dist/types/generated/OpenApiMessages.js.map +1 -0
- package/dist/types/generated/OpenApiModelMessages.d.ts +1116 -0
- package/dist/types/generated/OpenApiModelMessages.d.ts.map +1 -0
- package/dist/types/generated/OpenApiModelMessages.js +6917 -0
- package/dist/types/generated/OpenApiModelMessages.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +141 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "";
|
|
3
|
+
export declare enum ProtoOAPayloadType {
|
|
4
|
+
PROTO_OA_APPLICATION_AUTH_REQ = 2100,
|
|
5
|
+
PROTO_OA_APPLICATION_AUTH_RES = 2101,
|
|
6
|
+
PROTO_OA_ACCOUNT_AUTH_REQ = 2102,
|
|
7
|
+
PROTO_OA_ACCOUNT_AUTH_RES = 2103,
|
|
8
|
+
PROTO_OA_VERSION_REQ = 2104,
|
|
9
|
+
PROTO_OA_VERSION_RES = 2105,
|
|
10
|
+
PROTO_OA_NEW_ORDER_REQ = 2106,
|
|
11
|
+
PROTO_OA_TRAILING_SL_CHANGED_EVENT = 2107,
|
|
12
|
+
PROTO_OA_CANCEL_ORDER_REQ = 2108,
|
|
13
|
+
PROTO_OA_AMEND_ORDER_REQ = 2109,
|
|
14
|
+
PROTO_OA_AMEND_POSITION_SLTP_REQ = 2110,
|
|
15
|
+
PROTO_OA_CLOSE_POSITION_REQ = 2111,
|
|
16
|
+
PROTO_OA_ASSET_LIST_REQ = 2112,
|
|
17
|
+
PROTO_OA_ASSET_LIST_RES = 2113,
|
|
18
|
+
PROTO_OA_SYMBOLS_LIST_REQ = 2114,
|
|
19
|
+
PROTO_OA_SYMBOLS_LIST_RES = 2115,
|
|
20
|
+
PROTO_OA_SYMBOL_BY_ID_REQ = 2116,
|
|
21
|
+
PROTO_OA_SYMBOL_BY_ID_RES = 2117,
|
|
22
|
+
PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ = 2118,
|
|
23
|
+
PROTO_OA_SYMBOLS_FOR_CONVERSION_RES = 2119,
|
|
24
|
+
PROTO_OA_SYMBOL_CHANGED_EVENT = 2120,
|
|
25
|
+
PROTO_OA_TRADER_REQ = 2121,
|
|
26
|
+
PROTO_OA_TRADER_RES = 2122,
|
|
27
|
+
PROTO_OA_TRADER_UPDATE_EVENT = 2123,
|
|
28
|
+
PROTO_OA_RECONCILE_REQ = 2124,
|
|
29
|
+
PROTO_OA_RECONCILE_RES = 2125,
|
|
30
|
+
PROTO_OA_EXECUTION_EVENT = 2126,
|
|
31
|
+
PROTO_OA_SUBSCRIBE_SPOTS_REQ = 2127,
|
|
32
|
+
PROTO_OA_SUBSCRIBE_SPOTS_RES = 2128,
|
|
33
|
+
PROTO_OA_UNSUBSCRIBE_SPOTS_REQ = 2129,
|
|
34
|
+
PROTO_OA_UNSUBSCRIBE_SPOTS_RES = 2130,
|
|
35
|
+
PROTO_OA_SPOT_EVENT = 2131,
|
|
36
|
+
PROTO_OA_ORDER_ERROR_EVENT = 2132,
|
|
37
|
+
PROTO_OA_DEAL_LIST_REQ = 2133,
|
|
38
|
+
PROTO_OA_DEAL_LIST_RES = 2134,
|
|
39
|
+
PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ = 2135,
|
|
40
|
+
PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ = 2136,
|
|
41
|
+
PROTO_OA_GET_TRENDBARS_REQ = 2137,
|
|
42
|
+
PROTO_OA_GET_TRENDBARS_RES = 2138,
|
|
43
|
+
PROTO_OA_EXPECTED_MARGIN_REQ = 2139,
|
|
44
|
+
PROTO_OA_EXPECTED_MARGIN_RES = 2140,
|
|
45
|
+
PROTO_OA_MARGIN_CHANGED_EVENT = 2141,
|
|
46
|
+
PROTO_OA_ERROR_RES = 2142,
|
|
47
|
+
PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ = 2143,
|
|
48
|
+
PROTO_OA_CASH_FLOW_HISTORY_LIST_RES = 2144,
|
|
49
|
+
PROTO_OA_GET_TICKDATA_REQ = 2145,
|
|
50
|
+
PROTO_OA_GET_TICKDATA_RES = 2146,
|
|
51
|
+
PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT = 2147,
|
|
52
|
+
PROTO_OA_CLIENT_DISCONNECT_EVENT = 2148,
|
|
53
|
+
PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ = 2149,
|
|
54
|
+
PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES = 2150,
|
|
55
|
+
PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ = 2151,
|
|
56
|
+
PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES = 2152,
|
|
57
|
+
PROTO_OA_ASSET_CLASS_LIST_REQ = 2153,
|
|
58
|
+
PROTO_OA_ASSET_CLASS_LIST_RES = 2154,
|
|
59
|
+
PROTO_OA_DEPTH_EVENT = 2155,
|
|
60
|
+
PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ = 2156,
|
|
61
|
+
PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES = 2157,
|
|
62
|
+
PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ = 2158,
|
|
63
|
+
PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES = 2159,
|
|
64
|
+
PROTO_OA_SYMBOL_CATEGORY_REQ = 2160,
|
|
65
|
+
PROTO_OA_SYMBOL_CATEGORY_RES = 2161,
|
|
66
|
+
PROTO_OA_ACCOUNT_LOGOUT_REQ = 2162,
|
|
67
|
+
PROTO_OA_ACCOUNT_LOGOUT_RES = 2163,
|
|
68
|
+
PROTO_OA_ACCOUNT_DISCONNECT_EVENT = 2164,
|
|
69
|
+
PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES = 2165,
|
|
70
|
+
PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES = 2166,
|
|
71
|
+
PROTO_OA_MARGIN_CALL_LIST_REQ = 2167,
|
|
72
|
+
PROTO_OA_MARGIN_CALL_LIST_RES = 2168,
|
|
73
|
+
PROTO_OA_MARGIN_CALL_UPDATE_REQ = 2169,
|
|
74
|
+
PROTO_OA_MARGIN_CALL_UPDATE_RES = 2170,
|
|
75
|
+
PROTO_OA_MARGIN_CALL_UPDATE_EVENT = 2171,
|
|
76
|
+
PROTO_OA_MARGIN_CALL_TRIGGER_EVENT = 2172,
|
|
77
|
+
PROTO_OA_REFRESH_TOKEN_REQ = 2173,
|
|
78
|
+
PROTO_OA_REFRESH_TOKEN_RES = 2174,
|
|
79
|
+
PROTO_OA_ORDER_LIST_REQ = 2175,
|
|
80
|
+
PROTO_OA_ORDER_LIST_RES = 2176,
|
|
81
|
+
PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ = 2177,
|
|
82
|
+
PROTO_OA_GET_DYNAMIC_LEVERAGE_RES = 2178,
|
|
83
|
+
PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ = 2179,
|
|
84
|
+
PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES = 2180,
|
|
85
|
+
PROTO_OA_ORDER_DETAILS_REQ = 2181,
|
|
86
|
+
PROTO_OA_ORDER_DETAILS_RES = 2182,
|
|
87
|
+
PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ = 2183,
|
|
88
|
+
PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES = 2184,
|
|
89
|
+
PROTO_OA_DEAL_OFFSET_LIST_REQ = 2185,
|
|
90
|
+
PROTO_OA_DEAL_OFFSET_LIST_RES = 2186,
|
|
91
|
+
PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ = 2187,
|
|
92
|
+
PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES = 2188
|
|
93
|
+
}
|
|
94
|
+
export declare function protoOAPayloadTypeFromJSON(object: any): ProtoOAPayloadType;
|
|
95
|
+
export declare function protoOAPayloadTypeToJSON(object: ProtoOAPayloadType): string;
|
|
96
|
+
export declare enum ProtoOADayOfWeek {
|
|
97
|
+
NONE = 0,
|
|
98
|
+
MONDAY = 1,
|
|
99
|
+
TUESDAY = 2,
|
|
100
|
+
WEDNESDAY = 3,
|
|
101
|
+
THURSDAY = 4,
|
|
102
|
+
FRIDAY = 5,
|
|
103
|
+
SATURDAY = 6,
|
|
104
|
+
SUNDAY = 7
|
|
105
|
+
}
|
|
106
|
+
export declare function protoOADayOfWeekFromJSON(object: any): ProtoOADayOfWeek;
|
|
107
|
+
export declare function protoOADayOfWeekToJSON(object: ProtoOADayOfWeek): string;
|
|
108
|
+
/** Enum for specifying type of trading commission. */
|
|
109
|
+
export declare enum ProtoOACommissionType {
|
|
110
|
+
/** USD_PER_MILLION_USD - USD per million USD volume - usually used for FX. Example: 50 USD for 1 mil USD of trading volume. */
|
|
111
|
+
USD_PER_MILLION_USD = 1,
|
|
112
|
+
/** USD_PER_LOT - USD per 1 lot - usually used for CFDs and futures for commodities, and indices. Example: 15 USD for 1 contract. */
|
|
113
|
+
USD_PER_LOT = 2,
|
|
114
|
+
/** PERCENTAGE_OF_VALUE - Percentage of trading volume - usually used for Equities. Example: 0.005% of notional trading volume. Multiplied by 100,000. */
|
|
115
|
+
PERCENTAGE_OF_VALUE = 3,
|
|
116
|
+
/** QUOTE_CCY_PER_LOT - Quote ccy of Symbol per 1 lot - will be used for CFDs and futures for commodities, and indices. Example: 15 EUR for 1 contract of DAX. */
|
|
117
|
+
QUOTE_CCY_PER_LOT = 4
|
|
118
|
+
}
|
|
119
|
+
export declare function protoOACommissionTypeFromJSON(object: any): ProtoOACommissionType;
|
|
120
|
+
export declare function protoOACommissionTypeToJSON(object: ProtoOACommissionType): string;
|
|
121
|
+
/** Enum for specifying stop loss and take profit distances. */
|
|
122
|
+
export declare enum ProtoOASymbolDistanceType {
|
|
123
|
+
SYMBOL_DISTANCE_IN_POINTS = 1,
|
|
124
|
+
SYMBOL_DISTANCE_IN_PERCENTAGE = 2
|
|
125
|
+
}
|
|
126
|
+
export declare function protoOASymbolDistanceTypeFromJSON(object: any): ProtoOASymbolDistanceType;
|
|
127
|
+
export declare function protoOASymbolDistanceTypeToJSON(object: ProtoOASymbolDistanceType): string;
|
|
128
|
+
/** Enum for specifying type of minimum trading commission. */
|
|
129
|
+
export declare enum ProtoOAMinCommissionType {
|
|
130
|
+
CURRENCY = 1,
|
|
131
|
+
QUOTE_CURRENCY = 2
|
|
132
|
+
}
|
|
133
|
+
export declare function protoOAMinCommissionTypeFromJSON(object: any): ProtoOAMinCommissionType;
|
|
134
|
+
export declare function protoOAMinCommissionTypeToJSON(object: ProtoOAMinCommissionType): string;
|
|
135
|
+
/** Enum for specifying symbol trading mode. */
|
|
136
|
+
export declare enum ProtoOATradingMode {
|
|
137
|
+
ENABLED = 0,
|
|
138
|
+
DISABLED_WITHOUT_PENDINGS_EXECUTION = 1,
|
|
139
|
+
DISABLED_WITH_PENDINGS_EXECUTION = 2,
|
|
140
|
+
CLOSE_ONLY_MODE = 3
|
|
141
|
+
}
|
|
142
|
+
export declare function protoOATradingModeFromJSON(object: any): ProtoOATradingMode;
|
|
143
|
+
export declare function protoOATradingModeToJSON(object: ProtoOATradingMode): string;
|
|
144
|
+
/** Enum for specifying SWAP calculation type for symbol. */
|
|
145
|
+
export declare enum ProtoOASwapCalculationType {
|
|
146
|
+
/** PIPS - Specifies type of SWAP computation as PIPS (0) */
|
|
147
|
+
PIPS = 0,
|
|
148
|
+
/** PERCENTAGE - Specifies type of SWAP computation as PERCENTAGE (1, annual, in percent) */
|
|
149
|
+
PERCENTAGE = 1,
|
|
150
|
+
/** POINTS - Specifies type of SWAP computation as POINTS (2) */
|
|
151
|
+
POINTS = 2
|
|
152
|
+
}
|
|
153
|
+
export declare function protoOASwapCalculationTypeFromJSON(object: any): ProtoOASwapCalculationType;
|
|
154
|
+
export declare function protoOASwapCalculationTypeToJSON(object: ProtoOASwapCalculationType): string;
|
|
155
|
+
/** Enum for specifying access right for a trader. */
|
|
156
|
+
export declare enum ProtoOAAccessRights {
|
|
157
|
+
/** FULL_ACCESS - Enable all trading. */
|
|
158
|
+
FULL_ACCESS = 0,
|
|
159
|
+
/** CLOSE_ONLY - Only closing trading request are enabled. */
|
|
160
|
+
CLOSE_ONLY = 1,
|
|
161
|
+
/** NO_TRADING - View only access. */
|
|
162
|
+
NO_TRADING = 2,
|
|
163
|
+
/** NO_LOGIN - No access. */
|
|
164
|
+
NO_LOGIN = 3
|
|
165
|
+
}
|
|
166
|
+
export declare function protoOAAccessRightsFromJSON(object: any): ProtoOAAccessRights;
|
|
167
|
+
export declare function protoOAAccessRightsToJSON(object: ProtoOAAccessRights): string;
|
|
168
|
+
/** Enum for specifying margin calculation type for an account. */
|
|
169
|
+
export declare enum ProtoOATotalMarginCalculationType {
|
|
170
|
+
MAX = 0,
|
|
171
|
+
SUM = 1,
|
|
172
|
+
NET = 2
|
|
173
|
+
}
|
|
174
|
+
export declare function protoOATotalMarginCalculationTypeFromJSON(object: any): ProtoOATotalMarginCalculationType;
|
|
175
|
+
export declare function protoOATotalMarginCalculationTypeToJSON(object: ProtoOATotalMarginCalculationType): string;
|
|
176
|
+
/** Enum for specifying type of an account. */
|
|
177
|
+
export declare enum ProtoOAAccountType {
|
|
178
|
+
/** HEDGED - Allows multiple positions on a trading account for a symbol. */
|
|
179
|
+
HEDGED = 0,
|
|
180
|
+
/** NETTED - Only one position per symbol is allowed on a trading account. */
|
|
181
|
+
NETTED = 1,
|
|
182
|
+
/** SPREAD_BETTING - Spread betting type account. */
|
|
183
|
+
SPREAD_BETTING = 2
|
|
184
|
+
}
|
|
185
|
+
export declare function protoOAAccountTypeFromJSON(object: any): ProtoOAAccountType;
|
|
186
|
+
export declare function protoOAAccountTypeToJSON(object: ProtoOAAccountType): string;
|
|
187
|
+
/** Position status ENUM. */
|
|
188
|
+
export declare enum ProtoOAPositionStatus {
|
|
189
|
+
POSITION_STATUS_OPEN = 1,
|
|
190
|
+
POSITION_STATUS_CLOSED = 2,
|
|
191
|
+
/** POSITION_STATUS_CREATED - Empty position is created for pending order. */
|
|
192
|
+
POSITION_STATUS_CREATED = 3,
|
|
193
|
+
POSITION_STATUS_ERROR = 4
|
|
194
|
+
}
|
|
195
|
+
export declare function protoOAPositionStatusFromJSON(object: any): ProtoOAPositionStatus;
|
|
196
|
+
export declare function protoOAPositionStatusToJSON(object: ProtoOAPositionStatus): string;
|
|
197
|
+
/** Trader side ENUM. Used for order, position, deal. */
|
|
198
|
+
export declare enum ProtoOATradeSide {
|
|
199
|
+
BUY = 1,
|
|
200
|
+
SELL = 2
|
|
201
|
+
}
|
|
202
|
+
export declare function protoOATradeSideFromJSON(object: any): ProtoOATradeSide;
|
|
203
|
+
export declare function protoOATradeSideToJSON(object: ProtoOATradeSide): string;
|
|
204
|
+
/** Order type ENUM. */
|
|
205
|
+
export declare enum ProtoOAOrderType {
|
|
206
|
+
MARKET = 1,
|
|
207
|
+
LIMIT = 2,
|
|
208
|
+
STOP = 3,
|
|
209
|
+
STOP_LOSS_TAKE_PROFIT = 4,
|
|
210
|
+
MARKET_RANGE = 5,
|
|
211
|
+
STOP_LIMIT = 6
|
|
212
|
+
}
|
|
213
|
+
export declare function protoOAOrderTypeFromJSON(object: any): ProtoOAOrderType;
|
|
214
|
+
export declare function protoOAOrderTypeToJSON(object: ProtoOAOrderType): string;
|
|
215
|
+
/** Order's time in force ENUM. */
|
|
216
|
+
export declare enum ProtoOATimeInForce {
|
|
217
|
+
GOOD_TILL_DATE = 1,
|
|
218
|
+
GOOD_TILL_CANCEL = 2,
|
|
219
|
+
IMMEDIATE_OR_CANCEL = 3,
|
|
220
|
+
FILL_OR_KILL = 4,
|
|
221
|
+
MARKET_ON_OPEN = 5
|
|
222
|
+
}
|
|
223
|
+
export declare function protoOATimeInForceFromJSON(object: any): ProtoOATimeInForce;
|
|
224
|
+
export declare function protoOATimeInForceToJSON(object: ProtoOATimeInForce): string;
|
|
225
|
+
/** Order status ENUM. */
|
|
226
|
+
export declare enum ProtoOAOrderStatus {
|
|
227
|
+
/** ORDER_STATUS_ACCEPTED - Order request validated and accepted for execution. */
|
|
228
|
+
ORDER_STATUS_ACCEPTED = 1,
|
|
229
|
+
/** ORDER_STATUS_FILLED - Order is fully filled. */
|
|
230
|
+
ORDER_STATUS_FILLED = 2,
|
|
231
|
+
/** ORDER_STATUS_REJECTED - Order is rejected due to validation. */
|
|
232
|
+
ORDER_STATUS_REJECTED = 3,
|
|
233
|
+
/** ORDER_STATUS_EXPIRED - Order expired. Might be valid for orders with partially filled volume that were expired on LP. */
|
|
234
|
+
ORDER_STATUS_EXPIRED = 4,
|
|
235
|
+
/** ORDER_STATUS_CANCELLED - Order is cancelled. Might be valid for orders with partially filled volume that were cancelled by LP. */
|
|
236
|
+
ORDER_STATUS_CANCELLED = 5
|
|
237
|
+
}
|
|
238
|
+
export declare function protoOAOrderStatusFromJSON(object: any): ProtoOAOrderStatus;
|
|
239
|
+
export declare function protoOAOrderStatusToJSON(object: ProtoOAOrderStatus): string;
|
|
240
|
+
/** Stop Order and Stop Loss triggering method ENUM. */
|
|
241
|
+
export declare enum ProtoOAOrderTriggerMethod {
|
|
242
|
+
/** TRADE - Stop Order: buy is triggered by ask, sell by bid; Stop Loss Order: for buy position is triggered by bid and for sell position by ask. */
|
|
243
|
+
TRADE = 1,
|
|
244
|
+
/** OPPOSITE - Stop Order: buy is triggered by bid, sell by ask; Stop Loss Order: for buy position is triggered by ask and for sell position by bid. */
|
|
245
|
+
OPPOSITE = 2,
|
|
246
|
+
/** DOUBLE_TRADE - The same as TRADE, but trigger is checked after the second consecutive tick. */
|
|
247
|
+
DOUBLE_TRADE = 3,
|
|
248
|
+
/** DOUBLE_OPPOSITE - The same as OPPOSITE, but trigger is checked after the second consecutive tick. */
|
|
249
|
+
DOUBLE_OPPOSITE = 4
|
|
250
|
+
}
|
|
251
|
+
export declare function protoOAOrderTriggerMethodFromJSON(object: any): ProtoOAOrderTriggerMethod;
|
|
252
|
+
export declare function protoOAOrderTriggerMethodToJSON(object: ProtoOAOrderTriggerMethod): string;
|
|
253
|
+
/** Execution event type ENUM. */
|
|
254
|
+
export declare enum ProtoOAExecutionType {
|
|
255
|
+
/** ORDER_ACCEPTED - Order passed validation. */
|
|
256
|
+
ORDER_ACCEPTED = 2,
|
|
257
|
+
/** ORDER_FILLED - Order filled. */
|
|
258
|
+
ORDER_FILLED = 3,
|
|
259
|
+
/** ORDER_REPLACED - Pending order is changed with a new one. */
|
|
260
|
+
ORDER_REPLACED = 4,
|
|
261
|
+
/** ORDER_CANCELLED - Order cancelled. */
|
|
262
|
+
ORDER_CANCELLED = 5,
|
|
263
|
+
/** ORDER_EXPIRED - Order with GTD time in force is expired. */
|
|
264
|
+
ORDER_EXPIRED = 6,
|
|
265
|
+
/** ORDER_REJECTED - Order is rejected due to validations. */
|
|
266
|
+
ORDER_REJECTED = 7,
|
|
267
|
+
/** ORDER_CANCEL_REJECTED - Cancel order request is rejected. */
|
|
268
|
+
ORDER_CANCEL_REJECTED = 8,
|
|
269
|
+
/** SWAP - Type related to SWAP execution events. */
|
|
270
|
+
SWAP = 9,
|
|
271
|
+
/** DEPOSIT_WITHDRAW - Type related to event of deposit or withdrawal cash flow operation. */
|
|
272
|
+
DEPOSIT_WITHDRAW = 10,
|
|
273
|
+
/** ORDER_PARTIAL_FILL - Order is partially filled. */
|
|
274
|
+
ORDER_PARTIAL_FILL = 11,
|
|
275
|
+
/** BONUS_DEPOSIT_WITHDRAW - Type related to event of bonus deposit or bonus withdrawal. */
|
|
276
|
+
BONUS_DEPOSIT_WITHDRAW = 12
|
|
277
|
+
}
|
|
278
|
+
export declare function protoOAExecutionTypeFromJSON(object: any): ProtoOAExecutionType;
|
|
279
|
+
export declare function protoOAExecutionTypeToJSON(object: ProtoOAExecutionType): string;
|
|
280
|
+
/** Bonus operation type ENUM. */
|
|
281
|
+
export declare enum ProtoOAChangeBonusType {
|
|
282
|
+
BONUS_DEPOSIT = 0,
|
|
283
|
+
BONUS_WITHDRAW = 1
|
|
284
|
+
}
|
|
285
|
+
export declare function protoOAChangeBonusTypeFromJSON(object: any): ProtoOAChangeBonusType;
|
|
286
|
+
export declare function protoOAChangeBonusTypeToJSON(object: ProtoOAChangeBonusType): string;
|
|
287
|
+
/** Balance operation entity. Covers all cash movement operations related to account, trading, IB operations, mirroring, etc. */
|
|
288
|
+
export declare enum ProtoOAChangeBalanceType {
|
|
289
|
+
/** BALANCE_DEPOSIT - Cash deposit. */
|
|
290
|
+
BALANCE_DEPOSIT = 0,
|
|
291
|
+
/** BALANCE_WITHDRAW - Cash withdrawal. */
|
|
292
|
+
BALANCE_WITHDRAW = 1,
|
|
293
|
+
/** BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER - Received mirroring commission. */
|
|
294
|
+
BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER = 3,
|
|
295
|
+
/** BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER - Paid mirroring commission. */
|
|
296
|
+
BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER = 4,
|
|
297
|
+
/** BALANCE_DEPOSIT_IB_COMMISSIONS - For IB account. Commissions paid by trader. */
|
|
298
|
+
BALANCE_DEPOSIT_IB_COMMISSIONS = 5,
|
|
299
|
+
/** BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE - For IB account. Withdrawal of commissions shared with broker. */
|
|
300
|
+
BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE = 6,
|
|
301
|
+
/** BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB - For IB account. Commissions paid by sub-ibs. */
|
|
302
|
+
BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB = 7,
|
|
303
|
+
/** BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER - For IB account. Commissions paid by broker. */
|
|
304
|
+
BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER = 8,
|
|
305
|
+
/** BALANCE_DEPOSIT_REBATE - Deposit rebate for trading volume for period. */
|
|
306
|
+
BALANCE_DEPOSIT_REBATE = 9,
|
|
307
|
+
/** BALANCE_WITHDRAW_REBATE - Withdrawal of rebate. */
|
|
308
|
+
BALANCE_WITHDRAW_REBATE = 10,
|
|
309
|
+
/** BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER - Mirroring commission. */
|
|
310
|
+
BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER = 11,
|
|
311
|
+
/** BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER - Mirroring commission. */
|
|
312
|
+
BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER = 12,
|
|
313
|
+
/** BALANCE_WITHDRAW_BONUS_COMPENSATION - For IB account. Share commission with the Broker. */
|
|
314
|
+
BALANCE_WITHDRAW_BONUS_COMPENSATION = 13,
|
|
315
|
+
/** BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER - IB commissions. */
|
|
316
|
+
BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER = 14,
|
|
317
|
+
/** BALANCE_DEPOSIT_DIVIDENDS - Deposit dividends payments. */
|
|
318
|
+
BALANCE_DEPOSIT_DIVIDENDS = 15,
|
|
319
|
+
/** BALANCE_WITHDRAW_DIVIDENDS - Negative dividend charge for short position. */
|
|
320
|
+
BALANCE_WITHDRAW_DIVIDENDS = 16,
|
|
321
|
+
/** BALANCE_WITHDRAW_GSL_CHARGE - Charge for guaranteedStopLoss. */
|
|
322
|
+
BALANCE_WITHDRAW_GSL_CHARGE = 17,
|
|
323
|
+
/** BALANCE_WITHDRAW_ROLLOVER - Charge of rollover fee for Shariah compliant accounts. */
|
|
324
|
+
BALANCE_WITHDRAW_ROLLOVER = 18,
|
|
325
|
+
/** BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS - Broker's operation to deposit bonus. */
|
|
326
|
+
BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS = 19,
|
|
327
|
+
/** BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS - Broker's operation to withdrawal bonus. */
|
|
328
|
+
BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS = 20,
|
|
329
|
+
/** BALANCE_DEPOSIT_SWAP - Deposits of negative SWAP. */
|
|
330
|
+
BALANCE_DEPOSIT_SWAP = 21,
|
|
331
|
+
/** BALANCE_WITHDRAW_SWAP - SWAP charges. */
|
|
332
|
+
BALANCE_WITHDRAW_SWAP = 22,
|
|
333
|
+
/** BALANCE_DEPOSIT_MANAGEMENT_FEE - Mirroring commission. */
|
|
334
|
+
BALANCE_DEPOSIT_MANAGEMENT_FEE = 27,
|
|
335
|
+
/** BALANCE_WITHDRAW_MANAGEMENT_FEE - Mirroring commission. Deprecated since 7.1 in favor of BALANCE_WITHDRAW_COPY_FEE (34). */
|
|
336
|
+
BALANCE_WITHDRAW_MANAGEMENT_FEE = 28,
|
|
337
|
+
/** BALANCE_DEPOSIT_PERFORMANCE_FEE - Mirroring commission. */
|
|
338
|
+
BALANCE_DEPOSIT_PERFORMANCE_FEE = 29,
|
|
339
|
+
/** BALANCE_WITHDRAW_FOR_SUBACCOUNT - Withdraw for subaccount creation (cTrader Copy). */
|
|
340
|
+
BALANCE_WITHDRAW_FOR_SUBACCOUNT = 30,
|
|
341
|
+
/** BALANCE_DEPOSIT_TO_SUBACCOUNT - Deposit to subaccount on creation (cTrader Copy). */
|
|
342
|
+
BALANCE_DEPOSIT_TO_SUBACCOUNT = 31,
|
|
343
|
+
/** BALANCE_WITHDRAW_FROM_SUBACCOUNT - Manual user's withdraw from subaccount (cTrader Copy), to parent account. */
|
|
344
|
+
BALANCE_WITHDRAW_FROM_SUBACCOUNT = 32,
|
|
345
|
+
/** BALANCE_DEPOSIT_FROM_SUBACCOUNT - Manual user's deposit to subaccount (cTrader Copy), from parent account. */
|
|
346
|
+
BALANCE_DEPOSIT_FROM_SUBACCOUNT = 33,
|
|
347
|
+
/** BALANCE_WITHDRAW_COPY_FEE - Withdrawal fees to Strategy Provider. */
|
|
348
|
+
BALANCE_WITHDRAW_COPY_FEE = 34,
|
|
349
|
+
/** BALANCE_WITHDRAW_INACTIVITY_FEE - Withdraw of inactivity fee from the balance. */
|
|
350
|
+
BALANCE_WITHDRAW_INACTIVITY_FEE = 35,
|
|
351
|
+
/** BALANCE_DEPOSIT_TRANSFER - Deposit within the same server (from another account). */
|
|
352
|
+
BALANCE_DEPOSIT_TRANSFER = 36,
|
|
353
|
+
/** BALANCE_WITHDRAW_TRANSFER - Withdraw within the same server (to another account). */
|
|
354
|
+
BALANCE_WITHDRAW_TRANSFER = 37,
|
|
355
|
+
/** BALANCE_DEPOSIT_CONVERTED_BONUS - Bonus being converted from virtual bonus to real deposit. */
|
|
356
|
+
BALANCE_DEPOSIT_CONVERTED_BONUS = 38,
|
|
357
|
+
/** BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION - Applies if negative balance protection is configured by broker, should make balance = 0. */
|
|
358
|
+
BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION = 39
|
|
359
|
+
}
|
|
360
|
+
export declare function protoOAChangeBalanceTypeFromJSON(object: any): ProtoOAChangeBalanceType;
|
|
361
|
+
export declare function protoOAChangeBalanceTypeToJSON(object: ProtoOAChangeBalanceType): string;
|
|
362
|
+
/** Deal status ENUM. */
|
|
363
|
+
export declare enum ProtoOADealStatus {
|
|
364
|
+
/** FILLED - Deal filled. */
|
|
365
|
+
FILLED = 2,
|
|
366
|
+
/** PARTIALLY_FILLED - Deal is partially filled. */
|
|
367
|
+
PARTIALLY_FILLED = 3,
|
|
368
|
+
/** REJECTED - Deal is correct but was rejected by liquidity provider (e.g. no liquidity). */
|
|
369
|
+
REJECTED = 4,
|
|
370
|
+
/** INTERNALLY_REJECTED - Deal rejected by server (e.g. no price quotes). */
|
|
371
|
+
INTERNALLY_REJECTED = 5,
|
|
372
|
+
/** ERROR - Deal is rejected by LP due to error (e.g. symbol is unknown). */
|
|
373
|
+
ERROR = 6,
|
|
374
|
+
/** MISSED - Liquidity provider did not sent response on the deal during specified execution time period. */
|
|
375
|
+
MISSED = 7
|
|
376
|
+
}
|
|
377
|
+
export declare function protoOADealStatusFromJSON(object: any): ProtoOADealStatus;
|
|
378
|
+
export declare function protoOADealStatusToJSON(object: ProtoOADealStatus): string;
|
|
379
|
+
/** Trendbar period ENUM. */
|
|
380
|
+
export declare enum ProtoOATrendbarPeriod {
|
|
381
|
+
M1 = 1,
|
|
382
|
+
M2 = 2,
|
|
383
|
+
M3 = 3,
|
|
384
|
+
M4 = 4,
|
|
385
|
+
M5 = 5,
|
|
386
|
+
M10 = 6,
|
|
387
|
+
M15 = 7,
|
|
388
|
+
M30 = 8,
|
|
389
|
+
H1 = 9,
|
|
390
|
+
H4 = 10,
|
|
391
|
+
H12 = 11,
|
|
392
|
+
D1 = 12,
|
|
393
|
+
W1 = 13,
|
|
394
|
+
MN1 = 14
|
|
395
|
+
}
|
|
396
|
+
export declare function protoOATrendbarPeriodFromJSON(object: any): ProtoOATrendbarPeriod;
|
|
397
|
+
export declare function protoOATrendbarPeriodToJSON(object: ProtoOATrendbarPeriod): string;
|
|
398
|
+
/** Price quote type. */
|
|
399
|
+
export declare enum ProtoOAQuoteType {
|
|
400
|
+
BID = 1,
|
|
401
|
+
ASK = 2
|
|
402
|
+
}
|
|
403
|
+
export declare function protoOAQuoteTypeFromJSON(object: any): ProtoOAQuoteType;
|
|
404
|
+
export declare function protoOAQuoteTypeToJSON(object: ProtoOAQuoteType): string;
|
|
405
|
+
/** Open API application permission in regards to token ENUM. */
|
|
406
|
+
export declare enum ProtoOAClientPermissionScope {
|
|
407
|
+
/** SCOPE_VIEW - Allows to use only view commends. Trade is prohibited. */
|
|
408
|
+
SCOPE_VIEW = 0,
|
|
409
|
+
/** SCOPE_TRADE - Allows to use all commands. */
|
|
410
|
+
SCOPE_TRADE = 1
|
|
411
|
+
}
|
|
412
|
+
export declare function protoOAClientPermissionScopeFromJSON(object: any): ProtoOAClientPermissionScope;
|
|
413
|
+
export declare function protoOAClientPermissionScopeToJSON(object: ProtoOAClientPermissionScope): string;
|
|
414
|
+
/** Type of notification, currently only 3 instances of marginCall are supported. */
|
|
415
|
+
export declare enum ProtoOANotificationType {
|
|
416
|
+
/** MARGIN_LEVEL_THRESHOLD_1 - one of three margin calls, they are all similar. */
|
|
417
|
+
MARGIN_LEVEL_THRESHOLD_1 = 61,
|
|
418
|
+
/** MARGIN_LEVEL_THRESHOLD_2 - one of three margin calls, they are all similar. */
|
|
419
|
+
MARGIN_LEVEL_THRESHOLD_2 = 62,
|
|
420
|
+
/** MARGIN_LEVEL_THRESHOLD_3 - one of three margin calls, they are all similar. */
|
|
421
|
+
MARGIN_LEVEL_THRESHOLD_3 = 63
|
|
422
|
+
}
|
|
423
|
+
export declare function protoOANotificationTypeFromJSON(object: any): ProtoOANotificationType;
|
|
424
|
+
export declare function protoOANotificationTypeToJSON(object: ProtoOANotificationType): string;
|
|
425
|
+
/** Error code ENUM. */
|
|
426
|
+
export declare enum ProtoOAErrorCode {
|
|
427
|
+
/** OA_AUTH_TOKEN_EXPIRED - Authorization */
|
|
428
|
+
OA_AUTH_TOKEN_EXPIRED = 1,
|
|
429
|
+
/** ACCOUNT_NOT_AUTHORIZED - When account is not authorized. */
|
|
430
|
+
ACCOUNT_NOT_AUTHORIZED = 2,
|
|
431
|
+
/** RET_NO_SUCH_LOGIN - When such account no longer exists. */
|
|
432
|
+
RET_NO_SUCH_LOGIN = 12,
|
|
433
|
+
/** ALREADY_LOGGED_IN - When client tries to authorize after it was already authorized. */
|
|
434
|
+
ALREADY_LOGGED_IN = 14,
|
|
435
|
+
/** RET_ACCOUNT_DISABLED - When account is disabled. */
|
|
436
|
+
RET_ACCOUNT_DISABLED = 64,
|
|
437
|
+
/** CH_CLIENT_AUTH_FAILURE - Open API client is not activated or wrong client credentials. */
|
|
438
|
+
CH_CLIENT_AUTH_FAILURE = 101,
|
|
439
|
+
/** CH_CLIENT_NOT_AUTHENTICATED - When a command is sent for not authorized Open API client. */
|
|
440
|
+
CH_CLIENT_NOT_AUTHENTICATED = 102,
|
|
441
|
+
/** CH_CLIENT_ALREADY_AUTHENTICATED - Client is trying to authenticate twice. */
|
|
442
|
+
CH_CLIENT_ALREADY_AUTHENTICATED = 103,
|
|
443
|
+
/** CH_ACCESS_TOKEN_INVALID - Access token is invalid. */
|
|
444
|
+
CH_ACCESS_TOKEN_INVALID = 104,
|
|
445
|
+
/** CH_SERVER_NOT_REACHABLE - Trading service is not available. */
|
|
446
|
+
CH_SERVER_NOT_REACHABLE = 105,
|
|
447
|
+
/** CH_CTID_TRADER_ACCOUNT_NOT_FOUND - Trading account is not found. */
|
|
448
|
+
CH_CTID_TRADER_ACCOUNT_NOT_FOUND = 106,
|
|
449
|
+
/** CH_OA_CLIENT_NOT_FOUND - Could not find this client id. */
|
|
450
|
+
CH_OA_CLIENT_NOT_FOUND = 107,
|
|
451
|
+
/** REQUEST_FREQUENCY_EXCEEDED - General */
|
|
452
|
+
REQUEST_FREQUENCY_EXCEEDED = 108,
|
|
453
|
+
/** SERVER_IS_UNDER_MAINTENANCE - Server is under maintenance. */
|
|
454
|
+
SERVER_IS_UNDER_MAINTENANCE = 109,
|
|
455
|
+
/** CHANNEL_IS_BLOCKED - Operations are not allowed for this account. */
|
|
456
|
+
CHANNEL_IS_BLOCKED = 110,
|
|
457
|
+
/** CONNECTIONS_LIMIT_EXCEEDED - Limit of connections is reached for this Open API client. */
|
|
458
|
+
CONNECTIONS_LIMIT_EXCEEDED = 67,
|
|
459
|
+
/** WORSE_GSL_NOT_ALLOWED - Not allowed to increase risk for Positions with Guaranteed Stop Loss. */
|
|
460
|
+
WORSE_GSL_NOT_ALLOWED = 68,
|
|
461
|
+
/** SYMBOL_HAS_HOLIDAY - Trading disabled because symbol has holiday. */
|
|
462
|
+
SYMBOL_HAS_HOLIDAY = 69,
|
|
463
|
+
/** NOT_SUBSCRIBED_TO_SPOTS - Pricing */
|
|
464
|
+
NOT_SUBSCRIBED_TO_SPOTS = 112,
|
|
465
|
+
/** ALREADY_SUBSCRIBED - When subscription is requested for an active. */
|
|
466
|
+
ALREADY_SUBSCRIBED = 113,
|
|
467
|
+
/** SYMBOL_NOT_FOUND - Symbol not found. */
|
|
468
|
+
SYMBOL_NOT_FOUND = 114,
|
|
469
|
+
/** UNKNOWN_SYMBOL - Note: to be merged with SYMBOL_NOT_FOUND. */
|
|
470
|
+
UNKNOWN_SYMBOL = 115,
|
|
471
|
+
/** INCORRECT_BOUNDARIES - When requested period (from,to) is too large or invalid values are set to from/to. */
|
|
472
|
+
INCORRECT_BOUNDARIES = 35,
|
|
473
|
+
/** NO_QUOTES - Trading */
|
|
474
|
+
NO_QUOTES = 117,
|
|
475
|
+
/** NOT_ENOUGH_MONEY - Not enough funds to allocate margin. */
|
|
476
|
+
NOT_ENOUGH_MONEY = 118,
|
|
477
|
+
/** MAX_EXPOSURE_REACHED - Max exposure limit is reached for a {trader, symbol, side}. */
|
|
478
|
+
MAX_EXPOSURE_REACHED = 119,
|
|
479
|
+
/** POSITION_NOT_FOUND - Position not found. */
|
|
480
|
+
POSITION_NOT_FOUND = 120,
|
|
481
|
+
/** ORDER_NOT_FOUND - Order not found. */
|
|
482
|
+
ORDER_NOT_FOUND = 121,
|
|
483
|
+
/** POSITION_NOT_OPEN - When trying to close a position that it is not open. */
|
|
484
|
+
POSITION_NOT_OPEN = 122,
|
|
485
|
+
/** POSITION_LOCKED - Position in the state that does not allow to perform an operation. */
|
|
486
|
+
POSITION_LOCKED = 123,
|
|
487
|
+
/** TOO_MANY_POSITIONS - Trading account reached its limit for max number of open positions and orders. */
|
|
488
|
+
TOO_MANY_POSITIONS = 124,
|
|
489
|
+
/** TRADING_BAD_VOLUME - Invalid volume. */
|
|
490
|
+
TRADING_BAD_VOLUME = 125,
|
|
491
|
+
/** TRADING_BAD_STOPS - Invalid stop price. */
|
|
492
|
+
TRADING_BAD_STOPS = 126,
|
|
493
|
+
/** TRADING_BAD_PRICES - Invalid price (e.g. negative). */
|
|
494
|
+
TRADING_BAD_PRICES = 127,
|
|
495
|
+
/** TRADING_BAD_STAKE - Invalid stake volume (e.g. negative). */
|
|
496
|
+
TRADING_BAD_STAKE = 128,
|
|
497
|
+
/** PROTECTION_IS_TOO_CLOSE_TO_MARKET - Invalid protection prices. */
|
|
498
|
+
PROTECTION_IS_TOO_CLOSE_TO_MARKET = 129,
|
|
499
|
+
/** TRADING_BAD_EXPIRATION_DATE - Invalid expiration. */
|
|
500
|
+
TRADING_BAD_EXPIRATION_DATE = 130,
|
|
501
|
+
/** PENDING_EXECUTION - Unable to apply changes as position has an order under execution. */
|
|
502
|
+
PENDING_EXECUTION = 131,
|
|
503
|
+
/** TRADING_DISABLED - Trading is blocked for the symbol. */
|
|
504
|
+
TRADING_DISABLED = 132,
|
|
505
|
+
/** TRADING_NOT_ALLOWED - Trading account is in read only mode. */
|
|
506
|
+
TRADING_NOT_ALLOWED = 133,
|
|
507
|
+
/** UNABLE_TO_CANCEL_ORDER - Unable to cancel order. */
|
|
508
|
+
UNABLE_TO_CANCEL_ORDER = 134,
|
|
509
|
+
/** UNABLE_TO_AMEND_ORDER - Unable to amend order. */
|
|
510
|
+
UNABLE_TO_AMEND_ORDER = 135,
|
|
511
|
+
/** SHORT_SELLING_NOT_ALLOWED - Short selling is not allowed. */
|
|
512
|
+
SHORT_SELLING_NOT_ALLOWED = 136
|
|
513
|
+
}
|
|
514
|
+
export declare function protoOAErrorCodeFromJSON(object: any): ProtoOAErrorCode;
|
|
515
|
+
export declare function protoOAErrorCodeToJSON(object: ProtoOAErrorCode): string;
|
|
516
|
+
export declare enum ProtoOALimitedRiskMarginCalculationStrategy {
|
|
517
|
+
ACCORDING_TO_LEVERAGE = 0,
|
|
518
|
+
ACCORDING_TO_GSL = 1,
|
|
519
|
+
ACCORDING_TO_GSL_AND_LEVERAGE = 2
|
|
520
|
+
}
|
|
521
|
+
export declare function protoOALimitedRiskMarginCalculationStrategyFromJSON(object: any): ProtoOALimitedRiskMarginCalculationStrategy;
|
|
522
|
+
export declare function protoOALimitedRiskMarginCalculationStrategyToJSON(object: ProtoOALimitedRiskMarginCalculationStrategy): string;
|
|
523
|
+
/** The strategy for choosing which Position to close during a Stop Out */
|
|
524
|
+
export declare enum ProtoOAStopOutStrategy {
|
|
525
|
+
/** MOST_MARGIN_USED_FIRST - A Stop Out strategy that closes a Position with the largest Used Margin */
|
|
526
|
+
MOST_MARGIN_USED_FIRST = 0,
|
|
527
|
+
/** MOST_LOSING_FIRST - A Stop Out strategy that closes a Position with the least PnL */
|
|
528
|
+
MOST_LOSING_FIRST = 1
|
|
529
|
+
}
|
|
530
|
+
export declare function protoOAStopOutStrategyFromJSON(object: any): ProtoOAStopOutStrategy;
|
|
531
|
+
export declare function protoOAStopOutStrategyToJSON(object: ProtoOAStopOutStrategy): string;
|
|
532
|
+
/** Asset entity. */
|
|
533
|
+
export interface ProtoOAAsset {
|
|
534
|
+
/** The unique asset ID. */
|
|
535
|
+
assetId: number;
|
|
536
|
+
/** The asset name. */
|
|
537
|
+
name: string;
|
|
538
|
+
/** User friendly name. */
|
|
539
|
+
displayName?: string | undefined;
|
|
540
|
+
/** Precision of the asset. */
|
|
541
|
+
digits?: number | undefined;
|
|
542
|
+
}
|
|
543
|
+
/** Trading symbol entity. */
|
|
544
|
+
export interface ProtoOASymbol {
|
|
545
|
+
/** The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs. */
|
|
546
|
+
symbolId: number;
|
|
547
|
+
/** Number of price digits to be displayed. */
|
|
548
|
+
digits: number;
|
|
549
|
+
/** Pip position on digits. */
|
|
550
|
+
pipPosition: number;
|
|
551
|
+
/** If TRUE then the short selling with the symbol is enabled. */
|
|
552
|
+
enableShortSelling?: boolean | undefined;
|
|
553
|
+
/** If TRUE then setting of guaranteedStopLoss is available for limited risk accounts. */
|
|
554
|
+
guaranteedStopLoss?: boolean | undefined;
|
|
555
|
+
/** Day of the week when SWAP charge amount will be tripled. Doesn't impact Rollover Commission. */
|
|
556
|
+
swapRollover3Days?: ProtoOADayOfWeek | undefined;
|
|
557
|
+
/** SWAP charge for long positions. */
|
|
558
|
+
swapLong?: number | undefined;
|
|
559
|
+
/** SWAP charge for short positions. */
|
|
560
|
+
swapShort?: number | undefined;
|
|
561
|
+
/** Maximum allowed volume in cents for an order with a symbol. */
|
|
562
|
+
maxVolume?: number | undefined;
|
|
563
|
+
/** Minimum allowed volume in cents for an order with a symbol. */
|
|
564
|
+
minVolume?: number | undefined;
|
|
565
|
+
/** Step of the volume in cents for an order. */
|
|
566
|
+
stepVolume?: number | undefined;
|
|
567
|
+
/** Value of max exposure per symbol, per account. Blocks execution if breached. */
|
|
568
|
+
maxExposure?: number | undefined;
|
|
569
|
+
/** Symbol trading interval, specified in seconds starting from SUNDAY 00:00 in specified time zone. */
|
|
570
|
+
schedule: ProtoOAInterval[];
|
|
571
|
+
/**
|
|
572
|
+
* Commission base amount. Total commission depends on commissionType. Use preciseTradingCommissionRate.
|
|
573
|
+
*
|
|
574
|
+
* @deprecated
|
|
575
|
+
*/
|
|
576
|
+
commission?: number | undefined;
|
|
577
|
+
/** Commission type. See ProtoOACommissionType for details. */
|
|
578
|
+
commissionType?: ProtoOACommissionType | undefined;
|
|
579
|
+
/** Minimum allowed distance between stop loss and current market price. */
|
|
580
|
+
slDistance?: number | undefined;
|
|
581
|
+
/** Minimum allowed distance between take profit and current market price. */
|
|
582
|
+
tpDistance?: number | undefined;
|
|
583
|
+
/** Minimum allowed distance between guaranteed stop loss and current market price. */
|
|
584
|
+
gslDistance?: number | undefined;
|
|
585
|
+
/** Guaranteed stop loss fee. */
|
|
586
|
+
gslCharge?: number | undefined;
|
|
587
|
+
/** Unit of distance measure for slDistance, tpDistance, gslDistance. */
|
|
588
|
+
distanceSetIn?: ProtoOASymbolDistanceType | undefined;
|
|
589
|
+
/**
|
|
590
|
+
* Minimum commission amount per trade. Use preciseMinCommission.
|
|
591
|
+
*
|
|
592
|
+
* @deprecated
|
|
593
|
+
*/
|
|
594
|
+
minCommission?: number | undefined;
|
|
595
|
+
/** Minimum commission Type. See ProtoOAMinCommissionType for details. */
|
|
596
|
+
minCommissionType?: ProtoOAMinCommissionType | undefined;
|
|
597
|
+
/** Currency for minimum commission. (USD or quote currency). */
|
|
598
|
+
minCommissionAsset?: string | undefined;
|
|
599
|
+
/** Administrative Fee, charged instead of Swaps if the Account is marked as a "Shariah Compliant (Swap Free)". The Administrative Fee is charged daily as USD per current open volume of Position in lots. The Account charged in the Deposit currency. */
|
|
600
|
+
rolloverCommission?: number | undefined;
|
|
601
|
+
/** Initial period before the first rolloverCommission will be charged on the account. */
|
|
602
|
+
skipRolloverDays?: number | undefined;
|
|
603
|
+
/** Time zone for the symbol trading intervals. */
|
|
604
|
+
scheduleTimeZone?: string | undefined;
|
|
605
|
+
/** Rules for trading with the symbol. See ProtoOATradingMode for details. */
|
|
606
|
+
tradingMode?: ProtoOATradingMode | undefined;
|
|
607
|
+
/** Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Applied only if RolloverChargePeriod = 0 or 1. */
|
|
608
|
+
rolloverCommission3Days?: ProtoOADayOfWeek | undefined;
|
|
609
|
+
/** Specifies type of SWAP computation as PIPS (0) or PERCENTAGE (1, annual, in percent). */
|
|
610
|
+
swapCalculationType?: ProtoOASwapCalculationType | undefined;
|
|
611
|
+
/** Lot size of the Symbol (in cents). */
|
|
612
|
+
lotSize?: number | undefined;
|
|
613
|
+
/** Commission base amount. Total commission depends on commissionType: for non-percentage types it is multiplied by 10^8, for percentage of value commission type it is multiplied by 10^5. */
|
|
614
|
+
preciseTradingCommissionRate?: number | undefined;
|
|
615
|
+
/** Minimum commission amount per trade multiplied by 10^8. */
|
|
616
|
+
preciseMinCommission?: number | undefined;
|
|
617
|
+
/** List of holidays for this symbol specified by broker. */
|
|
618
|
+
holiday: ProtoOAHoliday[];
|
|
619
|
+
/** Percentage (1 = 0.01%) of the realized Gross Profit, which will be paid by the Trader for any trade if the Quote Asset of the traded Symbol is not matched with the Deposit Asset. */
|
|
620
|
+
pnlConversionFeeRate?: number | undefined;
|
|
621
|
+
/** The unique identifier of dynamic leverage entity. https://help.ctrader.com/ctrader/trading/dynamic-leverage */
|
|
622
|
+
leverageId?: number | undefined;
|
|
623
|
+
/** Period of charging swaps in hours. 24 means swaps will be charged 1 time per day, 12 - every 12 hours, 8 - every 8 hours, etc. */
|
|
624
|
+
swapPeriod?: number | undefined;
|
|
625
|
+
/** Time in minutes from 00:00 (UTC) when intraday swaps are charged for the first time. */
|
|
626
|
+
swapTime?: number | undefined;
|
|
627
|
+
/** Count of swapPeriods before the first SWAP charge. */
|
|
628
|
+
skipSWAPPeriods?: number | undefined;
|
|
629
|
+
/** If enabled, SWAP will be charged for all days of the week, including Saturday and Sunday. */
|
|
630
|
+
chargeSwapAtWeekends?: boolean | undefined;
|
|
631
|
+
/** Specifies the units in which the base Asset of the Symbol is denominated. */
|
|
632
|
+
measurementUnits?: string | undefined;
|
|
633
|
+
}
|
|
634
|
+
/** Lightweight symbol entity. */
|
|
635
|
+
export interface ProtoOALightSymbol {
|
|
636
|
+
/** The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs. */
|
|
637
|
+
symbolId: number;
|
|
638
|
+
/** Name of the symbol (e.g. EUR/USD). */
|
|
639
|
+
symbolName?: string | undefined;
|
|
640
|
+
/** If TRUE then symbol is visible for traders. */
|
|
641
|
+
enabled?: boolean | undefined;
|
|
642
|
+
/** Base asset. */
|
|
643
|
+
baseAssetId?: number | undefined;
|
|
644
|
+
/** Quote asset. */
|
|
645
|
+
quoteAssetId?: number | undefined;
|
|
646
|
+
/** Id of the symbol category used for symbols grouping. */
|
|
647
|
+
symbolCategoryId?: number | undefined;
|
|
648
|
+
description?: string | undefined;
|
|
649
|
+
/** The number used for sorting Symbols in the UI (lowest number should appear at the top). */
|
|
650
|
+
sortingNumber?: number | undefined;
|
|
651
|
+
}
|
|
652
|
+
export interface ProtoOAArchivedSymbol {
|
|
653
|
+
/** The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs. */
|
|
654
|
+
symbolId: number;
|
|
655
|
+
/** Name of the symbol (e.g. EUR/USD). */
|
|
656
|
+
name: string;
|
|
657
|
+
/** The Unix time in milliseconds of the last update of the symbol. */
|
|
658
|
+
utcLastUpdateTimestamp: number;
|
|
659
|
+
/** Description of the symbol. */
|
|
660
|
+
description?: string | undefined;
|
|
661
|
+
}
|
|
662
|
+
/** Symbol category entity. */
|
|
663
|
+
export interface ProtoOASymbolCategory {
|
|
664
|
+
/** The unique identifier of the symbol category. */
|
|
665
|
+
id: number;
|
|
666
|
+
/** Link to the asset class. One asset class can have many symbol categories. */
|
|
667
|
+
assetClassId: number;
|
|
668
|
+
/** Category name. */
|
|
669
|
+
name: string;
|
|
670
|
+
/** The number used for sorting Symbol Categories in the UI (lowest number should appear at the top). */
|
|
671
|
+
sortingNumber?: number | undefined;
|
|
672
|
+
}
|
|
673
|
+
/** Symbol trading session entity. */
|
|
674
|
+
export interface ProtoOAInterval {
|
|
675
|
+
/** Interval start, specified in seconds starting from SUNDAY 00:00 in specified time zone (inclusive to the interval). */
|
|
676
|
+
startSecond: number;
|
|
677
|
+
/** Interval end, specified in seconds starting from SUNDAY 00:00 in specified time zone (exclusive from the interval). */
|
|
678
|
+
endSecond: number;
|
|
679
|
+
}
|
|
680
|
+
/** Trading account entity. */
|
|
681
|
+
export interface ProtoOATrader {
|
|
682
|
+
/** The unique Trader's Account ID used to match the responses to the Trader's Account. */
|
|
683
|
+
ctidTraderAccountId: number;
|
|
684
|
+
/** Current account balance. */
|
|
685
|
+
balance: number;
|
|
686
|
+
/** Balance version used to identify the final balance. Increments each time when the trader's account balance is changed. */
|
|
687
|
+
balanceVersion?: number | undefined;
|
|
688
|
+
/** Amount of broker's bonus allocated to the account. */
|
|
689
|
+
managerBonus?: number | undefined;
|
|
690
|
+
/** Amount of introducing broker bonus allocated to the account. */
|
|
691
|
+
ibBonus?: number | undefined;
|
|
692
|
+
/** Broker's bonus that cannot be withdrew from the account as cash. */
|
|
693
|
+
nonWithdrawableBonus?: number | undefined;
|
|
694
|
+
/** Access rights that an owner has to the account in cTrader platform. See ProtoOAAccessRights for details. */
|
|
695
|
+
accessRights?: ProtoOAAccessRights | undefined;
|
|
696
|
+
/** Deposit currency of the account. */
|
|
697
|
+
depositAssetId: number;
|
|
698
|
+
/** If TRUE then account is Shariah compliant. */
|
|
699
|
+
swapFree?: boolean | undefined;
|
|
700
|
+
/** Account leverage (e.g. If leverage = 1:50 then value = 5000). */
|
|
701
|
+
leverageInCents?: number | undefined;
|
|
702
|
+
/** Margin computation type for the account (MAX, SUM, NET). */
|
|
703
|
+
totalMarginCalculationType?: ProtoOATotalMarginCalculationType | undefined;
|
|
704
|
+
/** Maximum allowed leverage for the account. Used as validation when a Trader can change leverage value. */
|
|
705
|
+
maxLeverage?: number | undefined;
|
|
706
|
+
/**
|
|
707
|
+
* If TRUE then account is AMF compliant. Use isLimitedRisk and limitedRiskMarginCalculationStrategy.
|
|
708
|
+
*
|
|
709
|
+
* @deprecated
|
|
710
|
+
*/
|
|
711
|
+
frenchRisk?: boolean | undefined;
|
|
712
|
+
/** ID of the account that is unique per server (Broker). */
|
|
713
|
+
traderLogin?: number | undefined;
|
|
714
|
+
/** Account type: HEDGED, NETTED, etc. */
|
|
715
|
+
accountType?: ProtoOAAccountType | undefined;
|
|
716
|
+
/** Some whitelabel assigned to trader by broker at the moment of account creation. */
|
|
717
|
+
brokerName?: string | undefined;
|
|
718
|
+
/** The Unix timestamp in milliseconds of the account registration. Should be used as minimal date in historical data requests. */
|
|
719
|
+
registrationTimestamp?: number | undefined;
|
|
720
|
+
/** If TRUE then account is compliant to use specific margin calculation strategy. Such accounts are require to have guaranteed stop loss on all positions. */
|
|
721
|
+
isLimitedRisk?: boolean | undefined;
|
|
722
|
+
/** Special strategy used in margin calculations for this account (if account isLimitedRisk). */
|
|
723
|
+
limitedRiskMarginCalculationStrategy?: ProtoOALimitedRiskMarginCalculationStrategy | undefined;
|
|
724
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, managerBonus, ibBonus, nonWithdrawableBonus. */
|
|
725
|
+
moneyDigits?: number | undefined;
|
|
726
|
+
/** If TRUE - Position is fully closed on Stop Out, if FALSE - smart (partial closing) Stop Out is applied, if unspecified - Stop Out format is determined by Broker. */
|
|
727
|
+
fairStopOut?: boolean | undefined;
|
|
728
|
+
/** The Stop Out strategy that is used for this Trader. The Trader can change the value in the cTrader UI if this option is not disabled by the Broker */
|
|
729
|
+
stopOutStrategy?: ProtoOAStopOutStrategy | undefined;
|
|
730
|
+
}
|
|
731
|
+
/** Trade position entity. */
|
|
732
|
+
export interface ProtoOAPosition {
|
|
733
|
+
/** The unique ID of the position. Note: trader might have two positions with the same id if positions are taken from accounts from different brokers. */
|
|
734
|
+
positionId: number;
|
|
735
|
+
/** Position details. See ProtoOATradeData for details. */
|
|
736
|
+
tradeData?: ProtoOATradeData | undefined;
|
|
737
|
+
/** Current status of the position. */
|
|
738
|
+
positionStatus: ProtoOAPositionStatus;
|
|
739
|
+
/** Total amount of charged swap on open position. */
|
|
740
|
+
swap: number;
|
|
741
|
+
/** VWAP price of the position based on all executions (orders) linked to the position. */
|
|
742
|
+
price?: number | undefined;
|
|
743
|
+
/** Current stop loss price. */
|
|
744
|
+
stopLoss?: number | undefined;
|
|
745
|
+
/** Current take profit price. */
|
|
746
|
+
takeProfit?: number | undefined;
|
|
747
|
+
/** The Unix time in milliseconds of the last change of the position, including amend SL/TP of the position, execution of related order, cancel or related order, etc. */
|
|
748
|
+
utcLastUpdateTimestamp?: number | undefined;
|
|
749
|
+
/** Current unrealized commission related to the position. */
|
|
750
|
+
commission?: number | undefined;
|
|
751
|
+
/** Rate for used margin computation. Represented as Base/Deposit. */
|
|
752
|
+
marginRate?: number | undefined;
|
|
753
|
+
/** Amount of unrealized commission related to following of strategy provider. */
|
|
754
|
+
mirroringCommission?: number | undefined;
|
|
755
|
+
/** If TRUE then position's stop loss is guaranteedStopLoss. */
|
|
756
|
+
guaranteedStopLoss?: boolean | undefined;
|
|
757
|
+
/** Amount of margin used for the position in deposit currency. */
|
|
758
|
+
usedMargin?: number | undefined;
|
|
759
|
+
/** Stop trigger method for SL/TP of the position. */
|
|
760
|
+
stopLossTriggerMethod?: ProtoOAOrderTriggerMethod | undefined;
|
|
761
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects swap, commission, mirroringCommission, usedMargin. */
|
|
762
|
+
moneyDigits?: number | undefined;
|
|
763
|
+
/** If TRUE then the Trailing Stop Loss is applied. */
|
|
764
|
+
trailingStopLoss?: boolean | undefined;
|
|
765
|
+
}
|
|
766
|
+
/** Position/order trading details entity. */
|
|
767
|
+
export interface ProtoOATradeData {
|
|
768
|
+
/** The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs. */
|
|
769
|
+
symbolId: number;
|
|
770
|
+
/** Volume in cents (e.g. 1000 in protocol means 10.00 units). */
|
|
771
|
+
volume: number;
|
|
772
|
+
/** Buy, Sell. */
|
|
773
|
+
tradeSide: ProtoOATradeSide;
|
|
774
|
+
/** The Unix time in milliseconds when position was opened or order was created. */
|
|
775
|
+
openTimestamp?: number | undefined;
|
|
776
|
+
/** Text label specified during order request. */
|
|
777
|
+
label?: string | undefined;
|
|
778
|
+
/** If TRUE then position/order stop loss is guaranteedStopLoss. */
|
|
779
|
+
guaranteedStopLoss?: boolean | undefined;
|
|
780
|
+
/** User-specified comment. */
|
|
781
|
+
comment?: string | undefined;
|
|
782
|
+
/** Specifies the units in which the Symbol is denominated. */
|
|
783
|
+
measurementUnits?: string | undefined;
|
|
784
|
+
/** The Unix time in milliseconds when a Position was closed */
|
|
785
|
+
closeTimestamp?: number | undefined;
|
|
786
|
+
}
|
|
787
|
+
/** Trade order entity. */
|
|
788
|
+
export interface ProtoOAOrder {
|
|
789
|
+
/** The unique ID of the order. Note: trader might have two orders with the same id if orders are taken from accounts from different brokers. */
|
|
790
|
+
orderId: number;
|
|
791
|
+
/** Detailed trader data. */
|
|
792
|
+
tradeData?: ProtoOATradeData | undefined;
|
|
793
|
+
/** Order type. */
|
|
794
|
+
orderType: ProtoOAOrderType;
|
|
795
|
+
/** Order status. */
|
|
796
|
+
orderStatus: ProtoOAOrderStatus;
|
|
797
|
+
/** The Unix time in milliseconds of expiration if the order has time in force GTD. */
|
|
798
|
+
expirationTimestamp?: number | undefined;
|
|
799
|
+
/** Price at which an order was executed. For order with FILLED status. */
|
|
800
|
+
executionPrice?: number | undefined;
|
|
801
|
+
/** Part of the volume that was filled in cents (e.g. 1000 in protocol means 10.00 units). */
|
|
802
|
+
executedVolume?: number | undefined;
|
|
803
|
+
/** The Unix time in milliseconds of the last update of the order. */
|
|
804
|
+
utcLastUpdateTimestamp?: number | undefined;
|
|
805
|
+
/** Used for Market Range order with combination of slippageInPoints to specify price range were order can be executed. */
|
|
806
|
+
baseSlippagePrice?: number | undefined;
|
|
807
|
+
/** Used for Market Range and STOP_LIMIT orders to to specify price range were order can be executed. */
|
|
808
|
+
slippageInPoints?: number | undefined;
|
|
809
|
+
/** If TRUE then the order is closing part of whole position. Must have specified positionId. */
|
|
810
|
+
closingOrder?: boolean | undefined;
|
|
811
|
+
/** Valid only for LIMIT orders. */
|
|
812
|
+
limitPrice?: number | undefined;
|
|
813
|
+
/** Valid only for STOP and STOP_LIMIT orders. */
|
|
814
|
+
stopPrice?: number | undefined;
|
|
815
|
+
/** Absolute stopLoss price. */
|
|
816
|
+
stopLoss?: number | undefined;
|
|
817
|
+
/** Absolute takeProfit price. */
|
|
818
|
+
takeProfit?: number | undefined;
|
|
819
|
+
/** Optional ClientOrderId. Max Length = 50 chars. */
|
|
820
|
+
clientOrderId?: string | undefined;
|
|
821
|
+
/** Order's time in force. Depends on order type. */
|
|
822
|
+
timeInForce?: ProtoOATimeInForce | undefined;
|
|
823
|
+
/** ID of the position linked to the order (e.g. closing order, order that increase volume of a specific position, etc.). */
|
|
824
|
+
positionId?: number | undefined;
|
|
825
|
+
/** Relative stopLoss that can be specified instead of absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss. */
|
|
826
|
+
relativeStopLoss?: number | undefined;
|
|
827
|
+
/** Relative takeProfit that can be specified instead of absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) ForBUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit. */
|
|
828
|
+
relativeTakeProfit?: number | undefined;
|
|
829
|
+
/** If TRUE then order was stopped out from server side. */
|
|
830
|
+
isStopOut?: boolean | undefined;
|
|
831
|
+
/** If TRUE then order is trailingStopLoss. Valid for STOP_LOSS_TAKE_PROFIT order. */
|
|
832
|
+
trailingStopLoss?: boolean | undefined;
|
|
833
|
+
/** Trigger method for the order. Valid only for STOP and STOP_LIMIT orders. */
|
|
834
|
+
stopTriggerMethod?: ProtoOAOrderTriggerMethod | undefined;
|
|
835
|
+
}
|
|
836
|
+
/** Bonus deposit/withdrawal entity. */
|
|
837
|
+
export interface ProtoOABonusDepositWithdraw {
|
|
838
|
+
/** Type of the operation. Deposit/Withdrawal. */
|
|
839
|
+
operationType: ProtoOAChangeBonusType;
|
|
840
|
+
/** The unique ID of the bonus deposit/withdrawal operation. */
|
|
841
|
+
bonusHistoryId: number;
|
|
842
|
+
/** Total amount of broker's bonus after the operation. */
|
|
843
|
+
managerBonus: number;
|
|
844
|
+
/** Amount of bonus deposited/withdrew by manager. */
|
|
845
|
+
managerDelta: number;
|
|
846
|
+
/** Total amount of introducing broker's bonus after the operation. */
|
|
847
|
+
ibBonus: number;
|
|
848
|
+
/** Amount of bonus deposited/withdrew by introducing broker. */
|
|
849
|
+
ibDelta: number;
|
|
850
|
+
/** The Unix time in milliseconds when the bonus operation was executed. */
|
|
851
|
+
changeBonusTimestamp: number;
|
|
852
|
+
/** Note added to operation. Visible to the trader. */
|
|
853
|
+
externalNote?: string | undefined;
|
|
854
|
+
/** ID of introducing broker who deposited/withdrew bonus. */
|
|
855
|
+
introducingBrokerId?: number | undefined;
|
|
856
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects managerBonus, managerDelta, ibBonus, ibDelta. */
|
|
857
|
+
moneyDigits?: number | undefined;
|
|
858
|
+
}
|
|
859
|
+
/** Account deposit/withdrawal operation entity. */
|
|
860
|
+
export interface ProtoOADepositWithdraw {
|
|
861
|
+
/** Type of the operation. Deposit/Withdrawal. */
|
|
862
|
+
operationType: ProtoOAChangeBalanceType;
|
|
863
|
+
/** The unique ID of the deposit/withdrawal operation. */
|
|
864
|
+
balanceHistoryId: number;
|
|
865
|
+
/** Account balance after the operation was executed. */
|
|
866
|
+
balance: number;
|
|
867
|
+
/** Amount of deposit/withdrawal operation. */
|
|
868
|
+
delta: number;
|
|
869
|
+
/** The Unix time in milliseconds when deposit/withdrawal operation was executed. */
|
|
870
|
+
changeBalanceTimestamp: number;
|
|
871
|
+
/** Note added to operation. Visible to the trader. */
|
|
872
|
+
externalNote?: string | undefined;
|
|
873
|
+
/** Balance version used to identify the final balance. Increments each time when the trader's account balance is changed. */
|
|
874
|
+
balanceVersion?: number | undefined;
|
|
875
|
+
/** Total account's equity after balance operation was executed. */
|
|
876
|
+
equity?: number | undefined;
|
|
877
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, delta, equity. */
|
|
878
|
+
moneyDigits?: number | undefined;
|
|
879
|
+
}
|
|
880
|
+
/** Execution entity. */
|
|
881
|
+
export interface ProtoOADeal {
|
|
882
|
+
/** The unique ID of the execution deal. */
|
|
883
|
+
dealId: number;
|
|
884
|
+
/** Source order of the deal. */
|
|
885
|
+
orderId: number;
|
|
886
|
+
/** Source position of the deal. */
|
|
887
|
+
positionId: number;
|
|
888
|
+
/** Volume sent for execution, in cents. */
|
|
889
|
+
volume: number;
|
|
890
|
+
/** Filled volume, in cents. */
|
|
891
|
+
filledVolume: number;
|
|
892
|
+
/** The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs. */
|
|
893
|
+
symbolId: number;
|
|
894
|
+
/** The Unix time in milliseconds when the deal was sent for execution. */
|
|
895
|
+
createTimestamp: number;
|
|
896
|
+
/** The Unix time in milliseconds when the deal was executed. */
|
|
897
|
+
executionTimestamp: number;
|
|
898
|
+
/** The Unix time in milliseconds when the deal was created, executed or rejected. */
|
|
899
|
+
utcLastUpdateTimestamp?: number | undefined;
|
|
900
|
+
/** Execution price. */
|
|
901
|
+
executionPrice?: number | undefined;
|
|
902
|
+
/** Buy/Sell. */
|
|
903
|
+
tradeSide: ProtoOATradeSide;
|
|
904
|
+
/** Status of the deal. */
|
|
905
|
+
dealStatus: ProtoOADealStatus;
|
|
906
|
+
/** Rate for used margin computation. Represented as Base/Deposit. */
|
|
907
|
+
marginRate?: number | undefined;
|
|
908
|
+
/** Amount of trading commission associated with the deal. */
|
|
909
|
+
commission?: number | undefined;
|
|
910
|
+
/** Base to USD conversion rate on the time of deal execution. */
|
|
911
|
+
baseToUsdConversionRate?: number | undefined;
|
|
912
|
+
/** Closing position detail. Valid only for closing deal. */
|
|
913
|
+
closePositionDetail?: ProtoOAClosePositionDetail | undefined;
|
|
914
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects commission. */
|
|
915
|
+
moneyDigits?: number | undefined;
|
|
916
|
+
}
|
|
917
|
+
/** Deal details for ProtoOADealOffsetListReq. */
|
|
918
|
+
export interface ProtoOADealOffset {
|
|
919
|
+
/** The unique ID of the execution Deal. */
|
|
920
|
+
dealId: number;
|
|
921
|
+
/** Matched volume, in cents. */
|
|
922
|
+
volume: number;
|
|
923
|
+
/** The Unix time in milliseconds when the offset Deal was executed. */
|
|
924
|
+
executionTimestamp?: number | undefined;
|
|
925
|
+
/** Execution price of the offset Deal. */
|
|
926
|
+
executionPrice?: number | undefined;
|
|
927
|
+
}
|
|
928
|
+
/** Trading details for closing deal. */
|
|
929
|
+
export interface ProtoOAClosePositionDetail {
|
|
930
|
+
/** Position price at the moment of filling the closing order. */
|
|
931
|
+
entryPrice: number;
|
|
932
|
+
/** Amount of realized gross profit after closing deal execution. */
|
|
933
|
+
grossProfit: number;
|
|
934
|
+
/** Amount of realized swap related to closed volume. */
|
|
935
|
+
swap: number;
|
|
936
|
+
/** Amount of realized commission related to closed volume. */
|
|
937
|
+
commission: number;
|
|
938
|
+
/** Account balance after closing deal execution. */
|
|
939
|
+
balance: number;
|
|
940
|
+
/** Quote/Deposit currency conversion rate on the time of closing deal execution. */
|
|
941
|
+
quoteToDepositConversionRate?: number | undefined;
|
|
942
|
+
/** Closed volume in cents. */
|
|
943
|
+
closedVolume?: number | undefined;
|
|
944
|
+
/** Balance version of the account related to closing deal operation. */
|
|
945
|
+
balanceVersion?: number | undefined;
|
|
946
|
+
/** Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects grossProfit, swap, commission, balance, pnlConversionFee. */
|
|
947
|
+
moneyDigits?: number | undefined;
|
|
948
|
+
/** Fee for conversion applied to the Deal in account's ccy when trader symbol's quote asset id <> ProtoOATrader.depositAssetId. */
|
|
949
|
+
pnlConversionFee?: number | undefined;
|
|
950
|
+
}
|
|
951
|
+
/** Historical Trendbar entity. */
|
|
952
|
+
export interface ProtoOATrendbar {
|
|
953
|
+
/** Bar volume in ticks. */
|
|
954
|
+
volume: number;
|
|
955
|
+
/** Bar period. */
|
|
956
|
+
period?: ProtoOATrendbarPeriod | undefined;
|
|
957
|
+
/** Low price of the bar. */
|
|
958
|
+
low?: number | undefined;
|
|
959
|
+
/** Delta between open and low price. open = low + deltaOpen. */
|
|
960
|
+
deltaOpen?: number | undefined;
|
|
961
|
+
/** Delta between close and low price. close = low + deltaClose. */
|
|
962
|
+
deltaClose?: number | undefined;
|
|
963
|
+
/** Delta between high and low price. high = low + deltaHigh. */
|
|
964
|
+
deltaHigh?: number | undefined;
|
|
965
|
+
/** The Unix time in minutes of the bar, equal to the timestamp of the open tick. */
|
|
966
|
+
utcTimestampInMinutes?: number | undefined;
|
|
967
|
+
}
|
|
968
|
+
/** Expected margin computation entity. */
|
|
969
|
+
export interface ProtoOAExpectedMargin {
|
|
970
|
+
/** Volume in cents used for computation of expected margin. */
|
|
971
|
+
volume: number;
|
|
972
|
+
/** Buy margin amount. */
|
|
973
|
+
buyMargin: number;
|
|
974
|
+
/** Sell margin amount. */
|
|
975
|
+
sellMargin: number;
|
|
976
|
+
}
|
|
977
|
+
/** Historical tick data type. */
|
|
978
|
+
export interface ProtoOATickData {
|
|
979
|
+
/** The Unix time in milliseconds of the tick. See ProtoOAGetTickDataRes.tickData for details. */
|
|
980
|
+
timestamp: number;
|
|
981
|
+
/** Tick price. */
|
|
982
|
+
tick: number;
|
|
983
|
+
}
|
|
984
|
+
/** Trader profile entity. Empty due to GDPR. */
|
|
985
|
+
export interface ProtoOACtidProfile {
|
|
986
|
+
userId: number;
|
|
987
|
+
}
|
|
988
|
+
/** Trader account entity. */
|
|
989
|
+
export interface ProtoOACtidTraderAccount {
|
|
990
|
+
/** Unique identifier of the trader's account. Used to match responses to trader's accounts.cTrader platform. Different brokers might have different ids */
|
|
991
|
+
ctidTraderAccountId: number;
|
|
992
|
+
/** If TRUE then the account is belong to Live environment and live host must be used to authorize it */
|
|
993
|
+
isLive?: boolean | undefined;
|
|
994
|
+
/** TraderLogin for a specific account. Value is displayed on Client App UI */
|
|
995
|
+
traderLogin?: number | undefined;
|
|
996
|
+
/** The Unix time in milliseconds of the last ProtoOAClosePositionDetail happened to this account. */
|
|
997
|
+
lastClosingDealTimestamp?: number | undefined;
|
|
998
|
+
/** The Unix time in milliseconds of the last ProtoOADepositWithdraw happened to this account. */
|
|
999
|
+
lastBalanceUpdateTimestamp?: number | undefined;
|
|
1000
|
+
/** The name of the broker to which the account belongs to. Shortened to be displayed in the UI. */
|
|
1001
|
+
brokerTitleShort?: string | undefined;
|
|
1002
|
+
}
|
|
1003
|
+
/** Asset class entity. */
|
|
1004
|
+
export interface ProtoOAAssetClass {
|
|
1005
|
+
/** Unique asset ID. */
|
|
1006
|
+
id?: number | undefined;
|
|
1007
|
+
/** Asset class name. */
|
|
1008
|
+
name?: string | undefined;
|
|
1009
|
+
/** The number used for sorting Asset Classes in the UI (lowest number should appear at the top). */
|
|
1010
|
+
sortingNumber?: number | undefined;
|
|
1011
|
+
}
|
|
1012
|
+
/** Depth of market entity. */
|
|
1013
|
+
export interface ProtoOADepthQuote {
|
|
1014
|
+
/** Quote ID. */
|
|
1015
|
+
id: number;
|
|
1016
|
+
/** Quote size in cents. */
|
|
1017
|
+
size: number;
|
|
1018
|
+
/** Bid price for bid quotes. */
|
|
1019
|
+
bid?: number | undefined;
|
|
1020
|
+
/** Ask price for ask quotes. */
|
|
1021
|
+
ask?: number | undefined;
|
|
1022
|
+
}
|
|
1023
|
+
/** Margin call entity, specifies threshold for exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details. */
|
|
1024
|
+
export interface ProtoOAMarginCall {
|
|
1025
|
+
/** Type of margin call. All margin calls are similar, only difference is in marginLevelThreshold. */
|
|
1026
|
+
marginCallType: ProtoOANotificationType;
|
|
1027
|
+
/** Margin level threshold for margin call. */
|
|
1028
|
+
marginLevelThreshold: number;
|
|
1029
|
+
/** The Unix time in milliseconds of the last update of the margin call. */
|
|
1030
|
+
utcLastUpdateTimestamp?: number | undefined;
|
|
1031
|
+
}
|
|
1032
|
+
export interface ProtoOAHoliday {
|
|
1033
|
+
/** Unique ID of holiday. */
|
|
1034
|
+
holidayId: number;
|
|
1035
|
+
/** Name of holiday. */
|
|
1036
|
+
name: string;
|
|
1037
|
+
/** Description of holiday. */
|
|
1038
|
+
description?: string | undefined;
|
|
1039
|
+
/** Timezone used for holiday. */
|
|
1040
|
+
scheduleTimeZone: string;
|
|
1041
|
+
/** Amount of days from 1st Jan 1970, multiply it by 86400000 to get Unix time in milliseconds. */
|
|
1042
|
+
holidayDate: number;
|
|
1043
|
+
/** If TRUE, then the holiday happens each year. */
|
|
1044
|
+
isRecurring: boolean;
|
|
1045
|
+
/** Amount of seconds from 00:00:00 of the holiday day when holiday actually starts. */
|
|
1046
|
+
startSecond?: number | undefined;
|
|
1047
|
+
/** Amount of seconds from 00:00:00 of the holiday day when holiday actually finishes. */
|
|
1048
|
+
endSecond?: number | undefined;
|
|
1049
|
+
}
|
|
1050
|
+
export interface ProtoOADynamicLeverage {
|
|
1051
|
+
/** Unique ID of dynamic leverage. */
|
|
1052
|
+
leverageId: number;
|
|
1053
|
+
/** Tiers sorted by volume. Last tier's leverage is applied also to volume above specified. */
|
|
1054
|
+
tiers: ProtoOADynamicLeverageTier[];
|
|
1055
|
+
}
|
|
1056
|
+
export interface ProtoOADynamicLeverageTier {
|
|
1057
|
+
/** Max USD volume (in cents) of the Open Position (per side) to apply specified leverage. Last tier's leverage is applied also to volume above specified. */
|
|
1058
|
+
volume: number;
|
|
1059
|
+
/** Applied leverage. */
|
|
1060
|
+
leverage: number;
|
|
1061
|
+
}
|
|
1062
|
+
export interface ProtoOAPositionUnrealizedPnL {
|
|
1063
|
+
/** The position ID. */
|
|
1064
|
+
positionId: number;
|
|
1065
|
+
/** The gross unrealized PnL of the position denoted in the account deposit currency. */
|
|
1066
|
+
grossUnrealizedPnL: number;
|
|
1067
|
+
/** The net unrealized PnL of the position denoted in the account deposit currency. It does not include potential closing commission. */
|
|
1068
|
+
netUnrealizedPnL: number;
|
|
1069
|
+
}
|
|
1070
|
+
export declare const ProtoOAAsset: MessageFns<ProtoOAAsset>;
|
|
1071
|
+
export declare const ProtoOASymbol: MessageFns<ProtoOASymbol>;
|
|
1072
|
+
export declare const ProtoOALightSymbol: MessageFns<ProtoOALightSymbol>;
|
|
1073
|
+
export declare const ProtoOAArchivedSymbol: MessageFns<ProtoOAArchivedSymbol>;
|
|
1074
|
+
export declare const ProtoOASymbolCategory: MessageFns<ProtoOASymbolCategory>;
|
|
1075
|
+
export declare const ProtoOAInterval: MessageFns<ProtoOAInterval>;
|
|
1076
|
+
export declare const ProtoOATrader: MessageFns<ProtoOATrader>;
|
|
1077
|
+
export declare const ProtoOAPosition: MessageFns<ProtoOAPosition>;
|
|
1078
|
+
export declare const ProtoOATradeData: MessageFns<ProtoOATradeData>;
|
|
1079
|
+
export declare const ProtoOAOrder: MessageFns<ProtoOAOrder>;
|
|
1080
|
+
export declare const ProtoOABonusDepositWithdraw: MessageFns<ProtoOABonusDepositWithdraw>;
|
|
1081
|
+
export declare const ProtoOADepositWithdraw: MessageFns<ProtoOADepositWithdraw>;
|
|
1082
|
+
export declare const ProtoOADeal: MessageFns<ProtoOADeal>;
|
|
1083
|
+
export declare const ProtoOADealOffset: MessageFns<ProtoOADealOffset>;
|
|
1084
|
+
export declare const ProtoOAClosePositionDetail: MessageFns<ProtoOAClosePositionDetail>;
|
|
1085
|
+
export declare const ProtoOATrendbar: MessageFns<ProtoOATrendbar>;
|
|
1086
|
+
export declare const ProtoOAExpectedMargin: MessageFns<ProtoOAExpectedMargin>;
|
|
1087
|
+
export declare const ProtoOATickData: MessageFns<ProtoOATickData>;
|
|
1088
|
+
export declare const ProtoOACtidProfile: MessageFns<ProtoOACtidProfile>;
|
|
1089
|
+
export declare const ProtoOACtidTraderAccount: MessageFns<ProtoOACtidTraderAccount>;
|
|
1090
|
+
export declare const ProtoOAAssetClass: MessageFns<ProtoOAAssetClass>;
|
|
1091
|
+
export declare const ProtoOADepthQuote: MessageFns<ProtoOADepthQuote>;
|
|
1092
|
+
export declare const ProtoOAMarginCall: MessageFns<ProtoOAMarginCall>;
|
|
1093
|
+
export declare const ProtoOAHoliday: MessageFns<ProtoOAHoliday>;
|
|
1094
|
+
export declare const ProtoOADynamicLeverage: MessageFns<ProtoOADynamicLeverage>;
|
|
1095
|
+
export declare const ProtoOADynamicLeverageTier: MessageFns<ProtoOADynamicLeverageTier>;
|
|
1096
|
+
export declare const ProtoOAPositionUnrealizedPnL: MessageFns<ProtoOAPositionUnrealizedPnL>;
|
|
1097
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1098
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
1099
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
1100
|
+
} : Partial<T>;
|
|
1101
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
1102
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
1103
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
1104
|
+
} & {
|
|
1105
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
1106
|
+
};
|
|
1107
|
+
export interface MessageFns<T> {
|
|
1108
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1109
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1110
|
+
fromJSON(object: any): T;
|
|
1111
|
+
toJSON(message: T): unknown;
|
|
1112
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
1113
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
1114
|
+
}
|
|
1115
|
+
export {};
|
|
1116
|
+
//# sourceMappingURL=OpenApiModelMessages.d.ts.map
|