@mywebapi.com/sdk 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -32
- package/dist/auth.d.ts +13 -3
- package/dist/browser/index.js +3675 -0
- package/dist/client.d.ts +2 -0
- package/dist/deadline.d.ts +1 -0
- package/dist/environments.d.ts +3 -0
- package/dist/errors.d.ts +1 -0
- package/dist/mutator.context.d.ts +14 -4
- package/dist/mutator.d.ts +6 -0
- package/dist/node/index.js +3670 -0
- package/dist/signalr.d.ts +4 -0
- package/package.json +28 -25
- package/dist/index.js +0 -6357
|
@@ -0,0 +1,3675 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __returnValue = (v) => v;
|
|
3
|
+
function __exportSetter(name, newValue) {
|
|
4
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
+
}
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
set: __exportSetter.bind(all, name)
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
16
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
17
|
+
}) : x)(function(x) {
|
|
18
|
+
if (typeof require !== "undefined")
|
|
19
|
+
return require.apply(this, arguments);
|
|
20
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// src/deadline.ts
|
|
24
|
+
async function withDeadline(timeoutMs, caller, operation) {
|
|
25
|
+
const controller = new AbortController;
|
|
26
|
+
let completed = false;
|
|
27
|
+
const timer = setTimeout(() => {
|
|
28
|
+
if (!completed)
|
|
29
|
+
controller.abort(new DOMException("The operation timed out.", "TimeoutError"));
|
|
30
|
+
}, timeoutMs);
|
|
31
|
+
const operationSignal = caller ? AbortSignal.any([caller, controller.signal]) : controller.signal;
|
|
32
|
+
try {
|
|
33
|
+
return await operation(operationSignal);
|
|
34
|
+
} finally {
|
|
35
|
+
completed = true;
|
|
36
|
+
clearTimeout(timer);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/auth.ts
|
|
41
|
+
class StaticTokenProvider {
|
|
42
|
+
token;
|
|
43
|
+
constructor(token) {
|
|
44
|
+
this.token = token;
|
|
45
|
+
}
|
|
46
|
+
async getToken(_opts) {
|
|
47
|
+
return this.token;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class OAuth2TokenError extends Error {
|
|
52
|
+
status;
|
|
53
|
+
errorCode;
|
|
54
|
+
errorDescription;
|
|
55
|
+
requestId;
|
|
56
|
+
constructor(opts) {
|
|
57
|
+
const code = opts.errorCode ?? String(opts.status);
|
|
58
|
+
const desc = opts.errorDescription ?? "<no description>";
|
|
59
|
+
super("OAuth2 token error (" + code + "): " + desc);
|
|
60
|
+
this.name = "OAuth2TokenError";
|
|
61
|
+
this.status = opts.status;
|
|
62
|
+
this.errorCode = opts.errorCode;
|
|
63
|
+
this.errorDescription = opts.errorDescription;
|
|
64
|
+
this.requestId = opts.requestId;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
class ClientCredentialsTokenProvider {
|
|
69
|
+
clientId;
|
|
70
|
+
clientSecret;
|
|
71
|
+
identityUrl;
|
|
72
|
+
identityOrigin;
|
|
73
|
+
scopes;
|
|
74
|
+
fetchFn;
|
|
75
|
+
clockSkewMs;
|
|
76
|
+
timeoutMs;
|
|
77
|
+
allowInsecureLoopback;
|
|
78
|
+
cached = null;
|
|
79
|
+
discoveryPromise = null;
|
|
80
|
+
refreshPromise = null;
|
|
81
|
+
constructor(opts) {
|
|
82
|
+
this.clientId = opts.clientId;
|
|
83
|
+
this.clientSecret = opts.clientSecret;
|
|
84
|
+
this.allowInsecureLoopback = opts.allowInsecureLoopback === true;
|
|
85
|
+
this.identityUrl = stripTrailingSlashes(validateHttpsUrl(opts.identityUrl, "identityUrl", this.allowInsecureLoopback));
|
|
86
|
+
this.identityOrigin = new URL(this.identityUrl).origin;
|
|
87
|
+
this.scopes = opts.scopes;
|
|
88
|
+
this.fetchFn = opts.fetch ?? globalThis.fetch.bind(globalThis);
|
|
89
|
+
this.clockSkewMs = (opts.clockSkewSeconds ?? 60) * 1000;
|
|
90
|
+
this.timeoutMs = opts.timeoutMs ?? 30000;
|
|
91
|
+
if (!Number.isFinite(this.timeoutMs) || this.timeoutMs <= 0) {
|
|
92
|
+
throw new TypeError("timeoutMs must be a positive finite number");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async getToken(opts) {
|
|
96
|
+
if (!opts?.forceRefresh && this.cached && this.cached.expiresAt - Date.now() > this.clockSkewMs) {
|
|
97
|
+
return this.cached.accessToken;
|
|
98
|
+
}
|
|
99
|
+
let refresh = this.refreshPromise;
|
|
100
|
+
if (!refresh) {
|
|
101
|
+
refresh = this.acquireToken();
|
|
102
|
+
this.refreshPromise = refresh;
|
|
103
|
+
refresh.then((result2) => {
|
|
104
|
+
this.cached = result2;
|
|
105
|
+
if (this.refreshPromise === refresh)
|
|
106
|
+
this.refreshPromise = null;
|
|
107
|
+
}, () => {
|
|
108
|
+
if (this.refreshPromise === refresh)
|
|
109
|
+
this.refreshPromise = null;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const result = await waitForAbortable(refresh, opts?.signal);
|
|
113
|
+
return result.accessToken;
|
|
114
|
+
}
|
|
115
|
+
async acquireToken() {
|
|
116
|
+
const { tokenEndpoint } = await this.getDiscovery();
|
|
117
|
+
const body = new URLSearchParams;
|
|
118
|
+
body.set("grant_type", "client_credentials");
|
|
119
|
+
body.set("client_id", this.clientId);
|
|
120
|
+
body.set("client_secret", this.clientSecret);
|
|
121
|
+
if (this.scopes && this.scopes.length > 0)
|
|
122
|
+
body.set("scope", this.scopes.join(" "));
|
|
123
|
+
return withDeadline(this.timeoutMs, undefined, async (signal) => {
|
|
124
|
+
const res = await this.fetchFn(tokenEndpoint, {
|
|
125
|
+
method: "POST",
|
|
126
|
+
redirect: "error",
|
|
127
|
+
signal,
|
|
128
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded", Accept: "application/json" },
|
|
129
|
+
body: body.toString()
|
|
130
|
+
});
|
|
131
|
+
const requestId = res.headers.get("x-request-id") ?? undefined;
|
|
132
|
+
if (!res.ok) {
|
|
133
|
+
const errorPayload = await parseOAuthError(res);
|
|
134
|
+
throw new OAuth2TokenError({
|
|
135
|
+
status: res.status,
|
|
136
|
+
...errorPayload.errorCode !== undefined ? { errorCode: errorPayload.errorCode } : {},
|
|
137
|
+
...errorPayload.errorDescription !== undefined ? { errorDescription: errorPayload.errorDescription } : {},
|
|
138
|
+
...requestId !== undefined ? { requestId } : {}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const json = await res.json();
|
|
142
|
+
if (typeof json.access_token !== "string" || typeof json.expires_in !== "number" || json.expires_in <= 0) {
|
|
143
|
+
throw new OAuth2TokenError({
|
|
144
|
+
status: res.status,
|
|
145
|
+
errorCode: "invalid_response",
|
|
146
|
+
errorDescription: "Token endpoint returned malformed JSON (missing access_token or expires_in).",
|
|
147
|
+
...requestId !== undefined ? { requestId } : {}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return { accessToken: json.access_token, expiresAt: Date.now() + json.expires_in * 1000 };
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
async getDiscovery() {
|
|
154
|
+
if (!this.discoveryPromise) {
|
|
155
|
+
const discovery = this.fetchDiscovery();
|
|
156
|
+
this.discoveryPromise = discovery;
|
|
157
|
+
discovery.then(() => {
|
|
158
|
+
return;
|
|
159
|
+
}, () => {
|
|
160
|
+
if (this.discoveryPromise === discovery)
|
|
161
|
+
this.discoveryPromise = null;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return this.discoveryPromise;
|
|
165
|
+
}
|
|
166
|
+
async fetchDiscovery() {
|
|
167
|
+
const url = this.identityUrl + "/.well-known/openid-configuration";
|
|
168
|
+
return withDeadline(this.timeoutMs, undefined, async (signal) => {
|
|
169
|
+
const res = await this.fetchFn(url, {
|
|
170
|
+
method: "GET",
|
|
171
|
+
redirect: "error",
|
|
172
|
+
signal,
|
|
173
|
+
headers: { Accept: "application/json" }
|
|
174
|
+
});
|
|
175
|
+
if (!res.ok) {
|
|
176
|
+
throw new OAuth2TokenError({
|
|
177
|
+
status: res.status,
|
|
178
|
+
errorCode: "discovery_failed",
|
|
179
|
+
errorDescription: "Discovery endpoint returned HTTP " + res.status + "."
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
const json = await res.json();
|
|
183
|
+
if (typeof json.token_endpoint !== "string") {
|
|
184
|
+
throw new OAuth2TokenError({
|
|
185
|
+
status: res.status,
|
|
186
|
+
errorCode: "discovery_invalid",
|
|
187
|
+
errorDescription: "Discovery document missing or invalid token_endpoint."
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
const tokenEndpoint = validateHttpsUrl(json.token_endpoint, "token_endpoint", this.allowInsecureLoopback);
|
|
191
|
+
if (new URL(tokenEndpoint).origin !== this.identityOrigin) {
|
|
192
|
+
throw new OAuth2TokenError({
|
|
193
|
+
status: res.status,
|
|
194
|
+
errorCode: "discovery_invalid",
|
|
195
|
+
errorDescription: "Discovery token_endpoint must use the identityUrl origin."
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return { tokenEndpoint };
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function stripTrailingSlashes(value) {
|
|
203
|
+
let result = value;
|
|
204
|
+
while (result.endsWith("/"))
|
|
205
|
+
result = result.slice(0, -1);
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
function validateHttpsUrl(raw, name, allowInsecureLoopback = false) {
|
|
209
|
+
let parsed;
|
|
210
|
+
try {
|
|
211
|
+
parsed = new URL(raw);
|
|
212
|
+
} catch {
|
|
213
|
+
throw new TypeError(name + " must be an absolute URL");
|
|
214
|
+
}
|
|
215
|
+
const loopback = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]";
|
|
216
|
+
if (parsed.protocol !== "https:" && !(allowInsecureLoopback && loopback && parsed.protocol === "http:")) {
|
|
217
|
+
throw new TypeError(name + " must use HTTPS (HTTP is allowed only for explicit loopback tests)");
|
|
218
|
+
}
|
|
219
|
+
if (parsed.username || parsed.password)
|
|
220
|
+
throw new TypeError(name + " must not contain credentials");
|
|
221
|
+
return stripTrailingSlashes(parsed.toString());
|
|
222
|
+
}
|
|
223
|
+
function waitForAbortable(promise, signal) {
|
|
224
|
+
if (!signal)
|
|
225
|
+
return promise;
|
|
226
|
+
const waitSignal = AbortSignal.any([signal]);
|
|
227
|
+
if (waitSignal.aborted)
|
|
228
|
+
return Promise.reject(waitSignal.reason ?? new DOMException("Aborted", "AbortError"));
|
|
229
|
+
return new Promise((resolve, reject) => {
|
|
230
|
+
const onAbort = () => {
|
|
231
|
+
cleanup();
|
|
232
|
+
reject(waitSignal.reason ?? new DOMException("Aborted", "AbortError"));
|
|
233
|
+
};
|
|
234
|
+
const cleanup = () => waitSignal.removeEventListener("abort", onAbort);
|
|
235
|
+
waitSignal.addEventListener("abort", onAbort, { once: true });
|
|
236
|
+
promise.then((value) => {
|
|
237
|
+
cleanup();
|
|
238
|
+
resolve(value);
|
|
239
|
+
}, (error) => {
|
|
240
|
+
cleanup();
|
|
241
|
+
reject(error);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
async function parseOAuthError(res) {
|
|
246
|
+
const text = await res.text();
|
|
247
|
+
if (!text)
|
|
248
|
+
return {};
|
|
249
|
+
try {
|
|
250
|
+
const json = JSON.parse(text);
|
|
251
|
+
const out = {};
|
|
252
|
+
if (typeof json.error === "string")
|
|
253
|
+
out.errorCode = json.error;
|
|
254
|
+
if (typeof json.error_description === "string")
|
|
255
|
+
out.errorDescription = json.error_description;
|
|
256
|
+
if (out.errorCode || out.errorDescription)
|
|
257
|
+
return out;
|
|
258
|
+
} catch {}
|
|
259
|
+
const excerpt = text.slice(0, 500).replace(/client_secret=[^&\s]*/gi, "client_secret=<redacted>");
|
|
260
|
+
return { errorDescription: excerpt };
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// src/environments.ts
|
|
264
|
+
var PRESETS = {
|
|
265
|
+
prod: { apiBaseUrl: "https://cloud.mywebapi.com", authority: "https://auth.cplugin.net" },
|
|
266
|
+
staging: { apiBaseUrl: "https://pre.mywebapi.com", authority: "https://pre.auth.cplugin.net" }
|
|
267
|
+
};
|
|
268
|
+
function stripTrailingSlashes2(value) {
|
|
269
|
+
let result = value;
|
|
270
|
+
while (result.endsWith("/"))
|
|
271
|
+
result = result.slice(0, -1);
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
274
|
+
function validateServiceUrl(raw, name, allowInsecureLoopback = false) {
|
|
275
|
+
let parsed;
|
|
276
|
+
try {
|
|
277
|
+
parsed = new URL(raw);
|
|
278
|
+
} catch {
|
|
279
|
+
throw new TypeError(name + " must be an absolute URL");
|
|
280
|
+
}
|
|
281
|
+
const loopback = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]";
|
|
282
|
+
if (parsed.protocol !== "https:" && !(allowInsecureLoopback && loopback && parsed.protocol === "http:")) {
|
|
283
|
+
throw new TypeError(name + " must use HTTPS (HTTP is allowed only for explicit loopback tests)");
|
|
284
|
+
}
|
|
285
|
+
if (parsed.username || parsed.password)
|
|
286
|
+
throw new TypeError(name + " must not contain credentials");
|
|
287
|
+
return stripTrailingSlashes2(parsed.toString());
|
|
288
|
+
}
|
|
289
|
+
function resolveEnvironment(sel) {
|
|
290
|
+
if (sel.env === "custom") {
|
|
291
|
+
const allowInsecureLoopback = sel.allowInsecureLoopback === true;
|
|
292
|
+
return {
|
|
293
|
+
apiBaseUrl: validateServiceUrl(sel.apiBaseUrl, "apiBaseUrl", allowInsecureLoopback),
|
|
294
|
+
authority: validateServiceUrl(sel.authority, "authority", allowInsecureLoopback),
|
|
295
|
+
...allowInsecureLoopback ? { allowInsecureLoopback: true } : {}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
const preset = PRESETS[sel.env];
|
|
299
|
+
return { ...preset };
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// src/signalr.ts
|
|
303
|
+
class MT4V2SignalRError extends Error {
|
|
304
|
+
cause;
|
|
305
|
+
constructor(message, cause) {
|
|
306
|
+
super(message);
|
|
307
|
+
this.cause = cause;
|
|
308
|
+
this.name = "MT4V2SignalRError";
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
class MT4V2SignalRClient {
|
|
313
|
+
hubUrl;
|
|
314
|
+
tokenProvider;
|
|
315
|
+
reconnect;
|
|
316
|
+
logger;
|
|
317
|
+
connection = null;
|
|
318
|
+
pendingHandlers = [];
|
|
319
|
+
constructor(opts) {
|
|
320
|
+
if (!opts.tradePlatform)
|
|
321
|
+
throw new MT4V2SignalRError("tradePlatform is required");
|
|
322
|
+
if (!opts.baseUrl)
|
|
323
|
+
throw new MT4V2SignalRError("baseUrl is required");
|
|
324
|
+
if ("tokenProvider" in opts && opts.tokenProvider) {
|
|
325
|
+
this.tokenProvider = opts.tokenProvider;
|
|
326
|
+
} else if ("token" in opts && opts.token) {
|
|
327
|
+
this.tokenProvider = new StaticTokenProvider(opts.token);
|
|
328
|
+
} else if ("clientId" in opts && "clientSecret" in opts && "identityUrl" in opts) {
|
|
329
|
+
const cco = {
|
|
330
|
+
clientId: opts.clientId,
|
|
331
|
+
clientSecret: opts.clientSecret,
|
|
332
|
+
identityUrl: opts.identityUrl,
|
|
333
|
+
...opts.scopes ? { scopes: opts.scopes } : {},
|
|
334
|
+
...opts.timeoutMs !== undefined ? { timeoutMs: opts.timeoutMs } : {},
|
|
335
|
+
...opts.allowInsecureLoopback ? { allowInsecureLoopback: true } : {}
|
|
336
|
+
};
|
|
337
|
+
this.tokenProvider = new ClientCredentialsTokenProvider(cco);
|
|
338
|
+
} else {
|
|
339
|
+
throw new MT4V2SignalRError("opts must include either `tokenProvider`, `token`, or { clientId, clientSecret, identityUrl }");
|
|
340
|
+
}
|
|
341
|
+
const allowInsecureLoopback = opts.allowInsecureLoopback === true;
|
|
342
|
+
const serviceBase = validateServiceUrl(opts.baseUrl, "baseUrl", allowInsecureLoopback);
|
|
343
|
+
const base = validateServiceUrl(opts.hubUrl ?? `${serviceBase}/hubs/mt4/v2`, "hubUrl", allowInsecureLoopback);
|
|
344
|
+
const sep = base.includes("?") ? "&" : "?";
|
|
345
|
+
this.hubUrl = `${base}${sep}tradePlatform=${encodeURIComponent(opts.tradePlatform)}`;
|
|
346
|
+
this.reconnect = opts.reconnect ?? [0, 2000, 1e4, 30000];
|
|
347
|
+
this.logger = opts.logger;
|
|
348
|
+
}
|
|
349
|
+
register(fn) {
|
|
350
|
+
if (this.connection) {
|
|
351
|
+
fn(this.connection);
|
|
352
|
+
} else {
|
|
353
|
+
this.pendingHandlers.push(fn);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
get hubUrlForTest() {
|
|
357
|
+
return this.hubUrl;
|
|
358
|
+
}
|
|
359
|
+
tokenForTest() {
|
|
360
|
+
return this.tokenProvider.getToken();
|
|
361
|
+
}
|
|
362
|
+
async loadSignalRModule() {
|
|
363
|
+
try {
|
|
364
|
+
return await import("@microsoft/signalr");
|
|
365
|
+
} catch (e) {
|
|
366
|
+
throw new MT4V2SignalRError("The required `@microsoft/signalr` dependency could not be loaded. Run `npm install @microsoft/signalr` (or `bun add @microsoft/signalr`) and retry.", e);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
async start() {
|
|
370
|
+
if (this.connection?.state === "Connected")
|
|
371
|
+
return;
|
|
372
|
+
const signalR = await this.loadSignalRModule();
|
|
373
|
+
const Builder = signalR.HubConnectionBuilder;
|
|
374
|
+
const LogLevel = signalR.LogLevel;
|
|
375
|
+
let builder = new Builder().withUrl(this.hubUrl, {
|
|
376
|
+
accessTokenFactory: () => this.tokenProvider.getToken()
|
|
377
|
+
});
|
|
378
|
+
if (this.reconnect !== false) {
|
|
379
|
+
builder = builder.withAutomaticReconnect(this.reconnect);
|
|
380
|
+
}
|
|
381
|
+
if (this.logger !== undefined) {
|
|
382
|
+
builder = builder.configureLogging(this.logger);
|
|
383
|
+
} else {
|
|
384
|
+
builder = builder.configureLogging(LogLevel.Warning);
|
|
385
|
+
}
|
|
386
|
+
const conn = builder.build();
|
|
387
|
+
this.connection = conn;
|
|
388
|
+
for (const fn of this.pendingHandlers)
|
|
389
|
+
fn(conn);
|
|
390
|
+
this.pendingHandlers = [];
|
|
391
|
+
conn.on("OnConnectionStatus", () => {});
|
|
392
|
+
await conn.start();
|
|
393
|
+
}
|
|
394
|
+
async stop() {
|
|
395
|
+
if (!this.connection)
|
|
396
|
+
return;
|
|
397
|
+
await this.connection.stop();
|
|
398
|
+
this.connection = null;
|
|
399
|
+
}
|
|
400
|
+
getConnection() {
|
|
401
|
+
if (!this.connection)
|
|
402
|
+
throw new MT4V2SignalRError("SignalR client not started — call start() first");
|
|
403
|
+
return this.connection;
|
|
404
|
+
}
|
|
405
|
+
onTick(handler) {
|
|
406
|
+
this.register((c) => c.on("OnTick", handler));
|
|
407
|
+
}
|
|
408
|
+
onConnectionStatus(handler) {
|
|
409
|
+
this.register((c) => c.on("OnConnectionStatus", handler));
|
|
410
|
+
}
|
|
411
|
+
async subscribeToTicks(symbol) {
|
|
412
|
+
await this.getConnection().invoke("SubscribeToTicks", symbol);
|
|
413
|
+
}
|
|
414
|
+
async unsubscribeFromTicks(symbol) {
|
|
415
|
+
await this.getConnection().invoke("UnsubscribeFromTicks", symbol);
|
|
416
|
+
}
|
|
417
|
+
streamTicks(symbol) {
|
|
418
|
+
const conn = this.getConnection();
|
|
419
|
+
const args = symbol !== undefined ? [symbol] : [];
|
|
420
|
+
return this.toAsyncIterable(conn.stream("StreamTicks", ...args));
|
|
421
|
+
}
|
|
422
|
+
streamMarginCallUpdates() {
|
|
423
|
+
const conn = this.getConnection();
|
|
424
|
+
return this.toAsyncIterable(conn.stream("StreamMarginCallUpdates"));
|
|
425
|
+
}
|
|
426
|
+
streamTrades() {
|
|
427
|
+
const conn = this.getConnection();
|
|
428
|
+
return this.toAsyncIterable(conn.stream("StreamTrades"));
|
|
429
|
+
}
|
|
430
|
+
streamUserUpdates() {
|
|
431
|
+
const conn = this.getConnection();
|
|
432
|
+
return this.toAsyncIterable(conn.stream("StreamUserUpdates"));
|
|
433
|
+
}
|
|
434
|
+
streamSymbolUpdates() {
|
|
435
|
+
const conn = this.getConnection();
|
|
436
|
+
return this.toAsyncIterable(conn.stream("StreamSymbolUpdates"));
|
|
437
|
+
}
|
|
438
|
+
toAsyncIterable(stream) {
|
|
439
|
+
return {
|
|
440
|
+
[Symbol.asyncIterator]() {
|
|
441
|
+
const queue = [];
|
|
442
|
+
let waiter = null;
|
|
443
|
+
let error = null;
|
|
444
|
+
let done = false;
|
|
445
|
+
let sub = null;
|
|
446
|
+
sub = stream.subscribe({
|
|
447
|
+
next: (item) => {
|
|
448
|
+
if (done)
|
|
449
|
+
return;
|
|
450
|
+
if (waiter) {
|
|
451
|
+
const current = waiter;
|
|
452
|
+
waiter = null;
|
|
453
|
+
current.resolve({ value: item, done: false });
|
|
454
|
+
} else {
|
|
455
|
+
queue.push(item);
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
complete: () => {
|
|
459
|
+
if (done)
|
|
460
|
+
return;
|
|
461
|
+
done = true;
|
|
462
|
+
if (waiter) {
|
|
463
|
+
const current = waiter;
|
|
464
|
+
waiter = null;
|
|
465
|
+
current.resolve({ value: undefined, done: true });
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
error: (reason) => {
|
|
469
|
+
if (done)
|
|
470
|
+
return;
|
|
471
|
+
error = reason;
|
|
472
|
+
done = true;
|
|
473
|
+
sub?.dispose();
|
|
474
|
+
if (waiter) {
|
|
475
|
+
const current = waiter;
|
|
476
|
+
waiter = null;
|
|
477
|
+
current.reject(reason);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
return {
|
|
482
|
+
next() {
|
|
483
|
+
if (error !== null)
|
|
484
|
+
return Promise.reject(error);
|
|
485
|
+
if (queue.length)
|
|
486
|
+
return Promise.resolve({ value: queue.shift(), done: false });
|
|
487
|
+
if (done)
|
|
488
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
489
|
+
return new Promise((resolve, reject) => {
|
|
490
|
+
waiter = { resolve, reject };
|
|
491
|
+
});
|
|
492
|
+
},
|
|
493
|
+
return() {
|
|
494
|
+
try {
|
|
495
|
+
sub?.dispose();
|
|
496
|
+
} catch {}
|
|
497
|
+
done = true;
|
|
498
|
+
if (waiter) {
|
|
499
|
+
const current = waiter;
|
|
500
|
+
waiter = null;
|
|
501
|
+
current.resolve({ value: undefined, done: true });
|
|
502
|
+
}
|
|
503
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// src/signalr.mt5.ts
|
|
512
|
+
class MT5V2SignalRClient {
|
|
513
|
+
hubUrl;
|
|
514
|
+
tokenProvider;
|
|
515
|
+
reconnect;
|
|
516
|
+
logger;
|
|
517
|
+
connection = null;
|
|
518
|
+
pendingHandlers = [];
|
|
519
|
+
constructor(opts) {
|
|
520
|
+
if (!opts.tradePlatform)
|
|
521
|
+
throw new MT4V2SignalRError("tradePlatform is required");
|
|
522
|
+
if (!opts.baseUrl)
|
|
523
|
+
throw new MT4V2SignalRError("baseUrl is required");
|
|
524
|
+
if ("tokenProvider" in opts && opts.tokenProvider) {
|
|
525
|
+
this.tokenProvider = opts.tokenProvider;
|
|
526
|
+
} else if ("token" in opts && opts.token) {
|
|
527
|
+
this.tokenProvider = new StaticTokenProvider(opts.token);
|
|
528
|
+
} else if ("clientId" in opts && "clientSecret" in opts && "identityUrl" in opts) {
|
|
529
|
+
const cco = {
|
|
530
|
+
clientId: opts.clientId,
|
|
531
|
+
clientSecret: opts.clientSecret,
|
|
532
|
+
identityUrl: opts.identityUrl,
|
|
533
|
+
...opts.scopes ? { scopes: opts.scopes } : {},
|
|
534
|
+
...opts.timeoutMs !== undefined ? { timeoutMs: opts.timeoutMs } : {},
|
|
535
|
+
...opts.allowInsecureLoopback ? { allowInsecureLoopback: true } : {}
|
|
536
|
+
};
|
|
537
|
+
this.tokenProvider = new ClientCredentialsTokenProvider(cco);
|
|
538
|
+
} else {
|
|
539
|
+
throw new MT4V2SignalRError("opts must include either `tokenProvider`, `token`, or { clientId, clientSecret, identityUrl }");
|
|
540
|
+
}
|
|
541
|
+
const allowInsecureLoopback = opts.allowInsecureLoopback === true;
|
|
542
|
+
const serviceBase = validateServiceUrl(opts.baseUrl, "baseUrl", allowInsecureLoopback);
|
|
543
|
+
const base = validateServiceUrl(opts.hubUrl ?? `${serviceBase}/hubs/mt5/v2`, "hubUrl", allowInsecureLoopback);
|
|
544
|
+
const sep = base.includes("?") ? "&" : "?";
|
|
545
|
+
this.hubUrl = `${base}${sep}tradePlatform=${encodeURIComponent(opts.tradePlatform)}`;
|
|
546
|
+
this.reconnect = opts.reconnect ?? [0, 2000, 1e4, 30000];
|
|
547
|
+
this.logger = opts.logger;
|
|
548
|
+
}
|
|
549
|
+
register(fn) {
|
|
550
|
+
if (this.connection) {
|
|
551
|
+
fn(this.connection);
|
|
552
|
+
} else {
|
|
553
|
+
this.pendingHandlers.push(fn);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
get hubUrlForTest() {
|
|
557
|
+
return this.hubUrl;
|
|
558
|
+
}
|
|
559
|
+
tokenForTest() {
|
|
560
|
+
return this.tokenProvider.getToken();
|
|
561
|
+
}
|
|
562
|
+
async loadSignalRModule() {
|
|
563
|
+
try {
|
|
564
|
+
return await import("@microsoft/signalr");
|
|
565
|
+
} catch (e) {
|
|
566
|
+
throw new MT4V2SignalRError("The required `@microsoft/signalr` dependency could not be loaded. Run `npm install @microsoft/signalr` (or `bun add @microsoft/signalr`) and retry.", e);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
async start() {
|
|
570
|
+
if (this.connection?.state === "Connected")
|
|
571
|
+
return;
|
|
572
|
+
const signalR = await this.loadSignalRModule();
|
|
573
|
+
const Builder = signalR.HubConnectionBuilder;
|
|
574
|
+
const LogLevel = signalR.LogLevel;
|
|
575
|
+
let builder = new Builder().withUrl(this.hubUrl, {
|
|
576
|
+
accessTokenFactory: () => this.tokenProvider.getToken()
|
|
577
|
+
});
|
|
578
|
+
if (this.reconnect !== false) {
|
|
579
|
+
builder = builder.withAutomaticReconnect(this.reconnect);
|
|
580
|
+
}
|
|
581
|
+
if (this.logger !== undefined) {
|
|
582
|
+
builder = builder.configureLogging(this.logger);
|
|
583
|
+
} else {
|
|
584
|
+
builder = builder.configureLogging(LogLevel.Warning);
|
|
585
|
+
}
|
|
586
|
+
const conn = builder.build();
|
|
587
|
+
this.connection = conn;
|
|
588
|
+
for (const fn of this.pendingHandlers)
|
|
589
|
+
fn(conn);
|
|
590
|
+
this.pendingHandlers = [];
|
|
591
|
+
conn.on("OnConnectionStatus", () => {});
|
|
592
|
+
await conn.start();
|
|
593
|
+
}
|
|
594
|
+
async stop() {
|
|
595
|
+
if (!this.connection)
|
|
596
|
+
return;
|
|
597
|
+
await this.connection.stop();
|
|
598
|
+
this.connection = null;
|
|
599
|
+
}
|
|
600
|
+
getConnection() {
|
|
601
|
+
if (!this.connection)
|
|
602
|
+
throw new MT4V2SignalRError("SignalR client not started — call start() first");
|
|
603
|
+
return this.connection;
|
|
604
|
+
}
|
|
605
|
+
onConnectionStatus(handler) {
|
|
606
|
+
this.register((c) => c.on("OnConnectionStatus", handler));
|
|
607
|
+
}
|
|
608
|
+
streamMarginCallUpdates() {
|
|
609
|
+
return this.toAsyncIterable(this.getConnection().stream("StreamMarginCallUpdates"));
|
|
610
|
+
}
|
|
611
|
+
toAsyncIterable(stream) {
|
|
612
|
+
return {
|
|
613
|
+
[Symbol.asyncIterator]() {
|
|
614
|
+
const queue = [];
|
|
615
|
+
let waiter = null;
|
|
616
|
+
let error = null;
|
|
617
|
+
let done = false;
|
|
618
|
+
let sub = null;
|
|
619
|
+
sub = stream.subscribe({
|
|
620
|
+
next: (item) => {
|
|
621
|
+
if (done)
|
|
622
|
+
return;
|
|
623
|
+
if (waiter) {
|
|
624
|
+
const current = waiter;
|
|
625
|
+
waiter = null;
|
|
626
|
+
current.resolve({ value: item, done: false });
|
|
627
|
+
} else {
|
|
628
|
+
queue.push(item);
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
complete: () => {
|
|
632
|
+
if (done)
|
|
633
|
+
return;
|
|
634
|
+
done = true;
|
|
635
|
+
if (waiter) {
|
|
636
|
+
const current = waiter;
|
|
637
|
+
waiter = null;
|
|
638
|
+
current.resolve({ value: undefined, done: true });
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
error: (reason) => {
|
|
642
|
+
if (done)
|
|
643
|
+
return;
|
|
644
|
+
error = reason;
|
|
645
|
+
done = true;
|
|
646
|
+
sub?.dispose();
|
|
647
|
+
if (waiter) {
|
|
648
|
+
const current = waiter;
|
|
649
|
+
waiter = null;
|
|
650
|
+
current.reject(reason);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
return {
|
|
655
|
+
next() {
|
|
656
|
+
if (error !== null)
|
|
657
|
+
return Promise.reject(error);
|
|
658
|
+
if (queue.length)
|
|
659
|
+
return Promise.resolve({ value: queue.shift(), done: false });
|
|
660
|
+
if (done)
|
|
661
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
662
|
+
return new Promise((resolve, reject) => {
|
|
663
|
+
waiter = { resolve, reject };
|
|
664
|
+
});
|
|
665
|
+
},
|
|
666
|
+
return() {
|
|
667
|
+
try {
|
|
668
|
+
sub?.dispose();
|
|
669
|
+
} catch {}
|
|
670
|
+
done = true;
|
|
671
|
+
if (waiter) {
|
|
672
|
+
const current = waiter;
|
|
673
|
+
waiter = null;
|
|
674
|
+
current.resolve({ value: undefined, done: true });
|
|
675
|
+
}
|
|
676
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// src/retry.ts
|
|
685
|
+
var defaultPolicy = {
|
|
686
|
+
maxAttempts: 3,
|
|
687
|
+
baseDelayMs: 500,
|
|
688
|
+
maxDelayMs: 1e4,
|
|
689
|
+
factor: 2,
|
|
690
|
+
jitterPercent: 0.25
|
|
691
|
+
};
|
|
692
|
+
var RETRYABLE_STATUSES = new Set([408, 429, 502, 503, 504]);
|
|
693
|
+
async function withRetry(op, opts) {
|
|
694
|
+
const policy = opts.policy ?? defaultPolicy;
|
|
695
|
+
const { isIdempotent, signal } = opts;
|
|
696
|
+
let attempt = 0;
|
|
697
|
+
let lastResponse = null;
|
|
698
|
+
let lastError = null;
|
|
699
|
+
while (attempt < policy.maxAttempts) {
|
|
700
|
+
attempt++;
|
|
701
|
+
throwIfAborted(signal);
|
|
702
|
+
let outcome = null;
|
|
703
|
+
let thrown = null;
|
|
704
|
+
try {
|
|
705
|
+
outcome = await op();
|
|
706
|
+
} catch (error) {
|
|
707
|
+
thrown = error;
|
|
708
|
+
}
|
|
709
|
+
if (outcome) {
|
|
710
|
+
lastResponse = outcome;
|
|
711
|
+
lastError = null;
|
|
712
|
+
if (!shouldRetryStatus(outcome.response.status, isIdempotent))
|
|
713
|
+
return outcome;
|
|
714
|
+
} else {
|
|
715
|
+
lastError = thrown;
|
|
716
|
+
lastResponse = null;
|
|
717
|
+
if (!isIdempotent || isAbortLike(thrown) || signal?.aborted)
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
if (attempt >= policy.maxAttempts)
|
|
721
|
+
break;
|
|
722
|
+
await sleep(computeDelayMs({ attempt, policy, response: outcome?.response }), signal);
|
|
723
|
+
}
|
|
724
|
+
if (lastResponse)
|
|
725
|
+
return lastResponse;
|
|
726
|
+
throw lastError;
|
|
727
|
+
}
|
|
728
|
+
function isAbortLike(error) {
|
|
729
|
+
if (!error || typeof error !== "object")
|
|
730
|
+
return false;
|
|
731
|
+
const value = error;
|
|
732
|
+
return value.name === "AbortError" || value.name === "TimeoutError" || value.code === "ABORT_ERR";
|
|
733
|
+
}
|
|
734
|
+
function shouldRetryStatus(status, isIdempotent) {
|
|
735
|
+
return isIdempotent && RETRYABLE_STATUSES.has(status);
|
|
736
|
+
}
|
|
737
|
+
function computeDelayMs(args) {
|
|
738
|
+
const { attempt, policy, response } = args;
|
|
739
|
+
if (response) {
|
|
740
|
+
const retryAfterMs = parseRetryAfter(response.headers.get("retry-after"));
|
|
741
|
+
if (retryAfterMs !== null)
|
|
742
|
+
return Math.min(retryAfterMs, policy.maxDelayMs);
|
|
743
|
+
}
|
|
744
|
+
const exp = policy.baseDelayMs * Math.pow(policy.factor, attempt - 1);
|
|
745
|
+
const capped = Math.min(exp, policy.maxDelayMs);
|
|
746
|
+
const jitter = (Math.random() - 0.5) * 2 * policy.jitterPercent;
|
|
747
|
+
return Math.max(0, capped * (1 + jitter));
|
|
748
|
+
}
|
|
749
|
+
function parseRetryAfter(header) {
|
|
750
|
+
if (!header)
|
|
751
|
+
return null;
|
|
752
|
+
const trimmed = header.trim();
|
|
753
|
+
if (trimmed === "")
|
|
754
|
+
return null;
|
|
755
|
+
if (/^\d+$/.test(trimmed))
|
|
756
|
+
return Number(trimmed) * 1000;
|
|
757
|
+
const date = Date.parse(trimmed);
|
|
758
|
+
if (Number.isNaN(date))
|
|
759
|
+
return null;
|
|
760
|
+
return Math.max(0, date - Date.now());
|
|
761
|
+
}
|
|
762
|
+
function throwIfAborted(signal) {
|
|
763
|
+
if (!signal?.aborted)
|
|
764
|
+
return;
|
|
765
|
+
throw signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
766
|
+
}
|
|
767
|
+
function sleep(ms, signal) {
|
|
768
|
+
if (ms <= 0) {
|
|
769
|
+
throwIfAborted(signal);
|
|
770
|
+
return Promise.resolve();
|
|
771
|
+
}
|
|
772
|
+
return new Promise((resolve, reject) => {
|
|
773
|
+
let timer;
|
|
774
|
+
const onAbort = () => {
|
|
775
|
+
clearTimeout(timer);
|
|
776
|
+
signal?.removeEventListener("abort", onAbort);
|
|
777
|
+
reject(signal?.reason ?? new DOMException("Aborted", "AbortError"));
|
|
778
|
+
};
|
|
779
|
+
timer = setTimeout(() => {
|
|
780
|
+
signal?.removeEventListener("abort", onAbort);
|
|
781
|
+
resolve();
|
|
782
|
+
}, ms);
|
|
783
|
+
if (signal) {
|
|
784
|
+
if (signal.aborted)
|
|
785
|
+
onAbort();
|
|
786
|
+
else
|
|
787
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// src/mutator.context.ts
|
|
793
|
+
var requestContext = Symbol("cplugin.webapi.request-context");
|
|
794
|
+
function contextFromOptions(options) {
|
|
795
|
+
const ctx = options[requestContext];
|
|
796
|
+
if (!ctx)
|
|
797
|
+
throw new Error("No request context: call generated methods via CPluginWebApiClient.");
|
|
798
|
+
return ctx;
|
|
799
|
+
}
|
|
800
|
+
function withRequestContext(options, ctx) {
|
|
801
|
+
return { ...options ?? {}, [requestContext]: ctx };
|
|
802
|
+
}
|
|
803
|
+
var responseMeta = Symbol("cplugin.webapi.response-meta");
|
|
804
|
+
|
|
805
|
+
// src/errors.ts
|
|
806
|
+
function codeForHttpStatus(status) {
|
|
807
|
+
if (status === 401 || status === 403)
|
|
808
|
+
return "Forbidden";
|
|
809
|
+
if (status === 404)
|
|
810
|
+
return "NotFound";
|
|
811
|
+
return "Internal";
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
class ApiError extends Error {
|
|
815
|
+
code;
|
|
816
|
+
description;
|
|
817
|
+
activityId;
|
|
818
|
+
managerCode;
|
|
819
|
+
status;
|
|
820
|
+
constructor(body, meta, status) {
|
|
821
|
+
const desc = body.message ?? undefined;
|
|
822
|
+
super(desc ?? `v2 error: ${body.code}`);
|
|
823
|
+
this.name = "ApiError";
|
|
824
|
+
this.code = body.code;
|
|
825
|
+
this.description = desc;
|
|
826
|
+
this.activityId = meta?.activityId ?? undefined;
|
|
827
|
+
this.managerCode = body.managerCode ?? undefined;
|
|
828
|
+
this.status = status;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
// src/mutator.ts
|
|
833
|
+
async function authenticatedFetch(ctx, url, options, consume) {
|
|
834
|
+
return withDeadline(ctx.timeoutMs, options.signal, async (signal) => {
|
|
835
|
+
const fullUrl = new URL(url, ctx.apiBaseUrl).toString();
|
|
836
|
+
const requestOptions = { ...options };
|
|
837
|
+
delete requestOptions[requestContext];
|
|
838
|
+
const headerObj = {};
|
|
839
|
+
if (options.headers) {
|
|
840
|
+
if (options.headers instanceof Headers) {
|
|
841
|
+
options.headers.forEach((value, key) => {
|
|
842
|
+
headerObj[key] = value;
|
|
843
|
+
});
|
|
844
|
+
} else if (Array.isArray(options.headers)) {
|
|
845
|
+
for (const [key, value] of options.headers)
|
|
846
|
+
headerObj[key] = value;
|
|
847
|
+
} else {
|
|
848
|
+
Object.assign(headerObj, options.headers);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
const method = (options.method ?? "GET").toUpperCase();
|
|
852
|
+
const isIdempotent = method === "GET" || method === "HEAD" || method === "OPTIONS" || method === "PUT" || method === "DELETE";
|
|
853
|
+
const doFetch = async (forceRefresh) => {
|
|
854
|
+
const token = await ctx.tokenProvider.getToken({
|
|
855
|
+
...forceRefresh ? { forceRefresh: true } : {},
|
|
856
|
+
signal
|
|
857
|
+
});
|
|
858
|
+
return ctx.fetchImpl(fullUrl, {
|
|
859
|
+
...requestOptions,
|
|
860
|
+
method,
|
|
861
|
+
headers: {
|
|
862
|
+
...headerObj,
|
|
863
|
+
Authorization: "Bearer " + token,
|
|
864
|
+
Accept: "application/json"
|
|
865
|
+
},
|
|
866
|
+
signal,
|
|
867
|
+
redirect: "error"
|
|
868
|
+
});
|
|
869
|
+
};
|
|
870
|
+
const outcome = await withRetry(async () => {
|
|
871
|
+
let response = await doFetch(false);
|
|
872
|
+
if (response.status === 401 && isIdempotent)
|
|
873
|
+
response = await doFetch(true);
|
|
874
|
+
return { response, result: response };
|
|
875
|
+
}, { policy: ctx.retryPolicy, isIdempotent, signal });
|
|
876
|
+
return consume(outcome.response, signal);
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
async function customFetch(url, options) {
|
|
880
|
+
const ctx = contextFromOptions(options);
|
|
881
|
+
return authenticatedFetch(ctx, url, options, async (response, signal) => {
|
|
882
|
+
if (!response.ok) {
|
|
883
|
+
const text = await response.text();
|
|
884
|
+
try {
|
|
885
|
+
const env = JSON.parse(text);
|
|
886
|
+
if (env.error != null)
|
|
887
|
+
throw new ApiError(env.error, env.meta, response.status);
|
|
888
|
+
throw new ApiError({ code: codeForHttpStatus(response.status), message: "HTTP " + response.status }, env.meta ?? null, response.status);
|
|
889
|
+
} catch (error) {
|
|
890
|
+
if (error instanceof ApiError)
|
|
891
|
+
throw error;
|
|
892
|
+
throw new ApiError({ code: codeForHttpStatus(response.status), message: "HTTP " + response.status }, null, response.status);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
const envelope = await response.json();
|
|
896
|
+
if (envelope.error != null)
|
|
897
|
+
throw new ApiError(envelope.error, envelope.meta, response.status);
|
|
898
|
+
return attachResponseMeta(envelope.data, envelope.meta);
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
function attachResponseMeta(data, meta) {
|
|
902
|
+
if (data !== null && (typeof data === "object" || typeof data === "function")) {
|
|
903
|
+
Object.defineProperty(data, responseMeta, { value: meta ?? null, enumerable: false, configurable: true });
|
|
904
|
+
}
|
|
905
|
+
return data;
|
|
906
|
+
}
|
|
907
|
+
function pagingFromResult(items) {
|
|
908
|
+
if (items !== null && (typeof items === "object" || typeof items === "function")) {
|
|
909
|
+
return items[responseMeta] ?? null;
|
|
910
|
+
}
|
|
911
|
+
return null;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
// src/generated/mt4-v2-authentication.ts
|
|
915
|
+
var exports_mt4_v2_authentication = {};
|
|
916
|
+
__export(exports_mt4_v2_authentication, {
|
|
917
|
+
postUserPasswordSetLogin: () => postUserPasswordSetLogin,
|
|
918
|
+
postUserPasswordCheckLogin: () => postUserPasswordCheckLogin,
|
|
919
|
+
getPostUserPasswordSetLoginUrl: () => getPostUserPasswordSetLoginUrl,
|
|
920
|
+
getPostUserPasswordCheckLoginUrl: () => getPostUserPasswordCheckLoginUrl
|
|
921
|
+
});
|
|
922
|
+
var getPostUserPasswordCheckLoginUrl = (tradePlatform, login) => {
|
|
923
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserPasswordCheck/${encodeURIComponent(String(login))}`;
|
|
924
|
+
};
|
|
925
|
+
var postUserPasswordCheckLogin = async (tradePlatform, login, postUserPasswordCheckLoginBody, options) => {
|
|
926
|
+
return customFetch(getPostUserPasswordCheckLoginUrl(tradePlatform, login), {
|
|
927
|
+
...options,
|
|
928
|
+
method: "POST",
|
|
929
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
930
|
+
body: JSON.stringify(postUserPasswordCheckLoginBody)
|
|
931
|
+
});
|
|
932
|
+
};
|
|
933
|
+
var getPostUserPasswordSetLoginUrl = (tradePlatform, login, params) => {
|
|
934
|
+
const normalizedParams = new URLSearchParams;
|
|
935
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
936
|
+
if (value !== undefined) {
|
|
937
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
const stringifiedParams = normalizedParams.toString();
|
|
941
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserPasswordSet/${encodeURIComponent(String(login))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserPasswordSet/${encodeURIComponent(String(login))}`;
|
|
942
|
+
};
|
|
943
|
+
var postUserPasswordSetLogin = async (tradePlatform, login, postUserPasswordSetLoginBody, params, options) => {
|
|
944
|
+
return customFetch(getPostUserPasswordSetLoginUrl(tradePlatform, login, params), {
|
|
945
|
+
...options,
|
|
946
|
+
method: "POST",
|
|
947
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
948
|
+
body: JSON.stringify(postUserPasswordSetLoginBody)
|
|
949
|
+
});
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
// src/generated/mt4-v2-backup-destructive.ts
|
|
953
|
+
var exports_mt4_v2_backup_destructive = {};
|
|
954
|
+
__export(exports_mt4_v2_backup_destructive, {
|
|
955
|
+
postBackupRestoreUsers: () => postBackupRestoreUsers,
|
|
956
|
+
postBackupRestoreOrders: () => postBackupRestoreOrders,
|
|
957
|
+
getPostBackupRestoreUsersUrl: () => getPostBackupRestoreUsersUrl,
|
|
958
|
+
getPostBackupRestoreOrdersUrl: () => getPostBackupRestoreOrdersUrl
|
|
959
|
+
});
|
|
960
|
+
var getPostBackupRestoreUsersUrl = (tradePlatform, params) => {
|
|
961
|
+
const normalizedParams = new URLSearchParams;
|
|
962
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
963
|
+
if (value !== undefined) {
|
|
964
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
const stringifiedParams = normalizedParams.toString();
|
|
968
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRestoreUsers?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRestoreUsers`;
|
|
969
|
+
};
|
|
970
|
+
var postBackupRestoreUsers = async (tradePlatform, mT4UserRestoreInput, params, options) => {
|
|
971
|
+
return customFetch(getPostBackupRestoreUsersUrl(tradePlatform, params), {
|
|
972
|
+
...options,
|
|
973
|
+
method: "POST",
|
|
974
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
975
|
+
body: JSON.stringify(mT4UserRestoreInput)
|
|
976
|
+
});
|
|
977
|
+
};
|
|
978
|
+
var getPostBackupRestoreOrdersUrl = (tradePlatform, params) => {
|
|
979
|
+
const normalizedParams = new URLSearchParams;
|
|
980
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
981
|
+
if (value !== undefined) {
|
|
982
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
const stringifiedParams = normalizedParams.toString();
|
|
986
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRestoreOrders?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRestoreOrders`;
|
|
987
|
+
};
|
|
988
|
+
var postBackupRestoreOrders = async (tradePlatform, mT4TradeRestoreInput, params, options) => {
|
|
989
|
+
return customFetch(getPostBackupRestoreOrdersUrl(tradePlatform, params), {
|
|
990
|
+
...options,
|
|
991
|
+
method: "POST",
|
|
992
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
993
|
+
body: JSON.stringify(mT4TradeRestoreInput)
|
|
994
|
+
});
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
// src/generated/mt4-v2-backup.ts
|
|
998
|
+
var exports_mt4_v2_backup = {};
|
|
999
|
+
__export(exports_mt4_v2_backup, {
|
|
1000
|
+
getGetBackupRequestUsersFileUrl: () => getGetBackupRequestUsersFileUrl,
|
|
1001
|
+
getGetBackupRequestOrdersFileUrl: () => getGetBackupRequestOrdersFileUrl,
|
|
1002
|
+
getGetBackupInfoUsersModeUrl: () => getGetBackupInfoUsersModeUrl,
|
|
1003
|
+
getGetBackupInfoOrdersModeUrl: () => getGetBackupInfoOrdersModeUrl,
|
|
1004
|
+
getBackupRequestUsersFile: () => getBackupRequestUsersFile,
|
|
1005
|
+
getBackupRequestOrdersFile: () => getBackupRequestOrdersFile,
|
|
1006
|
+
getBackupInfoUsersMode: () => getBackupInfoUsersMode,
|
|
1007
|
+
getBackupInfoOrdersMode: () => getBackupInfoOrdersMode
|
|
1008
|
+
});
|
|
1009
|
+
var getGetBackupInfoUsersModeUrl = (tradePlatform, mode) => {
|
|
1010
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupInfoUsers/${encodeURIComponent(String(mode))}`;
|
|
1011
|
+
};
|
|
1012
|
+
var getBackupInfoUsersMode = async (tradePlatform, mode, options) => {
|
|
1013
|
+
return customFetch(getGetBackupInfoUsersModeUrl(tradePlatform, mode), {
|
|
1014
|
+
...options,
|
|
1015
|
+
method: "GET"
|
|
1016
|
+
});
|
|
1017
|
+
};
|
|
1018
|
+
var getGetBackupInfoOrdersModeUrl = (tradePlatform, mode) => {
|
|
1019
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupInfoOrders/${encodeURIComponent(String(mode))}`;
|
|
1020
|
+
};
|
|
1021
|
+
var getBackupInfoOrdersMode = async (tradePlatform, mode, options) => {
|
|
1022
|
+
return customFetch(getGetBackupInfoOrdersModeUrl(tradePlatform, mode), {
|
|
1023
|
+
...options,
|
|
1024
|
+
method: "GET"
|
|
1025
|
+
});
|
|
1026
|
+
};
|
|
1027
|
+
var getGetBackupRequestUsersFileUrl = (tradePlatform, file, params) => {
|
|
1028
|
+
const normalizedParams = new URLSearchParams;
|
|
1029
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1030
|
+
if (value !== undefined) {
|
|
1031
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1035
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRequestUsers/${encodeURIComponent(String(file))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRequestUsers/${encodeURIComponent(String(file))}`;
|
|
1036
|
+
};
|
|
1037
|
+
var getBackupRequestUsersFile = async (tradePlatform, file, params, options) => {
|
|
1038
|
+
return customFetch(getGetBackupRequestUsersFileUrl(tradePlatform, file, params), {
|
|
1039
|
+
...options,
|
|
1040
|
+
method: "GET"
|
|
1041
|
+
});
|
|
1042
|
+
};
|
|
1043
|
+
var getGetBackupRequestOrdersFileUrl = (tradePlatform, file, params) => {
|
|
1044
|
+
const normalizedParams = new URLSearchParams;
|
|
1045
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1046
|
+
if (value !== undefined) {
|
|
1047
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1051
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRequestOrders/${encodeURIComponent(String(file))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/BackupRequestOrders/${encodeURIComponent(String(file))}`;
|
|
1052
|
+
};
|
|
1053
|
+
var getBackupRequestOrdersFile = async (tradePlatform, file, params, options) => {
|
|
1054
|
+
return customFetch(getGetBackupRequestOrdersFileUrl(tradePlatform, file, params), {
|
|
1055
|
+
...options,
|
|
1056
|
+
method: "GET"
|
|
1057
|
+
});
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
// src/generated/mt4-v2-common.ts
|
|
1061
|
+
var exports_mt4_v2_common = {};
|
|
1062
|
+
__export(exports_mt4_v2_common, {
|
|
1063
|
+
getServerTimeMT4: () => getServerTimeMT4,
|
|
1064
|
+
getManagerCommon: () => getManagerCommon,
|
|
1065
|
+
getJournalRequest: () => getJournalRequest,
|
|
1066
|
+
getGetServerTimeMT4Url: () => getGetServerTimeMT4Url,
|
|
1067
|
+
getGetManagerCommonUrl: () => getGetManagerCommonUrl,
|
|
1068
|
+
getGetJournalRequestUrl: () => getGetJournalRequestUrl
|
|
1069
|
+
});
|
|
1070
|
+
var getGetServerTimeMT4Url = (tradePlatform) => {
|
|
1071
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ServerTime`;
|
|
1072
|
+
};
|
|
1073
|
+
var getServerTimeMT4 = async (tradePlatform, options) => {
|
|
1074
|
+
return customFetch(getGetServerTimeMT4Url(tradePlatform), {
|
|
1075
|
+
...options,
|
|
1076
|
+
method: "GET"
|
|
1077
|
+
});
|
|
1078
|
+
};
|
|
1079
|
+
var getGetManagerCommonUrl = (tradePlatform) => {
|
|
1080
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ManagerCommon`;
|
|
1081
|
+
};
|
|
1082
|
+
var getManagerCommon = async (tradePlatform, options) => {
|
|
1083
|
+
return customFetch(getGetManagerCommonUrl(tradePlatform), {
|
|
1084
|
+
...options,
|
|
1085
|
+
method: "GET"
|
|
1086
|
+
});
|
|
1087
|
+
};
|
|
1088
|
+
var getGetJournalRequestUrl = (tradePlatform, params) => {
|
|
1089
|
+
const normalizedParams = new URLSearchParams;
|
|
1090
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1091
|
+
if (value !== undefined) {
|
|
1092
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1096
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/JournalRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/JournalRequest`;
|
|
1097
|
+
};
|
|
1098
|
+
var getJournalRequest = async (tradePlatform, params, options) => {
|
|
1099
|
+
return customFetch(getGetJournalRequestUrl(tradePlatform, params), {
|
|
1100
|
+
...options,
|
|
1101
|
+
method: "GET"
|
|
1102
|
+
});
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
// src/generated/mt4-v2-config.ts
|
|
1106
|
+
var exports_mt4_v2_config = {};
|
|
1107
|
+
__export(exports_mt4_v2_config, {
|
|
1108
|
+
postCfgUpdateTime: () => postCfgUpdateTime,
|
|
1109
|
+
postCfgUpdateSync: () => postCfgUpdateSync,
|
|
1110
|
+
postCfgUpdateSymbolGroupPos: () => postCfgUpdateSymbolGroupPos,
|
|
1111
|
+
postCfgUpdateManager: () => postCfgUpdateManager,
|
|
1112
|
+
postCfgUpdateLiveUpdate: () => postCfgUpdateLiveUpdate,
|
|
1113
|
+
postCfgUpdateHolidayPos: () => postCfgUpdateHolidayPos,
|
|
1114
|
+
postCfgUpdateGatewayRule: () => postCfgUpdateGatewayRule,
|
|
1115
|
+
postCfgUpdateGatewayMarkup: () => postCfgUpdateGatewayMarkup,
|
|
1116
|
+
postCfgUpdateGatewayAccount: () => postCfgUpdateGatewayAccount,
|
|
1117
|
+
postCfgUpdateFeeder: () => postCfgUpdateFeeder,
|
|
1118
|
+
postCfgUpdateDataServerPos: () => postCfgUpdateDataServerPos,
|
|
1119
|
+
postCfgUpdateCommon: () => postCfgUpdateCommon,
|
|
1120
|
+
postCfgUpdateBackup: () => postCfgUpdateBackup,
|
|
1121
|
+
postCfgUpdateAccessPos: () => postCfgUpdateAccessPos,
|
|
1122
|
+
postCfgShiftSyncPos: () => postCfgShiftSyncPos,
|
|
1123
|
+
postCfgShiftSymbolPos: () => postCfgShiftSymbolPos,
|
|
1124
|
+
postCfgShiftPluginPos: () => postCfgShiftPluginPos,
|
|
1125
|
+
postCfgShiftManagerPos: () => postCfgShiftManagerPos,
|
|
1126
|
+
postCfgShiftLiveUpdatePos: () => postCfgShiftLiveUpdatePos,
|
|
1127
|
+
postCfgShiftHolidayPos: () => postCfgShiftHolidayPos,
|
|
1128
|
+
postCfgShiftGroupPos: () => postCfgShiftGroupPos,
|
|
1129
|
+
postCfgShiftGatewayRulePos: () => postCfgShiftGatewayRulePos,
|
|
1130
|
+
postCfgShiftGatewayMarkupPos: () => postCfgShiftGatewayMarkupPos,
|
|
1131
|
+
postCfgShiftGatewayAccountPos: () => postCfgShiftGatewayAccountPos,
|
|
1132
|
+
postCfgShiftFeederPos: () => postCfgShiftFeederPos,
|
|
1133
|
+
postCfgShiftDataServerPos: () => postCfgShiftDataServerPos,
|
|
1134
|
+
postCfgShiftAccessPos: () => postCfgShiftAccessPos,
|
|
1135
|
+
postCfgDeleteSyncPos: () => postCfgDeleteSyncPos,
|
|
1136
|
+
postCfgDeleteSymbolPos: () => postCfgDeleteSymbolPos,
|
|
1137
|
+
postCfgDeleteManagerPos: () => postCfgDeleteManagerPos,
|
|
1138
|
+
postCfgDeleteLiveUpdatePos: () => postCfgDeleteLiveUpdatePos,
|
|
1139
|
+
postCfgDeleteHolidayPos: () => postCfgDeleteHolidayPos,
|
|
1140
|
+
postCfgDeleteGatewayRulePos: () => postCfgDeleteGatewayRulePos,
|
|
1141
|
+
postCfgDeleteGatewayMarkupPos: () => postCfgDeleteGatewayMarkupPos,
|
|
1142
|
+
postCfgDeleteGatewayAccountPos: () => postCfgDeleteGatewayAccountPos,
|
|
1143
|
+
postCfgDeleteFeederPos: () => postCfgDeleteFeederPos,
|
|
1144
|
+
postCfgDeleteDataServerPos: () => postCfgDeleteDataServerPos,
|
|
1145
|
+
postCfgDeleteAccessPos: () => postCfgDeleteAccessPos,
|
|
1146
|
+
getPostCfgUpdateTimeUrl: () => getPostCfgUpdateTimeUrl,
|
|
1147
|
+
getPostCfgUpdateSyncUrl: () => getPostCfgUpdateSyncUrl,
|
|
1148
|
+
getPostCfgUpdateSymbolGroupPosUrl: () => getPostCfgUpdateSymbolGroupPosUrl,
|
|
1149
|
+
getPostCfgUpdateManagerUrl: () => getPostCfgUpdateManagerUrl,
|
|
1150
|
+
getPostCfgUpdateLiveUpdateUrl: () => getPostCfgUpdateLiveUpdateUrl,
|
|
1151
|
+
getPostCfgUpdateHolidayPosUrl: () => getPostCfgUpdateHolidayPosUrl,
|
|
1152
|
+
getPostCfgUpdateGatewayRuleUrl: () => getPostCfgUpdateGatewayRuleUrl,
|
|
1153
|
+
getPostCfgUpdateGatewayMarkupUrl: () => getPostCfgUpdateGatewayMarkupUrl,
|
|
1154
|
+
getPostCfgUpdateGatewayAccountUrl: () => getPostCfgUpdateGatewayAccountUrl,
|
|
1155
|
+
getPostCfgUpdateFeederUrl: () => getPostCfgUpdateFeederUrl,
|
|
1156
|
+
getPostCfgUpdateDataServerPosUrl: () => getPostCfgUpdateDataServerPosUrl,
|
|
1157
|
+
getPostCfgUpdateCommonUrl: () => getPostCfgUpdateCommonUrl,
|
|
1158
|
+
getPostCfgUpdateBackupUrl: () => getPostCfgUpdateBackupUrl,
|
|
1159
|
+
getPostCfgUpdateAccessPosUrl: () => getPostCfgUpdateAccessPosUrl,
|
|
1160
|
+
getPostCfgShiftSyncPosUrl: () => getPostCfgShiftSyncPosUrl,
|
|
1161
|
+
getPostCfgShiftSymbolPosUrl: () => getPostCfgShiftSymbolPosUrl,
|
|
1162
|
+
getPostCfgShiftPluginPosUrl: () => getPostCfgShiftPluginPosUrl,
|
|
1163
|
+
getPostCfgShiftManagerPosUrl: () => getPostCfgShiftManagerPosUrl,
|
|
1164
|
+
getPostCfgShiftLiveUpdatePosUrl: () => getPostCfgShiftLiveUpdatePosUrl,
|
|
1165
|
+
getPostCfgShiftHolidayPosUrl: () => getPostCfgShiftHolidayPosUrl,
|
|
1166
|
+
getPostCfgShiftGroupPosUrl: () => getPostCfgShiftGroupPosUrl,
|
|
1167
|
+
getPostCfgShiftGatewayRulePosUrl: () => getPostCfgShiftGatewayRulePosUrl,
|
|
1168
|
+
getPostCfgShiftGatewayMarkupPosUrl: () => getPostCfgShiftGatewayMarkupPosUrl,
|
|
1169
|
+
getPostCfgShiftGatewayAccountPosUrl: () => getPostCfgShiftGatewayAccountPosUrl,
|
|
1170
|
+
getPostCfgShiftFeederPosUrl: () => getPostCfgShiftFeederPosUrl,
|
|
1171
|
+
getPostCfgShiftDataServerPosUrl: () => getPostCfgShiftDataServerPosUrl,
|
|
1172
|
+
getPostCfgShiftAccessPosUrl: () => getPostCfgShiftAccessPosUrl,
|
|
1173
|
+
getPostCfgDeleteSyncPosUrl: () => getPostCfgDeleteSyncPosUrl,
|
|
1174
|
+
getPostCfgDeleteSymbolPosUrl: () => getPostCfgDeleteSymbolPosUrl,
|
|
1175
|
+
getPostCfgDeleteManagerPosUrl: () => getPostCfgDeleteManagerPosUrl,
|
|
1176
|
+
getPostCfgDeleteLiveUpdatePosUrl: () => getPostCfgDeleteLiveUpdatePosUrl,
|
|
1177
|
+
getPostCfgDeleteHolidayPosUrl: () => getPostCfgDeleteHolidayPosUrl,
|
|
1178
|
+
getPostCfgDeleteGatewayRulePosUrl: () => getPostCfgDeleteGatewayRulePosUrl,
|
|
1179
|
+
getPostCfgDeleteGatewayMarkupPosUrl: () => getPostCfgDeleteGatewayMarkupPosUrl,
|
|
1180
|
+
getPostCfgDeleteGatewayAccountPosUrl: () => getPostCfgDeleteGatewayAccountPosUrl,
|
|
1181
|
+
getPostCfgDeleteFeederPosUrl: () => getPostCfgDeleteFeederPosUrl,
|
|
1182
|
+
getPostCfgDeleteDataServerPosUrl: () => getPostCfgDeleteDataServerPosUrl,
|
|
1183
|
+
getPostCfgDeleteAccessPosUrl: () => getPostCfgDeleteAccessPosUrl,
|
|
1184
|
+
getGetCfgRequestTimeUrl: () => getGetCfgRequestTimeUrl,
|
|
1185
|
+
getGetCfgRequestSyncUrl: () => getGetCfgRequestSyncUrl,
|
|
1186
|
+
getGetCfgRequestManagerUrl: () => getGetCfgRequestManagerUrl,
|
|
1187
|
+
getGetCfgRequestLiveUpdateUrl: () => getGetCfgRequestLiveUpdateUrl,
|
|
1188
|
+
getGetCfgRequestHolidayUrl: () => getGetCfgRequestHolidayUrl,
|
|
1189
|
+
getGetCfgRequestGatewayRuleUrl: () => getGetCfgRequestGatewayRuleUrl,
|
|
1190
|
+
getGetCfgRequestGatewayMarkupUrl: () => getGetCfgRequestGatewayMarkupUrl,
|
|
1191
|
+
getGetCfgRequestGatewayAccountUrl: () => getGetCfgRequestGatewayAccountUrl,
|
|
1192
|
+
getGetCfgRequestFeederUrl: () => getGetCfgRequestFeederUrl,
|
|
1193
|
+
getGetCfgRequestDataServerUrl: () => getGetCfgRequestDataServerUrl,
|
|
1194
|
+
getGetCfgRequestCommonUrl: () => getGetCfgRequestCommonUrl,
|
|
1195
|
+
getGetCfgRequestBackupUrl: () => getGetCfgRequestBackupUrl,
|
|
1196
|
+
getGetCfgRequestAccessUrl: () => getGetCfgRequestAccessUrl,
|
|
1197
|
+
getCfgRequestTime: () => getCfgRequestTime,
|
|
1198
|
+
getCfgRequestSync: () => getCfgRequestSync,
|
|
1199
|
+
getCfgRequestManager: () => getCfgRequestManager,
|
|
1200
|
+
getCfgRequestLiveUpdate: () => getCfgRequestLiveUpdate,
|
|
1201
|
+
getCfgRequestHoliday: () => getCfgRequestHoliday,
|
|
1202
|
+
getCfgRequestGatewayRule: () => getCfgRequestGatewayRule,
|
|
1203
|
+
getCfgRequestGatewayMarkup: () => getCfgRequestGatewayMarkup,
|
|
1204
|
+
getCfgRequestGatewayAccount: () => getCfgRequestGatewayAccount,
|
|
1205
|
+
getCfgRequestFeeder: () => getCfgRequestFeeder,
|
|
1206
|
+
getCfgRequestDataServer: () => getCfgRequestDataServer,
|
|
1207
|
+
getCfgRequestCommon: () => getCfgRequestCommon,
|
|
1208
|
+
getCfgRequestBackup: () => getCfgRequestBackup,
|
|
1209
|
+
getCfgRequestAccess: () => getCfgRequestAccess
|
|
1210
|
+
});
|
|
1211
|
+
var getGetCfgRequestCommonUrl = (tradePlatform) => {
|
|
1212
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestCommon`;
|
|
1213
|
+
};
|
|
1214
|
+
var getCfgRequestCommon = async (tradePlatform, options) => {
|
|
1215
|
+
return customFetch(getGetCfgRequestCommonUrl(tradePlatform), {
|
|
1216
|
+
...options,
|
|
1217
|
+
method: "GET"
|
|
1218
|
+
});
|
|
1219
|
+
};
|
|
1220
|
+
var getPostCfgUpdateCommonUrl = (tradePlatform) => {
|
|
1221
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateCommon`;
|
|
1222
|
+
};
|
|
1223
|
+
var postCfgUpdateCommon = async (tradePlatform, mT4CommonUpdate, options) => {
|
|
1224
|
+
return customFetch(getPostCfgUpdateCommonUrl(tradePlatform), {
|
|
1225
|
+
...options,
|
|
1226
|
+
method: "POST",
|
|
1227
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1228
|
+
body: JSON.stringify(mT4CommonUpdate)
|
|
1229
|
+
});
|
|
1230
|
+
};
|
|
1231
|
+
var getGetCfgRequestHolidayUrl = (tradePlatform, params) => {
|
|
1232
|
+
const normalizedParams = new URLSearchParams;
|
|
1233
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1234
|
+
if (value !== undefined) {
|
|
1235
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1239
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestHoliday?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestHoliday`;
|
|
1240
|
+
};
|
|
1241
|
+
var getCfgRequestHoliday = async (tradePlatform, params, options) => {
|
|
1242
|
+
return customFetch(getGetCfgRequestHolidayUrl(tradePlatform, params), {
|
|
1243
|
+
...options,
|
|
1244
|
+
method: "GET"
|
|
1245
|
+
});
|
|
1246
|
+
};
|
|
1247
|
+
var getGetCfgRequestManagerUrl = (tradePlatform, params) => {
|
|
1248
|
+
const normalizedParams = new URLSearchParams;
|
|
1249
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1250
|
+
if (value !== undefined) {
|
|
1251
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1255
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestManager?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestManager`;
|
|
1256
|
+
};
|
|
1257
|
+
var getCfgRequestManager = async (tradePlatform, params, options) => {
|
|
1258
|
+
return customFetch(getGetCfgRequestManagerUrl(tradePlatform, params), {
|
|
1259
|
+
...options,
|
|
1260
|
+
method: "GET"
|
|
1261
|
+
});
|
|
1262
|
+
};
|
|
1263
|
+
var getGetCfgRequestTimeUrl = (tradePlatform) => {
|
|
1264
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestTime`;
|
|
1265
|
+
};
|
|
1266
|
+
var getCfgRequestTime = async (tradePlatform, options) => {
|
|
1267
|
+
return customFetch(getGetCfgRequestTimeUrl(tradePlatform), {
|
|
1268
|
+
...options,
|
|
1269
|
+
method: "GET"
|
|
1270
|
+
});
|
|
1271
|
+
};
|
|
1272
|
+
var getPostCfgUpdateTimeUrl = (tradePlatform) => {
|
|
1273
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateTime`;
|
|
1274
|
+
};
|
|
1275
|
+
var postCfgUpdateTime = async (tradePlatform, mT4ServerTime, options) => {
|
|
1276
|
+
return customFetch(getPostCfgUpdateTimeUrl(tradePlatform), {
|
|
1277
|
+
...options,
|
|
1278
|
+
method: "POST",
|
|
1279
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1280
|
+
body: JSON.stringify(mT4ServerTime)
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
var getGetCfgRequestAccessUrl = (tradePlatform, params) => {
|
|
1284
|
+
const normalizedParams = new URLSearchParams;
|
|
1285
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1286
|
+
if (value !== undefined) {
|
|
1287
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1291
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestAccess?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestAccess`;
|
|
1292
|
+
};
|
|
1293
|
+
var getCfgRequestAccess = async (tradePlatform, params, options) => {
|
|
1294
|
+
return customFetch(getGetCfgRequestAccessUrl(tradePlatform, params), {
|
|
1295
|
+
...options,
|
|
1296
|
+
method: "GET"
|
|
1297
|
+
});
|
|
1298
|
+
};
|
|
1299
|
+
var getGetCfgRequestBackupUrl = (tradePlatform) => {
|
|
1300
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestBackup`;
|
|
1301
|
+
};
|
|
1302
|
+
var getCfgRequestBackup = async (tradePlatform, options) => {
|
|
1303
|
+
return customFetch(getGetCfgRequestBackupUrl(tradePlatform), {
|
|
1304
|
+
...options,
|
|
1305
|
+
method: "GET"
|
|
1306
|
+
});
|
|
1307
|
+
};
|
|
1308
|
+
var getPostCfgUpdateBackupUrl = (tradePlatform) => {
|
|
1309
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateBackup`;
|
|
1310
|
+
};
|
|
1311
|
+
var postCfgUpdateBackup = async (tradePlatform, mT4Backup, options) => {
|
|
1312
|
+
return customFetch(getPostCfgUpdateBackupUrl(tradePlatform), {
|
|
1313
|
+
...options,
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1316
|
+
body: JSON.stringify(mT4Backup)
|
|
1317
|
+
});
|
|
1318
|
+
};
|
|
1319
|
+
var getPostCfgUpdateSyncUrl = (tradePlatform) => {
|
|
1320
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateSync`;
|
|
1321
|
+
};
|
|
1322
|
+
var postCfgUpdateSync = async (tradePlatform, mT4Sync, options) => {
|
|
1323
|
+
return customFetch(getPostCfgUpdateSyncUrl(tradePlatform), {
|
|
1324
|
+
...options,
|
|
1325
|
+
method: "POST",
|
|
1326
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1327
|
+
body: JSON.stringify(mT4Sync)
|
|
1328
|
+
});
|
|
1329
|
+
};
|
|
1330
|
+
var getPostCfgUpdateFeederUrl = (tradePlatform) => {
|
|
1331
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateFeeder`;
|
|
1332
|
+
};
|
|
1333
|
+
var postCfgUpdateFeeder = async (tradePlatform, mT4Feeder, options) => {
|
|
1334
|
+
return customFetch(getPostCfgUpdateFeederUrl(tradePlatform), {
|
|
1335
|
+
...options,
|
|
1336
|
+
method: "POST",
|
|
1337
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1338
|
+
body: JSON.stringify(mT4Feeder)
|
|
1339
|
+
});
|
|
1340
|
+
};
|
|
1341
|
+
var getPostCfgUpdateGatewayAccountUrl = (tradePlatform) => {
|
|
1342
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateGatewayAccount`;
|
|
1343
|
+
};
|
|
1344
|
+
var postCfgUpdateGatewayAccount = async (tradePlatform, mT4GatewayAccount, options) => {
|
|
1345
|
+
return customFetch(getPostCfgUpdateGatewayAccountUrl(tradePlatform), {
|
|
1346
|
+
...options,
|
|
1347
|
+
method: "POST",
|
|
1348
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1349
|
+
body: JSON.stringify(mT4GatewayAccount)
|
|
1350
|
+
});
|
|
1351
|
+
};
|
|
1352
|
+
var getPostCfgUpdateGatewayMarkupUrl = (tradePlatform) => {
|
|
1353
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateGatewayMarkup`;
|
|
1354
|
+
};
|
|
1355
|
+
var postCfgUpdateGatewayMarkup = async (tradePlatform, mT4GatewayMarkup, options) => {
|
|
1356
|
+
return customFetch(getPostCfgUpdateGatewayMarkupUrl(tradePlatform), {
|
|
1357
|
+
...options,
|
|
1358
|
+
method: "POST",
|
|
1359
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1360
|
+
body: JSON.stringify(mT4GatewayMarkup)
|
|
1361
|
+
});
|
|
1362
|
+
};
|
|
1363
|
+
var getPostCfgUpdateGatewayRuleUrl = (tradePlatform) => {
|
|
1364
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateGatewayRule`;
|
|
1365
|
+
};
|
|
1366
|
+
var postCfgUpdateGatewayRule = async (tradePlatform, mT4GatewayRule, options) => {
|
|
1367
|
+
return customFetch(getPostCfgUpdateGatewayRuleUrl(tradePlatform), {
|
|
1368
|
+
...options,
|
|
1369
|
+
method: "POST",
|
|
1370
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1371
|
+
body: JSON.stringify(mT4GatewayRule)
|
|
1372
|
+
});
|
|
1373
|
+
};
|
|
1374
|
+
var getPostCfgUpdateLiveUpdateUrl = (tradePlatform) => {
|
|
1375
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateLiveUpdate`;
|
|
1376
|
+
};
|
|
1377
|
+
var postCfgUpdateLiveUpdate = async (tradePlatform, mT4LiveUpdate, options) => {
|
|
1378
|
+
return customFetch(getPostCfgUpdateLiveUpdateUrl(tradePlatform), {
|
|
1379
|
+
...options,
|
|
1380
|
+
method: "POST",
|
|
1381
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1382
|
+
body: JSON.stringify(mT4LiveUpdate)
|
|
1383
|
+
});
|
|
1384
|
+
};
|
|
1385
|
+
var getPostCfgUpdateManagerUrl = (tradePlatform) => {
|
|
1386
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateManager`;
|
|
1387
|
+
};
|
|
1388
|
+
var postCfgUpdateManager = async (tradePlatform, mT4ManagerRights, options) => {
|
|
1389
|
+
return customFetch(getPostCfgUpdateManagerUrl(tradePlatform), {
|
|
1390
|
+
...options,
|
|
1391
|
+
method: "POST",
|
|
1392
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1393
|
+
body: JSON.stringify(mT4ManagerRights)
|
|
1394
|
+
});
|
|
1395
|
+
};
|
|
1396
|
+
var getPostCfgUpdateAccessPosUrl = (tradePlatform, pos) => {
|
|
1397
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateAccess/${encodeURIComponent(String(pos))}`;
|
|
1398
|
+
};
|
|
1399
|
+
var postCfgUpdateAccessPos = async (tradePlatform, pos, mT4Access, options) => {
|
|
1400
|
+
return customFetch(getPostCfgUpdateAccessPosUrl(tradePlatform, pos), {
|
|
1401
|
+
...options,
|
|
1402
|
+
method: "POST",
|
|
1403
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1404
|
+
body: JSON.stringify(mT4Access)
|
|
1405
|
+
});
|
|
1406
|
+
};
|
|
1407
|
+
var getPostCfgUpdateDataServerPosUrl = (tradePlatform, pos) => {
|
|
1408
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateDataServer/${encodeURIComponent(String(pos))}`;
|
|
1409
|
+
};
|
|
1410
|
+
var postCfgUpdateDataServerPos = async (tradePlatform, pos, mT4DataServer, options) => {
|
|
1411
|
+
return customFetch(getPostCfgUpdateDataServerPosUrl(tradePlatform, pos), {
|
|
1412
|
+
...options,
|
|
1413
|
+
method: "POST",
|
|
1414
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1415
|
+
body: JSON.stringify(mT4DataServer)
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
var getPostCfgUpdateHolidayPosUrl = (tradePlatform, pos) => {
|
|
1419
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateHoliday/${encodeURIComponent(String(pos))}`;
|
|
1420
|
+
};
|
|
1421
|
+
var postCfgUpdateHolidayPos = async (tradePlatform, pos, mT4Holiday, options) => {
|
|
1422
|
+
return customFetch(getPostCfgUpdateHolidayPosUrl(tradePlatform, pos), {
|
|
1423
|
+
...options,
|
|
1424
|
+
method: "POST",
|
|
1425
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1426
|
+
body: JSON.stringify(mT4Holiday)
|
|
1427
|
+
});
|
|
1428
|
+
};
|
|
1429
|
+
var getPostCfgUpdateSymbolGroupPosUrl = (tradePlatform, pos) => {
|
|
1430
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateSymbolGroup/${encodeURIComponent(String(pos))}`;
|
|
1431
|
+
};
|
|
1432
|
+
var postCfgUpdateSymbolGroupPos = async (tradePlatform, pos, mT4SymbolGroup, options) => {
|
|
1433
|
+
return customFetch(getPostCfgUpdateSymbolGroupPosUrl(tradePlatform, pos), {
|
|
1434
|
+
...options,
|
|
1435
|
+
method: "POST",
|
|
1436
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1437
|
+
body: JSON.stringify(mT4SymbolGroup)
|
|
1438
|
+
});
|
|
1439
|
+
};
|
|
1440
|
+
var getGetCfgRequestGatewayAccountUrl = (tradePlatform, params) => {
|
|
1441
|
+
const normalizedParams = new URLSearchParams;
|
|
1442
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1443
|
+
if (value !== undefined) {
|
|
1444
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1448
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayAccount?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayAccount`;
|
|
1449
|
+
};
|
|
1450
|
+
var getCfgRequestGatewayAccount = async (tradePlatform, params, options) => {
|
|
1451
|
+
return customFetch(getGetCfgRequestGatewayAccountUrl(tradePlatform, params), {
|
|
1452
|
+
...options,
|
|
1453
|
+
method: "GET"
|
|
1454
|
+
});
|
|
1455
|
+
};
|
|
1456
|
+
var getGetCfgRequestGatewayMarkupUrl = (tradePlatform, params) => {
|
|
1457
|
+
const normalizedParams = new URLSearchParams;
|
|
1458
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1459
|
+
if (value !== undefined) {
|
|
1460
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1464
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayMarkup?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayMarkup`;
|
|
1465
|
+
};
|
|
1466
|
+
var getCfgRequestGatewayMarkup = async (tradePlatform, params, options) => {
|
|
1467
|
+
return customFetch(getGetCfgRequestGatewayMarkupUrl(tradePlatform, params), {
|
|
1468
|
+
...options,
|
|
1469
|
+
method: "GET"
|
|
1470
|
+
});
|
|
1471
|
+
};
|
|
1472
|
+
var getGetCfgRequestGatewayRuleUrl = (tradePlatform, params) => {
|
|
1473
|
+
const normalizedParams = new URLSearchParams;
|
|
1474
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1475
|
+
if (value !== undefined) {
|
|
1476
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
1479
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1480
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayRule?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestGatewayRule`;
|
|
1481
|
+
};
|
|
1482
|
+
var getCfgRequestGatewayRule = async (tradePlatform, params, options) => {
|
|
1483
|
+
return customFetch(getGetCfgRequestGatewayRuleUrl(tradePlatform, params), {
|
|
1484
|
+
...options,
|
|
1485
|
+
method: "GET"
|
|
1486
|
+
});
|
|
1487
|
+
};
|
|
1488
|
+
var getGetCfgRequestDataServerUrl = (tradePlatform, params) => {
|
|
1489
|
+
const normalizedParams = new URLSearchParams;
|
|
1490
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1491
|
+
if (value !== undefined) {
|
|
1492
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1496
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestDataServer?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestDataServer`;
|
|
1497
|
+
};
|
|
1498
|
+
var getCfgRequestDataServer = async (tradePlatform, params, options) => {
|
|
1499
|
+
return customFetch(getGetCfgRequestDataServerUrl(tradePlatform, params), {
|
|
1500
|
+
...options,
|
|
1501
|
+
method: "GET"
|
|
1502
|
+
});
|
|
1503
|
+
};
|
|
1504
|
+
var getGetCfgRequestFeederUrl = (tradePlatform, params) => {
|
|
1505
|
+
const normalizedParams = new URLSearchParams;
|
|
1506
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1507
|
+
if (value !== undefined) {
|
|
1508
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1509
|
+
}
|
|
1510
|
+
});
|
|
1511
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1512
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestFeeder?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestFeeder`;
|
|
1513
|
+
};
|
|
1514
|
+
var getCfgRequestFeeder = async (tradePlatform, params, options) => {
|
|
1515
|
+
return customFetch(getGetCfgRequestFeederUrl(tradePlatform, params), {
|
|
1516
|
+
...options,
|
|
1517
|
+
method: "GET"
|
|
1518
|
+
});
|
|
1519
|
+
};
|
|
1520
|
+
var getGetCfgRequestLiveUpdateUrl = (tradePlatform, params) => {
|
|
1521
|
+
const normalizedParams = new URLSearchParams;
|
|
1522
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1523
|
+
if (value !== undefined) {
|
|
1524
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1528
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestLiveUpdate?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestLiveUpdate`;
|
|
1529
|
+
};
|
|
1530
|
+
var getCfgRequestLiveUpdate = async (tradePlatform, params, options) => {
|
|
1531
|
+
return customFetch(getGetCfgRequestLiveUpdateUrl(tradePlatform, params), {
|
|
1532
|
+
...options,
|
|
1533
|
+
method: "GET"
|
|
1534
|
+
});
|
|
1535
|
+
};
|
|
1536
|
+
var getGetCfgRequestSyncUrl = (tradePlatform, params) => {
|
|
1537
|
+
const normalizedParams = new URLSearchParams;
|
|
1538
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1539
|
+
if (value !== undefined) {
|
|
1540
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1544
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestSync?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestSync`;
|
|
1545
|
+
};
|
|
1546
|
+
var getCfgRequestSync = async (tradePlatform, params, options) => {
|
|
1547
|
+
return customFetch(getGetCfgRequestSyncUrl(tradePlatform, params), {
|
|
1548
|
+
...options,
|
|
1549
|
+
method: "GET"
|
|
1550
|
+
});
|
|
1551
|
+
};
|
|
1552
|
+
var getPostCfgDeleteAccessPosUrl = (tradePlatform, pos) => {
|
|
1553
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteAccess/${encodeURIComponent(String(pos))}`;
|
|
1554
|
+
};
|
|
1555
|
+
var postCfgDeleteAccessPos = async (tradePlatform, pos, options) => {
|
|
1556
|
+
return customFetch(getPostCfgDeleteAccessPosUrl(tradePlatform, pos), {
|
|
1557
|
+
...options,
|
|
1558
|
+
method: "POST"
|
|
1559
|
+
});
|
|
1560
|
+
};
|
|
1561
|
+
var getPostCfgDeleteDataServerPosUrl = (tradePlatform, pos) => {
|
|
1562
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteDataServer/${encodeURIComponent(String(pos))}`;
|
|
1563
|
+
};
|
|
1564
|
+
var postCfgDeleteDataServerPos = async (tradePlatform, pos, options) => {
|
|
1565
|
+
return customFetch(getPostCfgDeleteDataServerPosUrl(tradePlatform, pos), {
|
|
1566
|
+
...options,
|
|
1567
|
+
method: "POST"
|
|
1568
|
+
});
|
|
1569
|
+
};
|
|
1570
|
+
var getPostCfgDeleteFeederPosUrl = (tradePlatform, pos) => {
|
|
1571
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteFeeder/${encodeURIComponent(String(pos))}`;
|
|
1572
|
+
};
|
|
1573
|
+
var postCfgDeleteFeederPos = async (tradePlatform, pos, options) => {
|
|
1574
|
+
return customFetch(getPostCfgDeleteFeederPosUrl(tradePlatform, pos), {
|
|
1575
|
+
...options,
|
|
1576
|
+
method: "POST"
|
|
1577
|
+
});
|
|
1578
|
+
};
|
|
1579
|
+
var getPostCfgDeleteGatewayAccountPosUrl = (tradePlatform, pos) => {
|
|
1580
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteGatewayAccount/${encodeURIComponent(String(pos))}`;
|
|
1581
|
+
};
|
|
1582
|
+
var postCfgDeleteGatewayAccountPos = async (tradePlatform, pos, options) => {
|
|
1583
|
+
return customFetch(getPostCfgDeleteGatewayAccountPosUrl(tradePlatform, pos), {
|
|
1584
|
+
...options,
|
|
1585
|
+
method: "POST"
|
|
1586
|
+
});
|
|
1587
|
+
};
|
|
1588
|
+
var getPostCfgDeleteGatewayMarkupPosUrl = (tradePlatform, pos) => {
|
|
1589
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteGatewayMarkup/${encodeURIComponent(String(pos))}`;
|
|
1590
|
+
};
|
|
1591
|
+
var postCfgDeleteGatewayMarkupPos = async (tradePlatform, pos, options) => {
|
|
1592
|
+
return customFetch(getPostCfgDeleteGatewayMarkupPosUrl(tradePlatform, pos), {
|
|
1593
|
+
...options,
|
|
1594
|
+
method: "POST"
|
|
1595
|
+
});
|
|
1596
|
+
};
|
|
1597
|
+
var getPostCfgDeleteGatewayRulePosUrl = (tradePlatform, pos) => {
|
|
1598
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteGatewayRule/${encodeURIComponent(String(pos))}`;
|
|
1599
|
+
};
|
|
1600
|
+
var postCfgDeleteGatewayRulePos = async (tradePlatform, pos, options) => {
|
|
1601
|
+
return customFetch(getPostCfgDeleteGatewayRulePosUrl(tradePlatform, pos), {
|
|
1602
|
+
...options,
|
|
1603
|
+
method: "POST"
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1606
|
+
var getPostCfgDeleteHolidayPosUrl = (tradePlatform, pos) => {
|
|
1607
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteHoliday/${encodeURIComponent(String(pos))}`;
|
|
1608
|
+
};
|
|
1609
|
+
var postCfgDeleteHolidayPos = async (tradePlatform, pos, options) => {
|
|
1610
|
+
return customFetch(getPostCfgDeleteHolidayPosUrl(tradePlatform, pos), {
|
|
1611
|
+
...options,
|
|
1612
|
+
method: "POST"
|
|
1613
|
+
});
|
|
1614
|
+
};
|
|
1615
|
+
var getPostCfgDeleteLiveUpdatePosUrl = (tradePlatform, pos) => {
|
|
1616
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteLiveUpdate/${encodeURIComponent(String(pos))}`;
|
|
1617
|
+
};
|
|
1618
|
+
var postCfgDeleteLiveUpdatePos = async (tradePlatform, pos, options) => {
|
|
1619
|
+
return customFetch(getPostCfgDeleteLiveUpdatePosUrl(tradePlatform, pos), {
|
|
1620
|
+
...options,
|
|
1621
|
+
method: "POST"
|
|
1622
|
+
});
|
|
1623
|
+
};
|
|
1624
|
+
var getPostCfgDeleteManagerPosUrl = (tradePlatform, pos) => {
|
|
1625
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteManager/${encodeURIComponent(String(pos))}`;
|
|
1626
|
+
};
|
|
1627
|
+
var postCfgDeleteManagerPos = async (tradePlatform, pos, options) => {
|
|
1628
|
+
return customFetch(getPostCfgDeleteManagerPosUrl(tradePlatform, pos), {
|
|
1629
|
+
...options,
|
|
1630
|
+
method: "POST"
|
|
1631
|
+
});
|
|
1632
|
+
};
|
|
1633
|
+
var getPostCfgDeleteSymbolPosUrl = (tradePlatform, pos) => {
|
|
1634
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteSymbol/${encodeURIComponent(String(pos))}`;
|
|
1635
|
+
};
|
|
1636
|
+
var postCfgDeleteSymbolPos = async (tradePlatform, pos, options) => {
|
|
1637
|
+
return customFetch(getPostCfgDeleteSymbolPosUrl(tradePlatform, pos), {
|
|
1638
|
+
...options,
|
|
1639
|
+
method: "POST"
|
|
1640
|
+
});
|
|
1641
|
+
};
|
|
1642
|
+
var getPostCfgDeleteSyncPosUrl = (tradePlatform, pos) => {
|
|
1643
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgDeleteSync/${encodeURIComponent(String(pos))}`;
|
|
1644
|
+
};
|
|
1645
|
+
var postCfgDeleteSyncPos = async (tradePlatform, pos, options) => {
|
|
1646
|
+
return customFetch(getPostCfgDeleteSyncPosUrl(tradePlatform, pos), {
|
|
1647
|
+
...options,
|
|
1648
|
+
method: "POST"
|
|
1649
|
+
});
|
|
1650
|
+
};
|
|
1651
|
+
var getPostCfgShiftAccessPosUrl = (tradePlatform, pos, params) => {
|
|
1652
|
+
const normalizedParams = new URLSearchParams;
|
|
1653
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1654
|
+
if (value !== undefined) {
|
|
1655
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1656
|
+
}
|
|
1657
|
+
});
|
|
1658
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1659
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftAccess/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftAccess/${encodeURIComponent(String(pos))}`;
|
|
1660
|
+
};
|
|
1661
|
+
var postCfgShiftAccessPos = async (tradePlatform, pos, params, options) => {
|
|
1662
|
+
return customFetch(getPostCfgShiftAccessPosUrl(tradePlatform, pos, params), {
|
|
1663
|
+
...options,
|
|
1664
|
+
method: "POST"
|
|
1665
|
+
});
|
|
1666
|
+
};
|
|
1667
|
+
var getPostCfgShiftDataServerPosUrl = (tradePlatform, pos, params) => {
|
|
1668
|
+
const normalizedParams = new URLSearchParams;
|
|
1669
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1670
|
+
if (value !== undefined) {
|
|
1671
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1675
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftDataServer/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftDataServer/${encodeURIComponent(String(pos))}`;
|
|
1676
|
+
};
|
|
1677
|
+
var postCfgShiftDataServerPos = async (tradePlatform, pos, params, options) => {
|
|
1678
|
+
return customFetch(getPostCfgShiftDataServerPosUrl(tradePlatform, pos, params), {
|
|
1679
|
+
...options,
|
|
1680
|
+
method: "POST"
|
|
1681
|
+
});
|
|
1682
|
+
};
|
|
1683
|
+
var getPostCfgShiftFeederPosUrl = (tradePlatform, pos, params) => {
|
|
1684
|
+
const normalizedParams = new URLSearchParams;
|
|
1685
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1686
|
+
if (value !== undefined) {
|
|
1687
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1691
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftFeeder/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftFeeder/${encodeURIComponent(String(pos))}`;
|
|
1692
|
+
};
|
|
1693
|
+
var postCfgShiftFeederPos = async (tradePlatform, pos, params, options) => {
|
|
1694
|
+
return customFetch(getPostCfgShiftFeederPosUrl(tradePlatform, pos, params), {
|
|
1695
|
+
...options,
|
|
1696
|
+
method: "POST"
|
|
1697
|
+
});
|
|
1698
|
+
};
|
|
1699
|
+
var getPostCfgShiftGatewayAccountPosUrl = (tradePlatform, pos, params) => {
|
|
1700
|
+
const normalizedParams = new URLSearchParams;
|
|
1701
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1702
|
+
if (value !== undefined) {
|
|
1703
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1707
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayAccount/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayAccount/${encodeURIComponent(String(pos))}`;
|
|
1708
|
+
};
|
|
1709
|
+
var postCfgShiftGatewayAccountPos = async (tradePlatform, pos, params, options) => {
|
|
1710
|
+
return customFetch(getPostCfgShiftGatewayAccountPosUrl(tradePlatform, pos, params), {
|
|
1711
|
+
...options,
|
|
1712
|
+
method: "POST"
|
|
1713
|
+
});
|
|
1714
|
+
};
|
|
1715
|
+
var getPostCfgShiftGatewayMarkupPosUrl = (tradePlatform, pos, params) => {
|
|
1716
|
+
const normalizedParams = new URLSearchParams;
|
|
1717
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1718
|
+
if (value !== undefined) {
|
|
1719
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1723
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayMarkup/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayMarkup/${encodeURIComponent(String(pos))}`;
|
|
1724
|
+
};
|
|
1725
|
+
var postCfgShiftGatewayMarkupPos = async (tradePlatform, pos, params, options) => {
|
|
1726
|
+
return customFetch(getPostCfgShiftGatewayMarkupPosUrl(tradePlatform, pos, params), {
|
|
1727
|
+
...options,
|
|
1728
|
+
method: "POST"
|
|
1729
|
+
});
|
|
1730
|
+
};
|
|
1731
|
+
var getPostCfgShiftGatewayRulePosUrl = (tradePlatform, pos, params) => {
|
|
1732
|
+
const normalizedParams = new URLSearchParams;
|
|
1733
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1734
|
+
if (value !== undefined) {
|
|
1735
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1739
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayRule/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGatewayRule/${encodeURIComponent(String(pos))}`;
|
|
1740
|
+
};
|
|
1741
|
+
var postCfgShiftGatewayRulePos = async (tradePlatform, pos, params, options) => {
|
|
1742
|
+
return customFetch(getPostCfgShiftGatewayRulePosUrl(tradePlatform, pos, params), {
|
|
1743
|
+
...options,
|
|
1744
|
+
method: "POST"
|
|
1745
|
+
});
|
|
1746
|
+
};
|
|
1747
|
+
var getPostCfgShiftGroupPosUrl = (tradePlatform, pos, params) => {
|
|
1748
|
+
const normalizedParams = new URLSearchParams;
|
|
1749
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1750
|
+
if (value !== undefined) {
|
|
1751
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1752
|
+
}
|
|
1753
|
+
});
|
|
1754
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1755
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGroup/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftGroup/${encodeURIComponent(String(pos))}`;
|
|
1756
|
+
};
|
|
1757
|
+
var postCfgShiftGroupPos = async (tradePlatform, pos, params, options) => {
|
|
1758
|
+
return customFetch(getPostCfgShiftGroupPosUrl(tradePlatform, pos, params), {
|
|
1759
|
+
...options,
|
|
1760
|
+
method: "POST"
|
|
1761
|
+
});
|
|
1762
|
+
};
|
|
1763
|
+
var getPostCfgShiftHolidayPosUrl = (tradePlatform, pos, params) => {
|
|
1764
|
+
const normalizedParams = new URLSearchParams;
|
|
1765
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1766
|
+
if (value !== undefined) {
|
|
1767
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1768
|
+
}
|
|
1769
|
+
});
|
|
1770
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1771
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftHoliday/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftHoliday/${encodeURIComponent(String(pos))}`;
|
|
1772
|
+
};
|
|
1773
|
+
var postCfgShiftHolidayPos = async (tradePlatform, pos, params, options) => {
|
|
1774
|
+
return customFetch(getPostCfgShiftHolidayPosUrl(tradePlatform, pos, params), {
|
|
1775
|
+
...options,
|
|
1776
|
+
method: "POST"
|
|
1777
|
+
});
|
|
1778
|
+
};
|
|
1779
|
+
var getPostCfgShiftLiveUpdatePosUrl = (tradePlatform, pos, params) => {
|
|
1780
|
+
const normalizedParams = new URLSearchParams;
|
|
1781
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1782
|
+
if (value !== undefined) {
|
|
1783
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1787
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftLiveUpdate/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftLiveUpdate/${encodeURIComponent(String(pos))}`;
|
|
1788
|
+
};
|
|
1789
|
+
var postCfgShiftLiveUpdatePos = async (tradePlatform, pos, params, options) => {
|
|
1790
|
+
return customFetch(getPostCfgShiftLiveUpdatePosUrl(tradePlatform, pos, params), {
|
|
1791
|
+
...options,
|
|
1792
|
+
method: "POST"
|
|
1793
|
+
});
|
|
1794
|
+
};
|
|
1795
|
+
var getPostCfgShiftManagerPosUrl = (tradePlatform, pos, params) => {
|
|
1796
|
+
const normalizedParams = new URLSearchParams;
|
|
1797
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1798
|
+
if (value !== undefined) {
|
|
1799
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1803
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftManager/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftManager/${encodeURIComponent(String(pos))}`;
|
|
1804
|
+
};
|
|
1805
|
+
var postCfgShiftManagerPos = async (tradePlatform, pos, params, options) => {
|
|
1806
|
+
return customFetch(getPostCfgShiftManagerPosUrl(tradePlatform, pos, params), {
|
|
1807
|
+
...options,
|
|
1808
|
+
method: "POST"
|
|
1809
|
+
});
|
|
1810
|
+
};
|
|
1811
|
+
var getPostCfgShiftPluginPosUrl = (tradePlatform, pos, params) => {
|
|
1812
|
+
const normalizedParams = new URLSearchParams;
|
|
1813
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1814
|
+
if (value !== undefined) {
|
|
1815
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1816
|
+
}
|
|
1817
|
+
});
|
|
1818
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1819
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftPlugin/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftPlugin/${encodeURIComponent(String(pos))}`;
|
|
1820
|
+
};
|
|
1821
|
+
var postCfgShiftPluginPos = async (tradePlatform, pos, params, options) => {
|
|
1822
|
+
return customFetch(getPostCfgShiftPluginPosUrl(tradePlatform, pos, params), {
|
|
1823
|
+
...options,
|
|
1824
|
+
method: "POST"
|
|
1825
|
+
});
|
|
1826
|
+
};
|
|
1827
|
+
var getPostCfgShiftSymbolPosUrl = (tradePlatform, pos, params) => {
|
|
1828
|
+
const normalizedParams = new URLSearchParams;
|
|
1829
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1830
|
+
if (value !== undefined) {
|
|
1831
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
1834
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1835
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftSymbol/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftSymbol/${encodeURIComponent(String(pos))}`;
|
|
1836
|
+
};
|
|
1837
|
+
var postCfgShiftSymbolPos = async (tradePlatform, pos, params, options) => {
|
|
1838
|
+
return customFetch(getPostCfgShiftSymbolPosUrl(tradePlatform, pos, params), {
|
|
1839
|
+
...options,
|
|
1840
|
+
method: "POST"
|
|
1841
|
+
});
|
|
1842
|
+
};
|
|
1843
|
+
var getPostCfgShiftSyncPosUrl = (tradePlatform, pos, params) => {
|
|
1844
|
+
const normalizedParams = new URLSearchParams;
|
|
1845
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1846
|
+
if (value !== undefined) {
|
|
1847
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1851
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftSync/${encodeURIComponent(String(pos))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgShiftSync/${encodeURIComponent(String(pos))}`;
|
|
1852
|
+
};
|
|
1853
|
+
var postCfgShiftSyncPos = async (tradePlatform, pos, params, options) => {
|
|
1854
|
+
return customFetch(getPostCfgShiftSyncPosUrl(tradePlatform, pos, params), {
|
|
1855
|
+
...options,
|
|
1856
|
+
method: "POST"
|
|
1857
|
+
});
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1860
|
+
// src/generated/mt4-v2-groups.ts
|
|
1861
|
+
var exports_mt4_v2_groups = {};
|
|
1862
|
+
__export(exports_mt4_v2_groups, {
|
|
1863
|
+
postGroupRecordUpdateGroup: () => postGroupRecordUpdateGroup,
|
|
1864
|
+
patchGroupRecordGroupMT4: () => patchGroupRecordGroupMT4,
|
|
1865
|
+
getPostGroupRecordUpdateGroupUrl: () => getPostGroupRecordUpdateGroupUrl,
|
|
1866
|
+
getPatchGroupRecordGroupMT4Url: () => getPatchGroupRecordGroupMT4Url,
|
|
1867
|
+
getGroupsRequest: () => getGroupsRequest,
|
|
1868
|
+
getGroupsGet: () => getGroupsGet,
|
|
1869
|
+
getGroupSecMarginsGetGroup: () => getGroupSecMarginsGetGroup,
|
|
1870
|
+
getGroupSecGroupsGetGroup: () => getGroupSecGroupsGetGroup,
|
|
1871
|
+
getGroupRecordGetGroup: () => getGroupRecordGetGroup,
|
|
1872
|
+
getGetGroupsRequestUrl: () => getGetGroupsRequestUrl,
|
|
1873
|
+
getGetGroupsGetUrl: () => getGetGroupsGetUrl,
|
|
1874
|
+
getGetGroupSecMarginsGetGroupUrl: () => getGetGroupSecMarginsGetGroupUrl,
|
|
1875
|
+
getGetGroupSecGroupsGetGroupUrl: () => getGetGroupSecGroupsGetGroupUrl,
|
|
1876
|
+
getGetGroupRecordGetGroupUrl: () => getGetGroupRecordGetGroupUrl,
|
|
1877
|
+
getGetEnsureGroupNameExistGroupUrl: () => getGetEnsureGroupNameExistGroupUrl,
|
|
1878
|
+
getEnsureGroupNameExistGroup: () => getEnsureGroupNameExistGroup
|
|
1879
|
+
});
|
|
1880
|
+
var getGetGroupsGetUrl = (tradePlatform) => {
|
|
1881
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupsGet`;
|
|
1882
|
+
};
|
|
1883
|
+
var getGroupsGet = async (tradePlatform, options) => {
|
|
1884
|
+
return customFetch(getGetGroupsGetUrl(tradePlatform), {
|
|
1885
|
+
...options,
|
|
1886
|
+
method: "GET"
|
|
1887
|
+
});
|
|
1888
|
+
};
|
|
1889
|
+
var getGetGroupRecordGetGroupUrl = (tradePlatform, group) => {
|
|
1890
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupRecordGet/${encodeURIComponent(String(group))}`;
|
|
1891
|
+
};
|
|
1892
|
+
var getGroupRecordGetGroup = async (tradePlatform, group, options) => {
|
|
1893
|
+
return customFetch(getGetGroupRecordGetGroupUrl(tradePlatform, group), {
|
|
1894
|
+
...options,
|
|
1895
|
+
method: "GET"
|
|
1896
|
+
});
|
|
1897
|
+
};
|
|
1898
|
+
var getGetGroupsRequestUrl = (tradePlatform, params) => {
|
|
1899
|
+
const normalizedParams = new URLSearchParams;
|
|
1900
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1901
|
+
if (value !== undefined) {
|
|
1902
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1905
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1906
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupsRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupsRequest`;
|
|
1907
|
+
};
|
|
1908
|
+
var getGroupsRequest = async (tradePlatform, params, options) => {
|
|
1909
|
+
return customFetch(getGetGroupsRequestUrl(tradePlatform, params), {
|
|
1910
|
+
...options,
|
|
1911
|
+
method: "GET"
|
|
1912
|
+
});
|
|
1913
|
+
};
|
|
1914
|
+
var getGetGroupSecGroupsGetGroupUrl = (tradePlatform, group) => {
|
|
1915
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupSecGroupsGet/${encodeURIComponent(String(group))}`;
|
|
1916
|
+
};
|
|
1917
|
+
var getGroupSecGroupsGetGroup = async (tradePlatform, group, options) => {
|
|
1918
|
+
return customFetch(getGetGroupSecGroupsGetGroupUrl(tradePlatform, group), {
|
|
1919
|
+
...options,
|
|
1920
|
+
method: "GET"
|
|
1921
|
+
});
|
|
1922
|
+
};
|
|
1923
|
+
var getGetGroupSecMarginsGetGroupUrl = (tradePlatform, group) => {
|
|
1924
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupSecMarginsGet/${encodeURIComponent(String(group))}`;
|
|
1925
|
+
};
|
|
1926
|
+
var getGroupSecMarginsGetGroup = async (tradePlatform, group, options) => {
|
|
1927
|
+
return customFetch(getGetGroupSecMarginsGetGroupUrl(tradePlatform, group), {
|
|
1928
|
+
...options,
|
|
1929
|
+
method: "GET"
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
var getPostGroupRecordUpdateGroupUrl = (tradePlatform, group) => {
|
|
1933
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupRecordUpdate/${encodeURIComponent(String(group))}`;
|
|
1934
|
+
};
|
|
1935
|
+
var postGroupRecordUpdateGroup = async (tradePlatform, group, mT4GroupUpdate, options) => {
|
|
1936
|
+
return customFetch(getPostGroupRecordUpdateGroupUrl(tradePlatform, group), {
|
|
1937
|
+
...options,
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
1940
|
+
body: JSON.stringify(mT4GroupUpdate)
|
|
1941
|
+
});
|
|
1942
|
+
};
|
|
1943
|
+
var getPatchGroupRecordGroupMT4Url = (tradePlatform, group) => {
|
|
1944
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/GroupRecord/${encodeURIComponent(String(group))}`;
|
|
1945
|
+
};
|
|
1946
|
+
var patchGroupRecordGroupMT4 = async (tradePlatform, group, options) => {
|
|
1947
|
+
return customFetch(getPatchGroupRecordGroupMT4Url(tradePlatform, group), {
|
|
1948
|
+
...options,
|
|
1949
|
+
method: "PATCH"
|
|
1950
|
+
});
|
|
1951
|
+
};
|
|
1952
|
+
var getGetEnsureGroupNameExistGroupUrl = (tradePlatform, group) => {
|
|
1953
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/EnsureGroupNameExist/${encodeURIComponent(String(group))}`;
|
|
1954
|
+
};
|
|
1955
|
+
var getEnsureGroupNameExistGroup = async (tradePlatform, group, options) => {
|
|
1956
|
+
return customFetch(getGetEnsureGroupNameExistGroupUrl(tradePlatform, group), {
|
|
1957
|
+
...options,
|
|
1958
|
+
method: "GET"
|
|
1959
|
+
});
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
// src/generated/mt4-v2-history.ts
|
|
1963
|
+
var exports_mt4_v2_history = {};
|
|
1964
|
+
__export(exports_mt4_v2_history, {
|
|
1965
|
+
getTradesUserHistoryLogin: () => getTradesUserHistoryLogin,
|
|
1966
|
+
getGetTradesUserHistoryLoginUrl: () => getGetTradesUserHistoryLoginUrl
|
|
1967
|
+
});
|
|
1968
|
+
var getGetTradesUserHistoryLoginUrl = (tradePlatform, login, params) => {
|
|
1969
|
+
const normalizedParams = new URLSearchParams;
|
|
1970
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1971
|
+
if (value !== undefined) {
|
|
1972
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1975
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1976
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesUserHistory/${encodeURIComponent(String(login))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesUserHistory/${encodeURIComponent(String(login))}`;
|
|
1977
|
+
};
|
|
1978
|
+
var getTradesUserHistoryLogin = async (tradePlatform, login, params, options) => {
|
|
1979
|
+
return customFetch(getGetTradesUserHistoryLoginUrl(tradePlatform, login, params), {
|
|
1980
|
+
...options,
|
|
1981
|
+
method: "GET"
|
|
1982
|
+
});
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
// src/generated/mt4-v2-mail.ts
|
|
1986
|
+
var exports_mt4_v2_mail = {};
|
|
1987
|
+
__export(exports_mt4_v2_mail, {
|
|
1988
|
+
getMailLast: () => getMailLast,
|
|
1989
|
+
getGetMailLastUrl: () => getGetMailLastUrl
|
|
1990
|
+
});
|
|
1991
|
+
var getGetMailLastUrl = (tradePlatform) => {
|
|
1992
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MailLast`;
|
|
1993
|
+
};
|
|
1994
|
+
var getMailLast = async (tradePlatform, options) => {
|
|
1995
|
+
return customFetch(getGetMailLastUrl(tradePlatform), {
|
|
1996
|
+
...options,
|
|
1997
|
+
method: "GET"
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
|
|
2001
|
+
// src/generated/mt4-v2-margins.ts
|
|
2002
|
+
var exports_mt4_v2_margins = {};
|
|
2003
|
+
__export(exports_mt4_v2_margins, {
|
|
2004
|
+
getMarginsGet: () => getMarginsGet,
|
|
2005
|
+
getMarginLevelRequestLogin: () => getMarginLevelRequestLogin,
|
|
2006
|
+
getMarginLevelGetLogin: () => getMarginLevelGetLogin,
|
|
2007
|
+
getGetMarginsGetUrl: () => getGetMarginsGetUrl,
|
|
2008
|
+
getGetMarginLevelRequestLoginUrl: () => getGetMarginLevelRequestLoginUrl,
|
|
2009
|
+
getGetMarginLevelGetLoginUrl: () => getGetMarginLevelGetLoginUrl
|
|
2010
|
+
});
|
|
2011
|
+
var getGetMarginsGetUrl = (tradePlatform) => {
|
|
2012
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MarginsGet`;
|
|
2013
|
+
};
|
|
2014
|
+
var getMarginsGet = async (tradePlatform, options) => {
|
|
2015
|
+
return customFetch(getGetMarginsGetUrl(tradePlatform), {
|
|
2016
|
+
...options,
|
|
2017
|
+
method: "GET"
|
|
2018
|
+
});
|
|
2019
|
+
};
|
|
2020
|
+
var getGetMarginLevelGetLoginUrl = (tradePlatform, login) => {
|
|
2021
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MarginLevelGet/${encodeURIComponent(String(login))}`;
|
|
2022
|
+
};
|
|
2023
|
+
var getMarginLevelGetLogin = async (tradePlatform, login, options) => {
|
|
2024
|
+
return customFetch(getGetMarginLevelGetLoginUrl(tradePlatform, login), {
|
|
2025
|
+
...options,
|
|
2026
|
+
method: "GET"
|
|
2027
|
+
});
|
|
2028
|
+
};
|
|
2029
|
+
var getGetMarginLevelRequestLoginUrl = (tradePlatform, login) => {
|
|
2030
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MarginLevelRequest/${encodeURIComponent(String(login))}`;
|
|
2031
|
+
};
|
|
2032
|
+
var getMarginLevelRequestLogin = async (tradePlatform, login, options) => {
|
|
2033
|
+
return customFetch(getGetMarginLevelRequestLoginUrl(tradePlatform, login), {
|
|
2034
|
+
...options,
|
|
2035
|
+
method: "GET"
|
|
2036
|
+
});
|
|
2037
|
+
};
|
|
2038
|
+
|
|
2039
|
+
// src/generated/mt4-v2-news.ts
|
|
2040
|
+
var exports_mt4_v2_news = {};
|
|
2041
|
+
__export(exports_mt4_v2_news, {
|
|
2042
|
+
postNewsBodyRequestKey: () => postNewsBodyRequestKey,
|
|
2043
|
+
getPostNewsBodyRequestKeyUrl: () => getPostNewsBodyRequestKeyUrl,
|
|
2044
|
+
getNewsTotal: () => getNewsTotal,
|
|
2045
|
+
getNewsTopicGetPos: () => getNewsTopicGetPos,
|
|
2046
|
+
getNewsGet: () => getNewsGet,
|
|
2047
|
+
getNewsBodyGetKey: () => getNewsBodyGetKey,
|
|
2048
|
+
getGetNewsTotalUrl: () => getGetNewsTotalUrl,
|
|
2049
|
+
getGetNewsTopicGetPosUrl: () => getGetNewsTopicGetPosUrl,
|
|
2050
|
+
getGetNewsGetUrl: () => getGetNewsGetUrl,
|
|
2051
|
+
getGetNewsBodyGetKeyUrl: () => getGetNewsBodyGetKeyUrl
|
|
2052
|
+
});
|
|
2053
|
+
var getGetNewsTotalUrl = (tradePlatform) => {
|
|
2054
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsTotal`;
|
|
2055
|
+
};
|
|
2056
|
+
var getNewsTotal = async (tradePlatform, options) => {
|
|
2057
|
+
return customFetch(getGetNewsTotalUrl(tradePlatform), {
|
|
2058
|
+
...options,
|
|
2059
|
+
method: "GET"
|
|
2060
|
+
});
|
|
2061
|
+
};
|
|
2062
|
+
var getGetNewsBodyGetKeyUrl = (tradePlatform, key) => {
|
|
2063
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsBodyGet/${encodeURIComponent(String(key))}`;
|
|
2064
|
+
};
|
|
2065
|
+
var getNewsBodyGetKey = async (tradePlatform, key, options) => {
|
|
2066
|
+
return customFetch(getGetNewsBodyGetKeyUrl(tradePlatform, key), {
|
|
2067
|
+
...options,
|
|
2068
|
+
method: "GET"
|
|
2069
|
+
});
|
|
2070
|
+
};
|
|
2071
|
+
var getGetNewsGetUrl = (tradePlatform) => {
|
|
2072
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsGet`;
|
|
2073
|
+
};
|
|
2074
|
+
var getNewsGet = async (tradePlatform, options) => {
|
|
2075
|
+
return customFetch(getGetNewsGetUrl(tradePlatform), {
|
|
2076
|
+
...options,
|
|
2077
|
+
method: "GET"
|
|
2078
|
+
});
|
|
2079
|
+
};
|
|
2080
|
+
var getGetNewsTopicGetPosUrl = (tradePlatform, pos) => {
|
|
2081
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsTopicGet/${encodeURIComponent(String(pos))}`;
|
|
2082
|
+
};
|
|
2083
|
+
var getNewsTopicGetPos = async (tradePlatform, pos, options) => {
|
|
2084
|
+
return customFetch(getGetNewsTopicGetPosUrl(tradePlatform, pos), {
|
|
2085
|
+
...options,
|
|
2086
|
+
method: "GET"
|
|
2087
|
+
});
|
|
2088
|
+
};
|
|
2089
|
+
var getPostNewsBodyRequestKeyUrl = (tradePlatform, key) => {
|
|
2090
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsBodyRequest/${encodeURIComponent(String(key))}`;
|
|
2091
|
+
};
|
|
2092
|
+
var postNewsBodyRequestKey = async (tradePlatform, key, options) => {
|
|
2093
|
+
return customFetch(getPostNewsBodyRequestKeyUrl(tradePlatform, key), {
|
|
2094
|
+
...options,
|
|
2095
|
+
method: "POST"
|
|
2096
|
+
});
|
|
2097
|
+
};
|
|
2098
|
+
|
|
2099
|
+
// src/generated/mt4-v2-online.ts
|
|
2100
|
+
var exports_mt4_v2_online = {};
|
|
2101
|
+
__export(exports_mt4_v2_online, {
|
|
2102
|
+
getOnlineRequest: () => getOnlineRequest,
|
|
2103
|
+
getOnlineGet: () => getOnlineGet,
|
|
2104
|
+
getGetOnlineRequestUrl: () => getGetOnlineRequestUrl,
|
|
2105
|
+
getGetOnlineGetUrl: () => getGetOnlineGetUrl
|
|
2106
|
+
});
|
|
2107
|
+
var getGetOnlineGetUrl = (tradePlatform, params) => {
|
|
2108
|
+
const normalizedParams = new URLSearchParams;
|
|
2109
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2110
|
+
if (value !== undefined) {
|
|
2111
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
2114
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2115
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/OnlineGet?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/OnlineGet`;
|
|
2116
|
+
};
|
|
2117
|
+
var getOnlineGet = async (tradePlatform, params, options) => {
|
|
2118
|
+
return customFetch(getGetOnlineGetUrl(tradePlatform, params), {
|
|
2119
|
+
...options,
|
|
2120
|
+
method: "GET"
|
|
2121
|
+
});
|
|
2122
|
+
};
|
|
2123
|
+
var getGetOnlineRequestUrl = (tradePlatform, params) => {
|
|
2124
|
+
const normalizedParams = new URLSearchParams;
|
|
2125
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2126
|
+
if (value !== undefined) {
|
|
2127
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2131
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/OnlineRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/OnlineRequest`;
|
|
2132
|
+
};
|
|
2133
|
+
var getOnlineRequest = async (tradePlatform, params, options) => {
|
|
2134
|
+
return customFetch(getGetOnlineRequestUrl(tradePlatform, params), {
|
|
2135
|
+
...options,
|
|
2136
|
+
method: "GET"
|
|
2137
|
+
});
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
// src/generated/mt4-v2-plugins.ts
|
|
2141
|
+
var exports_mt4_v2_plugins = {};
|
|
2142
|
+
__export(exports_mt4_v2_plugins, {
|
|
2143
|
+
postExternalCommandJSON: () => postExternalCommandJSON,
|
|
2144
|
+
getPostExternalCommandJSONUrl: () => getPostExternalCommandJSONUrl
|
|
2145
|
+
});
|
|
2146
|
+
var getPostExternalCommandJSONUrl = (tradePlatform) => {
|
|
2147
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ExternalCommandJSON`;
|
|
2148
|
+
};
|
|
2149
|
+
var postExternalCommandJSON = async (tradePlatform, options) => {
|
|
2150
|
+
return customFetch(getPostExternalCommandJSONUrl(tradePlatform), {
|
|
2151
|
+
...options,
|
|
2152
|
+
method: "POST"
|
|
2153
|
+
});
|
|
2154
|
+
};
|
|
2155
|
+
|
|
2156
|
+
// src/generated/mt4-v2-prices.ts
|
|
2157
|
+
var exports_mt4_v2_prices = {};
|
|
2158
|
+
__export(exports_mt4_v2_prices, {
|
|
2159
|
+
postHistoryCorrectSymbol: () => postHistoryCorrectSymbol,
|
|
2160
|
+
postChartUpdateSymbol: () => postChartUpdateSymbol,
|
|
2161
|
+
postChartDeleteSymbol: () => postChartDeleteSymbol,
|
|
2162
|
+
postChartAddSymbol: () => postChartAddSymbol,
|
|
2163
|
+
getTicksRequestSymbol: () => getTicksRequestSymbol,
|
|
2164
|
+
getTickInfoLastSymbol: () => getTickInfoLastSymbol,
|
|
2165
|
+
getTickInfoLast: () => getTickInfoLast,
|
|
2166
|
+
getPostHistoryCorrectSymbolUrl: () => getPostHistoryCorrectSymbolUrl,
|
|
2167
|
+
getPostChartUpdateSymbolUrl: () => getPostChartUpdateSymbolUrl,
|
|
2168
|
+
getPostChartDeleteSymbolUrl: () => getPostChartDeleteSymbolUrl,
|
|
2169
|
+
getPostChartAddSymbolUrl: () => getPostChartAddSymbolUrl,
|
|
2170
|
+
getGetTicksRequestSymbolUrl: () => getGetTicksRequestSymbolUrl,
|
|
2171
|
+
getGetTickInfoLastUrl: () => getGetTickInfoLastUrl,
|
|
2172
|
+
getGetTickInfoLastSymbolUrl: () => getGetTickInfoLastSymbolUrl,
|
|
2173
|
+
getGetChartRequestSymbolUrl: () => getGetChartRequestSymbolUrl,
|
|
2174
|
+
getChartRequestSymbol: () => getChartRequestSymbol
|
|
2175
|
+
});
|
|
2176
|
+
var getGetChartRequestSymbolUrl = (tradePlatform, symbol, params) => {
|
|
2177
|
+
const normalizedParams = new URLSearchParams;
|
|
2178
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2179
|
+
if (value !== undefined) {
|
|
2180
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2181
|
+
}
|
|
2182
|
+
});
|
|
2183
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2184
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartRequest/${encodeURIComponent(String(symbol))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartRequest/${encodeURIComponent(String(symbol))}`;
|
|
2185
|
+
};
|
|
2186
|
+
var getChartRequestSymbol = async (tradePlatform, symbol, params, options) => {
|
|
2187
|
+
return customFetch(getGetChartRequestSymbolUrl(tradePlatform, symbol, params), {
|
|
2188
|
+
...options,
|
|
2189
|
+
method: "GET"
|
|
2190
|
+
});
|
|
2191
|
+
};
|
|
2192
|
+
var getPostChartAddSymbolUrl = (tradePlatform, symbol, params) => {
|
|
2193
|
+
const normalizedParams = new URLSearchParams;
|
|
2194
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2195
|
+
if (value !== undefined) {
|
|
2196
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2197
|
+
}
|
|
2198
|
+
});
|
|
2199
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2200
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartAdd/${encodeURIComponent(String(symbol))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartAdd/${encodeURIComponent(String(symbol))}`;
|
|
2201
|
+
};
|
|
2202
|
+
var postChartAddSymbol = async (tradePlatform, symbol, mT4ChartWriteRequest, params, options) => {
|
|
2203
|
+
return customFetch(getPostChartAddSymbolUrl(tradePlatform, symbol, params), {
|
|
2204
|
+
...options,
|
|
2205
|
+
method: "POST",
|
|
2206
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2207
|
+
body: JSON.stringify(mT4ChartWriteRequest)
|
|
2208
|
+
});
|
|
2209
|
+
};
|
|
2210
|
+
var getPostChartUpdateSymbolUrl = (tradePlatform, symbol, params) => {
|
|
2211
|
+
const normalizedParams = new URLSearchParams;
|
|
2212
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2213
|
+
if (value !== undefined) {
|
|
2214
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2218
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartUpdate/${encodeURIComponent(String(symbol))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartUpdate/${encodeURIComponent(String(symbol))}`;
|
|
2219
|
+
};
|
|
2220
|
+
var postChartUpdateSymbol = async (tradePlatform, symbol, mT4ChartWriteRequest, params, options) => {
|
|
2221
|
+
return customFetch(getPostChartUpdateSymbolUrl(tradePlatform, symbol, params), {
|
|
2222
|
+
...options,
|
|
2223
|
+
method: "POST",
|
|
2224
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2225
|
+
body: JSON.stringify(mT4ChartWriteRequest)
|
|
2226
|
+
});
|
|
2227
|
+
};
|
|
2228
|
+
var getPostChartDeleteSymbolUrl = (tradePlatform, symbol, params) => {
|
|
2229
|
+
const normalizedParams = new URLSearchParams;
|
|
2230
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2231
|
+
if (value !== undefined) {
|
|
2232
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2233
|
+
}
|
|
2234
|
+
});
|
|
2235
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2236
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartDelete/${encodeURIComponent(String(symbol))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ChartDelete/${encodeURIComponent(String(symbol))}`;
|
|
2237
|
+
};
|
|
2238
|
+
var postChartDeleteSymbol = async (tradePlatform, symbol, mT4ChartWriteRequest, params, options) => {
|
|
2239
|
+
return customFetch(getPostChartDeleteSymbolUrl(tradePlatform, symbol, params), {
|
|
2240
|
+
...options,
|
|
2241
|
+
method: "POST",
|
|
2242
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2243
|
+
body: JSON.stringify(mT4ChartWriteRequest)
|
|
2244
|
+
});
|
|
2245
|
+
};
|
|
2246
|
+
var getPostHistoryCorrectSymbolUrl = (tradePlatform, symbol) => {
|
|
2247
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/HistoryCorrect/${encodeURIComponent(String(symbol))}`;
|
|
2248
|
+
};
|
|
2249
|
+
var postHistoryCorrectSymbol = async (tradePlatform, symbol, options) => {
|
|
2250
|
+
return customFetch(getPostHistoryCorrectSymbolUrl(tradePlatform, symbol), {
|
|
2251
|
+
...options,
|
|
2252
|
+
method: "POST"
|
|
2253
|
+
});
|
|
2254
|
+
};
|
|
2255
|
+
var getGetTicksRequestSymbolUrl = (tradePlatform, symbol, params) => {
|
|
2256
|
+
const normalizedParams = new URLSearchParams;
|
|
2257
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2258
|
+
if (value !== undefined) {
|
|
2259
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2260
|
+
}
|
|
2261
|
+
});
|
|
2262
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2263
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TicksRequest/${encodeURIComponent(String(symbol))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TicksRequest/${encodeURIComponent(String(symbol))}`;
|
|
2264
|
+
};
|
|
2265
|
+
var getTicksRequestSymbol = async (tradePlatform, symbol, params, options) => {
|
|
2266
|
+
return customFetch(getGetTicksRequestSymbolUrl(tradePlatform, symbol, params), {
|
|
2267
|
+
...options,
|
|
2268
|
+
method: "GET"
|
|
2269
|
+
});
|
|
2270
|
+
};
|
|
2271
|
+
var getGetTickInfoLastSymbolUrl = (tradePlatform, symbol) => {
|
|
2272
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TickInfoLast/${encodeURIComponent(String(symbol))}`;
|
|
2273
|
+
};
|
|
2274
|
+
var getTickInfoLastSymbol = async (tradePlatform, symbol, options) => {
|
|
2275
|
+
return customFetch(getGetTickInfoLastSymbolUrl(tradePlatform, symbol), {
|
|
2276
|
+
...options,
|
|
2277
|
+
method: "GET"
|
|
2278
|
+
});
|
|
2279
|
+
};
|
|
2280
|
+
var getGetTickInfoLastUrl = (tradePlatform) => {
|
|
2281
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TickInfoLast`;
|
|
2282
|
+
};
|
|
2283
|
+
var getTickInfoLast = async (tradePlatform, options) => {
|
|
2284
|
+
return customFetch(getGetTickInfoLastUrl(tradePlatform), {
|
|
2285
|
+
...options,
|
|
2286
|
+
method: "GET"
|
|
2287
|
+
});
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2290
|
+
// src/generated/mt4-v2-reports.ts
|
|
2291
|
+
var exports_mt4_v2_reports = {};
|
|
2292
|
+
__export(exports_mt4_v2_reports, {
|
|
2293
|
+
postDailySyncStart: () => postDailySyncStart,
|
|
2294
|
+
postDailySyncRead: () => postDailySyncRead,
|
|
2295
|
+
getReportsRequest: () => getReportsRequest,
|
|
2296
|
+
getPostDailySyncStartUrl: () => getPostDailySyncStartUrl,
|
|
2297
|
+
getPostDailySyncReadUrl: () => getPostDailySyncReadUrl,
|
|
2298
|
+
getPerformanceRequest: () => getPerformanceRequest,
|
|
2299
|
+
getGetReportsRequestUrl: () => getGetReportsRequestUrl,
|
|
2300
|
+
getGetPerformanceRequestUrl: () => getGetPerformanceRequestUrl,
|
|
2301
|
+
getGetDailyReportsRequestUrl: () => getGetDailyReportsRequestUrl,
|
|
2302
|
+
getGetDailyReportsRequestExUrl: () => getGetDailyReportsRequestExUrl,
|
|
2303
|
+
getDailyReportsRequestEx: () => getDailyReportsRequestEx,
|
|
2304
|
+
getDailyReportsRequest: () => getDailyReportsRequest
|
|
2305
|
+
});
|
|
2306
|
+
var getGetPerformanceRequestUrl = (tradePlatform, params) => {
|
|
2307
|
+
const normalizedParams = new URLSearchParams;
|
|
2308
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2309
|
+
if (value !== undefined) {
|
|
2310
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2311
|
+
}
|
|
2312
|
+
});
|
|
2313
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2314
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/PerformanceRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/PerformanceRequest`;
|
|
2315
|
+
};
|
|
2316
|
+
var getPerformanceRequest = async (tradePlatform, params, options) => {
|
|
2317
|
+
return customFetch(getGetPerformanceRequestUrl(tradePlatform, params), {
|
|
2318
|
+
...options,
|
|
2319
|
+
method: "GET"
|
|
2320
|
+
});
|
|
2321
|
+
};
|
|
2322
|
+
var getGetReportsRequestUrl = (tradePlatform, params) => {
|
|
2323
|
+
const normalizedParams = new URLSearchParams;
|
|
2324
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2325
|
+
if (value !== undefined) {
|
|
2326
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2329
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2330
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ReportsRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ReportsRequest`;
|
|
2331
|
+
};
|
|
2332
|
+
var getReportsRequest = async (tradePlatform, params, options) => {
|
|
2333
|
+
return customFetch(getGetReportsRequestUrl(tradePlatform, params), {
|
|
2334
|
+
...options,
|
|
2335
|
+
method: "GET"
|
|
2336
|
+
});
|
|
2337
|
+
};
|
|
2338
|
+
var getGetDailyReportsRequestUrl = (tradePlatform, params) => {
|
|
2339
|
+
const normalizedParams = new URLSearchParams;
|
|
2340
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2341
|
+
if (value !== undefined) {
|
|
2342
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2343
|
+
}
|
|
2344
|
+
});
|
|
2345
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2346
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailyReportsRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailyReportsRequest`;
|
|
2347
|
+
};
|
|
2348
|
+
var getDailyReportsRequest = async (tradePlatform, params, options) => {
|
|
2349
|
+
return customFetch(getGetDailyReportsRequestUrl(tradePlatform, params), {
|
|
2350
|
+
...options,
|
|
2351
|
+
method: "GET"
|
|
2352
|
+
});
|
|
2353
|
+
};
|
|
2354
|
+
var getGetDailyReportsRequestExUrl = (tradePlatform, params) => {
|
|
2355
|
+
const normalizedParams = new URLSearchParams;
|
|
2356
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2357
|
+
if (value !== undefined) {
|
|
2358
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2359
|
+
}
|
|
2360
|
+
});
|
|
2361
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2362
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailyReportsRequestEx?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailyReportsRequestEx`;
|
|
2363
|
+
};
|
|
2364
|
+
var getDailyReportsRequestEx = async (tradePlatform, params, options) => {
|
|
2365
|
+
return customFetch(getGetDailyReportsRequestExUrl(tradePlatform, params), {
|
|
2366
|
+
...options,
|
|
2367
|
+
method: "GET"
|
|
2368
|
+
});
|
|
2369
|
+
};
|
|
2370
|
+
var getPostDailySyncStartUrl = (tradePlatform, params) => {
|
|
2371
|
+
const normalizedParams = new URLSearchParams;
|
|
2372
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2373
|
+
if (value !== undefined) {
|
|
2374
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2375
|
+
}
|
|
2376
|
+
});
|
|
2377
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2378
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailySyncStart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailySyncStart`;
|
|
2379
|
+
};
|
|
2380
|
+
var postDailySyncStart = async (tradePlatform, params, options) => {
|
|
2381
|
+
return customFetch(getPostDailySyncStartUrl(tradePlatform, params), {
|
|
2382
|
+
...options,
|
|
2383
|
+
method: "POST"
|
|
2384
|
+
});
|
|
2385
|
+
};
|
|
2386
|
+
var getPostDailySyncReadUrl = (tradePlatform) => {
|
|
2387
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/DailySyncRead`;
|
|
2388
|
+
};
|
|
2389
|
+
var postDailySyncRead = async (tradePlatform, options) => {
|
|
2390
|
+
return customFetch(getPostDailySyncReadUrl(tradePlatform), {
|
|
2391
|
+
...options,
|
|
2392
|
+
method: "POST"
|
|
2393
|
+
});
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2396
|
+
// src/generated/mt4-v2-server-admin-destructive.ts
|
|
2397
|
+
var exports_mt4_v2_server_admin_destructive = {};
|
|
2398
|
+
__export(exports_mt4_v2_server_admin_destructive, {
|
|
2399
|
+
postSrvRestart: () => postSrvRestart,
|
|
2400
|
+
postSrvLiveUpdateStart: () => postSrvLiveUpdateStart,
|
|
2401
|
+
postSrvFeedsRestart: () => postSrvFeedsRestart,
|
|
2402
|
+
postSrvChartsSync: () => postSrvChartsSync,
|
|
2403
|
+
getPostSrvRestartUrl: () => getPostSrvRestartUrl,
|
|
2404
|
+
getPostSrvLiveUpdateStartUrl: () => getPostSrvLiveUpdateStartUrl,
|
|
2405
|
+
getPostSrvFeedsRestartUrl: () => getPostSrvFeedsRestartUrl,
|
|
2406
|
+
getPostSrvChartsSyncUrl: () => getPostSrvChartsSyncUrl
|
|
2407
|
+
});
|
|
2408
|
+
var getPostSrvRestartUrl = (tradePlatform, params) => {
|
|
2409
|
+
const normalizedParams = new URLSearchParams;
|
|
2410
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2411
|
+
if (value !== undefined) {
|
|
2412
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
2415
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2416
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvRestart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvRestart`;
|
|
2417
|
+
};
|
|
2418
|
+
var postSrvRestart = async (tradePlatform, params, options) => {
|
|
2419
|
+
return customFetch(getPostSrvRestartUrl(tradePlatform, params), {
|
|
2420
|
+
...options,
|
|
2421
|
+
method: "POST"
|
|
2422
|
+
});
|
|
2423
|
+
};
|
|
2424
|
+
var getPostSrvChartsSyncUrl = (tradePlatform, params) => {
|
|
2425
|
+
const normalizedParams = new URLSearchParams;
|
|
2426
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2427
|
+
if (value !== undefined) {
|
|
2428
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2429
|
+
}
|
|
2430
|
+
});
|
|
2431
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2432
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvChartsSync?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvChartsSync`;
|
|
2433
|
+
};
|
|
2434
|
+
var postSrvChartsSync = async (tradePlatform, params, options) => {
|
|
2435
|
+
return customFetch(getPostSrvChartsSyncUrl(tradePlatform, params), {
|
|
2436
|
+
...options,
|
|
2437
|
+
method: "POST"
|
|
2438
|
+
});
|
|
2439
|
+
};
|
|
2440
|
+
var getPostSrvLiveUpdateStartUrl = (tradePlatform, params) => {
|
|
2441
|
+
const normalizedParams = new URLSearchParams;
|
|
2442
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2443
|
+
if (value !== undefined) {
|
|
2444
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2445
|
+
}
|
|
2446
|
+
});
|
|
2447
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2448
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvLiveUpdateStart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvLiveUpdateStart`;
|
|
2449
|
+
};
|
|
2450
|
+
var postSrvLiveUpdateStart = async (tradePlatform, params, options) => {
|
|
2451
|
+
return customFetch(getPostSrvLiveUpdateStartUrl(tradePlatform, params), {
|
|
2452
|
+
...options,
|
|
2453
|
+
method: "POST"
|
|
2454
|
+
});
|
|
2455
|
+
};
|
|
2456
|
+
var getPostSrvFeedsRestartUrl = (tradePlatform, params) => {
|
|
2457
|
+
const normalizedParams = new URLSearchParams;
|
|
2458
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2459
|
+
if (value !== undefined) {
|
|
2460
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2461
|
+
}
|
|
2462
|
+
});
|
|
2463
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2464
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvFeedsRestart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvFeedsRestart`;
|
|
2465
|
+
};
|
|
2466
|
+
var postSrvFeedsRestart = async (tradePlatform, params, options) => {
|
|
2467
|
+
return customFetch(getPostSrvFeedsRestartUrl(tradePlatform, params), {
|
|
2468
|
+
...options,
|
|
2469
|
+
method: "POST"
|
|
2470
|
+
});
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
// src/generated/mt4-v2-server-admin.ts
|
|
2474
|
+
var exports_mt4_v2_server_admin = {};
|
|
2475
|
+
__export(exports_mt4_v2_server_admin, {
|
|
2476
|
+
postNotificationsSend: () => postNotificationsSend,
|
|
2477
|
+
getSrvFeeders: () => getSrvFeeders,
|
|
2478
|
+
getSrvFeederLogName: () => getSrvFeederLogName,
|
|
2479
|
+
getPostNotificationsSendUrl: () => getPostNotificationsSendUrl,
|
|
2480
|
+
getLicenseCheckLicenseName: () => getLicenseCheckLicenseName,
|
|
2481
|
+
getGetSrvFeedersUrl: () => getGetSrvFeedersUrl,
|
|
2482
|
+
getGetSrvFeederLogNameUrl: () => getGetSrvFeederLogNameUrl,
|
|
2483
|
+
getGetLicenseCheckLicenseNameUrl: () => getGetLicenseCheckLicenseNameUrl
|
|
2484
|
+
});
|
|
2485
|
+
var getGetSrvFeedersUrl = (tradePlatform, params) => {
|
|
2486
|
+
const normalizedParams = new URLSearchParams;
|
|
2487
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2488
|
+
if (value !== undefined) {
|
|
2489
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2493
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvFeeders?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvFeeders`;
|
|
2494
|
+
};
|
|
2495
|
+
var getSrvFeeders = async (tradePlatform, params, options) => {
|
|
2496
|
+
return customFetch(getGetSrvFeedersUrl(tradePlatform, params), {
|
|
2497
|
+
...options,
|
|
2498
|
+
method: "GET"
|
|
2499
|
+
});
|
|
2500
|
+
};
|
|
2501
|
+
var getGetLicenseCheckLicenseNameUrl = (tradePlatform, licenseName) => {
|
|
2502
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/LicenseCheck/${encodeURIComponent(String(licenseName))}`;
|
|
2503
|
+
};
|
|
2504
|
+
var getLicenseCheckLicenseName = async (tradePlatform, licenseName, options) => {
|
|
2505
|
+
return customFetch(getGetLicenseCheckLicenseNameUrl(tradePlatform, licenseName), {
|
|
2506
|
+
...options,
|
|
2507
|
+
method: "GET"
|
|
2508
|
+
});
|
|
2509
|
+
};
|
|
2510
|
+
var getPostNotificationsSendUrl = (tradePlatform) => {
|
|
2511
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NotificationsSend`;
|
|
2512
|
+
};
|
|
2513
|
+
var postNotificationsSend = async (tradePlatform, mT4NotificationsSendRequest, options) => {
|
|
2514
|
+
return customFetch(getPostNotificationsSendUrl(tradePlatform), {
|
|
2515
|
+
...options,
|
|
2516
|
+
method: "POST",
|
|
2517
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2518
|
+
body: JSON.stringify(mT4NotificationsSendRequest)
|
|
2519
|
+
});
|
|
2520
|
+
};
|
|
2521
|
+
var getGetSrvFeederLogNameUrl = (tradePlatform, name) => {
|
|
2522
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SrvFeederLog/${encodeURIComponent(String(name))}`;
|
|
2523
|
+
};
|
|
2524
|
+
var getSrvFeederLogName = async (tradePlatform, name, options) => {
|
|
2525
|
+
return customFetch(getGetSrvFeederLogNameUrl(tradePlatform, name), {
|
|
2526
|
+
...options,
|
|
2527
|
+
method: "GET"
|
|
2528
|
+
});
|
|
2529
|
+
};
|
|
2530
|
+
|
|
2531
|
+
// src/generated/mt4-v2-symbols.ts
|
|
2532
|
+
var exports_mt4_v2_symbols = {};
|
|
2533
|
+
__export(exports_mt4_v2_symbols, {
|
|
2534
|
+
postSymbolsRefresh: () => postSymbolsRefresh,
|
|
2535
|
+
postSymbolSendTick: () => postSymbolSendTick,
|
|
2536
|
+
postSymbolHideSymbol: () => postSymbolHideSymbol,
|
|
2537
|
+
postSymbolChange: () => postSymbolChange,
|
|
2538
|
+
postSymbolAddSymbol: () => postSymbolAddSymbol,
|
|
2539
|
+
postCfgUpdateSymbolSymbol: () => postCfgUpdateSymbolSymbol,
|
|
2540
|
+
patchSymbolConfigSymbol: () => patchSymbolConfigSymbol,
|
|
2541
|
+
getSymbolsGroupsGet: () => getSymbolsGroupsGet,
|
|
2542
|
+
getSymbolSessionsGetSymbol: () => getSymbolSessionsGetSymbol,
|
|
2543
|
+
getSymbolInfoUpdated: () => getSymbolInfoUpdated,
|
|
2544
|
+
getSymbolInfoGet: () => getSymbolInfoGet,
|
|
2545
|
+
getPostSymbolsRefreshUrl: () => getPostSymbolsRefreshUrl,
|
|
2546
|
+
getPostSymbolSendTickUrl: () => getPostSymbolSendTickUrl,
|
|
2547
|
+
getPostSymbolHideSymbolUrl: () => getPostSymbolHideSymbolUrl,
|
|
2548
|
+
getPostSymbolChangeUrl: () => getPostSymbolChangeUrl,
|
|
2549
|
+
getPostSymbolAddSymbolUrl: () => getPostSymbolAddSymbolUrl,
|
|
2550
|
+
getPostCfgUpdateSymbolSymbolUrl: () => getPostCfgUpdateSymbolSymbolUrl,
|
|
2551
|
+
getPatchSymbolConfigSymbolUrl: () => getPatchSymbolConfigSymbolUrl,
|
|
2552
|
+
getGetSymbolsGroupsGetUrl: () => getGetSymbolsGroupsGetUrl,
|
|
2553
|
+
getGetSymbolSessionsGetSymbolUrl: () => getGetSymbolSessionsGetSymbolUrl,
|
|
2554
|
+
getGetSymbolInfoUpdatedUrl: () => getGetSymbolInfoUpdatedUrl,
|
|
2555
|
+
getGetSymbolInfoGetUrl: () => getGetSymbolInfoGetUrl,
|
|
2556
|
+
getGetCfgRequestSymbolUrl: () => getGetCfgRequestSymbolUrl,
|
|
2557
|
+
getGetCfgRequestSymbolSymbolUrl: () => getGetCfgRequestSymbolSymbolUrl,
|
|
2558
|
+
getCfgRequestSymbolSymbol: () => getCfgRequestSymbolSymbol,
|
|
2559
|
+
getCfgRequestSymbol: () => getCfgRequestSymbol
|
|
2560
|
+
});
|
|
2561
|
+
var getGetSymbolInfoGetUrl = (tradePlatform, params) => {
|
|
2562
|
+
const normalizedParams = new URLSearchParams;
|
|
2563
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2564
|
+
if (value !== undefined) {
|
|
2565
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2566
|
+
}
|
|
2567
|
+
});
|
|
2568
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2569
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolInfoGet?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolInfoGet`;
|
|
2570
|
+
};
|
|
2571
|
+
var getSymbolInfoGet = async (tradePlatform, params, options) => {
|
|
2572
|
+
return customFetch(getGetSymbolInfoGetUrl(tradePlatform, params), {
|
|
2573
|
+
...options,
|
|
2574
|
+
method: "GET"
|
|
2575
|
+
});
|
|
2576
|
+
};
|
|
2577
|
+
var getGetSymbolInfoUpdatedUrl = (tradePlatform, params) => {
|
|
2578
|
+
const normalizedParams = new URLSearchParams;
|
|
2579
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2580
|
+
if (value !== undefined) {
|
|
2581
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2582
|
+
}
|
|
2583
|
+
});
|
|
2584
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2585
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolInfoUpdated?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolInfoUpdated`;
|
|
2586
|
+
};
|
|
2587
|
+
var getSymbolInfoUpdated = async (tradePlatform, params, options) => {
|
|
2588
|
+
return customFetch(getGetSymbolInfoUpdatedUrl(tradePlatform, params), {
|
|
2589
|
+
...options,
|
|
2590
|
+
method: "GET"
|
|
2591
|
+
});
|
|
2592
|
+
};
|
|
2593
|
+
var getGetSymbolsGroupsGetUrl = (tradePlatform) => {
|
|
2594
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolsGroupsGet`;
|
|
2595
|
+
};
|
|
2596
|
+
var getSymbolsGroupsGet = async (tradePlatform, options) => {
|
|
2597
|
+
return customFetch(getGetSymbolsGroupsGetUrl(tradePlatform), {
|
|
2598
|
+
...options,
|
|
2599
|
+
method: "GET"
|
|
2600
|
+
});
|
|
2601
|
+
};
|
|
2602
|
+
var getGetCfgRequestSymbolUrl = (tradePlatform) => {
|
|
2603
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestSymbol`;
|
|
2604
|
+
};
|
|
2605
|
+
var getCfgRequestSymbol = async (tradePlatform, options) => {
|
|
2606
|
+
return customFetch(getGetCfgRequestSymbolUrl(tradePlatform), {
|
|
2607
|
+
...options,
|
|
2608
|
+
method: "GET"
|
|
2609
|
+
});
|
|
2610
|
+
};
|
|
2611
|
+
var getGetCfgRequestSymbolSymbolUrl = (tradePlatform, symbol) => {
|
|
2612
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestSymbol/${encodeURIComponent(String(symbol))}`;
|
|
2613
|
+
};
|
|
2614
|
+
var getCfgRequestSymbolSymbol = async (tradePlatform, symbol, options) => {
|
|
2615
|
+
return customFetch(getGetCfgRequestSymbolSymbolUrl(tradePlatform, symbol), {
|
|
2616
|
+
...options,
|
|
2617
|
+
method: "GET"
|
|
2618
|
+
});
|
|
2619
|
+
};
|
|
2620
|
+
var getGetSymbolSessionsGetSymbolUrl = (tradePlatform, symbol) => {
|
|
2621
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolSessionsGet/${encodeURIComponent(String(symbol))}`;
|
|
2622
|
+
};
|
|
2623
|
+
var getSymbolSessionsGetSymbol = async (tradePlatform, symbol, options) => {
|
|
2624
|
+
return customFetch(getGetSymbolSessionsGetSymbolUrl(tradePlatform, symbol), {
|
|
2625
|
+
...options,
|
|
2626
|
+
method: "GET"
|
|
2627
|
+
});
|
|
2628
|
+
};
|
|
2629
|
+
var getPostCfgUpdateSymbolSymbolUrl = (tradePlatform, symbol) => {
|
|
2630
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdateSymbol/${encodeURIComponent(String(symbol))}`;
|
|
2631
|
+
};
|
|
2632
|
+
var postCfgUpdateSymbolSymbol = async (tradePlatform, symbol, mT4SymbolConfigUpdate, options) => {
|
|
2633
|
+
return customFetch(getPostCfgUpdateSymbolSymbolUrl(tradePlatform, symbol), {
|
|
2634
|
+
...options,
|
|
2635
|
+
method: "POST",
|
|
2636
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2637
|
+
body: JSON.stringify(mT4SymbolConfigUpdate)
|
|
2638
|
+
});
|
|
2639
|
+
};
|
|
2640
|
+
var getPatchSymbolConfigSymbolUrl = (tradePlatform, symbol) => {
|
|
2641
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolConfig/${encodeURIComponent(String(symbol))}`;
|
|
2642
|
+
};
|
|
2643
|
+
var patchSymbolConfigSymbol = async (tradePlatform, symbol, options) => {
|
|
2644
|
+
return customFetch(getPatchSymbolConfigSymbolUrl(tradePlatform, symbol), {
|
|
2645
|
+
...options,
|
|
2646
|
+
method: "PATCH"
|
|
2647
|
+
});
|
|
2648
|
+
};
|
|
2649
|
+
var getPostSymbolAddSymbolUrl = (tradePlatform, symbol) => {
|
|
2650
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolAdd/${encodeURIComponent(String(symbol))}`;
|
|
2651
|
+
};
|
|
2652
|
+
var postSymbolAddSymbol = async (tradePlatform, symbol, options) => {
|
|
2653
|
+
return customFetch(getPostSymbolAddSymbolUrl(tradePlatform, symbol), {
|
|
2654
|
+
...options,
|
|
2655
|
+
method: "POST"
|
|
2656
|
+
});
|
|
2657
|
+
};
|
|
2658
|
+
var getPostSymbolHideSymbolUrl = (tradePlatform, symbol) => {
|
|
2659
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolHide/${encodeURIComponent(String(symbol))}`;
|
|
2660
|
+
};
|
|
2661
|
+
var postSymbolHideSymbol = async (tradePlatform, symbol, options) => {
|
|
2662
|
+
return customFetch(getPostSymbolHideSymbolUrl(tradePlatform, symbol), {
|
|
2663
|
+
...options,
|
|
2664
|
+
method: "POST"
|
|
2665
|
+
});
|
|
2666
|
+
};
|
|
2667
|
+
var getPostSymbolsRefreshUrl = (tradePlatform) => {
|
|
2668
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolsRefresh`;
|
|
2669
|
+
};
|
|
2670
|
+
var postSymbolsRefresh = async (tradePlatform, options) => {
|
|
2671
|
+
return customFetch(getPostSymbolsRefreshUrl(tradePlatform), {
|
|
2672
|
+
...options,
|
|
2673
|
+
method: "POST"
|
|
2674
|
+
});
|
|
2675
|
+
};
|
|
2676
|
+
var getPostSymbolChangeUrl = (tradePlatform) => {
|
|
2677
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolChange`;
|
|
2678
|
+
};
|
|
2679
|
+
var postSymbolChange = async (tradePlatform, mT4SymbolChangeRequest, options) => {
|
|
2680
|
+
return customFetch(getPostSymbolChangeUrl(tradePlatform), {
|
|
2681
|
+
...options,
|
|
2682
|
+
method: "POST",
|
|
2683
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2684
|
+
body: JSON.stringify(mT4SymbolChangeRequest)
|
|
2685
|
+
});
|
|
2686
|
+
};
|
|
2687
|
+
var getPostSymbolSendTickUrl = (tradePlatform, params) => {
|
|
2688
|
+
const normalizedParams = new URLSearchParams;
|
|
2689
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2690
|
+
if (value !== undefined) {
|
|
2691
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2692
|
+
}
|
|
2693
|
+
});
|
|
2694
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2695
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolSendTick?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/SymbolSendTick`;
|
|
2696
|
+
};
|
|
2697
|
+
var postSymbolSendTick = async (tradePlatform, params, options) => {
|
|
2698
|
+
return customFetch(getPostSymbolSendTickUrl(tradePlatform, params), {
|
|
2699
|
+
...options,
|
|
2700
|
+
method: "POST"
|
|
2701
|
+
});
|
|
2702
|
+
};
|
|
2703
|
+
|
|
2704
|
+
// src/generated/mt4-v2-trades.ts
|
|
2705
|
+
var exports_mt4_v2_trades = {};
|
|
2706
|
+
__export(exports_mt4_v2_trades, {
|
|
2707
|
+
postTradesSyncStart: () => postTradesSyncStart,
|
|
2708
|
+
postTradeTransaction: () => postTradeTransaction,
|
|
2709
|
+
postTradeClearRollbackOrder: () => postTradeClearRollbackOrder,
|
|
2710
|
+
postTradeCheckStops: () => postTradeCheckStops,
|
|
2711
|
+
postAdmTradesDelete: () => postAdmTradesDelete,
|
|
2712
|
+
postAdmTradeRecordModifyTicket: () => postAdmTradeRecordModifyTicket,
|
|
2713
|
+
getTradesRequest: () => getTradesRequest,
|
|
2714
|
+
getTradesGetTicket: () => getTradesGetTicket,
|
|
2715
|
+
getTradesGetBySymbol: () => getTradesGetBySymbol,
|
|
2716
|
+
getTradesGetByMarket: () => getTradesGetByMarket,
|
|
2717
|
+
getTradesGetByLoginLoginGroup: () => getTradesGetByLoginLoginGroup,
|
|
2718
|
+
getTradesGet: () => getTradesGet,
|
|
2719
|
+
getTradeRecordsRequest: () => getTradeRecordsRequest,
|
|
2720
|
+
getTradeRecordRequestOrder: () => getTradeRecordRequestOrder,
|
|
2721
|
+
getTradeRecordGetOrder: () => getTradeRecordGetOrder,
|
|
2722
|
+
getPostTradesSyncStartUrl: () => getPostTradesSyncStartUrl,
|
|
2723
|
+
getPostTradeTransactionUrl: () => getPostTradeTransactionUrl,
|
|
2724
|
+
getPostTradeClearRollbackOrderUrl: () => getPostTradeClearRollbackOrderUrl,
|
|
2725
|
+
getPostTradeCheckStopsUrl: () => getPostTradeCheckStopsUrl,
|
|
2726
|
+
getPostAdmTradesDeleteUrl: () => getPostAdmTradesDeleteUrl,
|
|
2727
|
+
getPostAdmTradeRecordModifyTicketUrl: () => getPostAdmTradeRecordModifyTicketUrl,
|
|
2728
|
+
getGetTradesRequestUrl: () => getGetTradesRequestUrl,
|
|
2729
|
+
getGetTradesGetUrl: () => getGetTradesGetUrl,
|
|
2730
|
+
getGetTradesGetTicketUrl: () => getGetTradesGetTicketUrl,
|
|
2731
|
+
getGetTradesGetBySymbolUrl: () => getGetTradesGetBySymbolUrl,
|
|
2732
|
+
getGetTradesGetByMarketUrl: () => getGetTradesGetByMarketUrl,
|
|
2733
|
+
getGetTradesGetByLoginLoginGroupUrl: () => getGetTradesGetByLoginLoginGroupUrl,
|
|
2734
|
+
getGetTradeRecordsRequestUrl: () => getGetTradeRecordsRequestUrl,
|
|
2735
|
+
getGetTradeRecordRequestOrderUrl: () => getGetTradeRecordRequestOrderUrl,
|
|
2736
|
+
getGetTradeRecordGetOrderUrl: () => getGetTradeRecordGetOrderUrl,
|
|
2737
|
+
getGetAdmTradesRequestGroupUrl: () => getGetAdmTradesRequestGroupUrl,
|
|
2738
|
+
getAdmTradesRequestGroup: () => getAdmTradesRequestGroup
|
|
2739
|
+
});
|
|
2740
|
+
var getGetTradesGetUrl = (tradePlatform, params) => {
|
|
2741
|
+
const normalizedParams = new URLSearchParams;
|
|
2742
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2743
|
+
if (value !== undefined) {
|
|
2744
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2748
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGet?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGet`;
|
|
2749
|
+
};
|
|
2750
|
+
var getTradesGet = async (tradePlatform, params, options) => {
|
|
2751
|
+
return customFetch(getGetTradesGetUrl(tradePlatform, params), {
|
|
2752
|
+
...options,
|
|
2753
|
+
method: "GET"
|
|
2754
|
+
});
|
|
2755
|
+
};
|
|
2756
|
+
var getGetTradesGetTicketUrl = (tradePlatform, ticket) => {
|
|
2757
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGet/${encodeURIComponent(String(ticket))}`;
|
|
2758
|
+
};
|
|
2759
|
+
var getTradesGetTicket = async (tradePlatform, ticket, options) => {
|
|
2760
|
+
return customFetch(getGetTradesGetTicketUrl(tradePlatform, ticket), {
|
|
2761
|
+
...options,
|
|
2762
|
+
method: "GET"
|
|
2763
|
+
});
|
|
2764
|
+
};
|
|
2765
|
+
var getGetTradesGetByLoginLoginGroupUrl = (tradePlatform, login, group) => {
|
|
2766
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGetByLogin/${encodeURIComponent(String(login))}/${encodeURIComponent(String(group))}`;
|
|
2767
|
+
};
|
|
2768
|
+
var getTradesGetByLoginLoginGroup = async (tradePlatform, login, group, options) => {
|
|
2769
|
+
return customFetch(getGetTradesGetByLoginLoginGroupUrl(tradePlatform, login, group), {
|
|
2770
|
+
...options,
|
|
2771
|
+
method: "GET"
|
|
2772
|
+
});
|
|
2773
|
+
};
|
|
2774
|
+
var getGetTradesGetBySymbolUrl = (tradePlatform, params) => {
|
|
2775
|
+
const normalizedParams = new URLSearchParams;
|
|
2776
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2777
|
+
if (value !== undefined) {
|
|
2778
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2779
|
+
}
|
|
2780
|
+
});
|
|
2781
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2782
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGetBySymbol?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGetBySymbol`;
|
|
2783
|
+
};
|
|
2784
|
+
var getTradesGetBySymbol = async (tradePlatform, params, options) => {
|
|
2785
|
+
return customFetch(getGetTradesGetBySymbolUrl(tradePlatform, params), {
|
|
2786
|
+
...options,
|
|
2787
|
+
method: "GET"
|
|
2788
|
+
});
|
|
2789
|
+
};
|
|
2790
|
+
var getGetTradesGetByMarketUrl = (tradePlatform) => {
|
|
2791
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesGetByMarket`;
|
|
2792
|
+
};
|
|
2793
|
+
var getTradesGetByMarket = async (tradePlatform, options) => {
|
|
2794
|
+
return customFetch(getGetTradesGetByMarketUrl(tradePlatform), {
|
|
2795
|
+
...options,
|
|
2796
|
+
method: "GET"
|
|
2797
|
+
});
|
|
2798
|
+
};
|
|
2799
|
+
var getGetTradeRecordGetOrderUrl = (tradePlatform, order) => {
|
|
2800
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeRecordGet/${encodeURIComponent(String(order))}`;
|
|
2801
|
+
};
|
|
2802
|
+
var getTradeRecordGetOrder = async (tradePlatform, order, options) => {
|
|
2803
|
+
return customFetch(getGetTradeRecordGetOrderUrl(tradePlatform, order), {
|
|
2804
|
+
...options,
|
|
2805
|
+
method: "GET"
|
|
2806
|
+
});
|
|
2807
|
+
};
|
|
2808
|
+
var getPostTradeCheckStopsUrl = (tradePlatform, params) => {
|
|
2809
|
+
const normalizedParams = new URLSearchParams;
|
|
2810
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2811
|
+
if (value !== undefined) {
|
|
2812
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2813
|
+
}
|
|
2814
|
+
});
|
|
2815
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2816
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeCheckStops?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeCheckStops`;
|
|
2817
|
+
};
|
|
2818
|
+
var postTradeCheckStops = async (tradePlatform, mT4TradeTransaction, params, options) => {
|
|
2819
|
+
return customFetch(getPostTradeCheckStopsUrl(tradePlatform, params), {
|
|
2820
|
+
...options,
|
|
2821
|
+
method: "POST",
|
|
2822
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2823
|
+
body: JSON.stringify(mT4TradeTransaction)
|
|
2824
|
+
});
|
|
2825
|
+
};
|
|
2826
|
+
var getPostTradeClearRollbackOrderUrl = (tradePlatform, order) => {
|
|
2827
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeClearRollback/${encodeURIComponent(String(order))}`;
|
|
2828
|
+
};
|
|
2829
|
+
var postTradeClearRollbackOrder = async (tradePlatform, order, options) => {
|
|
2830
|
+
return customFetch(getPostTradeClearRollbackOrderUrl(tradePlatform, order), {
|
|
2831
|
+
...options,
|
|
2832
|
+
method: "POST"
|
|
2833
|
+
});
|
|
2834
|
+
};
|
|
2835
|
+
var getGetTradeRecordRequestOrderUrl = (tradePlatform, order) => {
|
|
2836
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeRecordRequest/${encodeURIComponent(String(order))}`;
|
|
2837
|
+
};
|
|
2838
|
+
var getTradeRecordRequestOrder = async (tradePlatform, order, options) => {
|
|
2839
|
+
return customFetch(getGetTradeRecordRequestOrderUrl(tradePlatform, order), {
|
|
2840
|
+
...options,
|
|
2841
|
+
method: "GET"
|
|
2842
|
+
});
|
|
2843
|
+
};
|
|
2844
|
+
var getGetTradesRequestUrl = (tradePlatform, params) => {
|
|
2845
|
+
const normalizedParams = new URLSearchParams;
|
|
2846
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2847
|
+
if (value !== undefined) {
|
|
2848
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2849
|
+
}
|
|
2850
|
+
});
|
|
2851
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2852
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesRequest`;
|
|
2853
|
+
};
|
|
2854
|
+
var getTradesRequest = async (tradePlatform, params, options) => {
|
|
2855
|
+
return customFetch(getGetTradesRequestUrl(tradePlatform, params), {
|
|
2856
|
+
...options,
|
|
2857
|
+
method: "GET"
|
|
2858
|
+
});
|
|
2859
|
+
};
|
|
2860
|
+
var getPostAdmTradeRecordModifyTicketUrl = (tradePlatform, ticket) => {
|
|
2861
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmTradeRecordModify/${encodeURIComponent(String(ticket))}`;
|
|
2862
|
+
};
|
|
2863
|
+
var postAdmTradeRecordModifyTicket = async (tradePlatform, ticket, mT4TradeUpdate, options) => {
|
|
2864
|
+
return customFetch(getPostAdmTradeRecordModifyTicketUrl(tradePlatform, ticket), {
|
|
2865
|
+
...options,
|
|
2866
|
+
method: "POST",
|
|
2867
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2868
|
+
body: JSON.stringify(mT4TradeUpdate)
|
|
2869
|
+
});
|
|
2870
|
+
};
|
|
2871
|
+
var getPostTradeTransactionUrl = (tradePlatform) => {
|
|
2872
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeTransaction`;
|
|
2873
|
+
};
|
|
2874
|
+
var postTradeTransaction = async (tradePlatform, mT4TradeTransaction, options) => {
|
|
2875
|
+
return customFetch(getPostTradeTransactionUrl(tradePlatform), {
|
|
2876
|
+
...options,
|
|
2877
|
+
method: "POST",
|
|
2878
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
2879
|
+
body: JSON.stringify(mT4TradeTransaction)
|
|
2880
|
+
});
|
|
2881
|
+
};
|
|
2882
|
+
var getGetTradeRecordsRequestUrl = (tradePlatform, params) => {
|
|
2883
|
+
const normalizedParams = new URLSearchParams;
|
|
2884
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2885
|
+
if (value !== undefined) {
|
|
2886
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2889
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2890
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeRecordsRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradeRecordsRequest`;
|
|
2891
|
+
};
|
|
2892
|
+
var getTradeRecordsRequest = async (tradePlatform, params, options) => {
|
|
2893
|
+
return customFetch(getGetTradeRecordsRequestUrl(tradePlatform, params), {
|
|
2894
|
+
...options,
|
|
2895
|
+
method: "GET"
|
|
2896
|
+
});
|
|
2897
|
+
};
|
|
2898
|
+
var getGetAdmTradesRequestGroupUrl = (tradePlatform, group, params) => {
|
|
2899
|
+
const normalizedParams = new URLSearchParams;
|
|
2900
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2901
|
+
if (value !== undefined) {
|
|
2902
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2905
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2906
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmTradesRequest/${encodeURIComponent(String(group))}?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmTradesRequest/${encodeURIComponent(String(group))}`;
|
|
2907
|
+
};
|
|
2908
|
+
var getAdmTradesRequestGroup = async (tradePlatform, group, params, options) => {
|
|
2909
|
+
return customFetch(getGetAdmTradesRequestGroupUrl(tradePlatform, group, params), {
|
|
2910
|
+
...options,
|
|
2911
|
+
method: "GET"
|
|
2912
|
+
});
|
|
2913
|
+
};
|
|
2914
|
+
var getPostAdmTradesDeleteUrl = (tradePlatform, params) => {
|
|
2915
|
+
const normalizedParams = new URLSearchParams;
|
|
2916
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2917
|
+
if (value !== undefined) {
|
|
2918
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2919
|
+
}
|
|
2920
|
+
});
|
|
2921
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2922
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmTradesDelete?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmTradesDelete`;
|
|
2923
|
+
};
|
|
2924
|
+
var postAdmTradesDelete = async (tradePlatform, params, options) => {
|
|
2925
|
+
return customFetch(getPostAdmTradesDeleteUrl(tradePlatform, params), {
|
|
2926
|
+
...options,
|
|
2927
|
+
method: "POST"
|
|
2928
|
+
});
|
|
2929
|
+
};
|
|
2930
|
+
var getPostTradesSyncStartUrl = (tradePlatform, params) => {
|
|
2931
|
+
const normalizedParams = new URLSearchParams;
|
|
2932
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2933
|
+
if (value !== undefined) {
|
|
2934
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2935
|
+
}
|
|
2936
|
+
});
|
|
2937
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2938
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSyncStart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSyncStart`;
|
|
2939
|
+
};
|
|
2940
|
+
var postTradesSyncStart = async (tradePlatform, params, options) => {
|
|
2941
|
+
return customFetch(getPostTradesSyncStartUrl(tradePlatform, params), {
|
|
2942
|
+
...options,
|
|
2943
|
+
method: "POST"
|
|
2944
|
+
});
|
|
2945
|
+
};
|
|
2946
|
+
|
|
2947
|
+
// src/generated/mt4-v2-users.ts
|
|
2948
|
+
var exports_mt4_v2_users = {};
|
|
2949
|
+
__export(exports_mt4_v2_users, {
|
|
2950
|
+
postUsersSyncStart: () => postUsersSyncStart,
|
|
2951
|
+
postUsersGroupOp: () => postUsersGroupOp,
|
|
2952
|
+
postUserRecordUpdateLogin: () => postUserRecordUpdateLogin,
|
|
2953
|
+
postUserRecordNew: () => postUserRecordNew,
|
|
2954
|
+
postAdmBalanceFix: () => postAdmBalanceFix,
|
|
2955
|
+
patchUserRecordLoginMT4: () => patchUserRecordLoginMT4,
|
|
2956
|
+
getUsersRequest: () => getUsersRequest,
|
|
2957
|
+
getUserRecordsRequest: () => getUserRecordsRequest,
|
|
2958
|
+
getUserRecordRequestLogin: () => getUserRecordRequestLogin,
|
|
2959
|
+
getUserRecordGetLogin: () => getUserRecordGetLogin,
|
|
2960
|
+
getPostUsersSyncStartUrl: () => getPostUsersSyncStartUrl,
|
|
2961
|
+
getPostUsersGroupOpUrl: () => getPostUsersGroupOpUrl,
|
|
2962
|
+
getPostUserRecordUpdateLoginUrl: () => getPostUserRecordUpdateLoginUrl,
|
|
2963
|
+
getPostUserRecordNewUrl: () => getPostUserRecordNewUrl,
|
|
2964
|
+
getPostAdmBalanceFixUrl: () => getPostAdmBalanceFixUrl,
|
|
2965
|
+
getPatchUserRecordLoginMT4Url: () => getPatchUserRecordLoginMT4Url,
|
|
2966
|
+
getGetUsersRequestUrl: () => getGetUsersRequestUrl,
|
|
2967
|
+
getGetUserRecordsRequestUrl: () => getGetUserRecordsRequestUrl,
|
|
2968
|
+
getGetUserRecordRequestLoginUrl: () => getGetUserRecordRequestLoginUrl,
|
|
2969
|
+
getGetUserRecordGetLoginUrl: () => getGetUserRecordGetLoginUrl,
|
|
2970
|
+
getGetAdmUsersRequestSafeGroupUrl: () => getGetAdmUsersRequestSafeGroupUrl,
|
|
2971
|
+
getGetAdmBalanceCheckUrl: () => getGetAdmBalanceCheckUrl,
|
|
2972
|
+
getGetAdmBalanceCheckLoginUrl: () => getGetAdmBalanceCheckLoginUrl,
|
|
2973
|
+
getAdmUsersRequestSafeGroup: () => getAdmUsersRequestSafeGroup,
|
|
2974
|
+
getAdmBalanceCheckLogin: () => getAdmBalanceCheckLogin,
|
|
2975
|
+
getAdmBalanceCheck: () => getAdmBalanceCheck
|
|
2976
|
+
});
|
|
2977
|
+
var getGetUserRecordGetLoginUrl = (tradePlatform, login) => {
|
|
2978
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordGet/${encodeURIComponent(String(login))}`;
|
|
2979
|
+
};
|
|
2980
|
+
var getUserRecordGetLogin = async (tradePlatform, login, options) => {
|
|
2981
|
+
return customFetch(getGetUserRecordGetLoginUrl(tradePlatform, login), {
|
|
2982
|
+
...options,
|
|
2983
|
+
method: "GET"
|
|
2984
|
+
});
|
|
2985
|
+
};
|
|
2986
|
+
var getGetUserRecordRequestLoginUrl = (tradePlatform, login) => {
|
|
2987
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordRequest/${encodeURIComponent(String(login))}`;
|
|
2988
|
+
};
|
|
2989
|
+
var getUserRecordRequestLogin = async (tradePlatform, login, options) => {
|
|
2990
|
+
return customFetch(getGetUserRecordRequestLoginUrl(tradePlatform, login), {
|
|
2991
|
+
...options,
|
|
2992
|
+
method: "GET"
|
|
2993
|
+
});
|
|
2994
|
+
};
|
|
2995
|
+
var getGetUserRecordsRequestUrl = (tradePlatform, params) => {
|
|
2996
|
+
const normalizedParams = new URLSearchParams;
|
|
2997
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2998
|
+
if (value !== undefined) {
|
|
2999
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3000
|
+
}
|
|
3001
|
+
});
|
|
3002
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3003
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordsRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordsRequest`;
|
|
3004
|
+
};
|
|
3005
|
+
var getUserRecordsRequest = async (tradePlatform, params, options) => {
|
|
3006
|
+
return customFetch(getGetUserRecordsRequestUrl(tradePlatform, params), {
|
|
3007
|
+
...options,
|
|
3008
|
+
method: "GET"
|
|
3009
|
+
});
|
|
3010
|
+
};
|
|
3011
|
+
var getGetAdmBalanceCheckLoginUrl = (tradePlatform, login) => {
|
|
3012
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmBalanceCheck/${encodeURIComponent(String(login))}`;
|
|
3013
|
+
};
|
|
3014
|
+
var getAdmBalanceCheckLogin = async (tradePlatform, login, options) => {
|
|
3015
|
+
return customFetch(getGetAdmBalanceCheckLoginUrl(tradePlatform, login), {
|
|
3016
|
+
...options,
|
|
3017
|
+
method: "GET"
|
|
3018
|
+
});
|
|
3019
|
+
};
|
|
3020
|
+
var getGetAdmBalanceCheckUrl = (tradePlatform, params) => {
|
|
3021
|
+
const normalizedParams = new URLSearchParams;
|
|
3022
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3023
|
+
if (value !== undefined) {
|
|
3024
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3025
|
+
}
|
|
3026
|
+
});
|
|
3027
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3028
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmBalanceCheck?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmBalanceCheck`;
|
|
3029
|
+
};
|
|
3030
|
+
var getAdmBalanceCheck = async (tradePlatform, params, options) => {
|
|
3031
|
+
return customFetch(getGetAdmBalanceCheckUrl(tradePlatform, params), {
|
|
3032
|
+
...options,
|
|
3033
|
+
method: "GET"
|
|
3034
|
+
});
|
|
3035
|
+
};
|
|
3036
|
+
var getPostAdmBalanceFixUrl = (tradePlatform, params) => {
|
|
3037
|
+
const normalizedParams = new URLSearchParams;
|
|
3038
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3039
|
+
if (value !== undefined) {
|
|
3040
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3041
|
+
}
|
|
3042
|
+
});
|
|
3043
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3044
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmBalanceFix?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmBalanceFix`;
|
|
3045
|
+
};
|
|
3046
|
+
var postAdmBalanceFix = async (tradePlatform, params, options) => {
|
|
3047
|
+
return customFetch(getPostAdmBalanceFixUrl(tradePlatform, params), {
|
|
3048
|
+
...options,
|
|
3049
|
+
method: "POST"
|
|
3050
|
+
});
|
|
3051
|
+
};
|
|
3052
|
+
var getGetUsersRequestUrl = (tradePlatform, params) => {
|
|
3053
|
+
const normalizedParams = new URLSearchParams;
|
|
3054
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3055
|
+
if (value !== undefined) {
|
|
3056
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3059
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3060
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersRequest?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersRequest`;
|
|
3061
|
+
};
|
|
3062
|
+
var getUsersRequest = async (tradePlatform, params, options) => {
|
|
3063
|
+
return customFetch(getGetUsersRequestUrl(tradePlatform, params), {
|
|
3064
|
+
...options,
|
|
3065
|
+
method: "GET"
|
|
3066
|
+
});
|
|
3067
|
+
};
|
|
3068
|
+
var getPostUserRecordNewUrl = (tradePlatform) => {
|
|
3069
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordNew`;
|
|
3070
|
+
};
|
|
3071
|
+
var postUserRecordNew = async (tradePlatform, mT4UserCreate, options) => {
|
|
3072
|
+
return customFetch(getPostUserRecordNewUrl(tradePlatform), {
|
|
3073
|
+
...options,
|
|
3074
|
+
method: "POST",
|
|
3075
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3076
|
+
body: JSON.stringify(mT4UserCreate)
|
|
3077
|
+
});
|
|
3078
|
+
};
|
|
3079
|
+
var getPostUserRecordUpdateLoginUrl = (tradePlatform, login) => {
|
|
3080
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecordUpdate/${encodeURIComponent(String(login))}`;
|
|
3081
|
+
};
|
|
3082
|
+
var postUserRecordUpdateLogin = async (tradePlatform, login, mT4UserUpdate, options) => {
|
|
3083
|
+
return customFetch(getPostUserRecordUpdateLoginUrl(tradePlatform, login), {
|
|
3084
|
+
...options,
|
|
3085
|
+
method: "POST",
|
|
3086
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3087
|
+
body: JSON.stringify(mT4UserUpdate)
|
|
3088
|
+
});
|
|
3089
|
+
};
|
|
3090
|
+
var getPatchUserRecordLoginMT4Url = (tradePlatform, login) => {
|
|
3091
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UserRecord/${encodeURIComponent(String(login))}`;
|
|
3092
|
+
};
|
|
3093
|
+
var patchUserRecordLoginMT4 = async (tradePlatform, login, options) => {
|
|
3094
|
+
return customFetch(getPatchUserRecordLoginMT4Url(tradePlatform, login), {
|
|
3095
|
+
...options,
|
|
3096
|
+
method: "PATCH"
|
|
3097
|
+
});
|
|
3098
|
+
};
|
|
3099
|
+
var getGetAdmUsersRequestSafeGroupUrl = (tradePlatform, group) => {
|
|
3100
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/AdmUsersRequestSafe/${encodeURIComponent(String(group))}`;
|
|
3101
|
+
};
|
|
3102
|
+
var getAdmUsersRequestSafeGroup = async (tradePlatform, group, options) => {
|
|
3103
|
+
return customFetch(getGetAdmUsersRequestSafeGroupUrl(tradePlatform, group), {
|
|
3104
|
+
...options,
|
|
3105
|
+
method: "GET"
|
|
3106
|
+
});
|
|
3107
|
+
};
|
|
3108
|
+
var getPostUsersSyncStartUrl = (tradePlatform, params) => {
|
|
3109
|
+
const normalizedParams = new URLSearchParams;
|
|
3110
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3111
|
+
if (value !== undefined) {
|
|
3112
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3113
|
+
}
|
|
3114
|
+
});
|
|
3115
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3116
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSyncStart?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSyncStart`;
|
|
3117
|
+
};
|
|
3118
|
+
var postUsersSyncStart = async (tradePlatform, params, options) => {
|
|
3119
|
+
return customFetch(getPostUsersSyncStartUrl(tradePlatform, params), {
|
|
3120
|
+
...options,
|
|
3121
|
+
method: "POST"
|
|
3122
|
+
});
|
|
3123
|
+
};
|
|
3124
|
+
var getPostUsersGroupOpUrl = (tradePlatform) => {
|
|
3125
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersGroupOp`;
|
|
3126
|
+
};
|
|
3127
|
+
var postUsersGroupOp = async (tradePlatform, mT4UsersGroupOp, options) => {
|
|
3128
|
+
return customFetch(getPostUsersGroupOpUrl(tradePlatform), {
|
|
3129
|
+
...options,
|
|
3130
|
+
method: "POST",
|
|
3131
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3132
|
+
body: JSON.stringify(mT4UsersGroupOp)
|
|
3133
|
+
});
|
|
3134
|
+
};
|
|
3135
|
+
|
|
3136
|
+
// src/generated/mt4-v2-sidecar-messaging.ts
|
|
3137
|
+
var exports_mt4_v2_sidecar_messaging = {};
|
|
3138
|
+
__export(exports_mt4_v2_sidecar_messaging, {
|
|
3139
|
+
postNewsSend: () => postNewsSend,
|
|
3140
|
+
postMailSend: () => postMailSend,
|
|
3141
|
+
getPostNewsSendUrl: () => getPostNewsSendUrl,
|
|
3142
|
+
getPostMailSendUrl: () => getPostMailSendUrl,
|
|
3143
|
+
getMailsRequest: () => getMailsRequest,
|
|
3144
|
+
getGetMailsRequestUrl: () => getGetMailsRequestUrl
|
|
3145
|
+
});
|
|
3146
|
+
var getPostNewsSendUrl = (tradePlatform) => {
|
|
3147
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/NewsSend`;
|
|
3148
|
+
};
|
|
3149
|
+
var postNewsSend = async (tradePlatform, mT4NewsSendRequest, options) => {
|
|
3150
|
+
return customFetch(getPostNewsSendUrl(tradePlatform), {
|
|
3151
|
+
...options,
|
|
3152
|
+
method: "POST",
|
|
3153
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3154
|
+
body: JSON.stringify(mT4NewsSendRequest)
|
|
3155
|
+
});
|
|
3156
|
+
};
|
|
3157
|
+
var getPostMailSendUrl = (tradePlatform) => {
|
|
3158
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MailSend`;
|
|
3159
|
+
};
|
|
3160
|
+
var postMailSend = async (tradePlatform, mT4MailSendRequest, options) => {
|
|
3161
|
+
return customFetch(getPostMailSendUrl(tradePlatform), {
|
|
3162
|
+
...options,
|
|
3163
|
+
method: "POST",
|
|
3164
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3165
|
+
body: JSON.stringify(mT4MailSendRequest)
|
|
3166
|
+
});
|
|
3167
|
+
};
|
|
3168
|
+
var getGetMailsRequestUrl = (tradePlatform) => {
|
|
3169
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/MailsRequest`;
|
|
3170
|
+
};
|
|
3171
|
+
var getMailsRequest = async (tradePlatform, options) => {
|
|
3172
|
+
return customFetch(getGetMailsRequestUrl(tradePlatform), {
|
|
3173
|
+
...options,
|
|
3174
|
+
method: "GET"
|
|
3175
|
+
});
|
|
3176
|
+
};
|
|
3177
|
+
|
|
3178
|
+
// src/generated/mt4-v2-sidecar-plugins.ts
|
|
3179
|
+
var exports_mt4_v2_sidecar_plugins = {};
|
|
3180
|
+
__export(exports_mt4_v2_sidecar_plugins, {
|
|
3181
|
+
postPluginUpdate: () => postPluginUpdate,
|
|
3182
|
+
postCfgUpdatePlugin: () => postCfgUpdatePlugin,
|
|
3183
|
+
getPostPluginUpdateUrl: () => getPostPluginUpdateUrl,
|
|
3184
|
+
getPostCfgUpdatePluginUrl: () => getPostCfgUpdatePluginUrl,
|
|
3185
|
+
getPluginsGet: () => getPluginsGet,
|
|
3186
|
+
getPluginParamGetPos: () => getPluginParamGetPos,
|
|
3187
|
+
getGetPluginsGetUrl: () => getGetPluginsGetUrl,
|
|
3188
|
+
getGetPluginParamGetPosUrl: () => getGetPluginParamGetPosUrl,
|
|
3189
|
+
getGetCfgRequestPluginUrl: () => getGetCfgRequestPluginUrl,
|
|
3190
|
+
getCfgRequestPlugin: () => getCfgRequestPlugin
|
|
3191
|
+
});
|
|
3192
|
+
var getGetPluginsGetUrl = (tradePlatform) => {
|
|
3193
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/PluginsGet`;
|
|
3194
|
+
};
|
|
3195
|
+
var getPluginsGet = async (tradePlatform, options) => {
|
|
3196
|
+
return customFetch(getGetPluginsGetUrl(tradePlatform), {
|
|
3197
|
+
...options,
|
|
3198
|
+
method: "GET"
|
|
3199
|
+
});
|
|
3200
|
+
};
|
|
3201
|
+
var getGetPluginParamGetPosUrl = (tradePlatform, pos) => {
|
|
3202
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/PluginParamGet/${encodeURIComponent(String(pos))}`;
|
|
3203
|
+
};
|
|
3204
|
+
var getPluginParamGetPos = async (tradePlatform, pos, options) => {
|
|
3205
|
+
return customFetch(getGetPluginParamGetPosUrl(tradePlatform, pos), {
|
|
3206
|
+
...options,
|
|
3207
|
+
method: "GET"
|
|
3208
|
+
});
|
|
3209
|
+
};
|
|
3210
|
+
var getPostPluginUpdateUrl = (tradePlatform) => {
|
|
3211
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/PluginUpdate`;
|
|
3212
|
+
};
|
|
3213
|
+
var postPluginUpdate = async (tradePlatform, mT4PluginParam, options) => {
|
|
3214
|
+
return customFetch(getPostPluginUpdateUrl(tradePlatform), {
|
|
3215
|
+
...options,
|
|
3216
|
+
method: "POST",
|
|
3217
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3218
|
+
body: JSON.stringify(mT4PluginParam)
|
|
3219
|
+
});
|
|
3220
|
+
};
|
|
3221
|
+
var getGetCfgRequestPluginUrl = (tradePlatform) => {
|
|
3222
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgRequestPlugin`;
|
|
3223
|
+
};
|
|
3224
|
+
var getCfgRequestPlugin = async (tradePlatform, options) => {
|
|
3225
|
+
return customFetch(getGetCfgRequestPluginUrl(tradePlatform), {
|
|
3226
|
+
...options,
|
|
3227
|
+
method: "GET"
|
|
3228
|
+
});
|
|
3229
|
+
};
|
|
3230
|
+
var getPostCfgUpdatePluginUrl = (tradePlatform) => {
|
|
3231
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/CfgUpdatePlugin`;
|
|
3232
|
+
};
|
|
3233
|
+
var postCfgUpdatePlugin = async (tradePlatform, mT4PluginParam, options) => {
|
|
3234
|
+
return customFetch(getPostCfgUpdatePluginUrl(tradePlatform), {
|
|
3235
|
+
...options,
|
|
3236
|
+
method: "POST",
|
|
3237
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3238
|
+
body: JSON.stringify(mT4PluginParam)
|
|
3239
|
+
});
|
|
3240
|
+
};
|
|
3241
|
+
|
|
3242
|
+
// src/generated/mt4-v2-sidecar-batch-reads.ts
|
|
3243
|
+
var exports_mt4_v2_sidecar_batch_reads = {};
|
|
3244
|
+
__export(exports_mt4_v2_sidecar_batch_reads, {
|
|
3245
|
+
getUsersSyncRead: () => getUsersSyncRead,
|
|
3246
|
+
getUsersSnapshot: () => getUsersSnapshot,
|
|
3247
|
+
getTradesSyncRead: () => getTradesSyncRead,
|
|
3248
|
+
getTradesSnapshot: () => getTradesSnapshot,
|
|
3249
|
+
getGetUsersSyncReadUrl: () => getGetUsersSyncReadUrl,
|
|
3250
|
+
getGetUsersSnapshotUrl: () => getGetUsersSnapshotUrl,
|
|
3251
|
+
getGetTradesSyncReadUrl: () => getGetTradesSyncReadUrl,
|
|
3252
|
+
getGetTradesSnapshotUrl: () => getGetTradesSnapshotUrl
|
|
3253
|
+
});
|
|
3254
|
+
var getGetUsersSnapshotUrl = (tradePlatform, params) => {
|
|
3255
|
+
const normalizedParams = new URLSearchParams;
|
|
3256
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3257
|
+
if (value !== undefined) {
|
|
3258
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3259
|
+
}
|
|
3260
|
+
});
|
|
3261
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3262
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSnapshot?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSnapshot`;
|
|
3263
|
+
};
|
|
3264
|
+
var getUsersSnapshot = async (tradePlatform, params, options) => {
|
|
3265
|
+
return customFetch(getGetUsersSnapshotUrl(tradePlatform, params), {
|
|
3266
|
+
...options,
|
|
3267
|
+
method: "GET"
|
|
3268
|
+
});
|
|
3269
|
+
};
|
|
3270
|
+
var getGetUsersSyncReadUrl = (tradePlatform, params) => {
|
|
3271
|
+
const normalizedParams = new URLSearchParams;
|
|
3272
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3273
|
+
if (value !== undefined) {
|
|
3274
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3275
|
+
}
|
|
3276
|
+
});
|
|
3277
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3278
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSyncRead?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/UsersSyncRead`;
|
|
3279
|
+
};
|
|
3280
|
+
var getUsersSyncRead = async (tradePlatform, params, options) => {
|
|
3281
|
+
return customFetch(getGetUsersSyncReadUrl(tradePlatform, params), {
|
|
3282
|
+
...options,
|
|
3283
|
+
method: "GET"
|
|
3284
|
+
});
|
|
3285
|
+
};
|
|
3286
|
+
var getGetTradesSnapshotUrl = (tradePlatform, params) => {
|
|
3287
|
+
const normalizedParams = new URLSearchParams;
|
|
3288
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3289
|
+
if (value !== undefined) {
|
|
3290
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3291
|
+
}
|
|
3292
|
+
});
|
|
3293
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3294
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSnapshot?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSnapshot`;
|
|
3295
|
+
};
|
|
3296
|
+
var getTradesSnapshot = async (tradePlatform, params, options) => {
|
|
3297
|
+
return customFetch(getGetTradesSnapshotUrl(tradePlatform, params), {
|
|
3298
|
+
...options,
|
|
3299
|
+
method: "GET"
|
|
3300
|
+
});
|
|
3301
|
+
};
|
|
3302
|
+
var getGetTradesSyncReadUrl = (tradePlatform, params) => {
|
|
3303
|
+
const normalizedParams = new URLSearchParams;
|
|
3304
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3305
|
+
if (value !== undefined) {
|
|
3306
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3307
|
+
}
|
|
3308
|
+
});
|
|
3309
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3310
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSyncRead?${stringifiedParams}` : `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/TradesSyncRead`;
|
|
3311
|
+
};
|
|
3312
|
+
var getTradesSyncRead = async (tradePlatform, params, options) => {
|
|
3313
|
+
return customFetch(getGetTradesSyncReadUrl(tradePlatform, params), {
|
|
3314
|
+
...options,
|
|
3315
|
+
method: "GET"
|
|
3316
|
+
});
|
|
3317
|
+
};
|
|
3318
|
+
|
|
3319
|
+
// src/generated/mt4-v2-sidecar-externalcommand.ts
|
|
3320
|
+
var exports_mt4_v2_sidecar_externalcommand = {};
|
|
3321
|
+
__export(exports_mt4_v2_sidecar_externalcommand, {
|
|
3322
|
+
postExternalCommandBinary: () => postExternalCommandBinary,
|
|
3323
|
+
getPostExternalCommandBinaryUrl: () => getPostExternalCommandBinaryUrl
|
|
3324
|
+
});
|
|
3325
|
+
var getPostExternalCommandBinaryUrl = (tradePlatform) => {
|
|
3326
|
+
return `/api/v2/MT4/${encodeURIComponent(String(tradePlatform))}/ExternalCommandBinary`;
|
|
3327
|
+
};
|
|
3328
|
+
var postExternalCommandBinary = async (tradePlatform, mT4ExternalCommandBinaryRequest, options) => {
|
|
3329
|
+
return customFetch(getPostExternalCommandBinaryUrl(tradePlatform), {
|
|
3330
|
+
...options,
|
|
3331
|
+
method: "POST",
|
|
3332
|
+
headers: { "Content-Type": "application/json-patch+json", ...options?.headers },
|
|
3333
|
+
body: JSON.stringify(mT4ExternalCommandBinaryRequest)
|
|
3334
|
+
});
|
|
3335
|
+
};
|
|
3336
|
+
|
|
3337
|
+
// src/generated/mt5-v2-common.ts
|
|
3338
|
+
var exports_mt5_v2_common = {};
|
|
3339
|
+
__export(exports_mt5_v2_common, {
|
|
3340
|
+
getTimeGet: () => getTimeGet,
|
|
3341
|
+
getServerTimeMT5: () => getServerTimeMT5,
|
|
3342
|
+
getGetTimeGetUrl: () => getGetTimeGetUrl,
|
|
3343
|
+
getGetServerTimeMT5Url: () => getGetServerTimeMT5Url
|
|
3344
|
+
});
|
|
3345
|
+
var getGetServerTimeMT5Url = (tradePlatform) => {
|
|
3346
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/ServerTime`;
|
|
3347
|
+
};
|
|
3348
|
+
var getServerTimeMT5 = async (tradePlatform, options) => {
|
|
3349
|
+
return customFetch(getGetServerTimeMT5Url(tradePlatform), {
|
|
3350
|
+
...options,
|
|
3351
|
+
method: "GET"
|
|
3352
|
+
});
|
|
3353
|
+
};
|
|
3354
|
+
var getGetTimeGetUrl = (tradePlatform) => {
|
|
3355
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/TimeGet`;
|
|
3356
|
+
};
|
|
3357
|
+
var getTimeGet = async (tradePlatform, options) => {
|
|
3358
|
+
return customFetch(getGetTimeGetUrl(tradePlatform), {
|
|
3359
|
+
...options,
|
|
3360
|
+
method: "GET"
|
|
3361
|
+
});
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
// src/generated/mt5-v2-groups.ts
|
|
3365
|
+
var exports_mt5_v2_groups = {};
|
|
3366
|
+
__export(exports_mt5_v2_groups, {
|
|
3367
|
+
patchGroupRecordGroupMT5: () => patchGroupRecordGroupMT5,
|
|
3368
|
+
getPatchGroupRecordGroupMT5Url: () => getPatchGroupRecordGroupMT5Url,
|
|
3369
|
+
getGroupGetGroup: () => getGroupGetGroup,
|
|
3370
|
+
getGetGroupGetGroupUrl: () => getGetGroupGetGroupUrl
|
|
3371
|
+
});
|
|
3372
|
+
var getGetGroupGetGroupUrl = (tradePlatform, group) => {
|
|
3373
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/GroupGet/${encodeURIComponent(String(group))}`;
|
|
3374
|
+
};
|
|
3375
|
+
var getGroupGetGroup = async (tradePlatform, group, options) => {
|
|
3376
|
+
return customFetch(getGetGroupGetGroupUrl(tradePlatform, group), {
|
|
3377
|
+
...options,
|
|
3378
|
+
method: "GET"
|
|
3379
|
+
});
|
|
3380
|
+
};
|
|
3381
|
+
var getPatchGroupRecordGroupMT5Url = (tradePlatform, group) => {
|
|
3382
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/GroupRecord/${encodeURIComponent(String(group))}`;
|
|
3383
|
+
};
|
|
3384
|
+
var patchGroupRecordGroupMT5 = async (tradePlatform, group, options) => {
|
|
3385
|
+
return customFetch(getPatchGroupRecordGroupMT5Url(tradePlatform, group), {
|
|
3386
|
+
...options,
|
|
3387
|
+
method: "PATCH"
|
|
3388
|
+
});
|
|
3389
|
+
};
|
|
3390
|
+
|
|
3391
|
+
// src/generated/mt5-v2-managers.ts
|
|
3392
|
+
var exports_mt5_v2_managers = {};
|
|
3393
|
+
__export(exports_mt5_v2_managers, {
|
|
3394
|
+
getManagerCurrent: () => getManagerCurrent,
|
|
3395
|
+
getGetManagerCurrentUrl: () => getGetManagerCurrentUrl
|
|
3396
|
+
});
|
|
3397
|
+
var getGetManagerCurrentUrl = (tradePlatform) => {
|
|
3398
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/ManagerCurrent`;
|
|
3399
|
+
};
|
|
3400
|
+
var getManagerCurrent = async (tradePlatform, options) => {
|
|
3401
|
+
return customFetch(getGetManagerCurrentUrl(tradePlatform), {
|
|
3402
|
+
...options,
|
|
3403
|
+
method: "GET"
|
|
3404
|
+
});
|
|
3405
|
+
};
|
|
3406
|
+
|
|
3407
|
+
// src/generated/mt5-v2-symbols.ts
|
|
3408
|
+
var exports_mt5_v2_symbols = {};
|
|
3409
|
+
__export(exports_mt5_v2_symbols, {
|
|
3410
|
+
patchSymbolRecordSymbol: () => patchSymbolRecordSymbol,
|
|
3411
|
+
getSymbolGetSymbol: () => getSymbolGetSymbol,
|
|
3412
|
+
getPatchSymbolRecordSymbolUrl: () => getPatchSymbolRecordSymbolUrl,
|
|
3413
|
+
getGetSymbolGetSymbolUrl: () => getGetSymbolGetSymbolUrl
|
|
3414
|
+
});
|
|
3415
|
+
var getGetSymbolGetSymbolUrl = (tradePlatform, symbol) => {
|
|
3416
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/SymbolGet/${encodeURIComponent(String(symbol))}`;
|
|
3417
|
+
};
|
|
3418
|
+
var getSymbolGetSymbol = async (tradePlatform, symbol, options) => {
|
|
3419
|
+
return customFetch(getGetSymbolGetSymbolUrl(tradePlatform, symbol), {
|
|
3420
|
+
...options,
|
|
3421
|
+
method: "GET"
|
|
3422
|
+
});
|
|
3423
|
+
};
|
|
3424
|
+
var getPatchSymbolRecordSymbolUrl = (tradePlatform, symbol) => {
|
|
3425
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/SymbolRecord/${encodeURIComponent(String(symbol))}`;
|
|
3426
|
+
};
|
|
3427
|
+
var patchSymbolRecordSymbol = async (tradePlatform, symbol, options) => {
|
|
3428
|
+
return customFetch(getPatchSymbolRecordSymbolUrl(tradePlatform, symbol), {
|
|
3429
|
+
...options,
|
|
3430
|
+
method: "PATCH"
|
|
3431
|
+
});
|
|
3432
|
+
};
|
|
3433
|
+
|
|
3434
|
+
// src/generated/mt5-v2-trades.ts
|
|
3435
|
+
var exports_mt5_v2_trades = {};
|
|
3436
|
+
__export(exports_mt5_v2_trades, {
|
|
3437
|
+
getPositionByGroupMask: () => getPositionByGroupMask,
|
|
3438
|
+
getOrderByGroupMask: () => getOrderByGroupMask,
|
|
3439
|
+
getGetPositionByGroupMaskUrl: () => getGetPositionByGroupMaskUrl,
|
|
3440
|
+
getGetOrderByGroupMaskUrl: () => getGetOrderByGroupMaskUrl,
|
|
3441
|
+
getGetDealByGroupMaskUrl: () => getGetDealByGroupMaskUrl,
|
|
3442
|
+
getDealByGroupMask: () => getDealByGroupMask
|
|
3443
|
+
});
|
|
3444
|
+
var getGetPositionByGroupMaskUrl = (tradePlatform, mask, params) => {
|
|
3445
|
+
const normalizedParams = new URLSearchParams;
|
|
3446
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3447
|
+
if (value !== undefined) {
|
|
3448
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3449
|
+
}
|
|
3450
|
+
});
|
|
3451
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3452
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/PositionByGroup/${encodeURIComponent(String(mask))}?${stringifiedParams}` : `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/PositionByGroup/${encodeURIComponent(String(mask))}`;
|
|
3453
|
+
};
|
|
3454
|
+
var getPositionByGroupMask = async (tradePlatform, mask, params, options) => {
|
|
3455
|
+
return customFetch(getGetPositionByGroupMaskUrl(tradePlatform, mask, params), {
|
|
3456
|
+
...options,
|
|
3457
|
+
method: "GET"
|
|
3458
|
+
});
|
|
3459
|
+
};
|
|
3460
|
+
var getGetOrderByGroupMaskUrl = (tradePlatform, mask, params) => {
|
|
3461
|
+
const normalizedParams = new URLSearchParams;
|
|
3462
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3463
|
+
if (value !== undefined) {
|
|
3464
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3465
|
+
}
|
|
3466
|
+
});
|
|
3467
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3468
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/OrderByGroup/${encodeURIComponent(String(mask))}?${stringifiedParams}` : `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/OrderByGroup/${encodeURIComponent(String(mask))}`;
|
|
3469
|
+
};
|
|
3470
|
+
var getOrderByGroupMask = async (tradePlatform, mask, params, options) => {
|
|
3471
|
+
return customFetch(getGetOrderByGroupMaskUrl(tradePlatform, mask, params), {
|
|
3472
|
+
...options,
|
|
3473
|
+
method: "GET"
|
|
3474
|
+
});
|
|
3475
|
+
};
|
|
3476
|
+
var getGetDealByGroupMaskUrl = (tradePlatform, mask, params) => {
|
|
3477
|
+
const normalizedParams = new URLSearchParams;
|
|
3478
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3479
|
+
if (value !== undefined) {
|
|
3480
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3481
|
+
}
|
|
3482
|
+
});
|
|
3483
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3484
|
+
return stringifiedParams.length > 0 ? `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/DealByGroup/${encodeURIComponent(String(mask))}?${stringifiedParams}` : `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/DealByGroup/${encodeURIComponent(String(mask))}`;
|
|
3485
|
+
};
|
|
3486
|
+
var getDealByGroupMask = async (tradePlatform, mask, params, options) => {
|
|
3487
|
+
return customFetch(getGetDealByGroupMaskUrl(tradePlatform, mask, params), {
|
|
3488
|
+
...options,
|
|
3489
|
+
method: "GET"
|
|
3490
|
+
});
|
|
3491
|
+
};
|
|
3492
|
+
|
|
3493
|
+
// src/generated/mt5-v2-users.ts
|
|
3494
|
+
var exports_mt5_v2_users = {};
|
|
3495
|
+
__export(exports_mt5_v2_users, {
|
|
3496
|
+
patchUserRecordLoginMT5: () => patchUserRecordLoginMT5,
|
|
3497
|
+
getUserGetLogin: () => getUserGetLogin,
|
|
3498
|
+
getPatchUserRecordLoginMT5Url: () => getPatchUserRecordLoginMT5Url,
|
|
3499
|
+
getGetUserGetLoginUrl: () => getGetUserGetLoginUrl
|
|
3500
|
+
});
|
|
3501
|
+
var getGetUserGetLoginUrl = (tradePlatform, login) => {
|
|
3502
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/UserGet/${encodeURIComponent(String(login))}`;
|
|
3503
|
+
};
|
|
3504
|
+
var getUserGetLogin = async (tradePlatform, login, options) => {
|
|
3505
|
+
return customFetch(getGetUserGetLoginUrl(tradePlatform, login), {
|
|
3506
|
+
...options,
|
|
3507
|
+
method: "GET"
|
|
3508
|
+
});
|
|
3509
|
+
};
|
|
3510
|
+
var getPatchUserRecordLoginMT5Url = (tradePlatform, login) => {
|
|
3511
|
+
return `/api/v2/MT5/${encodeURIComponent(String(tradePlatform))}/UserRecord/${encodeURIComponent(String(login))}`;
|
|
3512
|
+
};
|
|
3513
|
+
var patchUserRecordLoginMT5 = async (tradePlatform, login, options) => {
|
|
3514
|
+
return customFetch(getPatchUserRecordLoginMT5Url(tradePlatform, login), {
|
|
3515
|
+
...options,
|
|
3516
|
+
method: "PATCH"
|
|
3517
|
+
});
|
|
3518
|
+
};
|
|
3519
|
+
|
|
3520
|
+
// src/client.ts
|
|
3521
|
+
function bind(mod, base, platformSuffix) {
|
|
3522
|
+
const out = {};
|
|
3523
|
+
for (const [name, value] of Object.entries(mod)) {
|
|
3524
|
+
const key = platformSuffix && name.endsWith(platformSuffix) ? name.slice(0, -platformSuffix.length) : name;
|
|
3525
|
+
if (typeof value !== "function") {
|
|
3526
|
+
out[key] = value;
|
|
3527
|
+
continue;
|
|
3528
|
+
}
|
|
3529
|
+
out[key] = (...args) => {
|
|
3530
|
+
const callArgs = [...args];
|
|
3531
|
+
const optionsIndex = value.length - 1;
|
|
3532
|
+
while (callArgs.length < optionsIndex)
|
|
3533
|
+
callArgs.push(undefined);
|
|
3534
|
+
callArgs[optionsIndex] = withRequestContext(callArgs[optionsIndex], base);
|
|
3535
|
+
return value(...callArgs);
|
|
3536
|
+
};
|
|
3537
|
+
}
|
|
3538
|
+
return out;
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
class CPluginWebApiClient {
|
|
3542
|
+
mt4;
|
|
3543
|
+
mt5;
|
|
3544
|
+
realtime;
|
|
3545
|
+
base;
|
|
3546
|
+
constructor(init) {
|
|
3547
|
+
const env = resolveEnvironment(init);
|
|
3548
|
+
const tokenProvider = new ClientCredentialsTokenProvider({
|
|
3549
|
+
clientId: init.clientId,
|
|
3550
|
+
clientSecret: init.clientSecret,
|
|
3551
|
+
identityUrl: env.authority,
|
|
3552
|
+
...init.scopes ? { scopes: init.scopes } : {},
|
|
3553
|
+
...init.fetch ? { fetch: init.fetch } : {},
|
|
3554
|
+
...init.timeoutMs !== undefined ? { timeoutMs: init.timeoutMs } : {},
|
|
3555
|
+
...env.allowInsecureLoopback ? { allowInsecureLoopback: true } : {}
|
|
3556
|
+
});
|
|
3557
|
+
this.base = {
|
|
3558
|
+
apiBaseUrl: env.apiBaseUrl,
|
|
3559
|
+
tokenProvider,
|
|
3560
|
+
fetchImpl: init.fetch ?? globalThis.fetch.bind(globalThis),
|
|
3561
|
+
retryPolicy: { ...defaultPolicy, ...init.retry ?? {} },
|
|
3562
|
+
timeoutMs: init.timeoutMs ?? 30000
|
|
3563
|
+
};
|
|
3564
|
+
if (!Number.isFinite(this.base.timeoutMs) || this.base.timeoutMs <= 0) {
|
|
3565
|
+
throw new TypeError("timeoutMs must be a positive finite number");
|
|
3566
|
+
}
|
|
3567
|
+
this.mt4 = {
|
|
3568
|
+
...bind(exports_mt4_v2_authentication, this.base, "MT4"),
|
|
3569
|
+
...bind(exports_mt4_v2_backup_destructive, this.base, "MT4"),
|
|
3570
|
+
...bind(exports_mt4_v2_backup, this.base, "MT4"),
|
|
3571
|
+
...bind(exports_mt4_v2_common, this.base, "MT4"),
|
|
3572
|
+
...bind(exports_mt4_v2_config, this.base, "MT4"),
|
|
3573
|
+
...bind(exports_mt4_v2_groups, this.base, "MT4"),
|
|
3574
|
+
...bind(exports_mt4_v2_history, this.base, "MT4"),
|
|
3575
|
+
...bind(exports_mt4_v2_mail, this.base, "MT4"),
|
|
3576
|
+
...bind(exports_mt4_v2_margins, this.base, "MT4"),
|
|
3577
|
+
...bind(exports_mt4_v2_news, this.base, "MT4"),
|
|
3578
|
+
...bind(exports_mt4_v2_online, this.base, "MT4"),
|
|
3579
|
+
...bind(exports_mt4_v2_plugins, this.base, "MT4"),
|
|
3580
|
+
...bind(exports_mt4_v2_prices, this.base, "MT4"),
|
|
3581
|
+
...bind(exports_mt4_v2_reports, this.base, "MT4"),
|
|
3582
|
+
...bind(exports_mt4_v2_server_admin_destructive, this.base, "MT4"),
|
|
3583
|
+
...bind(exports_mt4_v2_server_admin, this.base, "MT4"),
|
|
3584
|
+
...bind(exports_mt4_v2_symbols, this.base, "MT4"),
|
|
3585
|
+
...bind(exports_mt4_v2_trades, this.base, "MT4"),
|
|
3586
|
+
...bind(exports_mt4_v2_users, this.base, "MT4"),
|
|
3587
|
+
...bind(exports_mt4_v2_sidecar_messaging, this.base, "MT4"),
|
|
3588
|
+
...bind(exports_mt4_v2_sidecar_plugins, this.base, "MT4"),
|
|
3589
|
+
...bind(exports_mt4_v2_sidecar_batch_reads, this.base, "MT4"),
|
|
3590
|
+
...bind(exports_mt4_v2_sidecar_externalcommand, this.base, "MT4")
|
|
3591
|
+
};
|
|
3592
|
+
this.mt5 = {
|
|
3593
|
+
...bind(exports_mt5_v2_common, this.base, "MT5"),
|
|
3594
|
+
...bind(exports_mt5_v2_groups, this.base, "MT5"),
|
|
3595
|
+
...bind(exports_mt5_v2_managers, this.base, "MT5"),
|
|
3596
|
+
...bind(exports_mt5_v2_symbols, this.base, "MT5"),
|
|
3597
|
+
...bind(exports_mt5_v2_trades, this.base, "MT5"),
|
|
3598
|
+
...bind(exports_mt5_v2_users, this.base, "MT5")
|
|
3599
|
+
};
|
|
3600
|
+
const base = this.base;
|
|
3601
|
+
this.realtime = {
|
|
3602
|
+
mt4: (tradePlatform, extras) => new MT4V2SignalRClient({
|
|
3603
|
+
tokenProvider: base.tokenProvider,
|
|
3604
|
+
baseUrl: base.apiBaseUrl,
|
|
3605
|
+
tradePlatform,
|
|
3606
|
+
...extras ?? {}
|
|
3607
|
+
}),
|
|
3608
|
+
mt5: (tradePlatform, extras) => new MT5V2SignalRClient({
|
|
3609
|
+
tokenProvider: base.tokenProvider,
|
|
3610
|
+
baseUrl: base.apiBaseUrl,
|
|
3611
|
+
tradePlatform,
|
|
3612
|
+
...extras ?? {}
|
|
3613
|
+
})
|
|
3614
|
+
};
|
|
3615
|
+
}
|
|
3616
|
+
async paged(call) {
|
|
3617
|
+
const items = await call();
|
|
3618
|
+
return {
|
|
3619
|
+
items: Array.isArray(items) ? items : [],
|
|
3620
|
+
paging: pagingFromResult(items)?.paging ?? null
|
|
3621
|
+
};
|
|
3622
|
+
}
|
|
3623
|
+
async listTradePlatforms() {
|
|
3624
|
+
return authenticatedFetch(this.base, "/api/TradePlatforms", { method: "GET" }, async (response, signal) => {
|
|
3625
|
+
if (!response.ok) {
|
|
3626
|
+
throw new ApiError({ code: codeForHttpStatus(response.status), message: "GET /api/TradePlatforms returned HTTP " + response.status }, null, response.status);
|
|
3627
|
+
}
|
|
3628
|
+
let payload;
|
|
3629
|
+
try {
|
|
3630
|
+
payload = await response.json();
|
|
3631
|
+
} catch (error) {
|
|
3632
|
+
if (signal.aborted)
|
|
3633
|
+
throw signal.reason ?? error;
|
|
3634
|
+
throw new ApiError({ code: "Internal", message: "GET /api/TradePlatforms returned malformed JSON" }, null, response.status);
|
|
3635
|
+
}
|
|
3636
|
+
if (!Array.isArray(payload)) {
|
|
3637
|
+
throw new ApiError({ code: "Internal", message: "GET /api/TradePlatforms returned an invalid payload" }, null, response.status);
|
|
3638
|
+
}
|
|
3639
|
+
return payload;
|
|
3640
|
+
});
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
// src/pagination.ts
|
|
3644
|
+
async function* paginate(fetchPage) {
|
|
3645
|
+
let cursor = undefined;
|
|
3646
|
+
while (true) {
|
|
3647
|
+
const page = await fetchPage(cursor);
|
|
3648
|
+
yield page.items;
|
|
3649
|
+
if (!page.paging?.hasMore)
|
|
3650
|
+
return;
|
|
3651
|
+
cursor = page.paging.nextCursor ?? undefined;
|
|
3652
|
+
if (!cursor)
|
|
3653
|
+
return;
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
async function collectAll(fetchPage) {
|
|
3657
|
+
const all = [];
|
|
3658
|
+
for await (const page of paginate(fetchPage))
|
|
3659
|
+
all.push(...page);
|
|
3660
|
+
return all;
|
|
3661
|
+
}
|
|
3662
|
+
export {
|
|
3663
|
+
resolveEnvironment,
|
|
3664
|
+
paginate,
|
|
3665
|
+
defaultPolicy,
|
|
3666
|
+
collectAll,
|
|
3667
|
+
StaticTokenProvider,
|
|
3668
|
+
OAuth2TokenError,
|
|
3669
|
+
MT5V2SignalRClient,
|
|
3670
|
+
MT4V2SignalRError,
|
|
3671
|
+
MT4V2SignalRClient,
|
|
3672
|
+
ClientCredentialsTokenProvider,
|
|
3673
|
+
CPluginWebApiClient,
|
|
3674
|
+
ApiError
|
|
3675
|
+
};
|