zklighter-perps 1.0.189 → 1.0.191
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/AccountApi.ts +2 -1
- package/apis/GeckoApi.ts +46 -0
- package/models/GeckoTicker.ts +151 -0
- package/models/GeckoTickers.ts +68 -0
- package/models/PnLEntry.ts +27 -0
- package/models/PublicPoolMetadata.ts +18 -0
- package/models/PublicPoolShare.ts +10 -1
- package/models/ReqGetPublicPoolsMetadata.ts +2 -1
- package/models/TransferHistoryItem.ts +5 -1
- package/models/index.ts +2 -0
- package/openapi.json +154 -4
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/AccountApi.ts
CHANGED
|
@@ -1418,6 +1418,7 @@ export const PublicPoolsMetadataFilterEnum = {
|
|
|
1418
1418
|
All: 'all',
|
|
1419
1419
|
User: 'user',
|
|
1420
1420
|
Protocol: 'protocol',
|
|
1421
|
-
AccountIndex: 'account_index'
|
|
1421
|
+
AccountIndex: 'account_index',
|
|
1422
|
+
Stake: 'stake'
|
|
1422
1423
|
} as const;
|
|
1423
1424
|
export type PublicPoolsMetadataFilterEnum = typeof PublicPoolsMetadataFilterEnum[keyof typeof PublicPoolsMetadataFilterEnum];
|
package/apis/GeckoApi.ts
CHANGED
|
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
GeckoContracts,
|
|
19
19
|
GeckoOrderbook,
|
|
20
|
+
GeckoTickers,
|
|
20
21
|
ResultCode,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
@@ -24,6 +25,8 @@ import {
|
|
|
24
25
|
GeckoContractsToJSON,
|
|
25
26
|
GeckoOrderbookFromJSON,
|
|
26
27
|
GeckoOrderbookToJSON,
|
|
28
|
+
GeckoTickersFromJSON,
|
|
29
|
+
GeckoTickersToJSON,
|
|
27
30
|
ResultCodeFromJSON,
|
|
28
31
|
ResultCodeToJSON,
|
|
29
32
|
} from '../models/index';
|
|
@@ -37,6 +40,10 @@ export interface GeckoOrderbookRequest {
|
|
|
37
40
|
ticker_id: string;
|
|
38
41
|
}
|
|
39
42
|
|
|
43
|
+
export interface GeckoTickersRequest {
|
|
44
|
+
auth: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
/**
|
|
41
48
|
*
|
|
42
49
|
*/
|
|
@@ -131,4 +138,43 @@ export class GeckoApi extends runtime.BaseAPI {
|
|
|
131
138
|
return await response.value();
|
|
132
139
|
}
|
|
133
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Coin Gecko Spot Tickers
|
|
143
|
+
* gecko_tickers
|
|
144
|
+
*/
|
|
145
|
+
async geckoTickersRaw(requestParameters: GeckoTickersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GeckoTickers>> {
|
|
146
|
+
if (requestParameters['auth'] == null) {
|
|
147
|
+
throw new runtime.RequiredError(
|
|
148
|
+
'auth',
|
|
149
|
+
'Required parameter "auth" was null or undefined when calling geckoTickers().'
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const queryParameters: any = {};
|
|
154
|
+
|
|
155
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
156
|
+
|
|
157
|
+
if (requestParameters['auth'] != null) {
|
|
158
|
+
headerParameters['auth'] = String(requestParameters['auth']);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const response = await this.request({
|
|
162
|
+
path: `/api/v1/gecko/tickers`,
|
|
163
|
+
method: 'GET',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GeckoTickersFromJSON(jsonValue));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Coin Gecko Spot Tickers
|
|
173
|
+
* gecko_tickers
|
|
174
|
+
*/
|
|
175
|
+
async geckoTickers(requestParameters: GeckoTickersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GeckoTickers> {
|
|
176
|
+
const response = await this.geckoTickersRaw(requestParameters, initOverrides);
|
|
177
|
+
return await response.value();
|
|
178
|
+
}
|
|
179
|
+
|
|
134
180
|
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 GeckoTicker
|
|
20
|
+
*/
|
|
21
|
+
export interface GeckoTicker {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GeckoTicker
|
|
26
|
+
*/
|
|
27
|
+
ticker_id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GeckoTicker
|
|
32
|
+
*/
|
|
33
|
+
base_currency: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GeckoTicker
|
|
38
|
+
*/
|
|
39
|
+
target_currency: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GeckoTicker
|
|
44
|
+
*/
|
|
45
|
+
last_price: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof GeckoTicker
|
|
50
|
+
*/
|
|
51
|
+
base_volume: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof GeckoTicker
|
|
56
|
+
*/
|
|
57
|
+
target_volume: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof GeckoTicker
|
|
62
|
+
*/
|
|
63
|
+
pool_id: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof GeckoTicker
|
|
68
|
+
*/
|
|
69
|
+
bid: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof GeckoTicker
|
|
74
|
+
*/
|
|
75
|
+
ask: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof GeckoTicker
|
|
80
|
+
*/
|
|
81
|
+
high: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof GeckoTicker
|
|
86
|
+
*/
|
|
87
|
+
low: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Check if a given object implements the GeckoTicker interface.
|
|
92
|
+
*/
|
|
93
|
+
export function instanceOfGeckoTicker(value: object): value is GeckoTicker {
|
|
94
|
+
if (!('ticker_id' in value) || value['ticker_id'] === undefined) return false;
|
|
95
|
+
if (!('base_currency' in value) || value['base_currency'] === undefined) return false;
|
|
96
|
+
if (!('target_currency' in value) || value['target_currency'] === undefined) return false;
|
|
97
|
+
if (!('last_price' in value) || value['last_price'] === undefined) return false;
|
|
98
|
+
if (!('base_volume' in value) || value['base_volume'] === undefined) return false;
|
|
99
|
+
if (!('target_volume' in value) || value['target_volume'] === undefined) return false;
|
|
100
|
+
if (!('pool_id' in value) || value['pool_id'] === undefined) return false;
|
|
101
|
+
if (!('bid' in value) || value['bid'] === undefined) return false;
|
|
102
|
+
if (!('ask' in value) || value['ask'] === undefined) return false;
|
|
103
|
+
if (!('high' in value) || value['high'] === undefined) return false;
|
|
104
|
+
if (!('low' in value) || value['low'] === undefined) return false;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function GeckoTickerFromJSON(json: any): GeckoTicker {
|
|
109
|
+
return GeckoTickerFromJSONTyped(json, false);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function GeckoTickerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeckoTicker {
|
|
113
|
+
if (json == null) {
|
|
114
|
+
return json;
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
|
|
118
|
+
'ticker_id': json['ticker_id'],
|
|
119
|
+
'base_currency': json['base_currency'],
|
|
120
|
+
'target_currency': json['target_currency'],
|
|
121
|
+
'last_price': json['last_price'],
|
|
122
|
+
'base_volume': json['base_volume'],
|
|
123
|
+
'target_volume': json['target_volume'],
|
|
124
|
+
'pool_id': json['pool_id'],
|
|
125
|
+
'bid': json['bid'],
|
|
126
|
+
'ask': json['ask'],
|
|
127
|
+
'high': json['high'],
|
|
128
|
+
'low': json['low'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function GeckoTickerToJSON(value?: GeckoTicker | null): any {
|
|
133
|
+
if (value == null) {
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
|
|
138
|
+
'ticker_id': value['ticker_id'],
|
|
139
|
+
'base_currency': value['base_currency'],
|
|
140
|
+
'target_currency': value['target_currency'],
|
|
141
|
+
'last_price': value['last_price'],
|
|
142
|
+
'base_volume': value['base_volume'],
|
|
143
|
+
'target_volume': value['target_volume'],
|
|
144
|
+
'pool_id': value['pool_id'],
|
|
145
|
+
'bid': value['bid'],
|
|
146
|
+
'ask': value['ask'],
|
|
147
|
+
'high': value['high'],
|
|
148
|
+
'low': value['low'],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
import type { GeckoTicker } from './GeckoTicker';
|
|
17
|
+
import {
|
|
18
|
+
GeckoTickerFromJSON,
|
|
19
|
+
GeckoTickerFromJSONTyped,
|
|
20
|
+
GeckoTickerToJSON,
|
|
21
|
+
} from './GeckoTicker';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface GeckoTickers
|
|
27
|
+
*/
|
|
28
|
+
export interface GeckoTickers {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<GeckoTicker>}
|
|
32
|
+
* @memberof GeckoTickers
|
|
33
|
+
*/
|
|
34
|
+
tickers: Array<GeckoTicker>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the GeckoTickers interface.
|
|
39
|
+
*/
|
|
40
|
+
export function instanceOfGeckoTickers(value: object): value is GeckoTickers {
|
|
41
|
+
if (!('tickers' in value) || value['tickers'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function GeckoTickersFromJSON(json: any): GeckoTickers {
|
|
46
|
+
return GeckoTickersFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function GeckoTickersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeckoTickers {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'tickers': ((json['tickers'] as Array<any>).map(GeckoTickerFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function GeckoTickersToJSON(value?: GeckoTickers | null): any {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'tickers': ((value['tickers'] as Array<any>).map(GeckoTickerToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
package/models/PnLEntry.ts
CHANGED
|
@@ -79,6 +79,24 @@ export interface PnLEntry {
|
|
|
79
79
|
* @memberof PnLEntry
|
|
80
80
|
*/
|
|
81
81
|
pool_outflow: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof PnLEntry
|
|
86
|
+
*/
|
|
87
|
+
staking_pnl: number;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof PnLEntry
|
|
92
|
+
*/
|
|
93
|
+
staking_inflow: number;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof PnLEntry
|
|
98
|
+
*/
|
|
99
|
+
staking_outflow: number;
|
|
82
100
|
/**
|
|
83
101
|
*
|
|
84
102
|
* @type {number}
|
|
@@ -101,6 +119,9 @@ export function instanceOfPnLEntry(value: object): value is PnLEntry {
|
|
|
101
119
|
if (!('pool_pnl' in value) || value['pool_pnl'] === undefined) return false;
|
|
102
120
|
if (!('pool_inflow' in value) || value['pool_inflow'] === undefined) return false;
|
|
103
121
|
if (!('pool_outflow' in value) || value['pool_outflow'] === undefined) return false;
|
|
122
|
+
if (!('staking_pnl' in value) || value['staking_pnl'] === undefined) return false;
|
|
123
|
+
if (!('staking_inflow' in value) || value['staking_inflow'] === undefined) return false;
|
|
124
|
+
if (!('staking_outflow' in value) || value['staking_outflow'] === undefined) return false;
|
|
104
125
|
if (!('pool_total_shares' in value) || value['pool_total_shares'] === undefined) return false;
|
|
105
126
|
return true;
|
|
106
127
|
}
|
|
@@ -125,6 +146,9 @@ export function PnLEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
125
146
|
'pool_pnl': json['pool_pnl'],
|
|
126
147
|
'pool_inflow': json['pool_inflow'],
|
|
127
148
|
'pool_outflow': json['pool_outflow'],
|
|
149
|
+
'staking_pnl': json['staking_pnl'],
|
|
150
|
+
'staking_inflow': json['staking_inflow'],
|
|
151
|
+
'staking_outflow': json['staking_outflow'],
|
|
128
152
|
'pool_total_shares': json['pool_total_shares'],
|
|
129
153
|
};
|
|
130
154
|
}
|
|
@@ -145,6 +169,9 @@ export function PnLEntryToJSON(value?: PnLEntry | null): any {
|
|
|
145
169
|
'pool_pnl': value['pool_pnl'],
|
|
146
170
|
'pool_inflow': value['pool_inflow'],
|
|
147
171
|
'pool_outflow': value['pool_outflow'],
|
|
172
|
+
'staking_pnl': value['staking_pnl'],
|
|
173
|
+
'staking_inflow': value['staking_inflow'],
|
|
174
|
+
'staking_outflow': value['staking_outflow'],
|
|
148
175
|
'pool_total_shares': value['pool_total_shares'],
|
|
149
176
|
};
|
|
150
177
|
}
|
|
@@ -104,6 +104,18 @@ export interface PublicPoolMetadata {
|
|
|
104
104
|
* @memberof PublicPoolMetadata
|
|
105
105
|
*/
|
|
106
106
|
total_asset_value: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof PublicPoolMetadata
|
|
111
|
+
*/
|
|
112
|
+
total_spot_value: string;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @type {string}
|
|
116
|
+
* @memberof PublicPoolMetadata
|
|
117
|
+
*/
|
|
118
|
+
total_perps_value: string;
|
|
107
119
|
/**
|
|
108
120
|
*
|
|
109
121
|
* @type {number}
|
|
@@ -134,6 +146,8 @@ export function instanceOfPublicPoolMetadata(value: object): value is PublicPool
|
|
|
134
146
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
135
147
|
if (!('operator_fee' in value) || value['operator_fee'] === undefined) return false;
|
|
136
148
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
149
|
+
if (!('total_spot_value' in value) || value['total_spot_value'] === undefined) return false;
|
|
150
|
+
if (!('total_perps_value' in value) || value['total_perps_value'] === undefined) return false;
|
|
137
151
|
if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
|
|
138
152
|
return true;
|
|
139
153
|
}
|
|
@@ -161,6 +175,8 @@ export function PublicPoolMetadataFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
161
175
|
'status': json['status'],
|
|
162
176
|
'operator_fee': json['operator_fee'],
|
|
163
177
|
'total_asset_value': json['total_asset_value'],
|
|
178
|
+
'total_spot_value': json['total_spot_value'],
|
|
179
|
+
'total_perps_value': json['total_perps_value'],
|
|
164
180
|
'total_shares': json['total_shares'],
|
|
165
181
|
'account_share': json['account_share'] == null ? undefined : PublicPoolShareFromJSON(json['account_share']),
|
|
166
182
|
};
|
|
@@ -185,6 +201,8 @@ export function PublicPoolMetadataToJSON(value?: PublicPoolMetadata | null): any
|
|
|
185
201
|
'status': value['status'],
|
|
186
202
|
'operator_fee': value['operator_fee'],
|
|
187
203
|
'total_asset_value': value['total_asset_value'],
|
|
204
|
+
'total_spot_value': value['total_spot_value'],
|
|
205
|
+
'total_perps_value': value['total_perps_value'],
|
|
188
206
|
'total_shares': value['total_shares'],
|
|
189
207
|
'account_share': PublicPoolShareToJSON(value['account_share']),
|
|
190
208
|
};
|
|
@@ -32,11 +32,17 @@ export interface PublicPoolShare {
|
|
|
32
32
|
*/
|
|
33
33
|
shares_amount: number;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* For public pools and insurance fund
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof PublicPoolShare
|
|
38
38
|
*/
|
|
39
39
|
entry_usdc: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PublicPoolShare
|
|
44
|
+
*/
|
|
45
|
+
principal_amount: string;
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
/**
|
|
@@ -46,6 +52,7 @@ export function instanceOfPublicPoolShare(value: object): value is PublicPoolSha
|
|
|
46
52
|
if (!('public_pool_index' in value) || value['public_pool_index'] === undefined) return false;
|
|
47
53
|
if (!('shares_amount' in value) || value['shares_amount'] === undefined) return false;
|
|
48
54
|
if (!('entry_usdc' in value) || value['entry_usdc'] === undefined) return false;
|
|
55
|
+
if (!('principal_amount' in value) || value['principal_amount'] === undefined) return false;
|
|
49
56
|
return true;
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -62,6 +69,7 @@ export function PublicPoolShareFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
62
69
|
'public_pool_index': json['public_pool_index'],
|
|
63
70
|
'shares_amount': json['shares_amount'],
|
|
64
71
|
'entry_usdc': json['entry_usdc'],
|
|
72
|
+
'principal_amount': json['principal_amount'],
|
|
65
73
|
};
|
|
66
74
|
}
|
|
67
75
|
|
|
@@ -74,6 +82,7 @@ export function PublicPoolShareToJSON(value?: PublicPoolShare | null): any {
|
|
|
74
82
|
'public_pool_index': value['public_pool_index'],
|
|
75
83
|
'shares_amount': value['shares_amount'],
|
|
76
84
|
'entry_usdc': value['entry_usdc'],
|
|
85
|
+
'principal_amount': value['principal_amount'],
|
|
77
86
|
};
|
|
78
87
|
}
|
|
79
88
|
|
|
@@ -59,7 +59,8 @@ export const ReqGetPublicPoolsMetadataFilterEnum = {
|
|
|
59
59
|
All: 'all',
|
|
60
60
|
User: 'user',
|
|
61
61
|
Protocol: 'protocol',
|
|
62
|
-
AccountIndex: 'account_index'
|
|
62
|
+
AccountIndex: 'account_index',
|
|
63
|
+
Stake: 'stake'
|
|
63
64
|
} as const;
|
|
64
65
|
export type ReqGetPublicPoolsMetadataFilterEnum = typeof ReqGetPublicPoolsMetadataFilterEnum[keyof typeof ReqGetPublicPoolsMetadataFilterEnum];
|
|
65
66
|
|
|
@@ -110,7 +110,11 @@ export const TransferHistoryItemTypeEnum = {
|
|
|
110
110
|
L2BurnSharesOutflow: 'L2BurnSharesOutflow',
|
|
111
111
|
L2MintSharesInflow: 'L2MintSharesInflow',
|
|
112
112
|
L2MintSharesOutflow: 'L2MintSharesOutflow',
|
|
113
|
-
L2SelfTransfer: 'L2SelfTransfer'
|
|
113
|
+
L2SelfTransfer: 'L2SelfTransfer',
|
|
114
|
+
L2StakeAssetInflow: 'L2StakeAssetInflow',
|
|
115
|
+
L2StakeAssetOutflow: 'L2StakeAssetOutflow',
|
|
116
|
+
L2UnstakeAssetInflow: 'L2UnstakeAssetInflow',
|
|
117
|
+
L2UnstakeAssetOutflow: 'L2UnstakeAssetOutflow'
|
|
114
118
|
} as const;
|
|
115
119
|
export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
|
|
116
120
|
|
package/models/index.ts
CHANGED
|
@@ -51,6 +51,8 @@ export * from './Fundings';
|
|
|
51
51
|
export * from './GeckoContract';
|
|
52
52
|
export * from './GeckoContracts';
|
|
53
53
|
export * from './GeckoOrderbook';
|
|
54
|
+
export * from './GeckoTicker';
|
|
55
|
+
export * from './GeckoTickers';
|
|
54
56
|
export * from './IsWhitelisted';
|
|
55
57
|
export * from './L1Metadata';
|
|
56
58
|
export * from './L1ProviderInfo';
|
package/openapi.json
CHANGED
|
@@ -1698,6 +1698,38 @@
|
|
|
1698
1698
|
"description": "Coin Gecko Orderbook"
|
|
1699
1699
|
}
|
|
1700
1700
|
},
|
|
1701
|
+
"/api/v1/gecko/tickers": {
|
|
1702
|
+
"get": {
|
|
1703
|
+
"summary": "gecko_tickers",
|
|
1704
|
+
"operationId": "gecko_tickers",
|
|
1705
|
+
"responses": {
|
|
1706
|
+
"200": {
|
|
1707
|
+
"description": "A successful response.",
|
|
1708
|
+
"schema": {
|
|
1709
|
+
"$ref": "#/definitions/GeckoTickers"
|
|
1710
|
+
}
|
|
1711
|
+
},
|
|
1712
|
+
"400": {
|
|
1713
|
+
"description": "Bad request",
|
|
1714
|
+
"schema": {
|
|
1715
|
+
"$ref": "#/definitions/ResultCode"
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
"parameters": [
|
|
1720
|
+
{
|
|
1721
|
+
"name": "auth",
|
|
1722
|
+
"in": "header",
|
|
1723
|
+
"required": true,
|
|
1724
|
+
"type": "string"
|
|
1725
|
+
}
|
|
1726
|
+
],
|
|
1727
|
+
"tags": [
|
|
1728
|
+
"gecko"
|
|
1729
|
+
],
|
|
1730
|
+
"description": "Coin Gecko Spot Tickers"
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1701
1733
|
"/api/v1/geoLocation": {
|
|
1702
1734
|
"get": {
|
|
1703
1735
|
"summary": "geoLocation",
|
|
@@ -2429,7 +2461,8 @@
|
|
|
2429
2461
|
"all",
|
|
2430
2462
|
"user",
|
|
2431
2463
|
"protocol",
|
|
2432
|
-
"account_index"
|
|
2464
|
+
"account_index",
|
|
2465
|
+
"stake"
|
|
2433
2466
|
]
|
|
2434
2467
|
},
|
|
2435
2468
|
{
|
|
@@ -5830,6 +5863,80 @@
|
|
|
5830
5863
|
"asks"
|
|
5831
5864
|
]
|
|
5832
5865
|
},
|
|
5866
|
+
"GeckoTicker": {
|
|
5867
|
+
"type": "object",
|
|
5868
|
+
"properties": {
|
|
5869
|
+
"ticker_id": {
|
|
5870
|
+
"type": "string"
|
|
5871
|
+
},
|
|
5872
|
+
"base_currency": {
|
|
5873
|
+
"type": "string"
|
|
5874
|
+
},
|
|
5875
|
+
"target_currency": {
|
|
5876
|
+
"type": "string"
|
|
5877
|
+
},
|
|
5878
|
+
"last_price": {
|
|
5879
|
+
"type": "number",
|
|
5880
|
+
"format": "double"
|
|
5881
|
+
},
|
|
5882
|
+
"base_volume": {
|
|
5883
|
+
"type": "number",
|
|
5884
|
+
"format": "double"
|
|
5885
|
+
},
|
|
5886
|
+
"target_volume": {
|
|
5887
|
+
"type": "number",
|
|
5888
|
+
"format": "double"
|
|
5889
|
+
},
|
|
5890
|
+
"pool_id": {
|
|
5891
|
+
"type": "string"
|
|
5892
|
+
},
|
|
5893
|
+
"bid": {
|
|
5894
|
+
"type": "number",
|
|
5895
|
+
"format": "double"
|
|
5896
|
+
},
|
|
5897
|
+
"ask": {
|
|
5898
|
+
"type": "number",
|
|
5899
|
+
"format": "double"
|
|
5900
|
+
},
|
|
5901
|
+
"high": {
|
|
5902
|
+
"type": "number",
|
|
5903
|
+
"format": "double"
|
|
5904
|
+
},
|
|
5905
|
+
"low": {
|
|
5906
|
+
"type": "number",
|
|
5907
|
+
"format": "double"
|
|
5908
|
+
}
|
|
5909
|
+
},
|
|
5910
|
+
"title": "GeckoTicker",
|
|
5911
|
+
"required": [
|
|
5912
|
+
"ticker_id",
|
|
5913
|
+
"base_currency",
|
|
5914
|
+
"target_currency",
|
|
5915
|
+
"last_price",
|
|
5916
|
+
"base_volume",
|
|
5917
|
+
"target_volume",
|
|
5918
|
+
"pool_id",
|
|
5919
|
+
"bid",
|
|
5920
|
+
"ask",
|
|
5921
|
+
"high",
|
|
5922
|
+
"low"
|
|
5923
|
+
]
|
|
5924
|
+
},
|
|
5925
|
+
"GeckoTickers": {
|
|
5926
|
+
"type": "object",
|
|
5927
|
+
"properties": {
|
|
5928
|
+
"tickers": {
|
|
5929
|
+
"type": "array",
|
|
5930
|
+
"items": {
|
|
5931
|
+
"$ref": "#/definitions/GeckoTicker"
|
|
5932
|
+
}
|
|
5933
|
+
}
|
|
5934
|
+
},
|
|
5935
|
+
"title": "GeckoTickers",
|
|
5936
|
+
"required": [
|
|
5937
|
+
"tickers"
|
|
5938
|
+
]
|
|
5939
|
+
},
|
|
5833
5940
|
"IsWhitelisted": {
|
|
5834
5941
|
"type": "object",
|
|
5835
5942
|
"properties": {
|
|
@@ -7136,6 +7243,21 @@
|
|
|
7136
7243
|
"format": "double",
|
|
7137
7244
|
"example": "12.0"
|
|
7138
7245
|
},
|
|
7246
|
+
"staking_pnl": {
|
|
7247
|
+
"type": "number",
|
|
7248
|
+
"format": "double",
|
|
7249
|
+
"example": "12.0"
|
|
7250
|
+
},
|
|
7251
|
+
"staking_inflow": {
|
|
7252
|
+
"type": "number",
|
|
7253
|
+
"format": "double",
|
|
7254
|
+
"example": "12.0"
|
|
7255
|
+
},
|
|
7256
|
+
"staking_outflow": {
|
|
7257
|
+
"type": "number",
|
|
7258
|
+
"format": "double",
|
|
7259
|
+
"example": "12.0"
|
|
7260
|
+
},
|
|
7139
7261
|
"pool_total_shares": {
|
|
7140
7262
|
"type": "number",
|
|
7141
7263
|
"format": "double",
|
|
@@ -7154,6 +7276,9 @@
|
|
|
7154
7276
|
"pool_pnl",
|
|
7155
7277
|
"pool_inflow",
|
|
7156
7278
|
"pool_outflow",
|
|
7279
|
+
"staking_pnl",
|
|
7280
|
+
"staking_inflow",
|
|
7281
|
+
"staking_outflow",
|
|
7157
7282
|
"pool_total_shares"
|
|
7158
7283
|
]
|
|
7159
7284
|
},
|
|
@@ -7374,6 +7499,14 @@
|
|
|
7374
7499
|
"type": "string",
|
|
7375
7500
|
"example": "19995"
|
|
7376
7501
|
},
|
|
7502
|
+
"total_spot_value": {
|
|
7503
|
+
"type": "string",
|
|
7504
|
+
"example": "19995"
|
|
7505
|
+
},
|
|
7506
|
+
"total_perps_value": {
|
|
7507
|
+
"type": "string",
|
|
7508
|
+
"example": "19995"
|
|
7509
|
+
},
|
|
7377
7510
|
"total_shares": {
|
|
7378
7511
|
"type": "integer",
|
|
7379
7512
|
"format": "int64",
|
|
@@ -7397,6 +7530,8 @@
|
|
|
7397
7530
|
"status",
|
|
7398
7531
|
"operator_fee",
|
|
7399
7532
|
"total_asset_value",
|
|
7533
|
+
"total_spot_value",
|
|
7534
|
+
"total_perps_value",
|
|
7400
7535
|
"total_shares"
|
|
7401
7536
|
]
|
|
7402
7537
|
},
|
|
@@ -7414,6 +7549,11 @@
|
|
|
7414
7549
|
"example": "3000"
|
|
7415
7550
|
},
|
|
7416
7551
|
"entry_usdc": {
|
|
7552
|
+
"type": "string",
|
|
7553
|
+
"example": "3000",
|
|
7554
|
+
"description": " For public pools and insurance fund"
|
|
7555
|
+
},
|
|
7556
|
+
"principal_amount": {
|
|
7417
7557
|
"type": "string",
|
|
7418
7558
|
"example": "3000"
|
|
7419
7559
|
}
|
|
@@ -7422,7 +7562,8 @@
|
|
|
7422
7562
|
"required": [
|
|
7423
7563
|
"public_pool_index",
|
|
7424
7564
|
"shares_amount",
|
|
7425
|
-
"entry_usdc"
|
|
7565
|
+
"entry_usdc",
|
|
7566
|
+
"principal_amount"
|
|
7426
7567
|
]
|
|
7427
7568
|
},
|
|
7428
7569
|
"ReferralCode": {
|
|
@@ -8275,6 +8416,10 @@
|
|
|
8275
8416
|
"ticker_id"
|
|
8276
8417
|
]
|
|
8277
8418
|
},
|
|
8419
|
+
"ReqGetGeckoTickers": {
|
|
8420
|
+
"type": "object",
|
|
8421
|
+
"title": "ReqGetGeckoTickers"
|
|
8422
|
+
},
|
|
8278
8423
|
"ReqGetL1Metadata": {
|
|
8279
8424
|
"type": "object",
|
|
8280
8425
|
"properties": {
|
|
@@ -8505,7 +8650,8 @@
|
|
|
8505
8650
|
"all",
|
|
8506
8651
|
"user",
|
|
8507
8652
|
"protocol",
|
|
8508
|
-
"account_index"
|
|
8653
|
+
"account_index",
|
|
8654
|
+
"stake"
|
|
8509
8655
|
]
|
|
8510
8656
|
},
|
|
8511
8657
|
"index": {
|
|
@@ -10116,7 +10262,11 @@
|
|
|
10116
10262
|
"L2BurnSharesOutflow",
|
|
10117
10263
|
"L2MintSharesInflow",
|
|
10118
10264
|
"L2MintSharesOutflow",
|
|
10119
|
-
"L2SelfTransfer"
|
|
10265
|
+
"L2SelfTransfer",
|
|
10266
|
+
"L2StakeAssetInflow",
|
|
10267
|
+
"L2StakeAssetOutflow",
|
|
10268
|
+
"L2UnstakeAssetInflow",
|
|
10269
|
+
"L2UnstakeAssetOutflow"
|
|
10120
10270
|
]
|
|
10121
10271
|
},
|
|
10122
10272
|
"from_l1_address": {
|