zklighter-perps 1.0.329 → 1.0.330
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/apis/AccountApi.ts +0 -127
- package/openapi.json +0 -91
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -164,16 +164,6 @@ export interface ChangeAccountTierRequest {
|
|
|
164
164
|
auth?: string;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
export interface EquityHistoryPnlRequest {
|
|
168
|
-
by: EquityHistoryPnlByEnum;
|
|
169
|
-
value: string;
|
|
170
|
-
resolution: EquityHistoryPnlResolutionEnum;
|
|
171
|
-
start_timestamp: number;
|
|
172
|
-
end_timestamp: number;
|
|
173
|
-
count_back: number;
|
|
174
|
-
ignore_transfers?: boolean;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
167
|
export interface FaucetRequest {
|
|
178
168
|
l1_address: string;
|
|
179
169
|
do_l1_transfer: boolean;
|
|
@@ -814,104 +804,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
814
804
|
return await response.value();
|
|
815
805
|
}
|
|
816
806
|
|
|
817
|
-
/**
|
|
818
|
-
* Shadow account PnL chart computed from equity_history
|
|
819
|
-
* equity_history_pnl
|
|
820
|
-
*/
|
|
821
|
-
async equityHistoryPnlRaw(requestParameters: EquityHistoryPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPnL>> {
|
|
822
|
-
if (requestParameters['by'] == null) {
|
|
823
|
-
throw new runtime.RequiredError(
|
|
824
|
-
'by',
|
|
825
|
-
'Required parameter "by" was null or undefined when calling equityHistoryPnl().'
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
if (requestParameters['value'] == null) {
|
|
830
|
-
throw new runtime.RequiredError(
|
|
831
|
-
'value',
|
|
832
|
-
'Required parameter "value" was null or undefined when calling equityHistoryPnl().'
|
|
833
|
-
);
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
if (requestParameters['resolution'] == null) {
|
|
837
|
-
throw new runtime.RequiredError(
|
|
838
|
-
'resolution',
|
|
839
|
-
'Required parameter "resolution" was null or undefined when calling equityHistoryPnl().'
|
|
840
|
-
);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
if (requestParameters['start_timestamp'] == null) {
|
|
844
|
-
throw new runtime.RequiredError(
|
|
845
|
-
'start_timestamp',
|
|
846
|
-
'Required parameter "start_timestamp" was null or undefined when calling equityHistoryPnl().'
|
|
847
|
-
);
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
if (requestParameters['end_timestamp'] == null) {
|
|
851
|
-
throw new runtime.RequiredError(
|
|
852
|
-
'end_timestamp',
|
|
853
|
-
'Required parameter "end_timestamp" was null or undefined when calling equityHistoryPnl().'
|
|
854
|
-
);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
if (requestParameters['count_back'] == null) {
|
|
858
|
-
throw new runtime.RequiredError(
|
|
859
|
-
'count_back',
|
|
860
|
-
'Required parameter "count_back" was null or undefined when calling equityHistoryPnl().'
|
|
861
|
-
);
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
const queryParameters: any = {};
|
|
865
|
-
|
|
866
|
-
if (requestParameters['by'] != null) {
|
|
867
|
-
queryParameters['by'] = requestParameters['by'];
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
if (requestParameters['value'] != null) {
|
|
871
|
-
queryParameters['value'] = requestParameters['value'];
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
if (requestParameters['resolution'] != null) {
|
|
875
|
-
queryParameters['resolution'] = requestParameters['resolution'];
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
if (requestParameters['start_timestamp'] != null) {
|
|
879
|
-
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
if (requestParameters['end_timestamp'] != null) {
|
|
883
|
-
queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
if (requestParameters['count_back'] != null) {
|
|
887
|
-
queryParameters['count_back'] = requestParameters['count_back'];
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
if (requestParameters['ignore_transfers'] != null) {
|
|
891
|
-
queryParameters['ignore_transfers'] = requestParameters['ignore_transfers'];
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
895
|
-
|
|
896
|
-
const response = await this.request({
|
|
897
|
-
path: `/api/v1/equity_history/pnl`,
|
|
898
|
-
method: 'GET',
|
|
899
|
-
headers: headerParameters,
|
|
900
|
-
query: queryParameters,
|
|
901
|
-
}, initOverrides);
|
|
902
|
-
|
|
903
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AccountPnLFromJSON(jsonValue));
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* Shadow account PnL chart computed from equity_history
|
|
908
|
-
* equity_history_pnl
|
|
909
|
-
*/
|
|
910
|
-
async equityHistoryPnl(requestParameters: EquityHistoryPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountPnL> {
|
|
911
|
-
const response = await this.equityHistoryPnlRaw(requestParameters, initOverrides);
|
|
912
|
-
return await response.value();
|
|
913
|
-
}
|
|
914
|
-
|
|
915
807
|
/**
|
|
916
808
|
* Request funds from faucet
|
|
917
809
|
* faucet
|
|
@@ -2486,25 +2378,6 @@ export const AccountMetadataByEnum = {
|
|
|
2486
2378
|
L1Address: 'l1_address'
|
|
2487
2379
|
} as const;
|
|
2488
2380
|
export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof AccountMetadataByEnum];
|
|
2489
|
-
/**
|
|
2490
|
-
* @export
|
|
2491
|
-
*/
|
|
2492
|
-
export const EquityHistoryPnlByEnum = {
|
|
2493
|
-
Index: 'index'
|
|
2494
|
-
} as const;
|
|
2495
|
-
export type EquityHistoryPnlByEnum = typeof EquityHistoryPnlByEnum[keyof typeof EquityHistoryPnlByEnum];
|
|
2496
|
-
/**
|
|
2497
|
-
* @export
|
|
2498
|
-
*/
|
|
2499
|
-
export const EquityHistoryPnlResolutionEnum = {
|
|
2500
|
-
_1m: '1m',
|
|
2501
|
-
_5m: '5m',
|
|
2502
|
-
_15m: '15m',
|
|
2503
|
-
_1h: '1h',
|
|
2504
|
-
_4h: '4h',
|
|
2505
|
-
_1d: '1d'
|
|
2506
|
-
} as const;
|
|
2507
|
-
export type EquityHistoryPnlResolutionEnum = typeof EquityHistoryPnlResolutionEnum[keyof typeof EquityHistoryPnlResolutionEnum];
|
|
2508
2381
|
/**
|
|
2509
2382
|
* @export
|
|
2510
2383
|
*/
|
package/openapi.json
CHANGED
|
@@ -1544,97 +1544,6 @@
|
|
|
1544
1544
|
"description": "Get deposit supporting networks"
|
|
1545
1545
|
}
|
|
1546
1546
|
},
|
|
1547
|
-
"/api/v1/equity_history/pnl": {
|
|
1548
|
-
"get": {
|
|
1549
|
-
"summary": "equity_history_pnl",
|
|
1550
|
-
"operationId": "equity_history_pnl",
|
|
1551
|
-
"responses": {
|
|
1552
|
-
"200": {
|
|
1553
|
-
"description": "A successful response.",
|
|
1554
|
-
"schema": {
|
|
1555
|
-
"$ref": "#/definitions/AccountPnL"
|
|
1556
|
-
}
|
|
1557
|
-
},
|
|
1558
|
-
"400": {
|
|
1559
|
-
"description": "Bad request",
|
|
1560
|
-
"schema": {
|
|
1561
|
-
"$ref": "#/definitions/ResultCode"
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
},
|
|
1565
|
-
"parameters": [
|
|
1566
|
-
{
|
|
1567
|
-
"name": "by",
|
|
1568
|
-
"in": "query",
|
|
1569
|
-
"required": true,
|
|
1570
|
-
"type": "string",
|
|
1571
|
-
"enum": [
|
|
1572
|
-
"index"
|
|
1573
|
-
]
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
"name": "value",
|
|
1577
|
-
"in": "query",
|
|
1578
|
-
"required": true,
|
|
1579
|
-
"type": "string"
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
"name": "resolution",
|
|
1583
|
-
"in": "query",
|
|
1584
|
-
"required": true,
|
|
1585
|
-
"type": "string",
|
|
1586
|
-
"enum": [
|
|
1587
|
-
"1m",
|
|
1588
|
-
"5m",
|
|
1589
|
-
"15m",
|
|
1590
|
-
"1h",
|
|
1591
|
-
"4h",
|
|
1592
|
-
"1d"
|
|
1593
|
-
]
|
|
1594
|
-
},
|
|
1595
|
-
{
|
|
1596
|
-
"name": "start_timestamp",
|
|
1597
|
-
"in": "query",
|
|
1598
|
-
"required": true,
|
|
1599
|
-
"type": "integer",
|
|
1600
|
-
"format": "int64",
|
|
1601
|
-
"minimum": 0,
|
|
1602
|
-
"maximum": 5000000000000
|
|
1603
|
-
},
|
|
1604
|
-
{
|
|
1605
|
-
"name": "end_timestamp",
|
|
1606
|
-
"in": "query",
|
|
1607
|
-
"required": true,
|
|
1608
|
-
"type": "integer",
|
|
1609
|
-
"format": "int64",
|
|
1610
|
-
"minimum": 0,
|
|
1611
|
-
"maximum": 5000000000000
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
"name": "count_back",
|
|
1615
|
-
"in": "query",
|
|
1616
|
-
"required": true,
|
|
1617
|
-
"type": "integer",
|
|
1618
|
-
"format": "int64"
|
|
1619
|
-
},
|
|
1620
|
-
{
|
|
1621
|
-
"name": "ignore_transfers",
|
|
1622
|
-
"in": "query",
|
|
1623
|
-
"required": false,
|
|
1624
|
-
"type": "boolean",
|
|
1625
|
-
"format": "boolean",
|
|
1626
|
-
"default": "false"
|
|
1627
|
-
}
|
|
1628
|
-
],
|
|
1629
|
-
"tags": [
|
|
1630
|
-
"account"
|
|
1631
|
-
],
|
|
1632
|
-
"consumes": [
|
|
1633
|
-
"multipart/form-data"
|
|
1634
|
-
],
|
|
1635
|
-
"description": "Shadow account PnL chart computed from equity_history"
|
|
1636
|
-
}
|
|
1637
|
-
},
|
|
1638
1547
|
"/api/v1/event/create": {
|
|
1639
1548
|
"post": {
|
|
1640
1549
|
"summary": "event_create",
|