Skip to content

Commit 117714d

Browse files
authored
update-13-aug (#34)
* update-13-aug * adjust endpoints
1 parent 78e5826 commit 117714d

22 files changed

Lines changed: 1897 additions & 31 deletions

.openapi-generator/FILES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ docs/PositionFundings.md
6565
docs/PriceLevel.md
6666
docs/PublicPool.md
6767
docs/PublicPoolInfo.md
68+
docs/PublicPoolMetadata.md
6869
docs/PublicPoolShare.md
6970
docs/PublicPools.md
7071
docs/ReferralApi.md
7172
docs/ReferralPointEntry.md
7273
docs/ReferralPoints.md
7374
docs/ReqExportData.md
7475
docs/ReqGetAccount.md
76+
docs/ReqGetAccountActiveOrders.md
7577
docs/ReqGetAccountApiKeys.md
7678
docs/ReqGetAccountByL1Address.md
7779
docs/ReqGetAccountInactiveOrders.md
@@ -96,6 +98,7 @@ docs/ReqGetOrderBookOrders.md
9698
docs/ReqGetOrderBooks.md
9799
docs/ReqGetPositionFunding.md
98100
docs/ReqGetPublicPools.md
101+
docs/ReqGetPublicPoolsMetadata.md
99102
docs/ReqGetRangeWithCursor.md
100103
docs/ReqGetRangeWithIndex.md
101104
docs/ReqGetRangeWithIndexSortable.md
@@ -108,13 +111,15 @@ docs/ReqGetTx.md
108111
docs/ReqGetWithdrawHistory.md
109112
docs/RespChangeAccountTier.md
110113
docs/RespGetFastBridgeInfo.md
114+
docs/RespPublicPoolsMetadata.md
111115
docs/RespSendTx.md
112116
docs/RespSendTxBatch.md
113117
docs/RespWithdrawalDelay.md
114118
docs/ResultCode.md
115119
docs/RiskInfo.md
116120
docs/RiskParameters.md
117121
docs/RootApi.md
122+
docs/SharePrice.md
118123
docs/SimpleOrder.md
119124
docs/Status.md
120125
docs/SubAccounts.md
@@ -211,12 +216,14 @@ lighter/models/position_fundings.py
211216
lighter/models/price_level.py
212217
lighter/models/public_pool.py
213218
lighter/models/public_pool_info.py
219+
lighter/models/public_pool_metadata.py
214220
lighter/models/public_pool_share.py
215221
lighter/models/public_pools.py
216222
lighter/models/referral_point_entry.py
217223
lighter/models/referral_points.py
218224
lighter/models/req_export_data.py
219225
lighter/models/req_get_account.py
226+
lighter/models/req_get_account_active_orders.py
220227
lighter/models/req_get_account_api_keys.py
221228
lighter/models/req_get_account_by_l1_address.py
222229
lighter/models/req_get_account_inactive_orders.py
@@ -241,6 +248,7 @@ lighter/models/req_get_order_book_orders.py
241248
lighter/models/req_get_order_books.py
242249
lighter/models/req_get_position_funding.py
243250
lighter/models/req_get_public_pools.py
251+
lighter/models/req_get_public_pools_metadata.py
244252
lighter/models/req_get_range_with_cursor.py
245253
lighter/models/req_get_range_with_index.py
246254
lighter/models/req_get_range_with_index_sortable.py
@@ -253,12 +261,14 @@ lighter/models/req_get_tx.py
253261
lighter/models/req_get_withdraw_history.py
254262
lighter/models/resp_change_account_tier.py
255263
lighter/models/resp_get_fast_bridge_info.py
264+
lighter/models/resp_public_pools_metadata.py
256265
lighter/models/resp_send_tx.py
257266
lighter/models/resp_send_tx_batch.py
258267
lighter/models/resp_withdrawal_delay.py
259268
lighter/models/result_code.py
260269
lighter/models/risk_info.py
261270
lighter/models/risk_parameters.py
271+
lighter/models/share_price.py
262272
lighter/models/simple_order.py
263273
lighter/models/status.py
264274
lighter/models/sub_accounts.py

docs/AccountApi.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Method | HTTP request | Description
1515
[**pnl**](AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
1616
[**position_funding**](AccountApi.md#position_funding) | **GET** /api/v1/positionFunding | positionFunding
1717
[**public_pools**](AccountApi.md#public_pools) | **GET** /api/v1/publicPools | publicPools
18+
[**public_pools_metadata**](AccountApi.md#public_pools_metadata) | **GET** /api/v1/publicPoolsMetadata | publicPoolsMetadata
1819

1920

2021
# **account**
@@ -848,3 +849,82 @@ No authorization required
848849

849850
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
850851

852+
# **public_pools_metadata**
853+
> RespPublicPoolsMetadata public_pools_metadata(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)
854+
855+
publicPoolsMetadata
856+
857+
Get public pools metadata
858+
859+
### Example
860+
861+
862+
```python
863+
import lighter
864+
from lighter.models.resp_public_pools_metadata import RespPublicPoolsMetadata
865+
from lighter.rest import ApiException
866+
from pprint import pprint
867+
868+
# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
869+
# See configuration.py for a list of all supported configuration parameters.
870+
configuration = lighter.Configuration(
871+
host = "https://mainnet.zklighter.elliot.ai"
872+
)
873+
874+
875+
# Enter a context with an instance of the API client
876+
async with lighter.ApiClient(configuration) as api_client:
877+
# Create an instance of the API class
878+
api_instance = lighter.AccountApi(api_client)
879+
index = 56 # int |
880+
limit = 56 # int |
881+
authorization = 'authorization_example' # str | (optional)
882+
auth = 'auth_example' # str | (optional)
883+
filter = 'filter_example' # str | (optional)
884+
account_index = 56 # int | (optional)
885+
886+
try:
887+
# publicPoolsMetadata
888+
api_response = await api_instance.public_pools_metadata(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)
889+
print("The response of AccountApi->public_pools_metadata:\n")
890+
pprint(api_response)
891+
except Exception as e:
892+
print("Exception when calling AccountApi->public_pools_metadata: %s\n" % e)
893+
```
894+
895+
896+
897+
### Parameters
898+
899+
900+
Name | Type | Description | Notes
901+
------------- | ------------- | ------------- | -------------
902+
**index** | **int**| |
903+
**limit** | **int**| |
904+
**authorization** | **str**| | [optional]
905+
**auth** | **str**| | [optional]
906+
**filter** | **str**| | [optional]
907+
**account_index** | **int**| | [optional]
908+
909+
### Return type
910+
911+
[**RespPublicPoolsMetadata**](RespPublicPoolsMetadata.md)
912+
913+
### Authorization
914+
915+
No authorization required
916+
917+
### HTTP request headers
918+
919+
- **Content-Type**: Not defined
920+
- **Accept**: application/json
921+
922+
### HTTP response details
923+
924+
| Status code | Description | Response headers |
925+
|-------------|-------------|------------------|
926+
**200** | A successful response. | - |
927+
**400** | Bad request | - |
928+
929+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
930+

docs/AccountPosition.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
1717
**position_value** | **str** | |
1818
**unrealized_pnl** | **str** | |
1919
**realized_pnl** | **str** | |
20+
**liquidation_price** | **str** | |
2021
**total_funding_paid_out** | **str** | | [optional]
2122
**margin_mode** | **int** | |
2223
**allocated_margin** | **str** | |

docs/OrderApi.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All URIs are relative to *https://mainnet.zklighter.elliot.ai*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**account_active_orders**](OrderApi.md#account_active_orders) | **GET** /api/v1/accountActiveOrders | accountActiveOrders
78
[**account_inactive_orders**](OrderApi.md#account_inactive_orders) | **GET** /api/v1/accountInactiveOrders | accountInactiveOrders
89
[**exchange_stats**](OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
910
[**export**](OrderApi.md#export) | **GET** /api/v1/export | export
@@ -14,6 +15,81 @@ Method | HTTP request | Description
1415
[**trades**](OrderApi.md#trades) | **GET** /api/v1/trades | trades
1516

1617

18+
# **account_active_orders**
19+
> Orders account_active_orders(account_index, market_id, authorization=authorization, auth=auth)
20+
21+
accountActiveOrders
22+
23+
Get account active orders. `auth` can be generated using the SDK.
24+
25+
### Example
26+
27+
28+
```python
29+
import lighter
30+
from lighter.models.orders import Orders
31+
from lighter.rest import ApiException
32+
from pprint import pprint
33+
34+
# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
35+
# See configuration.py for a list of all supported configuration parameters.
36+
configuration = lighter.Configuration(
37+
host = "https://mainnet.zklighter.elliot.ai"
38+
)
39+
40+
41+
# Enter a context with an instance of the API client
42+
async with lighter.ApiClient(configuration) as api_client:
43+
# Create an instance of the API class
44+
api_instance = lighter.OrderApi(api_client)
45+
account_index = 56 # int |
46+
market_id = 56 # int |
47+
authorization = 'authorization_example' # str | make required after integ is done (optional)
48+
auth = 'auth_example' # str | made optional to support header auth clients (optional)
49+
50+
try:
51+
# accountActiveOrders
52+
api_response = await api_instance.account_active_orders(account_index, market_id, authorization=authorization, auth=auth)
53+
print("The response of OrderApi->account_active_orders:\n")
54+
pprint(api_response)
55+
except Exception as e:
56+
print("Exception when calling OrderApi->account_active_orders: %s\n" % e)
57+
```
58+
59+
60+
61+
### Parameters
62+
63+
64+
Name | Type | Description | Notes
65+
------------- | ------------- | ------------- | -------------
66+
**account_index** | **int**| |
67+
**market_id** | **int**| |
68+
**authorization** | **str**| make required after integ is done | [optional]
69+
**auth** | **str**| made optional to support header auth clients | [optional]
70+
71+
### Return type
72+
73+
[**Orders**](Orders.md)
74+
75+
### Authorization
76+
77+
No authorization required
78+
79+
### HTTP request headers
80+
81+
- **Content-Type**: Not defined
82+
- **Accept**: application/json
83+
84+
### HTTP response details
85+
86+
| Status code | Description | Response headers |
87+
|-------------|-------------|------------------|
88+
**200** | A successful response. | - |
89+
**400** | Bad request | - |
90+
91+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
92+
1793
# **account_inactive_orders**
1894
> Orders account_inactive_orders(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, ask_filter=ask_filter, between_timestamps=between_timestamps, cursor=cursor)
1995

docs/PublicPoolInfo.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ Name | Type | Description | Notes
1010
**min_operator_share_rate** | **str** | |
1111
**total_shares** | **int** | |
1212
**operator_shares** | **int** | |
13-
**share_price_1d** | **float** | |
14-
**share_price_7d** | **float** | |
15-
**share_price_30d** | **float** | |
1613
**annual_percentage_yield** | **float** | |
1714
**daily_returns** | [**List[DailyReturn]**](DailyReturn.md) | |
15+
**share_prices** | [**List[SharePrice]**](SharePrice.md) | |
1816

1917
## Example
2018

docs/PublicPoolMetadata.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PublicPoolMetadata
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**code** | **int** | |
9+
**message** | **str** | | [optional]
10+
**account_index** | **int** | |
11+
**account_type** | **int** | |
12+
**name** | **str** | |
13+
**l1_address** | **str** | |
14+
**annual_percentage_yield** | **float** | |
15+
**status** | **int** | |
16+
**operator_fee** | **str** | |
17+
**total_asset_value** | **str** | |
18+
**total_shares** | **int** | |
19+
**account_share** | [**PublicPoolShare**](PublicPoolShare.md) | | [optional]
20+
21+
## Example
22+
23+
```python
24+
from lighter.models.public_pool_metadata import PublicPoolMetadata
25+
26+
# TODO update the JSON string below
27+
json = "{}"
28+
# create an instance of PublicPoolMetadata from a JSON string
29+
public_pool_metadata_instance = PublicPoolMetadata.from_json(json)
30+
# print the JSON string representation of the object
31+
print(PublicPoolMetadata.to_json())
32+
33+
# convert the object into a dict
34+
public_pool_metadata_dict = public_pool_metadata_instance.to_dict()
35+
# create an instance of PublicPoolMetadata from a dict
36+
public_pool_metadata_from_dict = PublicPoolMetadata.from_dict(public_pool_metadata_dict)
37+
```
38+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
39+
40+

docs/ReqGetAccountActiveOrders.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ReqGetAccountActiveOrders
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**account_index** | **int** | |
9+
**market_id** | **int** | |
10+
**auth** | **str** | made optional to support header auth clients | [optional]
11+
12+
## Example
13+
14+
```python
15+
from lighter.models.req_get_account_active_orders import ReqGetAccountActiveOrders
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of ReqGetAccountActiveOrders from a JSON string
20+
req_get_account_active_orders_instance = ReqGetAccountActiveOrders.from_json(json)
21+
# print the JSON string representation of the object
22+
print(ReqGetAccountActiveOrders.to_json())
23+
24+
# convert the object into a dict
25+
req_get_account_active_orders_dict = req_get_account_active_orders_instance.to_dict()
26+
# create an instance of ReqGetAccountActiveOrders from a dict
27+
req_get_account_active_orders_from_dict = ReqGetAccountActiveOrders.from_dict(req_get_account_active_orders_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

docs/ReqGetPublicPoolsMetadata.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ReqGetPublicPoolsMetadata
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**auth** | **str** | | [optional]
9+
**filter** | **str** | | [optional]
10+
**index** | **int** | |
11+
**limit** | **int** | |
12+
**account_index** | **int** | | [optional]
13+
14+
## Example
15+
16+
```python
17+
from lighter.models.req_get_public_pools_metadata import ReqGetPublicPoolsMetadata
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of ReqGetPublicPoolsMetadata from a JSON string
22+
req_get_public_pools_metadata_instance = ReqGetPublicPoolsMetadata.from_json(json)
23+
# print the JSON string representation of the object
24+
print(ReqGetPublicPoolsMetadata.to_json())
25+
26+
# convert the object into a dict
27+
req_get_public_pools_metadata_dict = req_get_public_pools_metadata_instance.to_dict()
28+
# create an instance of ReqGetPublicPoolsMetadata from a dict
29+
req_get_public_pools_metadata_from_dict = ReqGetPublicPoolsMetadata.from_dict(req_get_public_pools_metadata_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

0 commit comments

Comments
 (0)