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.
Files changed (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +177 -0
  3. package/dist/auth/index.d.ts +7 -0
  4. package/dist/auth/index.d.ts.map +1 -0
  5. package/dist/auth/index.js +23 -0
  6. package/dist/auth/index.js.map +1 -0
  7. package/dist/auth/spotware-oauth-client.d.ts +31 -0
  8. package/dist/auth/spotware-oauth-client.d.ts.map +1 -0
  9. package/dist/auth/spotware-oauth-client.js +65 -0
  10. package/dist/auth/spotware-oauth-client.js.map +1 -0
  11. package/dist/auth/spotware-oauth-endpoints.d.ts +3 -0
  12. package/dist/auth/spotware-oauth-endpoints.d.ts.map +1 -0
  13. package/dist/auth/spotware-oauth-endpoints.js +8 -0
  14. package/dist/auth/spotware-oauth-endpoints.js.map +1 -0
  15. package/dist/auth/spotware-oauth-error.d.ts +6 -0
  16. package/dist/auth/spotware-oauth-error.d.ts.map +1 -0
  17. package/dist/auth/spotware-oauth-error.js +15 -0
  18. package/dist/auth/spotware-oauth-error.js.map +1 -0
  19. package/dist/auth/spotware-oauth-scope.enum.d.ts +5 -0
  20. package/dist/auth/spotware-oauth-scope.enum.d.ts.map +1 -0
  21. package/dist/auth/spotware-oauth-scope.enum.js +9 -0
  22. package/dist/auth/spotware-oauth-scope.enum.js.map +1 -0
  23. package/dist/auth/spotware-oauth-token.model.d.ts +7 -0
  24. package/dist/auth/spotware-oauth-token.model.d.ts.map +1 -0
  25. package/dist/auth/spotware-oauth-token.model.js +3 -0
  26. package/dist/auth/spotware-oauth-token.model.js.map +1 -0
  27. package/dist/auth/spotware-socket-auth-error.d.ts +5 -0
  28. package/dist/auth/spotware-socket-auth-error.d.ts.map +1 -0
  29. package/dist/auth/spotware-socket-auth-error.js +13 -0
  30. package/dist/auth/spotware-socket-auth-error.js.map +1 -0
  31. package/dist/auth/spotware-socket-authenticator.d.ts +21 -0
  32. package/dist/auth/spotware-socket-authenticator.d.ts.map +1 -0
  33. package/dist/auth/spotware-socket-authenticator.js +80 -0
  34. package/dist/auth/spotware-socket-authenticator.js.map +1 -0
  35. package/dist/client/index.d.ts +3 -0
  36. package/dist/client/index.d.ts.map +1 -0
  37. package/dist/client/index.js +19 -0
  38. package/dist/client/index.js.map +1 -0
  39. package/dist/client/spotware-client.d.ts +56 -0
  40. package/dist/client/spotware-client.d.ts.map +1 -0
  41. package/dist/client/spotware-client.js +172 -0
  42. package/dist/client/spotware-client.js.map +1 -0
  43. package/dist/client/spotware-request-error.d.ts +5 -0
  44. package/dist/client/spotware-request-error.d.ts.map +1 -0
  45. package/dist/client/spotware-request-error.js +13 -0
  46. package/dist/client/spotware-request-error.js.map +1 -0
  47. package/dist/example/example.d.ts +2 -0
  48. package/dist/example/example.d.ts.map +1 -0
  49. package/dist/example/example.js +187 -0
  50. package/dist/example/example.js.map +1 -0
  51. package/dist/example/market-data-example.d.ts +2 -0
  52. package/dist/example/market-data-example.d.ts.map +1 -0
  53. package/dist/example/market-data-example.js +32 -0
  54. package/dist/example/market-data-example.js.map +1 -0
  55. package/dist/example/shared/create-authenticated-client.d.ts +9 -0
  56. package/dist/example/shared/create-authenticated-client.d.ts.map +1 -0
  57. package/dist/example/shared/create-authenticated-client.js +154 -0
  58. package/dist/example/shared/create-authenticated-client.js.map +1 -0
  59. package/dist/example/trading-example.d.ts +2 -0
  60. package/dist/example/trading-example.d.ts.map +1 -0
  61. package/dist/example/trading-example.js +78 -0
  62. package/dist/example/trading-example.js.map +1 -0
  63. package/dist/index.d.ts +7 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +23 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/market-data/index.d.ts +3 -0
  68. package/dist/market-data/index.d.ts.map +1 -0
  69. package/dist/market-data/index.js +19 -0
  70. package/dist/market-data/index.js.map +1 -0
  71. package/dist/market-data/spotware-market-data.d.ts +31 -0
  72. package/dist/market-data/spotware-market-data.d.ts.map +1 -0
  73. package/dist/market-data/spotware-market-data.js +68 -0
  74. package/dist/market-data/spotware-market-data.js.map +1 -0
  75. package/dist/market-data/spotware-symbol-catalog.d.ts +19 -0
  76. package/dist/market-data/spotware-symbol-catalog.d.ts.map +1 -0
  77. package/dist/market-data/spotware-symbol-catalog.js +52 -0
  78. package/dist/market-data/spotware-symbol-catalog.js.map +1 -0
  79. package/dist/shared/sleep.d.ts +5 -0
  80. package/dist/shared/sleep.d.ts.map +1 -0
  81. package/dist/shared/sleep.js +17 -0
  82. package/dist/shared/sleep.js.map +1 -0
  83. package/dist/shared/spotware-scale.d.ts +3 -0
  84. package/dist/shared/spotware-scale.d.ts.map +1 -0
  85. package/dist/shared/spotware-scale.js +12 -0
  86. package/dist/shared/spotware-scale.js.map +1 -0
  87. package/dist/shared/typed-event-emitter.d.ts +13 -0
  88. package/dist/shared/typed-event-emitter.d.ts.map +1 -0
  89. package/dist/shared/typed-event-emitter.js +28 -0
  90. package/dist/shared/typed-event-emitter.js.map +1 -0
  91. package/dist/trading/index.d.ts +2 -0
  92. package/dist/trading/index.d.ts.map +1 -0
  93. package/dist/trading/index.js +18 -0
  94. package/dist/trading/index.js.map +1 -0
  95. package/dist/trading/spotware-trading.d.ts +59 -0
  96. package/dist/trading/spotware-trading.d.ts.map +1 -0
  97. package/dist/trading/spotware-trading.js +97 -0
  98. package/dist/trading/spotware-trading.js.map +1 -0
  99. package/dist/transport/frame-codec.d.ts +6 -0
  100. package/dist/transport/frame-codec.d.ts.map +1 -0
  101. package/dist/transport/frame-codec.js +35 -0
  102. package/dist/transport/frame-codec.js.map +1 -0
  103. package/dist/transport/index.d.ts +4 -0
  104. package/dist/transport/index.d.ts.map +1 -0
  105. package/dist/transport/index.js +20 -0
  106. package/dist/transport/index.js.map +1 -0
  107. package/dist/transport/rate-limiter.d.ts +11 -0
  108. package/dist/transport/rate-limiter.d.ts.map +1 -0
  109. package/dist/transport/rate-limiter.js +48 -0
  110. package/dist/transport/rate-limiter.js.map +1 -0
  111. package/dist/transport/reconnect-backoff.d.ts +12 -0
  112. package/dist/transport/reconnect-backoff.d.ts.map +1 -0
  113. package/dist/transport/reconnect-backoff.js +20 -0
  114. package/dist/transport/reconnect-backoff.js.map +1 -0
  115. package/dist/transport/spotware-host.enum.d.ts +6 -0
  116. package/dist/transport/spotware-host.enum.d.ts.map +1 -0
  117. package/dist/transport/spotware-host.enum.js +10 -0
  118. package/dist/transport/spotware-host.enum.js.map +1 -0
  119. package/dist/transport/spotware-rate-limiter.d.ts +8 -0
  120. package/dist/transport/spotware-rate-limiter.d.ts.map +1 -0
  121. package/dist/transport/spotware-rate-limiter.js +29 -0
  122. package/dist/transport/spotware-rate-limiter.js.map +1 -0
  123. package/dist/transport/spotware-transport.d.ts +63 -0
  124. package/dist/transport/spotware-transport.d.ts.map +1 -0
  125. package/dist/transport/spotware-transport.js +237 -0
  126. package/dist/transport/spotware-transport.js.map +1 -0
  127. package/dist/types/generated/OpenApiCommonMessages.d.ts +49 -0
  128. package/dist/types/generated/OpenApiCommonMessages.d.ts.map +1 -0
  129. package/dist/types/generated/OpenApiCommonMessages.js +285 -0
  130. package/dist/types/generated/OpenApiCommonMessages.js.map +1 -0
  131. package/dist/types/generated/OpenApiCommonModelMessages.d.ts +40 -0
  132. package/dist/types/generated/OpenApiCommonModelMessages.d.ts.map +1 -0
  133. package/dist/types/generated/OpenApiCommonModelMessages.js +140 -0
  134. package/dist/types/generated/OpenApiCommonModelMessages.js.map +1 -0
  135. package/dist/types/generated/OpenApiMessages.d.ts +964 -0
  136. package/dist/types/generated/OpenApiMessages.d.ts.map +1 -0
  137. package/dist/types/generated/OpenApiMessages.js +8754 -0
  138. package/dist/types/generated/OpenApiMessages.js.map +1 -0
  139. package/dist/types/generated/OpenApiModelMessages.d.ts +1116 -0
  140. package/dist/types/generated/OpenApiModelMessages.d.ts.map +1 -0
  141. package/dist/types/generated/OpenApiModelMessages.js +6917 -0
  142. package/dist/types/generated/OpenApiModelMessages.js.map +1 -0
  143. package/dist/types/index.d.ts +5 -0
  144. package/dist/types/index.d.ts.map +1 -0
  145. package/dist/types/index.js +141 -0
  146. package/dist/types/index.js.map +1 -0
  147. package/package.json +61 -0
@@ -0,0 +1,964 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { ProtoOAArchivedSymbol, ProtoOAAsset, ProtoOAAssetClass, ProtoOABonusDepositWithdraw, ProtoOAClientPermissionScope, ProtoOACtidProfile, ProtoOACtidTraderAccount, ProtoOADeal, ProtoOADealOffset, ProtoOADepositWithdraw, ProtoOADepthQuote, ProtoOADynamicLeverage, ProtoOAExecutionType, ProtoOAExpectedMargin, ProtoOALightSymbol, ProtoOAMarginCall, ProtoOAOrder, ProtoOAOrderTriggerMethod, ProtoOAOrderType, ProtoOAPayloadType, ProtoOAPosition, ProtoOAPositionUnrealizedPnL, ProtoOAQuoteType, ProtoOASymbol, ProtoOASymbolCategory, ProtoOATickData, ProtoOATimeInForce, ProtoOATrader, ProtoOATradeSide, ProtoOATrendbar, ProtoOATrendbarPeriod } from "./OpenApiModelMessages";
3
+ export declare const protobufPackage = "";
4
+ /** Request for the authorizing an application to work with the cTrader platform Proxies. */
5
+ export interface ProtoOAApplicationAuthReq {
6
+ payloadType?: ProtoOAPayloadType | undefined;
7
+ /** The unique Client ID provided during the registration. */
8
+ clientId: string;
9
+ /** The unique Client Secret provided during the registration. */
10
+ clientSecret: string;
11
+ }
12
+ /** Response to the ProtoOAApplicationAuthReq request. */
13
+ export interface ProtoOAApplicationAuthRes {
14
+ payloadType?: ProtoOAPayloadType | undefined;
15
+ }
16
+ /** Request for authorizing of the trading account session. Requires established authorized connection with the client application using ProtoOAApplicationAuthReq. */
17
+ export interface ProtoOAAccountAuthReq {
18
+ payloadType?: ProtoOAPayloadType | undefined;
19
+ /** The unique identifier of the trader's account in cTrader platform. */
20
+ ctidTraderAccountId: number;
21
+ /** The Access Token issued for providing access to the Trader's Account. */
22
+ accessToken: string;
23
+ }
24
+ /** Response to the ProtoOAApplicationAuthRes request. */
25
+ export interface ProtoOAAccountAuthRes {
26
+ payloadType?: ProtoOAPayloadType | undefined;
27
+ /** The unique identifier of the trader's account in cTrader platform. */
28
+ ctidTraderAccountId: number;
29
+ }
30
+ /** Generic response when an ERROR occurred. */
31
+ export interface ProtoOAErrorRes {
32
+ payloadType?: ProtoOAPayloadType | undefined;
33
+ /** The unique identifier of the trader's account in cTrader platform. */
34
+ ctidTraderAccountId?: number | undefined;
35
+ /** The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). */
36
+ errorCode: string;
37
+ /** The error description. */
38
+ description?: string | undefined;
39
+ /** The Unix time in seconds when the current maintenance session will be ended. */
40
+ maintenanceEndTimestamp?: number | undefined;
41
+ /** When you hit rate limit with errorCode=BLOCKED_PAYLOAD_TYPE, this field will contain amount of seconds until related payload type will be unlocked. */
42
+ retryAfter?: number | undefined;
43
+ }
44
+ /** Event that is sent when the connection with the client application is cancelled by the server. All the sessions for the traders' accounts will be terminated. */
45
+ export interface ProtoOAClientDisconnectEvent {
46
+ payloadType?: ProtoOAPayloadType | undefined;
47
+ /** The disconnection reason explained. For example: The application access was blocked by cTrader Administrator. */
48
+ reason?: string | undefined;
49
+ }
50
+ /** Event that is sent when a session to a specific trader's account is terminated by the server but the existing connections with the other trader's accounts are maintained. Reasons to trigger: account was deleted, cTID was deleted, token was refreshed, token was revoked. */
51
+ export interface ProtoOAAccountsTokenInvalidatedEvent {
52
+ payloadType?: ProtoOAPayloadType | undefined;
53
+ /** The unique identifier of the trader's account in cTrader platform. */
54
+ ctidTraderAccountIds: number[];
55
+ /** The disconnection reason explained. For example: Access Token is expired or recalled. */
56
+ reason?: string | undefined;
57
+ }
58
+ /** Request for getting the proxy version. Can be used to check the current version of the Open API scheme. */
59
+ export interface ProtoOAVersionReq {
60
+ payloadType?: ProtoOAPayloadType | undefined;
61
+ }
62
+ /** Response to the ProtoOAVersionReq request. */
63
+ export interface ProtoOAVersionRes {
64
+ payloadType?: ProtoOAPayloadType | undefined;
65
+ /** The current version of the server application. */
66
+ version: string;
67
+ }
68
+ /** Request for sending a new trading order. Allowed only if the accessToken has the "trade" permissions for the trading account. */
69
+ export interface ProtoOANewOrderReq {
70
+ payloadType?: ProtoOAPayloadType | undefined;
71
+ /** The unique identifier of the trader's account in cTrader platform. */
72
+ ctidTraderAccountId: number;
73
+ /** The unique identifier of a symbol in cTrader platform. */
74
+ symbolId: number;
75
+ /** The type of an order - MARKET, LIMIT, STOP, MARKET_RANGE, STOP_LIMIT. */
76
+ orderType: ProtoOAOrderType;
77
+ /** The trade direction - BUY or SELL. */
78
+ tradeSide: ProtoOATradeSide;
79
+ /** The volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units). */
80
+ volume: number;
81
+ /** The limit price, can be specified for the LIMIT order only. */
82
+ limitPrice?: number | undefined;
83
+ /** Stop Price, can be specified for the STOP and the STOP_LIMIT orders only. */
84
+ stopPrice?: number | undefined;
85
+ /** The specific order execution or expiration instruction - GOOD_TILL_DATE, GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, MARKET_ON_OPEN. */
86
+ timeInForce?: ProtoOATimeInForce | undefined;
87
+ /** The Unix time in milliseconds of Order expiration. Should be set for the Good Till Date orders. */
88
+ expirationTimestamp?: number | undefined;
89
+ /** The absolute Stop Loss price (1.23456 for example). Not supported for MARKET orders. */
90
+ stopLoss?: number | undefined;
91
+ /** The absolute Take Profit price (1.23456 for example). Unsupported for MARKET orders. */
92
+ takeProfit?: number | undefined;
93
+ /** User-specified comment. MaxLength = 512. */
94
+ comment?: string | undefined;
95
+ /** Base price to calculate relative slippage price for MARKET_RANGE order. */
96
+ baseSlippagePrice?: number | undefined;
97
+ /** Slippage distance for MARKET_RANGE and STOP_LIMIT order. */
98
+ slippageInPoints?: number | undefined;
99
+ /** User-specified label. MaxLength = 100. */
100
+ label?: string | undefined;
101
+ /** Reference to the existing position if the Order is intended to modify it. */
102
+ positionId?: number | undefined;
103
+ /** Optional user-specific clientOrderId (similar to FIX ClOrderID). MaxLength = 50. */
104
+ clientOrderId?: string | undefined;
105
+ /** Relative Stop Loss that can be specified instead of the 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. */
106
+ relativeStopLoss?: number | undefined;
107
+ /** Relative Take Profit that can be specified instead of the absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit. */
108
+ relativeTakeProfit?: number | undefined;
109
+ /** If TRUE then stopLoss is guaranteed. Required to be set to TRUE for the Limited Risk accounts (ProtoOATrader.isLimitedRisk=true). */
110
+ guaranteedStopLoss?: boolean | undefined;
111
+ /** If TRUE then the Stop Loss is Trailing. */
112
+ trailingStopLoss?: boolean | undefined;
113
+ /** Trigger method for the STOP or the STOP_LIMIT pending order. */
114
+ stopTriggerMethod?: ProtoOAOrderTriggerMethod | undefined;
115
+ }
116
+ /** Event that is sent following the successful order acceptance or execution by the server. Acts as response to the ProtoOANewOrderReq, ProtoOACancelOrderReq, ProtoOAAmendOrderReq, ProtoOAAmendPositionSLTPReq, ProtoOAClosePositionReq requests. Also, the event is sent when a Deposit/Withdrawal took place. */
117
+ export interface ProtoOAExecutionEvent {
118
+ payloadType?: ProtoOAPayloadType | undefined;
119
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
120
+ ctidTraderAccountId: number;
121
+ /** Type of the order operation. For example: ACCEPTED, FILLED, etc. */
122
+ executionType: ProtoOAExecutionType;
123
+ /** Reference to the position linked with the execution */
124
+ position?: ProtoOAPosition | undefined;
125
+ /** Reference to the initial order. */
126
+ order?: ProtoOAOrder | undefined;
127
+ /** Reference to the deal (execution). */
128
+ deal?: ProtoOADeal | undefined;
129
+ /** Reference to the Bonus Deposit or Withdrawal operation. */
130
+ bonusDepositWithdraw?: ProtoOABonusDepositWithdraw | undefined;
131
+ /** Reference to the Deposit or Withdrawal operation. */
132
+ depositWithdraw?: ProtoOADepositWithdraw | undefined;
133
+ /** The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). */
134
+ errorCode?: string | undefined;
135
+ /** If TRUE then the event generated by the server logic instead of the trader's request. (e.g. stop-out). */
136
+ isServerEvent?: boolean | undefined;
137
+ }
138
+ /** Request for cancelling existing pending order. Allowed only if the accessToken has "trade" permissions for the trading account. */
139
+ export interface ProtoOACancelOrderReq {
140
+ payloadType?: ProtoOAPayloadType | undefined;
141
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
142
+ ctidTraderAccountId: number;
143
+ /** The unique ID of the order. */
144
+ orderId: number;
145
+ }
146
+ /** Request for amending the existing pending order. Allowed only if the Access Token has "trade" permissions for the trading account. */
147
+ export interface ProtoOAAmendOrderReq {
148
+ payloadType?: ProtoOAPayloadType | undefined;
149
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
150
+ ctidTraderAccountId: number;
151
+ /** The unique ID of the order. */
152
+ orderId: number;
153
+ /** Volume, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units). */
154
+ volume?: number | undefined;
155
+ /** The Limit Price, can be specified for the LIMIT order only. */
156
+ limitPrice?: number | undefined;
157
+ /** The Stop Price, can be specified for the STOP and the STOP_LIMIT orders. */
158
+ stopPrice?: number | undefined;
159
+ /** The Unix timestamp in milliseconds of Order expiration. Should be set for the Good Till Date orders. */
160
+ expirationTimestamp?: number | undefined;
161
+ /** The absolute Stop Loss price (e.g. 1.23456). Not supported for MARKET orders. */
162
+ stopLoss?: number | undefined;
163
+ /** The absolute Take Profit price (e.g. 1.23456). Not supported for MARKET orders. */
164
+ takeProfit?: number | undefined;
165
+ /** Slippage distance for the MARKET_RANGE and the STOP_LIMIT orders. */
166
+ slippageInPoints?: number | undefined;
167
+ /** The relative Stop Loss can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss. */
168
+ relativeStopLoss?: number | undefined;
169
+ /** The relative Take Profit can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit. */
170
+ relativeTakeProfit?: number | undefined;
171
+ /** If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts. */
172
+ guaranteedStopLoss?: boolean | undefined;
173
+ /** If TRUE then the Trailing Stop Loss is applied. */
174
+ trailingStopLoss?: boolean | undefined;
175
+ /** Trigger method for the STOP or the STOP_LIMIT pending order. */
176
+ stopTriggerMethod?: ProtoOAOrderTriggerMethod | undefined;
177
+ }
178
+ /** Request for amending StopLoss and TakeProfit of existing position. Allowed only if the accessToken has "trade" permissions for the trading account. */
179
+ export interface ProtoOAAmendPositionSLTPReq {
180
+ payloadType?: ProtoOAPayloadType | undefined;
181
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
182
+ ctidTraderAccountId: number;
183
+ /** The unique ID of the position to amend. */
184
+ positionId: number;
185
+ /** Absolute Stop Loss price (1.23456 for example). */
186
+ stopLoss?: number | undefined;
187
+ /** Absolute Take Profit price (1.26543 for example). */
188
+ takeProfit?: number | undefined;
189
+ /** If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts. */
190
+ guaranteedStopLoss?: boolean | undefined;
191
+ /** If TRUE then the Trailing Stop Loss is applied. */
192
+ trailingStopLoss?: boolean | undefined;
193
+ /** The Stop trigger method for the Stop Loss/Take Profit order. */
194
+ stopLossTriggerMethod?: ProtoOAOrderTriggerMethod | undefined;
195
+ }
196
+ /** Request for closing or partially closing of an existing position. Allowed only if the accessToken has "trade" permissions for the trading account. */
197
+ export interface ProtoOAClosePositionReq {
198
+ payloadType?: ProtoOAPayloadType | undefined;
199
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
200
+ ctidTraderAccountId: number;
201
+ /** The unique ID of the position to close. */
202
+ positionId: number;
203
+ /** Volume to close, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units). */
204
+ volume: number;
205
+ }
206
+ /** Event that is sent when the level of the Trailing Stop Loss is changed due to the price level changes. */
207
+ export interface ProtoOATrailingSLChangedEvent {
208
+ payloadType?: ProtoOAPayloadType | undefined;
209
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
210
+ ctidTraderAccountId: number;
211
+ /** The unique ID of the position. */
212
+ positionId: number;
213
+ /** The unique ID of the order. */
214
+ orderId: number;
215
+ /** New value of the Stop Loss price. */
216
+ stopPrice: number;
217
+ /** The Unix time in milliseconds when the Stop Loss was updated. */
218
+ utcLastUpdateTimestamp: number;
219
+ }
220
+ /** Request for the list of assets available for a trader's account. */
221
+ export interface ProtoOAAssetListReq {
222
+ payloadType?: ProtoOAPayloadType | undefined;
223
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
224
+ ctidTraderAccountId: number;
225
+ }
226
+ /** Response to the ProtoOAAssetListReq request. */
227
+ export interface ProtoOAAssetListRes {
228
+ payloadType?: ProtoOAPayloadType | undefined;
229
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
230
+ ctidTraderAccountId: number;
231
+ /** The list of assets. */
232
+ asset: ProtoOAAsset[];
233
+ }
234
+ /** Request for a list of symbols available for a trading account. Symbol entries are returned with the limited set of fields. */
235
+ export interface ProtoOASymbolsListReq {
236
+ payloadType?: ProtoOAPayloadType | undefined;
237
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
238
+ ctidTraderAccountId: number;
239
+ /** Whether to include old archived symbols into response. */
240
+ includeArchivedSymbols?: boolean | undefined;
241
+ }
242
+ /** Response to the ProtoOASymbolsListReq request. */
243
+ export interface ProtoOASymbolsListRes {
244
+ payloadType?: ProtoOAPayloadType | undefined;
245
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
246
+ ctidTraderAccountId: number;
247
+ /** The list of symbols. */
248
+ symbol: ProtoOALightSymbol[];
249
+ /** The list of archived symbols. */
250
+ archivedSymbol: ProtoOAArchivedSymbol[];
251
+ }
252
+ /** Request for getting a full symbol entity. */
253
+ export interface ProtoOASymbolByIdReq {
254
+ payloadType?: ProtoOAPayloadType | undefined;
255
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
256
+ ctidTraderAccountId: number;
257
+ /** Unique identifier of the symbol in cTrader platform. */
258
+ symbolId: number[];
259
+ }
260
+ /** Response to the ProtoOASymbolByIdReq request. */
261
+ export interface ProtoOASymbolByIdRes {
262
+ payloadType?: ProtoOAPayloadType | undefined;
263
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
264
+ ctidTraderAccountId: number;
265
+ /** Symbol entity with the full set of fields. */
266
+ symbol: ProtoOASymbol[];
267
+ /** Archived symbols. */
268
+ archivedSymbol: ProtoOAArchivedSymbol[];
269
+ }
270
+ /** Request for getting a conversion chain between two assets that consists of several symbols. Use when no direct quote is available. */
271
+ export interface ProtoOASymbolsForConversionReq {
272
+ payloadType?: ProtoOAPayloadType | undefined;
273
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
274
+ ctidTraderAccountId: number;
275
+ /** The ID of the firs asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID. */
276
+ firstAssetId: number;
277
+ /** The ID of the last asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID. */
278
+ lastAssetId: number;
279
+ }
280
+ /** Response to the ProtoOASymbolsForConversionReq request. */
281
+ export interface ProtoOASymbolsForConversionRes {
282
+ payloadType?: ProtoOAPayloadType | undefined;
283
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
284
+ ctidTraderAccountId: number;
285
+ /** Conversion chain of the symbols (e.g. EUR/USD, USD/JPY, GBP/JPY -> EUR/GBP). */
286
+ symbol: ProtoOALightSymbol[];
287
+ }
288
+ /** Event that is sent when the symbol is changed on the Server side. */
289
+ export interface ProtoOASymbolChangedEvent {
290
+ payloadType?: ProtoOAPayloadType | undefined;
291
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
292
+ ctidTraderAccountId: number;
293
+ /** Unique identifier of the Symbol in cTrader platform. */
294
+ symbolId: number[];
295
+ }
296
+ /** Request for a list of asset classes available for the trader's account. */
297
+ export interface ProtoOAAssetClassListReq {
298
+ payloadType?: ProtoOAPayloadType | undefined;
299
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
300
+ ctidTraderAccountId: number;
301
+ }
302
+ /** Response to the ProtoOAAssetListReq request. */
303
+ export interface ProtoOAAssetClassListRes {
304
+ payloadType?: ProtoOAPayloadType | undefined;
305
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
306
+ ctidTraderAccountId: number;
307
+ /** List of the asset classes. */
308
+ assetClass: ProtoOAAssetClass[];
309
+ }
310
+ /** Request for getting data of Trader's Account. */
311
+ export interface ProtoOATraderReq {
312
+ payloadType?: ProtoOAPayloadType | undefined;
313
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
314
+ ctidTraderAccountId: number;
315
+ }
316
+ /** Response to the ProtoOATraderReq request. */
317
+ export interface ProtoOATraderRes {
318
+ payloadType?: ProtoOAPayloadType | undefined;
319
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
320
+ ctidTraderAccountId: number;
321
+ /** The Trader account information. */
322
+ trader?: ProtoOATrader | undefined;
323
+ }
324
+ /** Event that is sent when a Trader is updated on Server side. */
325
+ export interface ProtoOATraderUpdatedEvent {
326
+ payloadType?: ProtoOAPayloadType | undefined;
327
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
328
+ ctidTraderAccountId: number;
329
+ /** The Trader account information. */
330
+ trader?: ProtoOATrader | undefined;
331
+ }
332
+ /** Request for getting Trader's current open positions and pending orders data. */
333
+ export interface ProtoOAReconcileReq {
334
+ payloadType?: ProtoOAPayloadType | undefined;
335
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
336
+ ctidTraderAccountId: number;
337
+ /** If TRUE, then current protection orders are returned separately, otherwise you can use position.stopLoss and position.takeProfit fields. */
338
+ returnProtectionOrders?: boolean | undefined;
339
+ }
340
+ /** The response to the ProtoOAReconcileReq request. */
341
+ export interface ProtoOAReconcileRes {
342
+ payloadType?: ProtoOAPayloadType | undefined;
343
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
344
+ ctidTraderAccountId: number;
345
+ /** The list of trader's account open positions. */
346
+ position: ProtoOAPosition[];
347
+ /** The list of trader's account pending orders. */
348
+ order: ProtoOAOrder[];
349
+ }
350
+ /** Event that is sent when errors occur during the order requests. */
351
+ export interface ProtoOAOrderErrorEvent {
352
+ payloadType?: ProtoOAPayloadType | undefined;
353
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
354
+ ctidTraderAccountId: number;
355
+ /** The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode). */
356
+ errorCode: string;
357
+ /** The unique ID of the order. */
358
+ orderId?: number | undefined;
359
+ /** The unique ID of the position. */
360
+ positionId?: number | undefined;
361
+ /** The error description. */
362
+ description?: string | undefined;
363
+ }
364
+ /** Request for getting Trader's deals historical data (execution details). */
365
+ export interface ProtoOADealListReq {
366
+ payloadType?: ProtoOAPayloadType | undefined;
367
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
368
+ ctidTraderAccountId: number;
369
+ /** The Unix time from which the search starts >=0 (1st Jan 1970). */
370
+ fromTimestamp?: number | undefined;
371
+ /** The Unix time where to stop searching <= 2147483646000 (19th Jan 2038). */
372
+ toTimestamp?: number | undefined;
373
+ /** The maximum number of the deals to return. */
374
+ maxRows?: number | undefined;
375
+ }
376
+ /** The response to the ProtoOADealListRes request. */
377
+ export interface ProtoOADealListRes {
378
+ payloadType?: ProtoOAPayloadType | undefined;
379
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
380
+ ctidTraderAccountId: number;
381
+ /** The list of the deals. */
382
+ deal: ProtoOADeal[];
383
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
384
+ hasMore: boolean;
385
+ }
386
+ /** Request for getting Trader's orders filtered by timestamp */
387
+ export interface ProtoOAOrderListReq {
388
+ payloadType?: ProtoOAPayloadType | undefined;
389
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
390
+ ctidTraderAccountId: number;
391
+ /** The Unix time from which the search starts >=0 (1st Jan 1970). */
392
+ fromTimestamp?: number | undefined;
393
+ /** The Unix time where to stop searching <= 2147483646000 (19th Jan 2038). */
394
+ toTimestamp?: number | undefined;
395
+ }
396
+ /** The response to the ProtoOAOrderListReq request. */
397
+ export interface ProtoOAOrderListRes {
398
+ payloadType?: ProtoOAPayloadType | undefined;
399
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
400
+ ctidTraderAccountId: number;
401
+ /** The list of the orders. */
402
+ order: ProtoOAOrder[];
403
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
404
+ hasMore: boolean;
405
+ }
406
+ /** Request for getting the margin estimate according to leverage profiles. Can be used before sending a new order request. This doesn't consider ACCORDING_TO_GSL margin calculation type, as this calculation is trivial: usedMargin = (VWAP price of the position - GSL price) * volume * Quote2Deposit. */
407
+ export interface ProtoOAExpectedMarginReq {
408
+ payloadType?: ProtoOAPayloadType | undefined;
409
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
410
+ ctidTraderAccountId: number;
411
+ /** Unique identifier of the Symbol in cTrader platform. */
412
+ symbolId: number;
413
+ /** Volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units). */
414
+ volume: number[];
415
+ }
416
+ /** The response to the ProtoOAExpectedMarginReq request. */
417
+ export interface ProtoOAExpectedMarginRes {
418
+ payloadType?: ProtoOAPayloadType | undefined;
419
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
420
+ ctidTraderAccountId: number;
421
+ /** The buy and sell margin estimate. */
422
+ margin: ProtoOAExpectedMargin[];
423
+ /** 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 margin.buyMargin, margin.sellMargin. */
424
+ moneyDigits?: number | undefined;
425
+ }
426
+ /** Event that is sent when the margin allocated to a specific position is changed. */
427
+ export interface ProtoOAMarginChangedEvent {
428
+ payloadType?: ProtoOAPayloadType | undefined;
429
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
430
+ ctidTraderAccountId: number;
431
+ /** The unique ID of the position. */
432
+ positionId: number;
433
+ /** The new value of the margin used. */
434
+ usedMargin: number;
435
+ /** 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 usedMargin. */
436
+ moneyDigits?: number | undefined;
437
+ }
438
+ /** Request for getting Trader's historical data of deposits and withdrawals. */
439
+ export interface ProtoOACashFlowHistoryListReq {
440
+ payloadType?: ProtoOAPayloadType | undefined;
441
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
442
+ ctidTraderAccountId: number;
443
+ /** The Unix time from which the search starts >=0 (1st Jan 1970). Validation: toTimestamp - fromTimestamp <= 604800000 (1 week). */
444
+ fromTimestamp: number;
445
+ /** The Unix time where to stop searching <= 2147483646000 (19th Jan 2038). */
446
+ toTimestamp: number;
447
+ }
448
+ /** Response to the ProtoOACashFlowHistoryListReq request. */
449
+ export interface ProtoOACashFlowHistoryListRes {
450
+ payloadType?: ProtoOAPayloadType | undefined;
451
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
452
+ ctidTraderAccountId: number;
453
+ /** The list of deposit and withdrawal operations. */
454
+ depositWithdraw: ProtoOADepositWithdraw[];
455
+ }
456
+ /** Request for getting the list of granted trader's account for the access token. */
457
+ export interface ProtoOAGetAccountListByAccessTokenReq {
458
+ payloadType?: ProtoOAPayloadType | undefined;
459
+ /** The Access Token issued for providing access to the Trader's Account. */
460
+ accessToken: string;
461
+ }
462
+ /** Response to the ProtoOAGetAccountListByAccessTokenReq request. */
463
+ export interface ProtoOAGetAccountListByAccessTokenRes {
464
+ payloadType?: ProtoOAPayloadType | undefined;
465
+ /** The Access Token issued for providing access to the Trader's Account. */
466
+ accessToken: string;
467
+ /** SCOPE_VIEW, SCOPE_TRADE. */
468
+ permissionScope?: ProtoOAClientPermissionScope | undefined;
469
+ /** The list of the accounts. */
470
+ ctidTraderAccount: ProtoOACtidTraderAccount[];
471
+ }
472
+ /** Request to refresh the access token using refresh token of granted trader's account. */
473
+ export interface ProtoOARefreshTokenReq {
474
+ payloadType?: ProtoOAPayloadType | undefined;
475
+ /** The Refresh Token issued for updating Access Token. */
476
+ refreshToken: string;
477
+ }
478
+ /** Response to the ProtoOARefreshTokenReq request. */
479
+ export interface ProtoOARefreshTokenRes {
480
+ payloadType?: ProtoOAPayloadType | undefined;
481
+ /** The Access Token issued for providing access to the Trader's Account. */
482
+ accessToken: string;
483
+ /** bearer */
484
+ tokenType: string;
485
+ /** Access Token expiration in seconds. */
486
+ expiresIn: number;
487
+ /** Your new Refresh Token. */
488
+ refreshToken: string;
489
+ }
490
+ /** Request for subscribing on spot events of the specified symbol. After successful subscription you'll receive technical ProtoOASpotEvent with latest price, after which you'll start receiving updates on prices via consequent ProtoOASpotEvents. */
491
+ export interface ProtoOASubscribeSpotsReq {
492
+ payloadType?: ProtoOAPayloadType | undefined;
493
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
494
+ ctidTraderAccountId: number;
495
+ /** Unique identifier of the Symbol in cTrader platform. */
496
+ symbolId: number[];
497
+ /** If TRUE you will also receive the timestamp in ProtoOASpotEvent. */
498
+ subscribeToSpotTimestamp?: boolean | undefined;
499
+ }
500
+ /** Response to the ProtoOASubscribeSpotsReq request. Reflects that your request to subscribe for symbol has been added to queue. You'll receive technical ProtoOASpotEvent with current price shortly after this response. */
501
+ export interface ProtoOASubscribeSpotsRes {
502
+ payloadType?: ProtoOAPayloadType | undefined;
503
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
504
+ ctidTraderAccountId: number;
505
+ }
506
+ /** Request for unsubscribing from the spot events of the specified symbol. Request to stop receiving ProtoOASpotEvents related to particular symbols. Unsubscription is useful to minimize traffic, especially during high volatility events. */
507
+ export interface ProtoOAUnsubscribeSpotsReq {
508
+ payloadType?: ProtoOAPayloadType | undefined;
509
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
510
+ ctidTraderAccountId: number;
511
+ /** Unique identifier of the Symbol in cTrader platform. */
512
+ symbolId: number[];
513
+ }
514
+ /** Response to the ProtoOASubscribeSpotsRes request. Reflects that your request to unsubscribe will has been added to queue and will be completed shortly. You may still occasionally receive ProtoOASpotEvents until request processing is complete. */
515
+ export interface ProtoOAUnsubscribeSpotsRes {
516
+ payloadType?: ProtoOAPayloadType | undefined;
517
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
518
+ ctidTraderAccountId: number;
519
+ }
520
+ /** Event that is sent when a new spot event is generated on the server side. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq. First event, received after subscription will contain latest spot prices even if market is closed. */
521
+ export interface ProtoOASpotEvent {
522
+ payloadType?: ProtoOAPayloadType | undefined;
523
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
524
+ ctidTraderAccountId: number;
525
+ /** Unique identifier of the Symbol in cTrader platform. */
526
+ symbolId: number;
527
+ /** Bid price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) */
528
+ bid?: number | undefined;
529
+ /** Ask price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) */
530
+ ask?: number | undefined;
531
+ /** Returns live trend bar. Requires subscription on the trend bars. */
532
+ trendbar: ProtoOATrendbar[];
533
+ /** Last session close. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) */
534
+ sessionClose?: number | undefined;
535
+ /** The Unix time for spot. */
536
+ timestamp?: number | undefined;
537
+ }
538
+ /** Request for subscribing for live trend bars. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq. */
539
+ export interface ProtoOASubscribeLiveTrendbarReq {
540
+ payloadType?: ProtoOAPayloadType | undefined;
541
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
542
+ ctidTraderAccountId: number;
543
+ /** Specifies period of trend bar series (e.g. M1, M10, etc.). */
544
+ period: ProtoOATrendbarPeriod;
545
+ /** Unique identifier of the Symbol in cTrader platform. */
546
+ symbolId: number;
547
+ }
548
+ /** Response to the ProtoOASubscribeLiveTrendbarReq request. */
549
+ export interface ProtoOASubscribeLiveTrendbarRes {
550
+ payloadType?: ProtoOAPayloadType | undefined;
551
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
552
+ ctidTraderAccountId: number;
553
+ }
554
+ /** Request for unsubscribing from the live trend bars. */
555
+ export interface ProtoOAUnsubscribeLiveTrendbarReq {
556
+ payloadType?: ProtoOAPayloadType | undefined;
557
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
558
+ ctidTraderAccountId: number;
559
+ /** Specifies period of trend bar series (e.g. M1, M10, etc.). */
560
+ period: ProtoOATrendbarPeriod;
561
+ /** Unique identifier of the Symbol in cTrader platform. */
562
+ symbolId: number;
563
+ }
564
+ /** Response to the ProtoOASubscribeLiveTrendbarReq request. */
565
+ export interface ProtoOAUnsubscribeLiveTrendbarRes {
566
+ payloadType?: ProtoOAPayloadType | undefined;
567
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
568
+ ctidTraderAccountId: number;
569
+ }
570
+ /** Request for getting historical trend bars for the symbol. */
571
+ export interface ProtoOAGetTrendbarsReq {
572
+ payloadType?: ProtoOAPayloadType | undefined;
573
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
574
+ ctidTraderAccountId: number;
575
+ /** The Unix time in milliseconds from which the search starts. Must be bigger or equal to zero (1st Jan 1970). */
576
+ fromTimestamp?: number | undefined;
577
+ /** The Unix time in milliseconds of finishing the search. Smaller or equal to 2147483646000 (19th Jan 2038). */
578
+ toTimestamp?: number | undefined;
579
+ /** Specifies period of trend bar series (e.g. M1, M10, etc.). */
580
+ period: ProtoOATrendbarPeriod;
581
+ /** Unique identifier of the Symbol in cTrader platform. */
582
+ symbolId: number;
583
+ /** Limit number of trend bars in response back from toTimestamp. */
584
+ count?: number | undefined;
585
+ }
586
+ /** Response to the ProtoOAGetTrendbarsReq request. */
587
+ export interface ProtoOAGetTrendbarsRes {
588
+ payloadType?: ProtoOAPayloadType | undefined;
589
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
590
+ ctidTraderAccountId: number;
591
+ /** Specifies period of trend bar series (e.g. M1, M10, etc.). */
592
+ period: ProtoOATrendbarPeriod;
593
+ /**
594
+ * Simply don't use this field, as your original request already contains toTimestamp.
595
+ *
596
+ * @deprecated
597
+ */
598
+ timestamp?: number | undefined;
599
+ /** The list of trend bars. */
600
+ trendbar: ProtoOATrendbar[];
601
+ /** Unique identifier of the Symbol in cTrader platform. */
602
+ symbolId?: number | undefined;
603
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
604
+ hasMore?: boolean | undefined;
605
+ }
606
+ /** Request for getting historical tick data for the symbol. */
607
+ export interface ProtoOAGetTickDataReq {
608
+ payloadType?: ProtoOAPayloadType | undefined;
609
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
610
+ ctidTraderAccountId: number;
611
+ /** Unique identifier of the Symbol in cTrader platform. */
612
+ symbolId: number;
613
+ /** Bid/Ask (1/2). */
614
+ type: ProtoOAQuoteType;
615
+ /** The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970). */
616
+ fromTimestamp?: number | undefined;
617
+ /** The Unix time in milliseconds of finishing the search. <= 2147483646000 (19th Jan 2038). */
618
+ toTimestamp?: number | undefined;
619
+ }
620
+ /** Response to the ProtoOAGetTickDataReq request. */
621
+ export interface ProtoOAGetTickDataRes {
622
+ payloadType?: ProtoOAPayloadType | undefined;
623
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
624
+ ctidTraderAccountId: number;
625
+ /** The list of ticks is in chronological order (newest first). The first tick contains Unix time in milliseconds while all subsequent ticks have the time difference in milliseconds between the previous and the current one. */
626
+ tickData: ProtoOATickData[];
627
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
628
+ hasMore: boolean;
629
+ }
630
+ /** Request for getting details of Trader's profile. Limited due to GDRP requirements. */
631
+ export interface ProtoOAGetCtidProfileByTokenReq {
632
+ payloadType?: ProtoOAPayloadType | undefined;
633
+ /** The Access Token issued for providing access to the Trader's Account. */
634
+ accessToken: string;
635
+ }
636
+ /** Response to the ProtoOAGetCtidProfileByTokenReq request. */
637
+ export interface ProtoOAGetCtidProfileByTokenRes {
638
+ payloadType?: ProtoOAPayloadType | undefined;
639
+ /** Trader's profile. */
640
+ profile?: ProtoOACtidProfile | undefined;
641
+ }
642
+ /** Event that is sent when the structure of depth of market is changed. Requires subscription on the depth of markets for the symbol, see ProtoOASubscribeDepthQuotesReq. */
643
+ export interface ProtoOADepthEvent {
644
+ payloadType?: ProtoOAPayloadType | undefined;
645
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
646
+ ctidTraderAccountId: number;
647
+ /** Unique identifier of the Symbol in cTrader platform. */
648
+ symbolId: number;
649
+ /** The list of changes in the depth of market quotes. */
650
+ newQuotes: ProtoOADepthQuote[];
651
+ /** The list of quotes to delete. */
652
+ deletedQuotes: number[];
653
+ }
654
+ /** Request for subscribing on depth of market of the specified symbol. */
655
+ export interface ProtoOASubscribeDepthQuotesReq {
656
+ payloadType?: ProtoOAPayloadType | undefined;
657
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
658
+ ctidTraderAccountId: number;
659
+ /** Unique identifier of the Symbol in cTrader platform. */
660
+ symbolId: number[];
661
+ }
662
+ /** Response to the ProtoOASubscribeDepthQuotesReq request. */
663
+ export interface ProtoOASubscribeDepthQuotesRes {
664
+ payloadType?: ProtoOAPayloadType | undefined;
665
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
666
+ ctidTraderAccountId: number;
667
+ }
668
+ /** Request for unsubscribing from the depth of market of the specified symbol. */
669
+ export interface ProtoOAUnsubscribeDepthQuotesReq {
670
+ payloadType?: ProtoOAPayloadType | undefined;
671
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
672
+ ctidTraderAccountId: number;
673
+ /** Unique identifier of the Symbol in cTrader platform. */
674
+ symbolId: number[];
675
+ }
676
+ /** Response to the ProtoOAUnsubscribeDepthQuotesReq request. */
677
+ export interface ProtoOAUnsubscribeDepthQuotesRes {
678
+ payloadType?: ProtoOAPayloadType | undefined;
679
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
680
+ ctidTraderAccountId: number;
681
+ }
682
+ /** Request for a list of symbol categories available for a trading account. */
683
+ export interface ProtoOASymbolCategoryListReq {
684
+ payloadType?: ProtoOAPayloadType | undefined;
685
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
686
+ ctidTraderAccountId: number;
687
+ }
688
+ /** Response to the ProtoSymbolCategoryListReq request. */
689
+ export interface ProtoOASymbolCategoryListRes {
690
+ payloadType?: ProtoOAPayloadType | undefined;
691
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
692
+ ctidTraderAccountId: number;
693
+ /** The list of symbol categories. */
694
+ symbolCategory: ProtoOASymbolCategory[];
695
+ }
696
+ /** Request for logout of trading account session. */
697
+ export interface ProtoOAAccountLogoutReq {
698
+ payloadType?: ProtoOAPayloadType | undefined;
699
+ /** The unique identifier of the trader's account in cTrader platform. */
700
+ ctidTraderAccountId: number;
701
+ }
702
+ /** Response to the ProtoOAAccountLogoutReq request. Actual logout of trading account will be completed on ProtoOAAccountDisconnectEvent. */
703
+ export interface ProtoOAAccountLogoutRes {
704
+ payloadType?: ProtoOAPayloadType | undefined;
705
+ /** The unique identifier of the trader's account in cTrader platform. */
706
+ ctidTraderAccountId: number;
707
+ }
708
+ /** Event that is sent when the established session for an account is dropped on the server side. A new session must be authorized for the account. */
709
+ export interface ProtoOAAccountDisconnectEvent {
710
+ payloadType?: ProtoOAPayloadType | undefined;
711
+ /** The unique identifier of the trader's account in cTrader platform. */
712
+ ctidTraderAccountId: number;
713
+ }
714
+ /** Request for a list of existing margin call thresholds configured for a user. */
715
+ export interface ProtoOAMarginCallListReq {
716
+ payloadType?: ProtoOAPayloadType | undefined;
717
+ ctidTraderAccountId: number;
718
+ }
719
+ /** Response with a list of existing user Margin Calls, usually contains 3 items. */
720
+ export interface ProtoOAMarginCallListRes {
721
+ payloadType?: ProtoOAPayloadType | undefined;
722
+ marginCall: ProtoOAMarginCall[];
723
+ }
724
+ /** Request to modify marginLevelThreshold of specified marginCallType for ctidTraderAccountId. */
725
+ export interface ProtoOAMarginCallUpdateReq {
726
+ payloadType?: ProtoOAPayloadType | undefined;
727
+ ctidTraderAccountId: number;
728
+ marginCall?: ProtoOAMarginCall | undefined;
729
+ }
730
+ /** If this response received, it means that margin call was successfully updated. */
731
+ export interface ProtoOAMarginCallUpdateRes {
732
+ payloadType?: ProtoOAPayloadType | undefined;
733
+ }
734
+ /** Event that is sent when a Margin Call threshold configuration is updated. */
735
+ export interface ProtoOAMarginCallUpdateEvent {
736
+ payloadType?: ProtoOAPayloadType | undefined;
737
+ ctidTraderAccountId: number;
738
+ marginCall?: ProtoOAMarginCall | undefined;
739
+ }
740
+ /** Event that is sent when account margin level reaches target marginLevelThreshold. Event is sent no more than once every 10 minutes to avoid spamming. */
741
+ export interface ProtoOAMarginCallTriggerEvent {
742
+ payloadType?: ProtoOAPayloadType | undefined;
743
+ ctidTraderAccountId: number;
744
+ marginCall?: ProtoOAMarginCall | undefined;
745
+ }
746
+ /** Request for getting a dynamic leverage entity referenced in ProtoOASymbol.leverageId. */
747
+ export interface ProtoOAGetDynamicLeverageByIDReq {
748
+ payloadType?: ProtoOAPayloadType | undefined;
749
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
750
+ ctidTraderAccountId: number;
751
+ leverageId: number;
752
+ }
753
+ /** Response to the ProtoOAGetDynamicLeverageByIDReq request. */
754
+ export interface ProtoOAGetDynamicLeverageByIDRes {
755
+ payloadType?: ProtoOAPayloadType | undefined;
756
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
757
+ ctidTraderAccountId: number;
758
+ leverage?: ProtoOADynamicLeverage | undefined;
759
+ }
760
+ /** Request for retrieving the deals related to a position. */
761
+ export interface ProtoOADealListByPositionIdReq {
762
+ payloadType?: ProtoOAPayloadType | undefined;
763
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
764
+ ctidTraderAccountId: number;
765
+ /** The unique ID of the position. */
766
+ positionId: number;
767
+ /** The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970). */
768
+ fromTimestamp?: number | undefined;
769
+ /** The Unix time in milliseconds of finishing the search. <= 2147483646000 (19th Jan 2038). */
770
+ toTimestamp?: number | undefined;
771
+ }
772
+ /** Response to the ProtoOADealListByPositionIdReq request. */
773
+ export interface ProtoOADealListByPositionIdRes {
774
+ payloadType?: ProtoOAPayloadType | undefined;
775
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
776
+ ctidTraderAccountId: number;
777
+ /** The list of deals. */
778
+ deal: ProtoOADeal[];
779
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
780
+ hasMore: boolean;
781
+ }
782
+ /** Request for getting Order and its related Deals. */
783
+ export interface ProtoOAOrderDetailsReq {
784
+ payloadType?: ProtoOAPayloadType | undefined;
785
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
786
+ ctidTraderAccountId: number;
787
+ /** The unique ID of the Order. */
788
+ orderId: number;
789
+ }
790
+ /** Response to the ProtoOAOrderDetailsReq request. */
791
+ export interface ProtoOAOrderDetailsRes {
792
+ payloadType?: ProtoOAPayloadType | undefined;
793
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
794
+ ctidTraderAccountId: number;
795
+ /** Order details. */
796
+ order?: ProtoOAOrder | undefined;
797
+ /** All Deals created by filling the specified Order. */
798
+ deal: ProtoOADeal[];
799
+ }
800
+ /** Request for retrieving Orders related to a Position by using Position ID. Filtered by utcLastUpdateTimestamp. */
801
+ export interface ProtoOAOrderListByPositionIdReq {
802
+ payloadType?: ProtoOAPayloadType | undefined;
803
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
804
+ ctidTraderAccountId: number;
805
+ /** The unique ID of the Position. */
806
+ positionId: number;
807
+ /** The Unix time from which the search starts >=0 (1st Jan 1970). Search by utcLastUpdateTimestamp of the Order. */
808
+ fromTimestamp?: number | undefined;
809
+ /** The Unix time where to stop searching <= 2147483646000 (19th Jan 2038). Search by utcLastUpdateTimestamp of the Order. */
810
+ toTimestamp?: number | undefined;
811
+ }
812
+ /** Response to ProtoOAOrderListByPositionIdReq request. */
813
+ export interface ProtoOAOrderListByPositionIdRes {
814
+ payloadType?: ProtoOAPayloadType | undefined;
815
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
816
+ ctidTraderAccountId: number;
817
+ /** Orders related to the specified Position, sorted by utcLastUpdateTimestamp in descending order (newest first). */
818
+ order: ProtoOAOrder[];
819
+ /** If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize. */
820
+ hasMore: boolean;
821
+ }
822
+ /** Request for getting sets of Deals that were offset by a specific Deal and that are offsetting the Deal. */
823
+ export interface ProtoOADealOffsetListReq {
824
+ payloadType?: ProtoOAPayloadType | undefined;
825
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
826
+ ctidTraderAccountId: number;
827
+ /** The unique ID of the Deal. */
828
+ dealId: number;
829
+ }
830
+ /** Response for ProtoOADealOffsetListReq. */
831
+ export interface ProtoOADealOffsetListRes {
832
+ payloadType?: ProtoOAPayloadType | undefined;
833
+ /** Unique identifier of the trader's account. Used to match responses to trader's accounts. */
834
+ ctidTraderAccountId: number;
835
+ /** Deals which closed the specified deal. */
836
+ offsetBy: ProtoOADealOffset[];
837
+ /** Deals which were closed by the specified deal. */
838
+ offsetting: ProtoOADealOffset[];
839
+ }
840
+ /** Request for getting trader's positions' unrealized PnLs. */
841
+ export interface ProtoOAGetPositionUnrealizedPnLReq {
842
+ payloadType?: ProtoOAPayloadType | undefined;
843
+ /** The unique identifier of the trader's account in cTrader platform. */
844
+ ctidTraderAccountId: number;
845
+ }
846
+ /** Response to ProtoOAGetPositionUnrealizedPnLReq request. */
847
+ export interface ProtoOAGetPositionUnrealizedPnLRes {
848
+ payloadType?: ProtoOAPayloadType | undefined;
849
+ /** The unique identifier of the trader's account in cTrader platform. */
850
+ ctidTraderAccountId: number;
851
+ /** Information about trader's positions' unrealized PnLs. */
852
+ positionUnrealizedPnL: ProtoOAPositionUnrealizedPnL[];
853
+ /** Specifies the exponent of various monetary values. E.g., moneyDigits = 8 should be interpreted as the value multiplied by 10^8 with the 'real' value equal to 10053099944 / 10^8 = 100.53099944. Affects positionUnrealizedPnL.grossUnrealizedPnL, positionUnrealizedPnL.netUnrealizedPnL. */
854
+ moneyDigits: number;
855
+ }
856
+ export declare const ProtoOAApplicationAuthReq: MessageFns<ProtoOAApplicationAuthReq>;
857
+ export declare const ProtoOAApplicationAuthRes: MessageFns<ProtoOAApplicationAuthRes>;
858
+ export declare const ProtoOAAccountAuthReq: MessageFns<ProtoOAAccountAuthReq>;
859
+ export declare const ProtoOAAccountAuthRes: MessageFns<ProtoOAAccountAuthRes>;
860
+ export declare const ProtoOAErrorRes: MessageFns<ProtoOAErrorRes>;
861
+ export declare const ProtoOAClientDisconnectEvent: MessageFns<ProtoOAClientDisconnectEvent>;
862
+ export declare const ProtoOAAccountsTokenInvalidatedEvent: MessageFns<ProtoOAAccountsTokenInvalidatedEvent>;
863
+ export declare const ProtoOAVersionReq: MessageFns<ProtoOAVersionReq>;
864
+ export declare const ProtoOAVersionRes: MessageFns<ProtoOAVersionRes>;
865
+ export declare const ProtoOANewOrderReq: MessageFns<ProtoOANewOrderReq>;
866
+ export declare const ProtoOAExecutionEvent: MessageFns<ProtoOAExecutionEvent>;
867
+ export declare const ProtoOACancelOrderReq: MessageFns<ProtoOACancelOrderReq>;
868
+ export declare const ProtoOAAmendOrderReq: MessageFns<ProtoOAAmendOrderReq>;
869
+ export declare const ProtoOAAmendPositionSLTPReq: MessageFns<ProtoOAAmendPositionSLTPReq>;
870
+ export declare const ProtoOAClosePositionReq: MessageFns<ProtoOAClosePositionReq>;
871
+ export declare const ProtoOATrailingSLChangedEvent: MessageFns<ProtoOATrailingSLChangedEvent>;
872
+ export declare const ProtoOAAssetListReq: MessageFns<ProtoOAAssetListReq>;
873
+ export declare const ProtoOAAssetListRes: MessageFns<ProtoOAAssetListRes>;
874
+ export declare const ProtoOASymbolsListReq: MessageFns<ProtoOASymbolsListReq>;
875
+ export declare const ProtoOASymbolsListRes: MessageFns<ProtoOASymbolsListRes>;
876
+ export declare const ProtoOASymbolByIdReq: MessageFns<ProtoOASymbolByIdReq>;
877
+ export declare const ProtoOASymbolByIdRes: MessageFns<ProtoOASymbolByIdRes>;
878
+ export declare const ProtoOASymbolsForConversionReq: MessageFns<ProtoOASymbolsForConversionReq>;
879
+ export declare const ProtoOASymbolsForConversionRes: MessageFns<ProtoOASymbolsForConversionRes>;
880
+ export declare const ProtoOASymbolChangedEvent: MessageFns<ProtoOASymbolChangedEvent>;
881
+ export declare const ProtoOAAssetClassListReq: MessageFns<ProtoOAAssetClassListReq>;
882
+ export declare const ProtoOAAssetClassListRes: MessageFns<ProtoOAAssetClassListRes>;
883
+ export declare const ProtoOATraderReq: MessageFns<ProtoOATraderReq>;
884
+ export declare const ProtoOATraderRes: MessageFns<ProtoOATraderRes>;
885
+ export declare const ProtoOATraderUpdatedEvent: MessageFns<ProtoOATraderUpdatedEvent>;
886
+ export declare const ProtoOAReconcileReq: MessageFns<ProtoOAReconcileReq>;
887
+ export declare const ProtoOAReconcileRes: MessageFns<ProtoOAReconcileRes>;
888
+ export declare const ProtoOAOrderErrorEvent: MessageFns<ProtoOAOrderErrorEvent>;
889
+ export declare const ProtoOADealListReq: MessageFns<ProtoOADealListReq>;
890
+ export declare const ProtoOADealListRes: MessageFns<ProtoOADealListRes>;
891
+ export declare const ProtoOAOrderListReq: MessageFns<ProtoOAOrderListReq>;
892
+ export declare const ProtoOAOrderListRes: MessageFns<ProtoOAOrderListRes>;
893
+ export declare const ProtoOAExpectedMarginReq: MessageFns<ProtoOAExpectedMarginReq>;
894
+ export declare const ProtoOAExpectedMarginRes: MessageFns<ProtoOAExpectedMarginRes>;
895
+ export declare const ProtoOAMarginChangedEvent: MessageFns<ProtoOAMarginChangedEvent>;
896
+ export declare const ProtoOACashFlowHistoryListReq: MessageFns<ProtoOACashFlowHistoryListReq>;
897
+ export declare const ProtoOACashFlowHistoryListRes: MessageFns<ProtoOACashFlowHistoryListRes>;
898
+ export declare const ProtoOAGetAccountListByAccessTokenReq: MessageFns<ProtoOAGetAccountListByAccessTokenReq>;
899
+ export declare const ProtoOAGetAccountListByAccessTokenRes: MessageFns<ProtoOAGetAccountListByAccessTokenRes>;
900
+ export declare const ProtoOARefreshTokenReq: MessageFns<ProtoOARefreshTokenReq>;
901
+ export declare const ProtoOARefreshTokenRes: MessageFns<ProtoOARefreshTokenRes>;
902
+ export declare const ProtoOASubscribeSpotsReq: MessageFns<ProtoOASubscribeSpotsReq>;
903
+ export declare const ProtoOASubscribeSpotsRes: MessageFns<ProtoOASubscribeSpotsRes>;
904
+ export declare const ProtoOAUnsubscribeSpotsReq: MessageFns<ProtoOAUnsubscribeSpotsReq>;
905
+ export declare const ProtoOAUnsubscribeSpotsRes: MessageFns<ProtoOAUnsubscribeSpotsRes>;
906
+ export declare const ProtoOASpotEvent: MessageFns<ProtoOASpotEvent>;
907
+ export declare const ProtoOASubscribeLiveTrendbarReq: MessageFns<ProtoOASubscribeLiveTrendbarReq>;
908
+ export declare const ProtoOASubscribeLiveTrendbarRes: MessageFns<ProtoOASubscribeLiveTrendbarRes>;
909
+ export declare const ProtoOAUnsubscribeLiveTrendbarReq: MessageFns<ProtoOAUnsubscribeLiveTrendbarReq>;
910
+ export declare const ProtoOAUnsubscribeLiveTrendbarRes: MessageFns<ProtoOAUnsubscribeLiveTrendbarRes>;
911
+ export declare const ProtoOAGetTrendbarsReq: MessageFns<ProtoOAGetTrendbarsReq>;
912
+ export declare const ProtoOAGetTrendbarsRes: MessageFns<ProtoOAGetTrendbarsRes>;
913
+ export declare const ProtoOAGetTickDataReq: MessageFns<ProtoOAGetTickDataReq>;
914
+ export declare const ProtoOAGetTickDataRes: MessageFns<ProtoOAGetTickDataRes>;
915
+ export declare const ProtoOAGetCtidProfileByTokenReq: MessageFns<ProtoOAGetCtidProfileByTokenReq>;
916
+ export declare const ProtoOAGetCtidProfileByTokenRes: MessageFns<ProtoOAGetCtidProfileByTokenRes>;
917
+ export declare const ProtoOADepthEvent: MessageFns<ProtoOADepthEvent>;
918
+ export declare const ProtoOASubscribeDepthQuotesReq: MessageFns<ProtoOASubscribeDepthQuotesReq>;
919
+ export declare const ProtoOASubscribeDepthQuotesRes: MessageFns<ProtoOASubscribeDepthQuotesRes>;
920
+ export declare const ProtoOAUnsubscribeDepthQuotesReq: MessageFns<ProtoOAUnsubscribeDepthQuotesReq>;
921
+ export declare const ProtoOAUnsubscribeDepthQuotesRes: MessageFns<ProtoOAUnsubscribeDepthQuotesRes>;
922
+ export declare const ProtoOASymbolCategoryListReq: MessageFns<ProtoOASymbolCategoryListReq>;
923
+ export declare const ProtoOASymbolCategoryListRes: MessageFns<ProtoOASymbolCategoryListRes>;
924
+ export declare const ProtoOAAccountLogoutReq: MessageFns<ProtoOAAccountLogoutReq>;
925
+ export declare const ProtoOAAccountLogoutRes: MessageFns<ProtoOAAccountLogoutRes>;
926
+ export declare const ProtoOAAccountDisconnectEvent: MessageFns<ProtoOAAccountDisconnectEvent>;
927
+ export declare const ProtoOAMarginCallListReq: MessageFns<ProtoOAMarginCallListReq>;
928
+ export declare const ProtoOAMarginCallListRes: MessageFns<ProtoOAMarginCallListRes>;
929
+ export declare const ProtoOAMarginCallUpdateReq: MessageFns<ProtoOAMarginCallUpdateReq>;
930
+ export declare const ProtoOAMarginCallUpdateRes: MessageFns<ProtoOAMarginCallUpdateRes>;
931
+ export declare const ProtoOAMarginCallUpdateEvent: MessageFns<ProtoOAMarginCallUpdateEvent>;
932
+ export declare const ProtoOAMarginCallTriggerEvent: MessageFns<ProtoOAMarginCallTriggerEvent>;
933
+ export declare const ProtoOAGetDynamicLeverageByIDReq: MessageFns<ProtoOAGetDynamicLeverageByIDReq>;
934
+ export declare const ProtoOAGetDynamicLeverageByIDRes: MessageFns<ProtoOAGetDynamicLeverageByIDRes>;
935
+ export declare const ProtoOADealListByPositionIdReq: MessageFns<ProtoOADealListByPositionIdReq>;
936
+ export declare const ProtoOADealListByPositionIdRes: MessageFns<ProtoOADealListByPositionIdRes>;
937
+ export declare const ProtoOAOrderDetailsReq: MessageFns<ProtoOAOrderDetailsReq>;
938
+ export declare const ProtoOAOrderDetailsRes: MessageFns<ProtoOAOrderDetailsRes>;
939
+ export declare const ProtoOAOrderListByPositionIdReq: MessageFns<ProtoOAOrderListByPositionIdReq>;
940
+ export declare const ProtoOAOrderListByPositionIdRes: MessageFns<ProtoOAOrderListByPositionIdRes>;
941
+ export declare const ProtoOADealOffsetListReq: MessageFns<ProtoOADealOffsetListReq>;
942
+ export declare const ProtoOADealOffsetListRes: MessageFns<ProtoOADealOffsetListRes>;
943
+ export declare const ProtoOAGetPositionUnrealizedPnLReq: MessageFns<ProtoOAGetPositionUnrealizedPnLReq>;
944
+ export declare const ProtoOAGetPositionUnrealizedPnLRes: MessageFns<ProtoOAGetPositionUnrealizedPnLRes>;
945
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
946
+ 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 {} ? {
947
+ [K in keyof T]?: DeepPartial<T[K]>;
948
+ } : Partial<T>;
949
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
950
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
951
+ [K in keyof P]: Exact<P[K], I[K]>;
952
+ } & {
953
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
954
+ };
955
+ export interface MessageFns<T> {
956
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
957
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
958
+ fromJSON(object: any): T;
959
+ toJSON(message: T): unknown;
960
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
961
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
962
+ }
963
+ export {};
964
+ //# sourceMappingURL=OpenApiMessages.d.ts.map