diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 4036197..5a01738 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -77,7 +77,6 @@ docs/ReqGetAccountByL1Address.md
docs/ReqGetAccountInactiveOrders.md
docs/ReqGetAccountLimits.md
docs/ReqGetAccountMetadata.md
-docs/ReqGetAccountPendingTxs.md
docs/ReqGetAccountPnL.md
docs/ReqGetAccountTxs.md
docs/ReqGetBlock.md
@@ -223,7 +222,6 @@ lighter/models/req_get_account_by_l1_address.py
lighter/models/req_get_account_inactive_orders.py
lighter/models/req_get_account_limits.py
lighter/models/req_get_account_metadata.py
-lighter/models/req_get_account_pending_txs.py
lighter/models/req_get_account_pn_l.py
lighter/models/req_get_account_txs.py
lighter/models/req_get_block.py
@@ -283,18 +281,4 @@ lighter/rest.py
setup.cfg
test-requirements.txt
test/__init__.py
-test/test_account_margin_stats.py
-test/test_info_api.py
-test/test_order_book_orders.py
-test/test_req_get_order_book_orders.py
-test/test_req_get_transfer_fee_info.py
-test/test_req_get_transfer_history.py
-test/test_resp_change_account_tier.py
-test/test_resp_send_tx.py
-test/test_resp_send_tx_batch.py
-test/test_resp_withdrawal_delay.py
-test/test_risk_parameters.py
-test/test_transfer_fee_info.py
-test/test_transfer_history.py
-test/test_transfer_history_item.py
tox.ini
diff --git a/README.md b/README.md
index 5fc6d13..607ade1 100644
--- a/README.md
+++ b/README.md
@@ -68,11 +68,8 @@ All URIs are relative to *https://mainnet.zklighter.elliot.ai*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountApi* | [**account**](docs/AccountApi.md#account) | **GET** /api/v1/account | account
-*AccountApi* | [**accounts**](docs/AccountApi.md#accounts) | **GET** /api/v1/accounts | accounts
*AccountApi* | [**accounts_by_l1_address**](docs/AccountApi.md#accounts_by_l1_address) | **GET** /api/v1/accountsByL1Address | accountsByL1Address
*AccountApi* | [**apikeys**](docs/AccountApi.md#apikeys) | **GET** /api/v1/apikeys | apikeys
-*AccountApi* | [**fee_bucket**](docs/AccountApi.md#fee_bucket) | **GET** /api/v1/feeBucket | feeBucket
-*AccountApi* | [**is_whitelisted**](docs/AccountApi.md#is_whitelisted) | **GET** /api/v1/isWhitelisted | isWhitelisted
*AccountApi* | [**pnl**](docs/AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
*AccountApi* | [**public_pools**](docs/AccountApi.md#public_pools) | **GET** /api/v1/publicPools | publicPools
*BlockApi* | [**block**](docs/BlockApi.md#block) | **GET** /api/v1/block | block
@@ -80,9 +77,7 @@ Class | Method | HTTP request | Description
*BlockApi* | [**current_height**](docs/BlockApi.md#current_height) | **GET** /api/v1/currentHeight | currentHeight
*CandlestickApi* | [**candlesticks**](docs/CandlestickApi.md#candlesticks) | **GET** /api/v1/candlesticks | candlesticks
*CandlestickApi* | [**fundings**](docs/CandlestickApi.md#fundings) | **GET** /api/v1/fundings | fundings
-*InfoApi* | [**layer2_basic_info**](docs/InfoApi.md#layer2_basic_info) | **GET** /api/v1/layer2BasicInfo | layer2BasicInfo
*OrderApi* | [**account_inactive_orders**](docs/OrderApi.md#account_inactive_orders) | **GET** /api/v1/accountInactiveOrders | accountInactiveOrders
-*OrderApi* | [**account_orders**](docs/OrderApi.md#account_orders) | **GET** /api/v1/accountOrders | accountOrders
*OrderApi* | [**exchange_stats**](docs/OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
*OrderApi* | [**order_book_details**](docs/OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
*OrderApi* | [**order_book_orders**](docs/OrderApi.md#order_book_orders) | **GET** /api/v1/orderBookOrders | orderBookOrders
@@ -91,12 +86,10 @@ Class | Method | HTTP request | Description
*OrderApi* | [**trades**](docs/OrderApi.md#trades) | **GET** /api/v1/trades | trades
*RootApi* | [**info**](docs/RootApi.md#info) | **GET** /info | info
*RootApi* | [**status**](docs/RootApi.md#status) | **GET** / | status
-*TransactionApi* | [**account_pending_txs**](docs/TransactionApi.md#account_pending_txs) | **GET** /api/v1/accountPendingTxs | accountPendingTxs
*TransactionApi* | [**account_txs**](docs/TransactionApi.md#account_txs) | **GET** /api/v1/accountTxs | accountTxs
*TransactionApi* | [**block_txs**](docs/TransactionApi.md#block_txs) | **GET** /api/v1/blockTxs | blockTxs
*TransactionApi* | [**deposit_history**](docs/TransactionApi.md#deposit_history) | **GET** /api/v1/deposit/history | deposit_history
*TransactionApi* | [**next_nonce**](docs/TransactionApi.md#next_nonce) | **GET** /api/v1/nextNonce | nextNonce
-*TransactionApi* | [**pending_txs**](docs/TransactionApi.md#pending_txs) | **GET** /api/v1/pendingTxs | pendingTxs
*TransactionApi* | [**send_tx**](docs/TransactionApi.md#send_tx) | **POST** /api/v1/sendTx | sendTx
*TransactionApi* | [**send_tx_batch**](docs/TransactionApi.md#send_tx_batch) | **POST** /api/v1/sendTxBatch | sendTxBatch
*TransactionApi* | [**tx**](docs/TransactionApi.md#tx) | **GET** /api/v1/tx | tx
@@ -114,7 +107,6 @@ Class | Method | HTTP request | Description
- [AccountPnL](docs/AccountPnL.md)
- [AccountPosition](docs/AccountPosition.md)
- [AccountStats](docs/AccountStats.md)
- - [Accounts](docs/Accounts.md)
- [ApiKey](docs/ApiKey.md)
- [Block](docs/Block.md)
- [Blocks](docs/Blocks.md)
@@ -131,12 +123,9 @@ Class | Method | HTTP request | Description
- [DetailedCandlestick](docs/DetailedCandlestick.md)
- [EnrichedTx](docs/EnrichedTx.md)
- [ExchangeStats](docs/ExchangeStats.md)
- - [FeeBucket](docs/FeeBucket.md)
- [Funding](docs/Funding.md)
- [Fundings](docs/Fundings.md)
- - [IsWhitelisted](docs/IsWhitelisted.md)
- [L1ProviderInfo](docs/L1ProviderInfo.md)
- - [Layer2BasicInfo](docs/Layer2BasicInfo.md)
- [Liquidation](docs/Liquidation.md)
- [MarketInfo](docs/MarketInfo.md)
- [NextNonce](docs/NextNonce.md)
@@ -160,8 +149,6 @@ Class | Method | HTTP request | Description
- [ReqGetAccountApiKeys](docs/ReqGetAccountApiKeys.md)
- [ReqGetAccountByL1Address](docs/ReqGetAccountByL1Address.md)
- [ReqGetAccountInactiveOrders](docs/ReqGetAccountInactiveOrders.md)
- - [ReqGetAccountOrders](docs/ReqGetAccountOrders.md)
- - [ReqGetAccountPendingTxs](docs/ReqGetAccountPendingTxs.md)
- [ReqGetAccountPnL](docs/ReqGetAccountPnL.md)
- [ReqGetAccountTxs](docs/ReqGetAccountTxs.md)
- [ReqGetBlock](docs/ReqGetBlock.md)
@@ -169,7 +156,6 @@ Class | Method | HTTP request | Description
- [ReqGetByAccount](docs/ReqGetByAccount.md)
- [ReqGetCandlesticks](docs/ReqGetCandlesticks.md)
- [ReqGetDepositHistory](docs/ReqGetDepositHistory.md)
- - [ReqGetFeeBucket](docs/ReqGetFeeBucket.md)
- [ReqGetFundings](docs/ReqGetFundings.md)
- [ReqGetL1Tx](docs/ReqGetL1Tx.md)
- [ReqGetLatestDeposit](docs/ReqGetLatestDeposit.md)
@@ -185,7 +171,6 @@ Class | Method | HTTP request | Description
- [ReqGetTrades](docs/ReqGetTrades.md)
- [ReqGetTx](docs/ReqGetTx.md)
- [ReqGetWithdrawHistory](docs/ReqGetWithdrawHistory.md)
- - [ReqIsWhitelisted](docs/ReqIsWhitelisted.md)
- [ResultCode](docs/ResultCode.md)
- [SimpleOrder](docs/SimpleOrder.md)
- [Status](docs/Status.md)
@@ -199,14 +184,15 @@ Class | Method | HTTP request | Description
- [Txs](docs/Txs.md)
- [ValidatorInfo](docs/ValidatorInfo.md)
- [WithdrawHistory](docs/WithdrawHistory.md)
- - [WithdrawHistoryCursor](docs/WithdrawHistoryCursor.md)
- [WithdrawHistoryItem](docs/WithdrawHistoryItem.md)
- [ZkLighterInfo](docs/ZkLighterInfo.md)
-
-## Documentation For Authorization
+[//]: # ()
-Endpoints do not require authorization.
+[//]: # (## Documentation For Authorization)
+
+[//]: # ()
+[//]: # (Endpoints do not require authorization.)
diff --git a/docs/Account.md b/docs/Account.md
index 21e0c49..173acf4 100644
--- a/docs/Account.md
+++ b/docs/Account.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
+**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |
diff --git a/docs/DetailedAccount.md b/docs/DetailedAccount.md
index 7331ceb..768c3e2 100644
--- a/docs/DetailedAccount.md
+++ b/docs/DetailedAccount.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
+**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |
**account_index** | **int** | |
diff --git a/docs/PnLEntry.md b/docs/PnLEntry.md
index 10a71ce..6f80183 100644
--- a/docs/PnLEntry.md
+++ b/docs/PnLEntry.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**pool_pnl** | **float** | |
**pool_inflow** | **float** | |
**pool_outflow** | **float** | |
+**pool_total_shares** | **float** | |
## Example
diff --git a/docs/PublicPool.md b/docs/PublicPool.md
index 884d3b3..527e94e 100644
--- a/docs/PublicPool.md
+++ b/docs/PublicPool.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
+**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |
**account_index** | **int** | |
diff --git a/docs/ReqGetAccountPendingTxs.md b/docs/ReqGetAccountPendingTxs.md
deleted file mode 100644
index f4e593d..0000000
--- a/docs/ReqGetAccountPendingTxs.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# ReqGetAccountPendingTxs
-
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**by** | **str** | | [optional]
-**value** | **str** | | [optional]
-**types** | **List[int]** | | [optional]
-
-## Example
-
-```python
-from lighter.models.req_get_account_pending_txs import ReqGetAccountPendingTxs
-
-# TODO update the JSON string below
-json = "{}"
-# create an instance of ReqGetAccountPendingTxs from a JSON string
-req_get_account_pending_txs_instance = ReqGetAccountPendingTxs.from_json(json)
-# print the JSON string representation of the object
-print(ReqGetAccountPendingTxs.to_json())
-
-# convert the object into a dict
-req_get_account_pending_txs_dict = req_get_account_pending_txs_instance.to_dict()
-# create an instance of ReqGetAccountPendingTxs from a dict
-req_get_account_pending_txs_from_dict = ReqGetAccountPendingTxs.from_dict(req_get_account_pending_txs_dict)
-```
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/docs/ReqGetAccountTxs.md b/docs/ReqGetAccountTxs.md
index c4a56f5..dbf8ffb 100644
--- a/docs/ReqGetAccountTxs.md
+++ b/docs/ReqGetAccountTxs.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**by** | **str** | | [optional]
**value** | **str** | | [optional]
**types** | **List[int]** | | [optional]
+**auth** | **str** | | [optional]
## Example
diff --git a/docs/TransactionApi.md b/docs/TransactionApi.md
index 4308aa3..01b0ec1 100644
--- a/docs/TransactionApi.md
+++ b/docs/TransactionApi.md
@@ -18,7 +18,7 @@ Method | HTTP request | Description
# **account_txs**
-> Txs account_txs(limit, by, value, index=index, types=types)
+> Txs account_txs(limit, by, value, authorization=authorization, index=index, types=types, auth=auth)
accountTxs
@@ -47,12 +47,14 @@ async with lighter.ApiClient(configuration) as api_client:
limit = 56 # int |
by = 'by_example' # str |
value = 'value_example' # str |
+ authorization = 'authorization_example' # str | (optional)
index = 56 # int | (optional)
types = [56] # List[int] | (optional)
+ auth = 'auth_example' # str | (optional)
try:
# accountTxs
- api_response = await api_instance.account_txs(limit, by, value, index=index, types=types)
+ api_response = await api_instance.account_txs(limit, by, value, authorization=authorization, index=index, types=types, auth=auth)
print("The response of TransactionApi->account_txs:\n")
pprint(api_response)
except Exception as e:
@@ -69,8 +71,10 @@ Name | Type | Description | Notes
**limit** | **int**| |
**by** | **str**| |
**value** | **str**| |
+ **authorization** | **str**| | [optional]
**index** | **int**| | [optional]
**types** | [**List[int]**](int.md)| | [optional]
+ **auth** | **str**| | [optional]
### Return type
diff --git a/lighter/__init__.py b/lighter/__init__.py
index 8d68c6a..a6a804a 100644
--- a/lighter/__init__.py
+++ b/lighter/__init__.py
@@ -111,7 +111,6 @@
from lighter.models.req_get_account_inactive_orders import ReqGetAccountInactiveOrders
from lighter.models.req_get_account_limits import ReqGetAccountLimits
from lighter.models.req_get_account_metadata import ReqGetAccountMetadata
-from lighter.models.req_get_account_pending_txs import ReqGetAccountPendingTxs
from lighter.models.req_get_account_pn_l import ReqGetAccountPnL
from lighter.models.req_get_account_txs import ReqGetAccountTxs
from lighter.models.req_get_block import ReqGetBlock
diff --git a/lighter/api/transaction_api.py b/lighter/api/transaction_api.py
index 066e564..5129ab0 100644
--- a/lighter/api/transaction_api.py
+++ b/lighter/api/transaction_api.py
@@ -52,8 +52,10 @@ async def account_txs(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
+ authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
+ auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -77,10 +79,14 @@ async def account_txs(
:type by: str
:param value: (required)
:type value: str
+ :param authorization:
+ :type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
+ :param auth:
+ :type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -107,8 +113,10 @@ async def account_txs(
limit=limit,
by=by,
value=value,
+ authorization=authorization,
index=index,
types=types,
+ auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -136,8 +144,10 @@ async def account_txs_with_http_info(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
+ authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
+ auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -161,10 +171,14 @@ async def account_txs_with_http_info(
:type by: str
:param value: (required)
:type value: str
+ :param authorization:
+ :type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
+ :param auth:
+ :type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -191,8 +205,10 @@ async def account_txs_with_http_info(
limit=limit,
by=by,
value=value,
+ authorization=authorization,
index=index,
types=types,
+ auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -220,8 +236,10 @@ async def account_txs_without_preload_content(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
+ authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
+ auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -245,10 +263,14 @@ async def account_txs_without_preload_content(
:type by: str
:param value: (required)
:type value: str
+ :param authorization:
+ :type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
+ :param auth:
+ :type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@@ -275,8 +297,10 @@ async def account_txs_without_preload_content(
limit=limit,
by=by,
value=value,
+ authorization=authorization,
index=index,
types=types,
+ auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -299,8 +323,10 @@ def _account_txs_serialize(
limit,
by,
value,
+ authorization,
index,
types,
+ auth,
_request_auth,
_content_type,
_headers,
@@ -342,7 +368,13 @@ def _account_txs_serialize(
_query_params.append(('types', types))
+ if auth is not None:
+
+ _query_params.append(('auth', auth))
+
# process the header parameters
+ if authorization is not None:
+ _header_params['authorization'] = authorization
# process the form parameters
# process the body parameter
diff --git a/lighter/models/__init__.py b/lighter/models/__init__.py
index 125d38a..c75e64c 100644
--- a/lighter/models/__init__.py
+++ b/lighter/models/__init__.py
@@ -83,7 +83,6 @@
from lighter.models.req_get_account_inactive_orders import ReqGetAccountInactiveOrders
from lighter.models.req_get_account_limits import ReqGetAccountLimits
from lighter.models.req_get_account_metadata import ReqGetAccountMetadata
-from lighter.models.req_get_account_pending_txs import ReqGetAccountPendingTxs
from lighter.models.req_get_account_pn_l import ReqGetAccountPnL
from lighter.models.req_get_account_txs import ReqGetAccountTxs
from lighter.models.req_get_block import ReqGetBlock
diff --git a/lighter/models/account.py b/lighter/models/account.py
index 766387d..6a59820 100644
--- a/lighter/models/account.py
+++ b/lighter/models/account.py
@@ -35,10 +35,11 @@ class Account(BaseModel):
total_order_count: StrictInt
total_isolated_order_count: StrictInt
pending_order_count: StrictInt
+ available_balance: StrictStr
status: StrictInt
collateral: StrictStr
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "status", "collateral"]
+ __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "available_balance", "status", "collateral"]
model_config = ConfigDict(
populate_by_name=True,
@@ -107,6 +108,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"total_order_count": obj.get("total_order_count"),
"total_isolated_order_count": obj.get("total_isolated_order_count"),
"pending_order_count": obj.get("pending_order_count"),
+ "available_balance": obj.get("available_balance"),
"status": obj.get("status"),
"collateral": obj.get("collateral")
})
diff --git a/lighter/models/detailed_account.py b/lighter/models/detailed_account.py
index 6fb47be..296e9e9 100644
--- a/lighter/models/detailed_account.py
+++ b/lighter/models/detailed_account.py
@@ -38,6 +38,7 @@ class DetailedAccount(BaseModel):
total_order_count: StrictInt
total_isolated_order_count: StrictInt
pending_order_count: StrictInt
+ available_balance: StrictStr
status: StrictInt
collateral: StrictStr
account_index: StrictInt
@@ -51,7 +52,7 @@ class DetailedAccount(BaseModel):
pool_info: PublicPoolInfo
shares: List[PublicPoolShare]
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "positions", "total_asset_value", "cross_asset_value", "pool_info", "shares"]
+ __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "available_balance", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "positions", "total_asset_value", "cross_asset_value", "pool_info", "shares"]
model_config = ConfigDict(
populate_by_name=True,
@@ -137,6 +138,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"total_order_count": obj.get("total_order_count"),
"total_isolated_order_count": obj.get("total_isolated_order_count"),
"pending_order_count": obj.get("pending_order_count"),
+ "available_balance": obj.get("available_balance"),
"status": obj.get("status"),
"collateral": obj.get("collateral"),
"account_index": obj.get("account_index"),
diff --git a/lighter/models/pn_l_entry.py b/lighter/models/pn_l_entry.py
index 67b5b99..5bedea7 100644
--- a/lighter/models/pn_l_entry.py
+++ b/lighter/models/pn_l_entry.py
@@ -33,8 +33,9 @@ class PnLEntry(BaseModel):
pool_pnl: Union[StrictFloat, StrictInt]
pool_inflow: Union[StrictFloat, StrictInt]
pool_outflow: Union[StrictFloat, StrictInt]
+ pool_total_shares: Union[StrictFloat, StrictInt]
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["timestamp", "trade_pnl", "inflow", "outflow", "pool_pnl", "pool_inflow", "pool_outflow"]
+ __properties: ClassVar[List[str]] = ["timestamp", "trade_pnl", "inflow", "outflow", "pool_pnl", "pool_inflow", "pool_outflow", "pool_total_shares"]
model_config = ConfigDict(
populate_by_name=True,
@@ -100,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"outflow": obj.get("outflow"),
"pool_pnl": obj.get("pool_pnl"),
"pool_inflow": obj.get("pool_inflow"),
- "pool_outflow": obj.get("pool_outflow")
+ "pool_outflow": obj.get("pool_outflow"),
+ "pool_total_shares": obj.get("pool_total_shares")
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/lighter/models/public_pool.py b/lighter/models/public_pool.py
index ba21cd1..5d9b61a 100644
--- a/lighter/models/public_pool.py
+++ b/lighter/models/public_pool.py
@@ -37,6 +37,7 @@ class PublicPool(BaseModel):
total_order_count: StrictInt
total_isolated_order_count: StrictInt
pending_order_count: StrictInt
+ available_balance: StrictStr
status: StrictInt
collateral: StrictStr
account_index: StrictInt
@@ -49,7 +50,7 @@ class PublicPool(BaseModel):
pool_info: PublicPoolInfo
account_share: Optional[PublicPoolShare] = None
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "total_asset_value", "cross_asset_value", "pool_info", "account_share"]
+ __properties: ClassVar[List[str]] = ["code", "message", "account_type", "index", "l1_address", "cancel_all_time", "total_order_count", "total_isolated_order_count", "pending_order_count", "available_balance", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "total_asset_value", "cross_asset_value", "pool_info", "account_share"]
model_config = ConfigDict(
populate_by_name=True,
@@ -124,6 +125,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"total_order_count": obj.get("total_order_count"),
"total_isolated_order_count": obj.get("total_isolated_order_count"),
"pending_order_count": obj.get("pending_order_count"),
+ "available_balance": obj.get("available_balance"),
"status": obj.get("status"),
"collateral": obj.get("collateral"),
"account_index": obj.get("account_index"),
diff --git a/lighter/models/req_get_account_pending_txs.py b/lighter/models/req_get_account_pending_txs.py
deleted file mode 100644
index 9f0f878..0000000
--- a/lighter/models/req_get_account_pending_txs.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# coding: utf-8
-
-"""
-
-
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
-
- The version of the OpenAPI document:
- Generated by OpenAPI Generator (https://openapi-generator.tech)
-
- Do not edit the class manually.
-""" # noqa: E501
-
-
-from __future__ import annotations
-import pprint
-import re # noqa: F401
-import json
-
-from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
-from typing import Any, ClassVar, Dict, List, Optional
-from typing import Optional, Set
-from typing_extensions import Self
-
-class ReqGetAccountPendingTxs(BaseModel):
- """
- ReqGetAccountPendingTxs
- """ # noqa: E501
- by: Optional[StrictStr] = None
- value: Optional[StrictStr] = None
- types: Optional[List[StrictInt]] = None
- additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["by", "value", "types"]
-
- @field_validator('by')
- def by_validate_enum(cls, value):
- """Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['account_index']):
- raise ValueError("must be one of enum values ('account_index')")
- return value
-
- model_config = ConfigDict(
- populate_by_name=True,
- validate_assignment=True,
- protected_namespaces=(),
- )
-
-
- def to_str(self) -> str:
- """Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
-
- def to_json(self) -> str:
- """Returns the JSON representation of the model using alias"""
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
- return json.dumps(self.to_dict())
-
- @classmethod
- def from_json(cls, json_str: str) -> Optional[Self]:
- """Create an instance of ReqGetAccountPendingTxs from a JSON string"""
- return cls.from_dict(json.loads(json_str))
-
- def to_dict(self) -> Dict[str, Any]:
- """Return the dictionary representation of the model using alias.
-
- This has the following differences from calling pydantic's
- `self.model_dump(by_alias=True)`:
-
- * `None` is only added to the output dict for nullable fields that
- were set at model initialization. Other fields with value `None`
- are ignored.
- * Fields in `self.additional_properties` are added to the output dict.
- """
- excluded_fields: Set[str] = set([
- "additional_properties",
- ])
-
- _dict = self.model_dump(
- by_alias=True,
- exclude=excluded_fields,
- exclude_none=True,
- )
- # puts key-value pairs in additional_properties in the top level
- if self.additional_properties is not None:
- for _key, _value in self.additional_properties.items():
- _dict[_key] = _value
-
- return _dict
-
- @classmethod
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
- """Create an instance of ReqGetAccountPendingTxs from a dict"""
- if obj is None:
- return None
-
- if not isinstance(obj, dict):
- return cls.model_validate(obj)
-
- _obj = cls.model_validate({
- "by": obj.get("by"),
- "value": obj.get("value"),
- "types": obj.get("types")
- })
- # store additional fields in additional_properties
- for _key in obj.keys():
- if _key not in cls.__properties:
- _obj.additional_properties[_key] = obj.get(_key)
-
- return _obj
-
-
diff --git a/lighter/models/req_get_account_txs.py b/lighter/models/req_get_account_txs.py
index c83d7ae..6c785f6 100644
--- a/lighter/models/req_get_account_txs.py
+++ b/lighter/models/req_get_account_txs.py
@@ -32,8 +32,9 @@ class ReqGetAccountTxs(BaseModel):
by: Optional[StrictStr] = None
value: Optional[StrictStr] = None
types: Optional[List[StrictInt]] = None
+ auth: Optional[StrictStr] = None
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["index", "limit", "by", "value", "types"]
+ __properties: ClassVar[List[str]] = ["index", "limit", "by", "value", "types", "auth"]
@field_validator('by')
def by_validate_enum(cls, value):
@@ -107,7 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"limit": obj.get("limit"),
"by": obj.get("by"),
"value": obj.get("value"),
- "types": obj.get("types")
+ "types": obj.get("types"),
+ "auth": obj.get("auth")
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/openapi.json b/openapi.json
index 1845067..86d4b68 100644
--- a/openapi.json
+++ b/openapi.json
@@ -297,6 +297,12 @@
}
},
"parameters": [
+ {
+ "name": "authorization",
+ "in": "header",
+ "required": false,
+ "type": "string"
+ },
{
"name": "index",
"in": "query",
@@ -337,6 +343,12 @@
"type": "integer",
"format": "uint8"
}
+ },
+ {
+ "name": "auth",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -2305,6 +2317,10 @@
"format": "int64",
"example": "100"
},
+ "available_balance": {
+ "type": "string",
+ "example": "19995"
+ },
"status": {
"type": "integer",
"format": "uint8",
@@ -2325,6 +2341,7 @@
"total_order_count",
"total_isolated_order_count",
"pending_order_count",
+ "available_balance",
"status",
"collateral"
]
@@ -3242,6 +3259,10 @@
"format": "int64",
"example": "100"
},
+ "available_balance": {
+ "type": "string",
+ "example": "19995"
+ },
"status": {
"type": "integer",
"format": "uint8",
@@ -3304,6 +3325,7 @@
"total_order_count",
"total_isolated_order_count",
"pending_order_count",
+ "available_balance",
"status",
"collateral",
"account_index",
@@ -4672,6 +4694,11 @@
"type": "number",
"format": "double",
"example": "12.0"
+ },
+ "pool_total_shares": {
+ "type": "number",
+ "format": "double",
+ "example": "12.0"
}
},
"title": "PnLEntry",
@@ -4682,7 +4709,8 @@
"outflow",
"pool_pnl",
"pool_inflow",
- "pool_outflow"
+ "pool_outflow",
+ "pool_total_shares"
]
},
"PositionFunding": {
@@ -4825,6 +4853,10 @@
"format": "int64",
"example": "100"
},
+ "available_balance": {
+ "type": "string",
+ "example": "19995"
+ },
"status": {
"type": "integer",
"format": "uint8",
@@ -4878,6 +4910,7 @@
"total_order_count",
"total_isolated_order_count",
"pending_order_count",
+ "available_balance",
"status",
"collateral",
"account_index",
@@ -5298,28 +5331,6 @@
"value"
]
},
- "ReqGetAccountPendingTxs": {
- "type": "object",
- "properties": {
- "by": {
- "type": "string",
- "enum": [
- "account_index"
- ]
- },
- "value": {
- "type": "string"
- },
- "types": {
- "type": "array",
- "items": {
- "type": "integer",
- "format": "uint8"
- }
- }
- },
- "title": "ReqGetAccountPendingTxs"
- },
"ReqGetAccountPnL": {
"type": "object",
"properties": {
@@ -5404,6 +5415,9 @@
"type": "integer",
"format": "uint8"
}
+ },
+ "auth": {
+ "type": "string"
}
},
"title": "ReqGetAccountTxs"