zklighter-perps 1.0.264 → 1.0.266
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 +0 -3
- package/apis/CandlestickApi.ts +0 -114
- package/apis/OrderApi.ts +5 -0
- package/models/AccountAsset.ts +1 -1
- package/models/AccountPosition.ts +9 -0
- package/models/Asset.ts +1 -1
- package/models/OrderBook.ts +1 -1
- package/models/PerpsOrderBookDetail.ts +10 -1
- package/models/ReqExportData.ts +8 -0
- package/models/RiskParameters.ts +9 -0
- package/models/SpotOrderBookDetail.ts +1 -1
- package/models/index.ts +0 -3
- package/openapi.json +29 -252
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -51,7 +51,6 @@ models/BridgeSupportedNetworks.ts
|
|
|
51
51
|
models/Candle.ts
|
|
52
52
|
models/Candles.ts
|
|
53
53
|
models/Candlestick.ts
|
|
54
|
-
models/Candlesticks.ts
|
|
55
54
|
models/ContractAddress.ts
|
|
56
55
|
models/CreateIntentAddressResp.ts
|
|
57
56
|
models/CurrentHeight.ts
|
|
@@ -63,7 +62,6 @@ models/DepositHistory.ts
|
|
|
63
62
|
models/DepositHistoryItem.ts
|
|
64
63
|
models/DetailedAccount.ts
|
|
65
64
|
models/DetailedAccounts.ts
|
|
66
|
-
models/DetailedCandlestick.ts
|
|
67
65
|
models/EnrichedTx.ts
|
|
68
66
|
models/ExchangeMetric.ts
|
|
69
67
|
models/ExchangeStats.ts
|
|
@@ -146,7 +144,6 @@ models/ReqGetBlockTxs.ts
|
|
|
146
144
|
models/ReqGetBridgesByL1Addr.ts
|
|
147
145
|
models/ReqGetByAccount.ts
|
|
148
146
|
models/ReqGetCandles.ts
|
|
149
|
-
models/ReqGetCandlesticks.ts
|
|
150
147
|
models/ReqGetDepositHistory.ts
|
|
151
148
|
models/ReqGetExchangeMetrics.ts
|
|
152
149
|
models/ReqGetExecuteStats.ts
|
package/apis/CandlestickApi.ts
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Candles,
|
|
19
|
-
Candlesticks,
|
|
20
19
|
Fundings,
|
|
21
20
|
MarkPriceCandles,
|
|
22
21
|
ResultCode,
|
|
@@ -24,8 +23,6 @@ import type {
|
|
|
24
23
|
import {
|
|
25
24
|
CandlesFromJSON,
|
|
26
25
|
CandlesToJSON,
|
|
27
|
-
CandlesticksFromJSON,
|
|
28
|
-
CandlesticksToJSON,
|
|
29
26
|
FundingsFromJSON,
|
|
30
27
|
FundingsToJSON,
|
|
31
28
|
MarkPriceCandlesFromJSON,
|
|
@@ -43,15 +40,6 @@ export interface CandlesRequest {
|
|
|
43
40
|
set_timestamp_to_end?: boolean;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
export interface CandlesticksRequest {
|
|
47
|
-
market_id: number;
|
|
48
|
-
resolution: CandlesticksResolutionEnum;
|
|
49
|
-
start_timestamp: number;
|
|
50
|
-
end_timestamp: number;
|
|
51
|
-
count_back: number;
|
|
52
|
-
set_timestamp_to_end?: boolean;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
43
|
export interface FundingsRequest {
|
|
56
44
|
market_id: number;
|
|
57
45
|
resolution: FundingsResolutionEnum;
|
|
@@ -160,93 +148,6 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
160
148
|
return await response.value();
|
|
161
149
|
}
|
|
162
150
|
|
|
163
|
-
/**
|
|
164
|
-
* Get candlesticks
|
|
165
|
-
* candlesticks
|
|
166
|
-
*/
|
|
167
|
-
async candlesticksRaw(requestParameters: CandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Candlesticks>> {
|
|
168
|
-
if (requestParameters['market_id'] == null) {
|
|
169
|
-
throw new runtime.RequiredError(
|
|
170
|
-
'market_id',
|
|
171
|
-
'Required parameter "market_id" was null or undefined when calling candlesticks().'
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (requestParameters['resolution'] == null) {
|
|
176
|
-
throw new runtime.RequiredError(
|
|
177
|
-
'resolution',
|
|
178
|
-
'Required parameter "resolution" was null or undefined when calling candlesticks().'
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (requestParameters['start_timestamp'] == null) {
|
|
183
|
-
throw new runtime.RequiredError(
|
|
184
|
-
'start_timestamp',
|
|
185
|
-
'Required parameter "start_timestamp" was null or undefined when calling candlesticks().'
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (requestParameters['end_timestamp'] == null) {
|
|
190
|
-
throw new runtime.RequiredError(
|
|
191
|
-
'end_timestamp',
|
|
192
|
-
'Required parameter "end_timestamp" was null or undefined when calling candlesticks().'
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (requestParameters['count_back'] == null) {
|
|
197
|
-
throw new runtime.RequiredError(
|
|
198
|
-
'count_back',
|
|
199
|
-
'Required parameter "count_back" was null or undefined when calling candlesticks().'
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const queryParameters: any = {};
|
|
204
|
-
|
|
205
|
-
if (requestParameters['market_id'] != null) {
|
|
206
|
-
queryParameters['market_id'] = requestParameters['market_id'];
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (requestParameters['resolution'] != null) {
|
|
210
|
-
queryParameters['resolution'] = requestParameters['resolution'];
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (requestParameters['start_timestamp'] != null) {
|
|
214
|
-
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (requestParameters['end_timestamp'] != null) {
|
|
218
|
-
queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (requestParameters['count_back'] != null) {
|
|
222
|
-
queryParameters['count_back'] = requestParameters['count_back'];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (requestParameters['set_timestamp_to_end'] != null) {
|
|
226
|
-
queryParameters['set_timestamp_to_end'] = requestParameters['set_timestamp_to_end'];
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
230
|
-
|
|
231
|
-
const response = await this.request({
|
|
232
|
-
path: `/api/v1/candlesticks`,
|
|
233
|
-
method: 'GET',
|
|
234
|
-
headers: headerParameters,
|
|
235
|
-
query: queryParameters,
|
|
236
|
-
}, initOverrides);
|
|
237
|
-
|
|
238
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => CandlesticksFromJSON(jsonValue));
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Get candlesticks
|
|
243
|
-
* candlesticks
|
|
244
|
-
*/
|
|
245
|
-
async candlesticks(requestParameters: CandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Candlesticks> {
|
|
246
|
-
const response = await this.candlesticksRaw(requestParameters, initOverrides);
|
|
247
|
-
return await response.value();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
151
|
/**
|
|
251
152
|
* Get fundings
|
|
252
153
|
* fundings
|
|
@@ -429,21 +330,6 @@ export const CandlesResolutionEnum = {
|
|
|
429
330
|
_1d: '1d'
|
|
430
331
|
} as const;
|
|
431
332
|
export type CandlesResolutionEnum = typeof CandlesResolutionEnum[keyof typeof CandlesResolutionEnum];
|
|
432
|
-
/**
|
|
433
|
-
* @export
|
|
434
|
-
*/
|
|
435
|
-
export const CandlesticksResolutionEnum = {
|
|
436
|
-
_1m: '1m',
|
|
437
|
-
_5m: '5m',
|
|
438
|
-
_15m: '15m',
|
|
439
|
-
_30m: '30m',
|
|
440
|
-
_1h: '1h',
|
|
441
|
-
_4h: '4h',
|
|
442
|
-
_12h: '12h',
|
|
443
|
-
_1d: '1d',
|
|
444
|
-
_1w: '1w'
|
|
445
|
-
} as const;
|
|
446
|
-
export type CandlesticksResolutionEnum = typeof CandlesticksResolutionEnum[keyof typeof CandlesticksResolutionEnum];
|
|
447
333
|
/**
|
|
448
334
|
* @export
|
|
449
335
|
*/
|
package/apis/OrderApi.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface ExportRequest {
|
|
|
61
61
|
auth?: string;
|
|
62
62
|
account_index?: number;
|
|
63
63
|
market_id?: number;
|
|
64
|
+
aggregate?: boolean;
|
|
64
65
|
start_timestamp?: number;
|
|
65
66
|
end_timestamp?: number;
|
|
66
67
|
side?: ExportSideEnum;
|
|
@@ -187,6 +188,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
187
188
|
queryParameters['type'] = requestParameters['type'];
|
|
188
189
|
}
|
|
189
190
|
|
|
191
|
+
if (requestParameters['aggregate'] != null) {
|
|
192
|
+
queryParameters['aggregate'] = requestParameters['aggregate'];
|
|
193
|
+
}
|
|
194
|
+
|
|
190
195
|
if (requestParameters['start_timestamp'] != null) {
|
|
191
196
|
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
192
197
|
}
|
package/models/AccountAsset.ts
CHANGED
|
@@ -109,6 +109,12 @@ export interface AccountPosition {
|
|
|
109
109
|
* @memberof AccountPosition
|
|
110
110
|
*/
|
|
111
111
|
margin_mode: number;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {number}
|
|
115
|
+
* @memberof AccountPosition
|
|
116
|
+
*/
|
|
117
|
+
margin_set_flag: number;
|
|
112
118
|
/**
|
|
113
119
|
*
|
|
114
120
|
* @type {string}
|
|
@@ -141,6 +147,7 @@ export function instanceOfAccountPosition(value: object): value is AccountPositi
|
|
|
141
147
|
if (!('realized_pnl' in value) || value['realized_pnl'] === undefined) return false;
|
|
142
148
|
if (!('liquidation_price' in value) || value['liquidation_price'] === undefined) return false;
|
|
143
149
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
150
|
+
if (!('margin_set_flag' in value) || value['margin_set_flag'] === undefined) return false;
|
|
144
151
|
if (!('allocated_margin' in value) || value['allocated_margin'] === undefined) return false;
|
|
145
152
|
if (!('total_discount' in value) || value['total_discount'] === undefined) return false;
|
|
146
153
|
return true;
|
|
@@ -171,6 +178,7 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
171
178
|
'liquidation_price': json['liquidation_price'],
|
|
172
179
|
'total_funding_paid_out': json['total_funding_paid_out'] == null ? undefined : json['total_funding_paid_out'],
|
|
173
180
|
'margin_mode': json['margin_mode'],
|
|
181
|
+
'margin_set_flag': json['margin_set_flag'],
|
|
174
182
|
'allocated_margin': json['allocated_margin'],
|
|
175
183
|
'total_discount': json['total_discount'],
|
|
176
184
|
};
|
|
@@ -197,6 +205,7 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
|
|
|
197
205
|
'liquidation_price': value['liquidation_price'],
|
|
198
206
|
'total_funding_paid_out': value['total_funding_paid_out'],
|
|
199
207
|
'margin_mode': value['margin_mode'],
|
|
208
|
+
'margin_set_flag': value['margin_set_flag'],
|
|
200
209
|
'allocated_margin': value['allocated_margin'],
|
|
201
210
|
'total_discount': value['total_discount'],
|
|
202
211
|
};
|
package/models/Asset.ts
CHANGED
package/models/OrderBook.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface PerpsOrderBookDetail {
|
|
|
135
135
|
*/
|
|
136
136
|
created_at: string;
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
*
|
|
139
139
|
* @type {string}
|
|
140
140
|
* @memberof PerpsOrderBookDetail
|
|
141
141
|
*/
|
|
@@ -260,6 +260,12 @@ export interface PerpsOrderBookDetail {
|
|
|
260
260
|
* @memberof PerpsOrderBookDetail
|
|
261
261
|
*/
|
|
262
262
|
strategy_index: number;
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @type {number}
|
|
266
|
+
* @memberof PerpsOrderBookDetail
|
|
267
|
+
*/
|
|
268
|
+
market_flags: number;
|
|
263
269
|
/**
|
|
264
270
|
*
|
|
265
271
|
* @type {string}
|
|
@@ -343,6 +349,7 @@ export function instanceOfPerpsOrderBookDetail(value: object): value is PerpsOrd
|
|
|
343
349
|
if (!('daily_chart' in value) || value['daily_chart'] === undefined) return false;
|
|
344
350
|
if (!('market_config' in value) || value['market_config'] === undefined) return false;
|
|
345
351
|
if (!('strategy_index' in value) || value['strategy_index'] === undefined) return false;
|
|
352
|
+
if (!('market_flags' in value) || value['market_flags'] === undefined) return false;
|
|
346
353
|
if (!('funding_clamp_small' in value) || value['funding_clamp_small'] === undefined) return false;
|
|
347
354
|
if (!('funding_clamp_big' in value) || value['funding_clamp_big'] === undefined) return false;
|
|
348
355
|
if (!('base_interest_rate' in value) || value['base_interest_rate'] === undefined) return false;
|
|
@@ -398,6 +405,7 @@ export function PerpsOrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
398
405
|
'daily_chart': json['daily_chart'],
|
|
399
406
|
'market_config': MarketConfigFromJSON(json['market_config']),
|
|
400
407
|
'strategy_index': json['strategy_index'],
|
|
408
|
+
'market_flags': json['market_flags'],
|
|
401
409
|
'funding_clamp_small': json['funding_clamp_small'],
|
|
402
410
|
'funding_clamp_big': json['funding_clamp_big'],
|
|
403
411
|
'base_interest_rate': json['base_interest_rate'],
|
|
@@ -449,6 +457,7 @@ export function PerpsOrderBookDetailToJSON(value?: PerpsOrderBookDetail | null):
|
|
|
449
457
|
'daily_chart': value['daily_chart'],
|
|
450
458
|
'market_config': MarketConfigToJSON(value['market_config']),
|
|
451
459
|
'strategy_index': value['strategy_index'],
|
|
460
|
+
'market_flags': value['market_flags'],
|
|
452
461
|
'funding_clamp_small': value['funding_clamp_small'],
|
|
453
462
|
'funding_clamp_big': value['funding_clamp_big'],
|
|
454
463
|
'base_interest_rate': value['base_interest_rate'],
|
package/models/ReqExportData.ts
CHANGED
|
@@ -43,6 +43,12 @@ export interface ReqExportData {
|
|
|
43
43
|
* @memberof ReqExportData
|
|
44
44
|
*/
|
|
45
45
|
type: ReqExportDataTypeEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof ReqExportData
|
|
50
|
+
*/
|
|
51
|
+
aggregate?: boolean;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {number}
|
|
@@ -140,6 +146,7 @@ export function ReqExportDataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
140
146
|
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
141
147
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
142
148
|
'type': json['type'],
|
|
149
|
+
'aggregate': json['aggregate'] == null ? undefined : json['aggregate'],
|
|
143
150
|
'start_timestamp': json['start_timestamp'] == null ? undefined : json['start_timestamp'],
|
|
144
151
|
'end_timestamp': json['end_timestamp'] == null ? undefined : json['end_timestamp'],
|
|
145
152
|
'side': json['side'] == null ? undefined : json['side'],
|
|
@@ -158,6 +165,7 @@ export function ReqExportDataToJSON(value?: ReqExportData | null): any {
|
|
|
158
165
|
'account_index': value['account_index'],
|
|
159
166
|
'market_id': value['market_id'],
|
|
160
167
|
'type': value['type'],
|
|
168
|
+
'aggregate': value['aggregate'],
|
|
161
169
|
'start_timestamp': value['start_timestamp'],
|
|
162
170
|
'end_timestamp': value['end_timestamp'],
|
|
163
171
|
'side': value['side'],
|
package/models/RiskParameters.ts
CHANGED
|
@@ -73,6 +73,12 @@ export interface RiskParameters {
|
|
|
73
73
|
* @memberof RiskParameters
|
|
74
74
|
*/
|
|
75
75
|
usdc_portfolio_value: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof RiskParameters
|
|
80
|
+
*/
|
|
81
|
+
total_portfolio_value: string;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
/**
|
|
@@ -88,6 +94,7 @@ export function instanceOfRiskParameters(value: object): value is RiskParameters
|
|
|
88
94
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
89
95
|
if (!('usdc_collateral_with_funding' in value) || value['usdc_collateral_with_funding'] === undefined) return false;
|
|
90
96
|
if (!('usdc_portfolio_value' in value) || value['usdc_portfolio_value'] === undefined) return false;
|
|
97
|
+
if (!('total_portfolio_value' in value) || value['total_portfolio_value'] === undefined) return false;
|
|
91
98
|
return true;
|
|
92
99
|
}
|
|
93
100
|
|
|
@@ -110,6 +117,7 @@ export function RiskParametersFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
110
117
|
'collateral': json['collateral'],
|
|
111
118
|
'usdc_collateral_with_funding': json['usdc_collateral_with_funding'],
|
|
112
119
|
'usdc_portfolio_value': json['usdc_portfolio_value'],
|
|
120
|
+
'total_portfolio_value': json['total_portfolio_value'],
|
|
113
121
|
};
|
|
114
122
|
}
|
|
115
123
|
|
|
@@ -128,6 +136,7 @@ export function RiskParametersToJSON(value?: RiskParameters | null): any {
|
|
|
128
136
|
'collateral': value['collateral'],
|
|
129
137
|
'usdc_collateral_with_funding': value['usdc_collateral_with_funding'],
|
|
130
138
|
'usdc_portfolio_value': value['usdc_portfolio_value'],
|
|
139
|
+
'total_portfolio_value': value['total_portfolio_value'],
|
|
131
140
|
};
|
|
132
141
|
}
|
|
133
142
|
|
package/models/index.ts
CHANGED
|
@@ -34,7 +34,6 @@ export * from './BridgeSupportedNetworks';
|
|
|
34
34
|
export * from './Candle';
|
|
35
35
|
export * from './Candles';
|
|
36
36
|
export * from './Candlestick';
|
|
37
|
-
export * from './Candlesticks';
|
|
38
37
|
export * from './ContractAddress';
|
|
39
38
|
export * from './CreateIntentAddressResp';
|
|
40
39
|
export * from './CurrentHeight';
|
|
@@ -46,7 +45,6 @@ export * from './DepositHistory';
|
|
|
46
45
|
export * from './DepositHistoryItem';
|
|
47
46
|
export * from './DetailedAccount';
|
|
48
47
|
export * from './DetailedAccounts';
|
|
49
|
-
export * from './DetailedCandlestick';
|
|
50
48
|
export * from './EnrichedTx';
|
|
51
49
|
export * from './ExchangeMetric';
|
|
52
50
|
export * from './ExchangeStats';
|
|
@@ -129,7 +127,6 @@ export * from './ReqGetBlockTxs';
|
|
|
129
127
|
export * from './ReqGetBridgesByL1Addr';
|
|
130
128
|
export * from './ReqGetByAccount';
|
|
131
129
|
export * from './ReqGetCandles';
|
|
132
|
-
export * from './ReqGetCandlesticks';
|
|
133
130
|
export * from './ReqGetDepositHistory';
|
|
134
131
|
export * from './ReqGetExchangeMetrics';
|
|
135
132
|
export * from './ReqGetExecuteStats';
|
package/openapi.json
CHANGED
|
@@ -1203,92 +1203,6 @@
|
|
|
1203
1203
|
"description": "Get candles (optimized with shortened fields and smaller response size)"
|
|
1204
1204
|
}
|
|
1205
1205
|
},
|
|
1206
|
-
"/api/v1/candlesticks": {
|
|
1207
|
-
"get": {
|
|
1208
|
-
"summary": "candlesticks",
|
|
1209
|
-
"operationId": "candlesticks",
|
|
1210
|
-
"responses": {
|
|
1211
|
-
"200": {
|
|
1212
|
-
"description": "A successful response.",
|
|
1213
|
-
"schema": {
|
|
1214
|
-
"$ref": "#/definitions/Candlesticks"
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
"400": {
|
|
1218
|
-
"description": "Bad request",
|
|
1219
|
-
"schema": {
|
|
1220
|
-
"$ref": "#/definitions/ResultCode"
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
},
|
|
1224
|
-
"parameters": [
|
|
1225
|
-
{
|
|
1226
|
-
"name": "market_id",
|
|
1227
|
-
"in": "query",
|
|
1228
|
-
"required": true,
|
|
1229
|
-
"type": "integer",
|
|
1230
|
-
"format": "int16"
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
"name": "resolution",
|
|
1234
|
-
"in": "query",
|
|
1235
|
-
"required": true,
|
|
1236
|
-
"type": "string",
|
|
1237
|
-
"enum": [
|
|
1238
|
-
"1m",
|
|
1239
|
-
"5m",
|
|
1240
|
-
"15m",
|
|
1241
|
-
"30m",
|
|
1242
|
-
"1h",
|
|
1243
|
-
"4h",
|
|
1244
|
-
"12h",
|
|
1245
|
-
"1d",
|
|
1246
|
-
"1w"
|
|
1247
|
-
]
|
|
1248
|
-
},
|
|
1249
|
-
{
|
|
1250
|
-
"name": "start_timestamp",
|
|
1251
|
-
"in": "query",
|
|
1252
|
-
"required": true,
|
|
1253
|
-
"type": "integer",
|
|
1254
|
-
"format": "int64",
|
|
1255
|
-
"minimum": 0,
|
|
1256
|
-
"maximum": 5000000000000
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
"name": "end_timestamp",
|
|
1260
|
-
"in": "query",
|
|
1261
|
-
"required": true,
|
|
1262
|
-
"type": "integer",
|
|
1263
|
-
"format": "int64",
|
|
1264
|
-
"minimum": 0,
|
|
1265
|
-
"maximum": 5000000000000
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
"name": "count_back",
|
|
1269
|
-
"in": "query",
|
|
1270
|
-
"required": true,
|
|
1271
|
-
"type": "integer",
|
|
1272
|
-
"format": "int64"
|
|
1273
|
-
},
|
|
1274
|
-
{
|
|
1275
|
-
"name": "set_timestamp_to_end",
|
|
1276
|
-
"in": "query",
|
|
1277
|
-
"required": false,
|
|
1278
|
-
"type": "boolean",
|
|
1279
|
-
"format": "boolean",
|
|
1280
|
-
"default": "false"
|
|
1281
|
-
}
|
|
1282
|
-
],
|
|
1283
|
-
"tags": [
|
|
1284
|
-
"candlestick"
|
|
1285
|
-
],
|
|
1286
|
-
"consumes": [
|
|
1287
|
-
"multipart/form-data"
|
|
1288
|
-
],
|
|
1289
|
-
"description": "Get candlesticks"
|
|
1290
|
-
}
|
|
1291
|
-
},
|
|
1292
1206
|
"/api/v1/changeAccountTier": {
|
|
1293
1207
|
"post": {
|
|
1294
1208
|
"summary": "changeAccountTier",
|
|
@@ -1841,6 +1755,14 @@
|
|
|
1841
1755
|
"trade"
|
|
1842
1756
|
]
|
|
1843
1757
|
},
|
|
1758
|
+
{
|
|
1759
|
+
"name": "aggregate",
|
|
1760
|
+
"in": "query",
|
|
1761
|
+
"required": false,
|
|
1762
|
+
"type": "boolean",
|
|
1763
|
+
"format": "boolean",
|
|
1764
|
+
"default": "false"
|
|
1765
|
+
},
|
|
1844
1766
|
{
|
|
1845
1767
|
"name": "start_timestamp",
|
|
1846
1768
|
"in": "query",
|
|
@@ -5702,6 +5624,11 @@
|
|
|
5702
5624
|
"format": "int32",
|
|
5703
5625
|
"example": "1"
|
|
5704
5626
|
},
|
|
5627
|
+
"margin_set_flag": {
|
|
5628
|
+
"type": "integer",
|
|
5629
|
+
"format": "int32",
|
|
5630
|
+
"example": "1"
|
|
5631
|
+
},
|
|
5705
5632
|
"allocated_margin": {
|
|
5706
5633
|
"type": "string",
|
|
5707
5634
|
"example": "46342"
|
|
@@ -5727,6 +5654,7 @@
|
|
|
5727
5654
|
"realized_pnl",
|
|
5728
5655
|
"liquidation_price",
|
|
5729
5656
|
"margin_mode",
|
|
5657
|
+
"margin_set_flag",
|
|
5730
5658
|
"allocated_margin",
|
|
5731
5659
|
"total_discount"
|
|
5732
5660
|
]
|
|
@@ -6751,35 +6679,6 @@
|
|
|
6751
6679
|
"trade_count"
|
|
6752
6680
|
]
|
|
6753
6681
|
},
|
|
6754
|
-
"Candlesticks": {
|
|
6755
|
-
"type": "object",
|
|
6756
|
-
"properties": {
|
|
6757
|
-
"code": {
|
|
6758
|
-
"type": "integer",
|
|
6759
|
-
"format": "int32",
|
|
6760
|
-
"example": "200"
|
|
6761
|
-
},
|
|
6762
|
-
"message": {
|
|
6763
|
-
"type": "string"
|
|
6764
|
-
},
|
|
6765
|
-
"resolution": {
|
|
6766
|
-
"type": "string",
|
|
6767
|
-
"example": "15m"
|
|
6768
|
-
},
|
|
6769
|
-
"candlesticks": {
|
|
6770
|
-
"type": "array",
|
|
6771
|
-
"items": {
|
|
6772
|
-
"$ref": "#/definitions/Candlestick"
|
|
6773
|
-
}
|
|
6774
|
-
}
|
|
6775
|
-
},
|
|
6776
|
-
"title": "Candlesticks",
|
|
6777
|
-
"required": [
|
|
6778
|
-
"code",
|
|
6779
|
-
"resolution",
|
|
6780
|
-
"candlesticks"
|
|
6781
|
-
]
|
|
6782
|
-
},
|
|
6783
6682
|
"ContractAddress": {
|
|
6784
6683
|
"type": "object",
|
|
6785
6684
|
"properties": {
|
|
@@ -7300,92 +7199,6 @@
|
|
|
7300
7199
|
"accounts"
|
|
7301
7200
|
]
|
|
7302
7201
|
},
|
|
7303
|
-
"DetailedCandlestick": {
|
|
7304
|
-
"type": "object",
|
|
7305
|
-
"properties": {
|
|
7306
|
-
"timestamp": {
|
|
7307
|
-
"type": "integer",
|
|
7308
|
-
"format": "int64",
|
|
7309
|
-
"example": "1640995200"
|
|
7310
|
-
},
|
|
7311
|
-
"open": {
|
|
7312
|
-
"type": "number",
|
|
7313
|
-
"format": "double",
|
|
7314
|
-
"example": "3024.66"
|
|
7315
|
-
},
|
|
7316
|
-
"high": {
|
|
7317
|
-
"type": "number",
|
|
7318
|
-
"format": "double",
|
|
7319
|
-
"example": "3034.66"
|
|
7320
|
-
},
|
|
7321
|
-
"low": {
|
|
7322
|
-
"type": "number",
|
|
7323
|
-
"format": "double",
|
|
7324
|
-
"example": "3014.66"
|
|
7325
|
-
},
|
|
7326
|
-
"close": {
|
|
7327
|
-
"type": "number",
|
|
7328
|
-
"format": "double",
|
|
7329
|
-
"example": "3024.66"
|
|
7330
|
-
},
|
|
7331
|
-
"open_raw": {
|
|
7332
|
-
"type": "number",
|
|
7333
|
-
"format": "double",
|
|
7334
|
-
"example": "3024.66"
|
|
7335
|
-
},
|
|
7336
|
-
"high_raw": {
|
|
7337
|
-
"type": "number",
|
|
7338
|
-
"format": "double",
|
|
7339
|
-
"example": "3034.66"
|
|
7340
|
-
},
|
|
7341
|
-
"low_raw": {
|
|
7342
|
-
"type": "number",
|
|
7343
|
-
"format": "double",
|
|
7344
|
-
"example": "3014.66"
|
|
7345
|
-
},
|
|
7346
|
-
"close_raw": {
|
|
7347
|
-
"type": "number",
|
|
7348
|
-
"format": "double",
|
|
7349
|
-
"example": "3024.66"
|
|
7350
|
-
},
|
|
7351
|
-
"volume0": {
|
|
7352
|
-
"type": "number",
|
|
7353
|
-
"format": "double",
|
|
7354
|
-
"example": "235.25"
|
|
7355
|
-
},
|
|
7356
|
-
"volume1": {
|
|
7357
|
-
"type": "number",
|
|
7358
|
-
"format": "double",
|
|
7359
|
-
"example": "93566.25"
|
|
7360
|
-
},
|
|
7361
|
-
"last_trade_id": {
|
|
7362
|
-
"type": "integer",
|
|
7363
|
-
"format": "int64",
|
|
7364
|
-
"example": "1"
|
|
7365
|
-
},
|
|
7366
|
-
"trade_count": {
|
|
7367
|
-
"type": "integer",
|
|
7368
|
-
"format": "int64",
|
|
7369
|
-
"example": "1503241"
|
|
7370
|
-
}
|
|
7371
|
-
},
|
|
7372
|
-
"title": "DetailedCandlestick",
|
|
7373
|
-
"required": [
|
|
7374
|
-
"timestamp",
|
|
7375
|
-
"open",
|
|
7376
|
-
"high",
|
|
7377
|
-
"low",
|
|
7378
|
-
"close",
|
|
7379
|
-
"open_raw",
|
|
7380
|
-
"high_raw",
|
|
7381
|
-
"low_raw",
|
|
7382
|
-
"close_raw",
|
|
7383
|
-
"volume0",
|
|
7384
|
-
"volume1",
|
|
7385
|
-
"last_trade_id",
|
|
7386
|
-
"trade_count"
|
|
7387
|
-
]
|
|
7388
|
-
},
|
|
7389
7202
|
"EnrichedTx": {
|
|
7390
7203
|
"type": "object",
|
|
7391
7204
|
"properties": {
|
|
@@ -9618,6 +9431,10 @@
|
|
|
9618
9431
|
"type": "integer",
|
|
9619
9432
|
"format": "uint8"
|
|
9620
9433
|
},
|
|
9434
|
+
"market_flags": {
|
|
9435
|
+
"type": "integer",
|
|
9436
|
+
"format": "int64"
|
|
9437
|
+
},
|
|
9621
9438
|
"funding_clamp_small": {
|
|
9622
9439
|
"type": "string",
|
|
9623
9440
|
"example": "0.005"
|
|
@@ -9672,6 +9489,7 @@
|
|
|
9672
9489
|
"daily_chart",
|
|
9673
9490
|
"market_config",
|
|
9674
9491
|
"strategy_index",
|
|
9492
|
+
"market_flags",
|
|
9675
9493
|
"funding_clamp_small",
|
|
9676
9494
|
"funding_clamp_big",
|
|
9677
9495
|
"base_interest_rate"
|
|
@@ -10666,6 +10484,11 @@
|
|
|
10666
10484
|
"trade"
|
|
10667
10485
|
]
|
|
10668
10486
|
},
|
|
10487
|
+
"aggregate": {
|
|
10488
|
+
"type": "boolean",
|
|
10489
|
+
"format": "boolean",
|
|
10490
|
+
"default": "false"
|
|
10491
|
+
},
|
|
10669
10492
|
"start_timestamp": {
|
|
10670
10493
|
"type": "integer",
|
|
10671
10494
|
"format": "int64",
|
|
@@ -11185,56 +11008,6 @@
|
|
|
11185
11008
|
"count_back"
|
|
11186
11009
|
]
|
|
11187
11010
|
},
|
|
11188
|
-
"ReqGetCandlesticks": {
|
|
11189
|
-
"type": "object",
|
|
11190
|
-
"properties": {
|
|
11191
|
-
"market_id": {
|
|
11192
|
-
"type": "integer",
|
|
11193
|
-
"format": "int16"
|
|
11194
|
-
},
|
|
11195
|
-
"resolution": {
|
|
11196
|
-
"type": "string",
|
|
11197
|
-
"enum": [
|
|
11198
|
-
"1m",
|
|
11199
|
-
"5m",
|
|
11200
|
-
"15m",
|
|
11201
|
-
"30m",
|
|
11202
|
-
"1h",
|
|
11203
|
-
"4h",
|
|
11204
|
-
"12h",
|
|
11205
|
-
"1d",
|
|
11206
|
-
"1w"
|
|
11207
|
-
]
|
|
11208
|
-
},
|
|
11209
|
-
"start_timestamp": {
|
|
11210
|
-
"type": "integer",
|
|
11211
|
-
"format": "int64",
|
|
11212
|
-
"maximum": 5000000000000
|
|
11213
|
-
},
|
|
11214
|
-
"end_timestamp": {
|
|
11215
|
-
"type": "integer",
|
|
11216
|
-
"format": "int64",
|
|
11217
|
-
"maximum": 5000000000000
|
|
11218
|
-
},
|
|
11219
|
-
"count_back": {
|
|
11220
|
-
"type": "integer",
|
|
11221
|
-
"format": "int64"
|
|
11222
|
-
},
|
|
11223
|
-
"set_timestamp_to_end": {
|
|
11224
|
-
"type": "boolean",
|
|
11225
|
-
"format": "boolean",
|
|
11226
|
-
"default": "false"
|
|
11227
|
-
}
|
|
11228
|
-
},
|
|
11229
|
-
"title": "ReqGetCandlesticks",
|
|
11230
|
-
"required": [
|
|
11231
|
-
"market_id",
|
|
11232
|
-
"resolution",
|
|
11233
|
-
"start_timestamp",
|
|
11234
|
-
"end_timestamp",
|
|
11235
|
-
"count_back"
|
|
11236
|
-
]
|
|
11237
|
-
},
|
|
11238
11011
|
"ReqGetDepositHistory": {
|
|
11239
11012
|
"type": "object",
|
|
11240
11013
|
"properties": {
|
|
@@ -13777,6 +13550,9 @@
|
|
|
13777
13550
|
},
|
|
13778
13551
|
"usdc_portfolio_value": {
|
|
13779
13552
|
"type": "string"
|
|
13553
|
+
},
|
|
13554
|
+
"total_portfolio_value": {
|
|
13555
|
+
"type": "string"
|
|
13780
13556
|
}
|
|
13781
13557
|
},
|
|
13782
13558
|
"title": "RiskParameters",
|
|
@@ -13789,7 +13565,8 @@
|
|
|
13789
13565
|
"total_account_liquidation_threshold",
|
|
13790
13566
|
"collateral",
|
|
13791
13567
|
"usdc_collateral_with_funding",
|
|
13792
|
-
"usdc_portfolio_value"
|
|
13568
|
+
"usdc_portfolio_value",
|
|
13569
|
+
"total_portfolio_value"
|
|
13793
13570
|
]
|
|
13794
13571
|
},
|
|
13795
13572
|
"RollingContractResp": {
|