zklighter-perps 1.0.319 → 1.0.321
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 +18 -0
- package/models/PriceOraclePrice.ts +9 -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';
|
|
@@ -61,6 +61,18 @@ export interface NotificationPreferences {
|
|
|
61
61
|
* @memberof NotificationPreferences
|
|
62
62
|
*/
|
|
63
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;
|
|
64
76
|
}
|
|
65
77
|
|
|
66
78
|
/**
|
|
@@ -74,6 +86,8 @@ export function instanceOfNotificationPreferences(value: object): value is Notif
|
|
|
74
86
|
if (!('order_filled_enabled' in value) || value['order_filled_enabled'] === undefined) return false;
|
|
75
87
|
if (!('cashflow_enabled' in value) || value['cashflow_enabled'] === undefined) return false;
|
|
76
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;
|
|
77
91
|
return true;
|
|
78
92
|
}
|
|
79
93
|
|
|
@@ -94,6 +108,8 @@ export function NotificationPreferencesFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
94
108
|
'order_filled_enabled': json['order_filled_enabled'],
|
|
95
109
|
'cashflow_enabled': json['cashflow_enabled'],
|
|
96
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'],
|
|
97
113
|
};
|
|
98
114
|
}
|
|
99
115
|
|
|
@@ -110,6 +126,8 @@ export function NotificationPreferencesToJSON(value?: NotificationPreferences |
|
|
|
110
126
|
'order_filled_enabled': value['order_filled_enabled'],
|
|
111
127
|
'cashflow_enabled': value['cashflow_enabled'],
|
|
112
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'],
|
|
113
131
|
};
|
|
114
132
|
}
|
|
115
133
|
|
|
@@ -43,6 +43,12 @@ export interface PriceOraclePrice {
|
|
|
43
43
|
* @memberof PriceOraclePrice
|
|
44
44
|
*/
|
|
45
45
|
median_sources: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
* what feeds a proxy source, e.g. "0.60 * pythlazer BRENTZ6 + 0.40 * pythlazer BRENTF7" for rolling
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof PriceOraclePrice
|
|
50
|
+
*/
|
|
51
|
+
underlying: string;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {number}
|
|
@@ -65,6 +71,7 @@ export function instanceOfPriceOraclePrice(value: object): value is PriceOracleP
|
|
|
65
71
|
if (!('using_median' in value) || value['using_median'] === undefined) return false;
|
|
66
72
|
if (!('using_internal_price' in value) || value['using_internal_price'] === undefined) return false;
|
|
67
73
|
if (!('median_sources' in value) || value['median_sources'] === undefined) return false;
|
|
74
|
+
if (!('underlying' in value) || value['underlying'] === undefined) return false;
|
|
68
75
|
if (!('price_cap_bps' in value) || value['price_cap_bps'] === undefined) return false;
|
|
69
76
|
if (!('price_cap_reference_price' in value) || value['price_cap_reference_price'] === undefined) return false;
|
|
70
77
|
return true;
|
|
@@ -84,6 +91,7 @@ export function PriceOraclePriceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
84
91
|
'using_median': json['using_median'],
|
|
85
92
|
'using_internal_price': json['using_internal_price'],
|
|
86
93
|
'median_sources': json['median_sources'],
|
|
94
|
+
'underlying': json['underlying'],
|
|
87
95
|
'price_cap_bps': json['price_cap_bps'],
|
|
88
96
|
'price_cap_reference_price': json['price_cap_reference_price'],
|
|
89
97
|
};
|
|
@@ -99,6 +107,7 @@ export function PriceOraclePriceToJSON(value?: PriceOraclePrice | null): any {
|
|
|
99
107
|
'using_median': value['using_median'],
|
|
100
108
|
'using_internal_price': value['using_internal_price'],
|
|
101
109
|
'median_sources': value['median_sources'],
|
|
110
|
+
'underlying': value['underlying'],
|
|
102
111
|
'price_cap_bps': value['price_cap_bps'],
|
|
103
112
|
'price_cap_reference_price': value['price_cap_reference_price'],
|
|
104
113
|
};
|
|
@@ -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",
|
|
@@ -11784,6 +11895,14 @@
|
|
|
11784
11895
|
"api_key_change_enabled": {
|
|
11785
11896
|
"type": "boolean",
|
|
11786
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"
|
|
11787
11906
|
}
|
|
11788
11907
|
},
|
|
11789
11908
|
"title": "NotificationPreferences",
|
|
@@ -11794,7 +11913,9 @@
|
|
|
11794
11913
|
"price_alerts_enabled",
|
|
11795
11914
|
"order_filled_enabled",
|
|
11796
11915
|
"cashflow_enabled",
|
|
11797
|
-
"api_key_change_enabled"
|
|
11916
|
+
"api_key_change_enabled",
|
|
11917
|
+
"strategy_interrupted_enabled",
|
|
11918
|
+
"strategy_finished_enabled"
|
|
11798
11919
|
]
|
|
11799
11920
|
},
|
|
11800
11921
|
"Order": {
|
|
@@ -13649,6 +13770,10 @@
|
|
|
13649
13770
|
"type": "string"
|
|
13650
13771
|
}
|
|
13651
13772
|
},
|
|
13773
|
+
"underlying": {
|
|
13774
|
+
"type": "string",
|
|
13775
|
+
"description": " what feeds a proxy source, e.g. \"0.60 * pythlazer BRENTZ6 + 0.40 * pythlazer BRENTF7\" for rolling"
|
|
13776
|
+
},
|
|
13652
13777
|
"price_cap_bps": {
|
|
13653
13778
|
"type": "number",
|
|
13654
13779
|
"format": "double"
|
|
@@ -13665,6 +13790,7 @@
|
|
|
13665
13790
|
"using_median",
|
|
13666
13791
|
"using_internal_price",
|
|
13667
13792
|
"median_sources",
|
|
13793
|
+
"underlying",
|
|
13668
13794
|
"price_cap_bps",
|
|
13669
13795
|
"price_cap_reference_price"
|
|
13670
13796
|
]
|
|
@@ -14620,6 +14746,26 @@
|
|
|
14620
14746
|
"account_index"
|
|
14621
14747
|
]
|
|
14622
14748
|
},
|
|
14749
|
+
"ReqCreateStrategyHeartbeat": {
|
|
14750
|
+
"type": "object",
|
|
14751
|
+
"properties": {
|
|
14752
|
+
"auth": {
|
|
14753
|
+
"type": "string",
|
|
14754
|
+
"description": " made optional to support header auth clients"
|
|
14755
|
+
},
|
|
14756
|
+
"account_index": {
|
|
14757
|
+
"type": "integer",
|
|
14758
|
+
"format": "int64"
|
|
14759
|
+
},
|
|
14760
|
+
"strategy_type": {
|
|
14761
|
+
"type": "string"
|
|
14762
|
+
}
|
|
14763
|
+
},
|
|
14764
|
+
"title": "ReqCreateStrategyHeartbeat",
|
|
14765
|
+
"required": [
|
|
14766
|
+
"account_index"
|
|
14767
|
+
]
|
|
14768
|
+
},
|
|
14623
14769
|
"ReqDeleteAtomicOrder": {
|
|
14624
14770
|
"type": "object",
|
|
14625
14771
|
"properties": {
|
|
@@ -14772,6 +14918,27 @@
|
|
|
14772
14918
|
"to_address"
|
|
14773
14919
|
]
|
|
14774
14920
|
},
|
|
14921
|
+
"ReqFinishStrategyHeartbeat": {
|
|
14922
|
+
"type": "object",
|
|
14923
|
+
"properties": {
|
|
14924
|
+
"auth": {
|
|
14925
|
+
"type": "string",
|
|
14926
|
+
"description": " made optional to support header auth clients"
|
|
14927
|
+
},
|
|
14928
|
+
"account_index": {
|
|
14929
|
+
"type": "integer",
|
|
14930
|
+
"format": "int64"
|
|
14931
|
+
},
|
|
14932
|
+
"heartbeat_id": {
|
|
14933
|
+
"type": "string"
|
|
14934
|
+
}
|
|
14935
|
+
},
|
|
14936
|
+
"title": "ReqFinishStrategyHeartbeat",
|
|
14937
|
+
"required": [
|
|
14938
|
+
"account_index",
|
|
14939
|
+
"heartbeat_id"
|
|
14940
|
+
]
|
|
14941
|
+
},
|
|
14775
14942
|
"ReqGaslessDeposit": {
|
|
14776
14943
|
"type": "object",
|
|
14777
14944
|
"properties": {
|
|
@@ -16881,6 +17048,27 @@
|
|
|
16881
17048
|
},
|
|
16882
17049
|
"title": "ReqListRFQs"
|
|
16883
17050
|
},
|
|
17051
|
+
"ReqPingStrategyHeartbeat": {
|
|
17052
|
+
"type": "object",
|
|
17053
|
+
"properties": {
|
|
17054
|
+
"auth": {
|
|
17055
|
+
"type": "string",
|
|
17056
|
+
"description": " made optional to support header auth clients"
|
|
17057
|
+
},
|
|
17058
|
+
"account_index": {
|
|
17059
|
+
"type": "integer",
|
|
17060
|
+
"format": "int64"
|
|
17061
|
+
},
|
|
17062
|
+
"heartbeat_id": {
|
|
17063
|
+
"type": "string"
|
|
17064
|
+
}
|
|
17065
|
+
},
|
|
17066
|
+
"title": "ReqPingStrategyHeartbeat",
|
|
17067
|
+
"required": [
|
|
17068
|
+
"account_index",
|
|
17069
|
+
"heartbeat_id"
|
|
17070
|
+
]
|
|
17071
|
+
},
|
|
16884
17072
|
"ReqPostApiToken": {
|
|
16885
17073
|
"type": "object",
|
|
16886
17074
|
"properties": {
|
|
@@ -17664,6 +17852,32 @@
|
|
|
17664
17852
|
"updated_at"
|
|
17665
17853
|
]
|
|
17666
17854
|
},
|
|
17855
|
+
"RespCreateStrategyHeartbeat": {
|
|
17856
|
+
"type": "object",
|
|
17857
|
+
"properties": {
|
|
17858
|
+
"code": {
|
|
17859
|
+
"type": "integer",
|
|
17860
|
+
"format": "int32",
|
|
17861
|
+
"example": "200"
|
|
17862
|
+
},
|
|
17863
|
+
"message": {
|
|
17864
|
+
"type": "string"
|
|
17865
|
+
},
|
|
17866
|
+
"heartbeat_id": {
|
|
17867
|
+
"type": "string"
|
|
17868
|
+
},
|
|
17869
|
+
"ping_interval_sec": {
|
|
17870
|
+
"type": "integer",
|
|
17871
|
+
"format": "int64"
|
|
17872
|
+
}
|
|
17873
|
+
},
|
|
17874
|
+
"title": "RespCreateStrategyHeartbeat",
|
|
17875
|
+
"required": [
|
|
17876
|
+
"code",
|
|
17877
|
+
"heartbeat_id",
|
|
17878
|
+
"ping_interval_sec"
|
|
17879
|
+
]
|
|
17880
|
+
},
|
|
17667
17881
|
"RespGaslessDeposit": {
|
|
17668
17882
|
"type": "object",
|
|
17669
17883
|
"properties": {
|