zklighter-perps 1.0.318 → 1.0.320
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/.openapi-generator/FILES +2 -0
- package/apis/StrategyApi.ts +251 -0
- package/apis/index.ts +1 -0
- package/models/NotificationPreferences.ts +27 -0
- package/models/RespCreateStrategyHeartbeat.ts +87 -0
- package/models/index.ts +1 -0
- package/openapi.json +215 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -21,6 +21,7 @@ apis/PushnotifApi.ts
|
|
|
21
21
|
apis/ReferralApi.ts
|
|
22
22
|
apis/RootApi.ts
|
|
23
23
|
apis/StockfinancialsApi.ts
|
|
24
|
+
apis/StrategyApi.ts
|
|
24
25
|
apis/TokenlistApi.ts
|
|
25
26
|
apis/TransactionApi.ts
|
|
26
27
|
apis/TvApi.ts
|
|
@@ -251,6 +252,7 @@ models/RespAtomicOrderList.ts
|
|
|
251
252
|
models/RespChangeAccountTier.ts
|
|
252
253
|
models/RespCreateEvent.ts
|
|
253
254
|
models/RespCreateRFQ.ts
|
|
255
|
+
models/RespCreateStrategyHeartbeat.ts
|
|
254
256
|
models/RespGaslessDeposit.ts
|
|
255
257
|
models/RespGetApiTokens.ts
|
|
256
258
|
models/RespGetBoPnL.ts
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
RespCreateStrategyHeartbeat,
|
|
19
|
+
ResultCode,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
RespCreateStrategyHeartbeatFromJSON,
|
|
23
|
+
RespCreateStrategyHeartbeatToJSON,
|
|
24
|
+
ResultCodeFromJSON,
|
|
25
|
+
ResultCodeToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface StrategyHeartbeatRequest {
|
|
29
|
+
account_index: number;
|
|
30
|
+
auth?: string;
|
|
31
|
+
strategy_type?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface StrategyHeartbeatFinishRequest {
|
|
35
|
+
account_index: number;
|
|
36
|
+
heartbeat_id: string;
|
|
37
|
+
auth?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface StrategyHeartbeatPingRequest {
|
|
41
|
+
account_index: number;
|
|
42
|
+
heartbeat_id: string;
|
|
43
|
+
auth?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export class StrategyApi extends runtime.BaseAPI {
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Start a strategy heartbeat session
|
|
53
|
+
* strategy_heartbeat
|
|
54
|
+
*/
|
|
55
|
+
async strategyHeartbeatRaw(requestParameters: StrategyHeartbeatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespCreateStrategyHeartbeat>> {
|
|
56
|
+
if (requestParameters['account_index'] == null) {
|
|
57
|
+
throw new runtime.RequiredError(
|
|
58
|
+
'account_index',
|
|
59
|
+
'Required parameter "account_index" was null or undefined when calling strategyHeartbeat().'
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const queryParameters: any = {};
|
|
64
|
+
|
|
65
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
66
|
+
|
|
67
|
+
const consumes: runtime.Consume[] = [
|
|
68
|
+
{ contentType: 'multipart/form-data' },
|
|
69
|
+
];
|
|
70
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
71
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
72
|
+
|
|
73
|
+
let formParams: { append(param: string, value: any): any };
|
|
74
|
+
let useForm = false;
|
|
75
|
+
if (useForm) {
|
|
76
|
+
formParams = new FormData();
|
|
77
|
+
} else {
|
|
78
|
+
formParams = new URLSearchParams();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (requestParameters['auth'] != null) {
|
|
82
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (requestParameters['account_index'] != null) {
|
|
86
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (requestParameters['strategy_type'] != null) {
|
|
90
|
+
formParams.append('strategy_type', requestParameters['strategy_type'] as any);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const response = await this.request({
|
|
94
|
+
path: `/api/v1/strategy/heartbeat`,
|
|
95
|
+
method: 'POST',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
body: formParams,
|
|
99
|
+
}, initOverrides);
|
|
100
|
+
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespCreateStrategyHeartbeatFromJSON(jsonValue));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Start a strategy heartbeat session
|
|
106
|
+
* strategy_heartbeat
|
|
107
|
+
*/
|
|
108
|
+
async strategyHeartbeat(requestParameters: StrategyHeartbeatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespCreateStrategyHeartbeat> {
|
|
109
|
+
const response = await this.strategyHeartbeatRaw(requestParameters, initOverrides);
|
|
110
|
+
return await response.value();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Finish a strategy heartbeat session
|
|
115
|
+
* strategy_heartbeat_finish
|
|
116
|
+
*/
|
|
117
|
+
async strategyHeartbeatFinishRaw(requestParameters: StrategyHeartbeatFinishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
118
|
+
if (requestParameters['account_index'] == null) {
|
|
119
|
+
throw new runtime.RequiredError(
|
|
120
|
+
'account_index',
|
|
121
|
+
'Required parameter "account_index" was null or undefined when calling strategyHeartbeatFinish().'
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (requestParameters['heartbeat_id'] == null) {
|
|
126
|
+
throw new runtime.RequiredError(
|
|
127
|
+
'heartbeat_id',
|
|
128
|
+
'Required parameter "heartbeat_id" was null or undefined when calling strategyHeartbeatFinish().'
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const queryParameters: any = {};
|
|
133
|
+
|
|
134
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
135
|
+
|
|
136
|
+
const consumes: runtime.Consume[] = [
|
|
137
|
+
{ contentType: 'multipart/form-data' },
|
|
138
|
+
];
|
|
139
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
140
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
141
|
+
|
|
142
|
+
let formParams: { append(param: string, value: any): any };
|
|
143
|
+
let useForm = false;
|
|
144
|
+
if (useForm) {
|
|
145
|
+
formParams = new FormData();
|
|
146
|
+
} else {
|
|
147
|
+
formParams = new URLSearchParams();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (requestParameters['auth'] != null) {
|
|
151
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (requestParameters['account_index'] != null) {
|
|
155
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (requestParameters['heartbeat_id'] != null) {
|
|
159
|
+
formParams.append('heartbeat_id', requestParameters['heartbeat_id'] as any);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const response = await this.request({
|
|
163
|
+
path: `/api/v1/strategy/heartbeat/finish`,
|
|
164
|
+
method: 'POST',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
body: formParams,
|
|
168
|
+
}, initOverrides);
|
|
169
|
+
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Finish a strategy heartbeat session
|
|
175
|
+
* strategy_heartbeat_finish
|
|
176
|
+
*/
|
|
177
|
+
async strategyHeartbeatFinish(requestParameters: StrategyHeartbeatFinishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
178
|
+
const response = await this.strategyHeartbeatFinishRaw(requestParameters, initOverrides);
|
|
179
|
+
return await response.value();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Keep a strategy heartbeat session alive
|
|
184
|
+
* strategy_heartbeat_ping
|
|
185
|
+
*/
|
|
186
|
+
async strategyHeartbeatPingRaw(requestParameters: StrategyHeartbeatPingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
187
|
+
if (requestParameters['account_index'] == null) {
|
|
188
|
+
throw new runtime.RequiredError(
|
|
189
|
+
'account_index',
|
|
190
|
+
'Required parameter "account_index" was null or undefined when calling strategyHeartbeatPing().'
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (requestParameters['heartbeat_id'] == null) {
|
|
195
|
+
throw new runtime.RequiredError(
|
|
196
|
+
'heartbeat_id',
|
|
197
|
+
'Required parameter "heartbeat_id" was null or undefined when calling strategyHeartbeatPing().'
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const queryParameters: any = {};
|
|
202
|
+
|
|
203
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
|
+
|
|
205
|
+
const consumes: runtime.Consume[] = [
|
|
206
|
+
{ contentType: 'multipart/form-data' },
|
|
207
|
+
];
|
|
208
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
209
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
210
|
+
|
|
211
|
+
let formParams: { append(param: string, value: any): any };
|
|
212
|
+
let useForm = false;
|
|
213
|
+
if (useForm) {
|
|
214
|
+
formParams = new FormData();
|
|
215
|
+
} else {
|
|
216
|
+
formParams = new URLSearchParams();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (requestParameters['auth'] != null) {
|
|
220
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (requestParameters['account_index'] != null) {
|
|
224
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (requestParameters['heartbeat_id'] != null) {
|
|
228
|
+
formParams.append('heartbeat_id', requestParameters['heartbeat_id'] as any);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const response = await this.request({
|
|
232
|
+
path: `/api/v1/strategy/heartbeat/ping`,
|
|
233
|
+
method: 'POST',
|
|
234
|
+
headers: headerParameters,
|
|
235
|
+
query: queryParameters,
|
|
236
|
+
body: formParams,
|
|
237
|
+
}, initOverrides);
|
|
238
|
+
|
|
239
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Keep a strategy heartbeat session alive
|
|
244
|
+
* strategy_heartbeat_ping
|
|
245
|
+
*/
|
|
246
|
+
async strategyHeartbeatPing(requestParameters: StrategyHeartbeatPingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
247
|
+
const response = await this.strategyHeartbeatPingRaw(requestParameters, initOverrides);
|
|
248
|
+
return await response.value();
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
}
|
package/apis/index.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './PushnotifApi';
|
|
|
23
23
|
export * from './ReferralApi';
|
|
24
24
|
export * from './RootApi';
|
|
25
25
|
export * from './StockfinancialsApi';
|
|
26
|
+
export * from './StrategyApi';
|
|
26
27
|
export * from './TokenlistApi';
|
|
27
28
|
export * from './TransactionApi';
|
|
28
29
|
export * from './TvApi';
|
|
@@ -55,6 +55,24 @@ export interface NotificationPreferences {
|
|
|
55
55
|
* @memberof NotificationPreferences
|
|
56
56
|
*/
|
|
57
57
|
cashflow_enabled: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof NotificationPreferences
|
|
62
|
+
*/
|
|
63
|
+
api_key_change_enabled: boolean;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof NotificationPreferences
|
|
68
|
+
*/
|
|
69
|
+
strategy_interrupted_enabled: boolean;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
* @memberof NotificationPreferences
|
|
74
|
+
*/
|
|
75
|
+
strategy_finished_enabled: boolean;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
/**
|
|
@@ -67,6 +85,9 @@ export function instanceOfNotificationPreferences(value: object): value is Notif
|
|
|
67
85
|
if (!('price_alerts_enabled' in value) || value['price_alerts_enabled'] === undefined) return false;
|
|
68
86
|
if (!('order_filled_enabled' in value) || value['order_filled_enabled'] === undefined) return false;
|
|
69
87
|
if (!('cashflow_enabled' in value) || value['cashflow_enabled'] === undefined) return false;
|
|
88
|
+
if (!('api_key_change_enabled' in value) || value['api_key_change_enabled'] === undefined) return false;
|
|
89
|
+
if (!('strategy_interrupted_enabled' in value) || value['strategy_interrupted_enabled'] === undefined) return false;
|
|
90
|
+
if (!('strategy_finished_enabled' in value) || value['strategy_finished_enabled'] === undefined) return false;
|
|
70
91
|
return true;
|
|
71
92
|
}
|
|
72
93
|
|
|
@@ -86,6 +107,9 @@ export function NotificationPreferencesFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
86
107
|
'price_alerts_enabled': json['price_alerts_enabled'],
|
|
87
108
|
'order_filled_enabled': json['order_filled_enabled'],
|
|
88
109
|
'cashflow_enabled': json['cashflow_enabled'],
|
|
110
|
+
'api_key_change_enabled': json['api_key_change_enabled'],
|
|
111
|
+
'strategy_interrupted_enabled': json['strategy_interrupted_enabled'],
|
|
112
|
+
'strategy_finished_enabled': json['strategy_finished_enabled'],
|
|
89
113
|
};
|
|
90
114
|
}
|
|
91
115
|
|
|
@@ -101,6 +125,9 @@ export function NotificationPreferencesToJSON(value?: NotificationPreferences |
|
|
|
101
125
|
'price_alerts_enabled': value['price_alerts_enabled'],
|
|
102
126
|
'order_filled_enabled': value['order_filled_enabled'],
|
|
103
127
|
'cashflow_enabled': value['cashflow_enabled'],
|
|
128
|
+
'api_key_change_enabled': value['api_key_change_enabled'],
|
|
129
|
+
'strategy_interrupted_enabled': value['strategy_interrupted_enabled'],
|
|
130
|
+
'strategy_finished_enabled': value['strategy_finished_enabled'],
|
|
104
131
|
};
|
|
105
132
|
}
|
|
106
133
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RespCreateStrategyHeartbeat
|
|
20
|
+
*/
|
|
21
|
+
export interface RespCreateStrategyHeartbeat {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespCreateStrategyHeartbeat
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RespCreateStrategyHeartbeat
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof RespCreateStrategyHeartbeat
|
|
38
|
+
*/
|
|
39
|
+
heartbeat_id: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof RespCreateStrategyHeartbeat
|
|
44
|
+
*/
|
|
45
|
+
ping_interval_sec: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the RespCreateStrategyHeartbeat interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfRespCreateStrategyHeartbeat(value: object): value is RespCreateStrategyHeartbeat {
|
|
52
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
53
|
+
if (!('heartbeat_id' in value) || value['heartbeat_id'] === undefined) return false;
|
|
54
|
+
if (!('ping_interval_sec' in value) || value['ping_interval_sec'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function RespCreateStrategyHeartbeatFromJSON(json: any): RespCreateStrategyHeartbeat {
|
|
59
|
+
return RespCreateStrategyHeartbeatFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RespCreateStrategyHeartbeatFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespCreateStrategyHeartbeat {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'heartbeat_id': json['heartbeat_id'],
|
|
71
|
+
'ping_interval_sec': json['ping_interval_sec'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function RespCreateStrategyHeartbeatToJSON(value?: RespCreateStrategyHeartbeat | null): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'code': value['code'],
|
|
82
|
+
'message': value['message'],
|
|
83
|
+
'heartbeat_id': value['heartbeat_id'],
|
|
84
|
+
'ping_interval_sec': value['ping_interval_sec'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
package/models/index.ts
CHANGED
|
@@ -224,6 +224,7 @@ export * from './RespAtomicOrderList';
|
|
|
224
224
|
export * from './RespChangeAccountTier';
|
|
225
225
|
export * from './RespCreateEvent';
|
|
226
226
|
export * from './RespCreateRFQ';
|
|
227
|
+
export * from './RespCreateStrategyHeartbeat';
|
|
227
228
|
export * from './RespGaslessDeposit';
|
|
228
229
|
export * from './RespGetApiTokens';
|
|
229
230
|
export * from './RespGetBoPnL';
|
package/openapi.json
CHANGED
|
@@ -6142,6 +6142,117 @@
|
|
|
6142
6142
|
"description": "Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings, next_dividend; omit it to get the full record, which requires market_id."
|
|
6143
6143
|
}
|
|
6144
6144
|
},
|
|
6145
|
+
"/api/v1/strategy/heartbeat": {
|
|
6146
|
+
"post": {
|
|
6147
|
+
"summary": "strategy_heartbeat",
|
|
6148
|
+
"operationId": "strategy_heartbeat",
|
|
6149
|
+
"responses": {
|
|
6150
|
+
"200": {
|
|
6151
|
+
"description": "A successful response.",
|
|
6152
|
+
"schema": {
|
|
6153
|
+
"$ref": "#/definitions/RespCreateStrategyHeartbeat"
|
|
6154
|
+
}
|
|
6155
|
+
},
|
|
6156
|
+
"400": {
|
|
6157
|
+
"description": "Bad request",
|
|
6158
|
+
"schema": {
|
|
6159
|
+
"$ref": "#/definitions/ResultCode"
|
|
6160
|
+
}
|
|
6161
|
+
}
|
|
6162
|
+
},
|
|
6163
|
+
"parameters": [
|
|
6164
|
+
{
|
|
6165
|
+
"name": "body",
|
|
6166
|
+
"in": "body",
|
|
6167
|
+
"required": true,
|
|
6168
|
+
"schema": {
|
|
6169
|
+
"$ref": "#/definitions/ReqCreateStrategyHeartbeat"
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
],
|
|
6173
|
+
"tags": [
|
|
6174
|
+
"strategy"
|
|
6175
|
+
],
|
|
6176
|
+
"consumes": [
|
|
6177
|
+
"multipart/form-data"
|
|
6178
|
+
],
|
|
6179
|
+
"description": "Start a strategy heartbeat session"
|
|
6180
|
+
}
|
|
6181
|
+
},
|
|
6182
|
+
"/api/v1/strategy/heartbeat/finish": {
|
|
6183
|
+
"post": {
|
|
6184
|
+
"summary": "strategy_heartbeat_finish",
|
|
6185
|
+
"operationId": "strategy_heartbeat_finish",
|
|
6186
|
+
"responses": {
|
|
6187
|
+
"200": {
|
|
6188
|
+
"description": "A successful response.",
|
|
6189
|
+
"schema": {
|
|
6190
|
+
"$ref": "#/definitions/ResultCode"
|
|
6191
|
+
}
|
|
6192
|
+
},
|
|
6193
|
+
"400": {
|
|
6194
|
+
"description": "Bad request",
|
|
6195
|
+
"schema": {
|
|
6196
|
+
"$ref": "#/definitions/ResultCode"
|
|
6197
|
+
}
|
|
6198
|
+
}
|
|
6199
|
+
},
|
|
6200
|
+
"parameters": [
|
|
6201
|
+
{
|
|
6202
|
+
"name": "body",
|
|
6203
|
+
"in": "body",
|
|
6204
|
+
"required": true,
|
|
6205
|
+
"schema": {
|
|
6206
|
+
"$ref": "#/definitions/ReqFinishStrategyHeartbeat"
|
|
6207
|
+
}
|
|
6208
|
+
}
|
|
6209
|
+
],
|
|
6210
|
+
"tags": [
|
|
6211
|
+
"strategy"
|
|
6212
|
+
],
|
|
6213
|
+
"consumes": [
|
|
6214
|
+
"multipart/form-data"
|
|
6215
|
+
],
|
|
6216
|
+
"description": "Finish a strategy heartbeat session"
|
|
6217
|
+
}
|
|
6218
|
+
},
|
|
6219
|
+
"/api/v1/strategy/heartbeat/ping": {
|
|
6220
|
+
"post": {
|
|
6221
|
+
"summary": "strategy_heartbeat_ping",
|
|
6222
|
+
"operationId": "strategy_heartbeat_ping",
|
|
6223
|
+
"responses": {
|
|
6224
|
+
"200": {
|
|
6225
|
+
"description": "A successful response.",
|
|
6226
|
+
"schema": {
|
|
6227
|
+
"$ref": "#/definitions/ResultCode"
|
|
6228
|
+
}
|
|
6229
|
+
},
|
|
6230
|
+
"400": {
|
|
6231
|
+
"description": "Bad request",
|
|
6232
|
+
"schema": {
|
|
6233
|
+
"$ref": "#/definitions/ResultCode"
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
},
|
|
6237
|
+
"parameters": [
|
|
6238
|
+
{
|
|
6239
|
+
"name": "body",
|
|
6240
|
+
"in": "body",
|
|
6241
|
+
"required": true,
|
|
6242
|
+
"schema": {
|
|
6243
|
+
"$ref": "#/definitions/ReqPingStrategyHeartbeat"
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
6246
|
+
],
|
|
6247
|
+
"tags": [
|
|
6248
|
+
"strategy"
|
|
6249
|
+
],
|
|
6250
|
+
"consumes": [
|
|
6251
|
+
"multipart/form-data"
|
|
6252
|
+
],
|
|
6253
|
+
"description": "Keep a strategy heartbeat session alive"
|
|
6254
|
+
}
|
|
6255
|
+
},
|
|
6145
6256
|
"/api/v1/syntheticSpotInfo": {
|
|
6146
6257
|
"get": {
|
|
6147
6258
|
"summary": "syntheticSpotInfo",
|
|
@@ -11780,6 +11891,18 @@
|
|
|
11780
11891
|
"cashflow_enabled": {
|
|
11781
11892
|
"type": "boolean",
|
|
11782
11893
|
"format": "boolean"
|
|
11894
|
+
},
|
|
11895
|
+
"api_key_change_enabled": {
|
|
11896
|
+
"type": "boolean",
|
|
11897
|
+
"format": "boolean"
|
|
11898
|
+
},
|
|
11899
|
+
"strategy_interrupted_enabled": {
|
|
11900
|
+
"type": "boolean",
|
|
11901
|
+
"format": "boolean"
|
|
11902
|
+
},
|
|
11903
|
+
"strategy_finished_enabled": {
|
|
11904
|
+
"type": "boolean",
|
|
11905
|
+
"format": "boolean"
|
|
11783
11906
|
}
|
|
11784
11907
|
},
|
|
11785
11908
|
"title": "NotificationPreferences",
|
|
@@ -11789,7 +11912,10 @@
|
|
|
11789
11912
|
"private_announcements_enabled",
|
|
11790
11913
|
"price_alerts_enabled",
|
|
11791
11914
|
"order_filled_enabled",
|
|
11792
|
-
"cashflow_enabled"
|
|
11915
|
+
"cashflow_enabled",
|
|
11916
|
+
"api_key_change_enabled",
|
|
11917
|
+
"strategy_interrupted_enabled",
|
|
11918
|
+
"strategy_finished_enabled"
|
|
11793
11919
|
]
|
|
11794
11920
|
},
|
|
11795
11921
|
"Order": {
|
|
@@ -14615,6 +14741,26 @@
|
|
|
14615
14741
|
"account_index"
|
|
14616
14742
|
]
|
|
14617
14743
|
},
|
|
14744
|
+
"ReqCreateStrategyHeartbeat": {
|
|
14745
|
+
"type": "object",
|
|
14746
|
+
"properties": {
|
|
14747
|
+
"auth": {
|
|
14748
|
+
"type": "string",
|
|
14749
|
+
"description": " made optional to support header auth clients"
|
|
14750
|
+
},
|
|
14751
|
+
"account_index": {
|
|
14752
|
+
"type": "integer",
|
|
14753
|
+
"format": "int64"
|
|
14754
|
+
},
|
|
14755
|
+
"strategy_type": {
|
|
14756
|
+
"type": "string"
|
|
14757
|
+
}
|
|
14758
|
+
},
|
|
14759
|
+
"title": "ReqCreateStrategyHeartbeat",
|
|
14760
|
+
"required": [
|
|
14761
|
+
"account_index"
|
|
14762
|
+
]
|
|
14763
|
+
},
|
|
14618
14764
|
"ReqDeleteAtomicOrder": {
|
|
14619
14765
|
"type": "object",
|
|
14620
14766
|
"properties": {
|
|
@@ -14767,6 +14913,27 @@
|
|
|
14767
14913
|
"to_address"
|
|
14768
14914
|
]
|
|
14769
14915
|
},
|
|
14916
|
+
"ReqFinishStrategyHeartbeat": {
|
|
14917
|
+
"type": "object",
|
|
14918
|
+
"properties": {
|
|
14919
|
+
"auth": {
|
|
14920
|
+
"type": "string",
|
|
14921
|
+
"description": " made optional to support header auth clients"
|
|
14922
|
+
},
|
|
14923
|
+
"account_index": {
|
|
14924
|
+
"type": "integer",
|
|
14925
|
+
"format": "int64"
|
|
14926
|
+
},
|
|
14927
|
+
"heartbeat_id": {
|
|
14928
|
+
"type": "string"
|
|
14929
|
+
}
|
|
14930
|
+
},
|
|
14931
|
+
"title": "ReqFinishStrategyHeartbeat",
|
|
14932
|
+
"required": [
|
|
14933
|
+
"account_index",
|
|
14934
|
+
"heartbeat_id"
|
|
14935
|
+
]
|
|
14936
|
+
},
|
|
14770
14937
|
"ReqGaslessDeposit": {
|
|
14771
14938
|
"type": "object",
|
|
14772
14939
|
"properties": {
|
|
@@ -16876,6 +17043,27 @@
|
|
|
16876
17043
|
},
|
|
16877
17044
|
"title": "ReqListRFQs"
|
|
16878
17045
|
},
|
|
17046
|
+
"ReqPingStrategyHeartbeat": {
|
|
17047
|
+
"type": "object",
|
|
17048
|
+
"properties": {
|
|
17049
|
+
"auth": {
|
|
17050
|
+
"type": "string",
|
|
17051
|
+
"description": " made optional to support header auth clients"
|
|
17052
|
+
},
|
|
17053
|
+
"account_index": {
|
|
17054
|
+
"type": "integer",
|
|
17055
|
+
"format": "int64"
|
|
17056
|
+
},
|
|
17057
|
+
"heartbeat_id": {
|
|
17058
|
+
"type": "string"
|
|
17059
|
+
}
|
|
17060
|
+
},
|
|
17061
|
+
"title": "ReqPingStrategyHeartbeat",
|
|
17062
|
+
"required": [
|
|
17063
|
+
"account_index",
|
|
17064
|
+
"heartbeat_id"
|
|
17065
|
+
]
|
|
17066
|
+
},
|
|
16879
17067
|
"ReqPostApiToken": {
|
|
16880
17068
|
"type": "object",
|
|
16881
17069
|
"properties": {
|
|
@@ -17659,6 +17847,32 @@
|
|
|
17659
17847
|
"updated_at"
|
|
17660
17848
|
]
|
|
17661
17849
|
},
|
|
17850
|
+
"RespCreateStrategyHeartbeat": {
|
|
17851
|
+
"type": "object",
|
|
17852
|
+
"properties": {
|
|
17853
|
+
"code": {
|
|
17854
|
+
"type": "integer",
|
|
17855
|
+
"format": "int32",
|
|
17856
|
+
"example": "200"
|
|
17857
|
+
},
|
|
17858
|
+
"message": {
|
|
17859
|
+
"type": "string"
|
|
17860
|
+
},
|
|
17861
|
+
"heartbeat_id": {
|
|
17862
|
+
"type": "string"
|
|
17863
|
+
},
|
|
17864
|
+
"ping_interval_sec": {
|
|
17865
|
+
"type": "integer",
|
|
17866
|
+
"format": "int64"
|
|
17867
|
+
}
|
|
17868
|
+
},
|
|
17869
|
+
"title": "RespCreateStrategyHeartbeat",
|
|
17870
|
+
"required": [
|
|
17871
|
+
"code",
|
|
17872
|
+
"heartbeat_id",
|
|
17873
|
+
"ping_interval_sec"
|
|
17874
|
+
]
|
|
17875
|
+
},
|
|
17662
17876
|
"RespGaslessDeposit": {
|
|
17663
17877
|
"type": "object",
|
|
17664
17878
|
"properties": {
|