diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 1559712..4036197 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -1,16 +1,23 @@
docs/Account.md
docs/AccountApi.md
docs/AccountApiKeys.md
+docs/AccountLimits.md
+docs/AccountMarginStats.md
docs/AccountMarketStats.md
docs/AccountMetadata.md
+docs/AccountMetadatas.md
docs/AccountPnL.md
docs/AccountPosition.md
docs/AccountStats.md
-docs/Accounts.md
+docs/AccountTradeStats.md
+docs/Announcement.md
+docs/AnnouncementApi.md
+docs/Announcements.md
docs/ApiKey.md
docs/Block.md
docs/BlockApi.md
docs/Blocks.md
+docs/BridgeApi.md
docs/BridgeSupportedNetwork.md
docs/Candlestick.md
docs/CandlestickApi.md
@@ -26,16 +33,22 @@ docs/DetailedAccounts.md
docs/DetailedCandlestick.md
docs/EnrichedTx.md
docs/ExchangeStats.md
-docs/FeeBucket.md
+docs/ExportData.md
docs/Funding.md
+docs/FundingApi.md
+docs/FundingRate.md
+docs/FundingRates.md
docs/Fundings.md
docs/InfoApi.md
-docs/IsWhitelisted.md
+docs/L1Metadata.md
docs/L1ProviderInfo.md
-docs/Layer2BasicInfo.md
+docs/LiqTrade.md
docs/Liquidation.md
+docs/LiquidationInfo.md
+docs/LiquidationInfos.md
docs/MarketInfo.md
docs/NextNonce.md
+docs/NotificationApi.md
docs/Order.md
docs/OrderApi.md
docs/OrderBook.md
@@ -47,17 +60,23 @@ docs/OrderBookStats.md
docs/OrderBooks.md
docs/Orders.md
docs/PnLEntry.md
+docs/PositionFunding.md
+docs/PositionFundings.md
docs/PriceLevel.md
docs/PublicPool.md
docs/PublicPoolInfo.md
docs/PublicPoolShare.md
docs/PublicPools.md
+docs/ReferralApi.md
+docs/ReferralPointEntry.md
+docs/ReferralPoints.md
+docs/ReqExportData.md
docs/ReqGetAccount.md
-docs/ReqGetAccountActiveOrders.md
docs/ReqGetAccountApiKeys.md
docs/ReqGetAccountByL1Address.md
docs/ReqGetAccountInactiveOrders.md
-docs/ReqGetAccountOrders.md
+docs/ReqGetAccountLimits.md
+docs/ReqGetAccountMetadata.md
docs/ReqGetAccountPendingTxs.md
docs/ReqGetAccountPnL.md
docs/ReqGetAccountTxs.md
@@ -66,24 +85,36 @@ docs/ReqGetBlockTxs.md
docs/ReqGetByAccount.md
docs/ReqGetCandlesticks.md
docs/ReqGetDepositHistory.md
-docs/ReqGetFeeBucket.md
+docs/ReqGetFastWithdrawInfo.md
docs/ReqGetFundings.md
+docs/ReqGetL1Metadata.md
docs/ReqGetL1Tx.md
docs/ReqGetLatestDeposit.md
+docs/ReqGetLiquidationInfos.md
docs/ReqGetNextNonce.md
docs/ReqGetOrderBookDetails.md
docs/ReqGetOrderBookOrders.md
docs/ReqGetOrderBooks.md
+docs/ReqGetPositionFunding.md
docs/ReqGetPublicPools.md
docs/ReqGetRangeWithCursor.md
docs/ReqGetRangeWithIndex.md
docs/ReqGetRangeWithIndexSortable.md
docs/ReqGetRecentTrades.md
+docs/ReqGetReferralPoints.md
docs/ReqGetTrades.md
+docs/ReqGetTransferFeeInfo.md
+docs/ReqGetTransferHistory.md
docs/ReqGetTx.md
docs/ReqGetWithdrawHistory.md
-docs/ReqIsWhitelisted.md
+docs/RespChangeAccountTier.md
+docs/RespGetFastBridgeInfo.md
+docs/RespSendTx.md
+docs/RespSendTxBatch.md
+docs/RespWithdrawalDelay.md
docs/ResultCode.md
+docs/RiskInfo.md
+docs/RiskParameters.md
docs/RootApi.md
docs/SimpleOrder.md
docs/Status.md
@@ -92,21 +123,30 @@ docs/Ticker.md
docs/Trade.md
docs/Trades.md
docs/TransactionApi.md
+docs/TransferFeeInfo.md
+docs/TransferHistory.md
+docs/TransferHistoryItem.md
docs/Tx.md
docs/TxHash.md
docs/TxHashes.md
docs/Txs.md
docs/ValidatorInfo.md
docs/WithdrawHistory.md
-docs/WithdrawHistoryCursor.md
docs/WithdrawHistoryItem.md
docs/ZkLighterInfo.md
+git_push.sh
+lighter/__init__.py
lighter/api/__init__.py
lighter/api/account_api.py
+lighter/api/announcement_api.py
lighter/api/block_api.py
+lighter/api/bridge_api.py
lighter/api/candlestick_api.py
+lighter/api/funding_api.py
lighter/api/info_api.py
+lighter/api/notification_api.py
lighter/api/order_api.py
+lighter/api/referral_api.py
lighter/api/root_api.py
lighter/api/transaction_api.py
lighter/api_client.py
@@ -116,28 +156,50 @@ lighter/exceptions.py
lighter/models/__init__.py
lighter/models/account.py
lighter/models/account_api_keys.py
+lighter/models/account_limits.py
+lighter/models/account_margin_stats.py
+lighter/models/account_market_stats.py
+lighter/models/account_metadata.py
+lighter/models/account_metadatas.py
lighter/models/account_pn_l.py
lighter/models/account_position.py
+lighter/models/account_stats.py
+lighter/models/account_trade_stats.py
+lighter/models/announcement.py
+lighter/models/announcements.py
lighter/models/api_key.py
lighter/models/block.py
lighter/models/blocks.py
+lighter/models/bridge_supported_network.py
lighter/models/candlestick.py
lighter/models/candlesticks.py
+lighter/models/contract_address.py
lighter/models/current_height.py
+lighter/models/cursor.py
lighter/models/daily_return.py
lighter/models/deposit_history.py
lighter/models/deposit_history_item.py
lighter/models/detailed_account.py
lighter/models/detailed_accounts.py
+lighter/models/detailed_candlestick.py
lighter/models/enriched_tx.py
lighter/models/exchange_stats.py
-lighter/models/fee_bucket.py
+lighter/models/export_data.py
lighter/models/funding.py
+lighter/models/funding_rate.py
+lighter/models/funding_rates.py
lighter/models/fundings.py
-lighter/models/layer2_basic_info.py
+lighter/models/l1_metadata.py
+lighter/models/l1_provider_info.py
+lighter/models/liq_trade.py
+lighter/models/liquidation.py
+lighter/models/liquidation_info.py
+lighter/models/liquidation_infos.py
+lighter/models/market_info.py
lighter/models/next_nonce.py
lighter/models/order.py
lighter/models/order_book.py
+lighter/models/order_book_depth.py
lighter/models/order_book_detail.py
lighter/models/order_book_details.py
lighter/models/order_book_orders.py
@@ -145,21 +207,94 @@ lighter/models/order_book_stats.py
lighter/models/order_books.py
lighter/models/orders.py
lighter/models/pn_l_entry.py
+lighter/models/position_funding.py
+lighter/models/position_fundings.py
+lighter/models/price_level.py
lighter/models/public_pool.py
lighter/models/public_pool_info.py
lighter/models/public_pool_share.py
lighter/models/public_pools.py
+lighter/models/referral_point_entry.py
+lighter/models/referral_points.py
+lighter/models/req_export_data.py
+lighter/models/req_get_account.py
+lighter/models/req_get_account_api_keys.py
+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
+lighter/models/req_get_block_txs.py
+lighter/models/req_get_by_account.py
+lighter/models/req_get_candlesticks.py
+lighter/models/req_get_deposit_history.py
+lighter/models/req_get_fast_withdraw_info.py
+lighter/models/req_get_fundings.py
+lighter/models/req_get_l1_metadata.py
+lighter/models/req_get_l1_tx.py
+lighter/models/req_get_latest_deposit.py
+lighter/models/req_get_liquidation_infos.py
+lighter/models/req_get_next_nonce.py
+lighter/models/req_get_order_book_details.py
+lighter/models/req_get_order_book_orders.py
+lighter/models/req_get_order_books.py
+lighter/models/req_get_position_funding.py
+lighter/models/req_get_public_pools.py
+lighter/models/req_get_range_with_cursor.py
+lighter/models/req_get_range_with_index.py
+lighter/models/req_get_range_with_index_sortable.py
+lighter/models/req_get_recent_trades.py
+lighter/models/req_get_referral_points.py
+lighter/models/req_get_trades.py
+lighter/models/req_get_transfer_fee_info.py
+lighter/models/req_get_transfer_history.py
+lighter/models/req_get_tx.py
+lighter/models/req_get_withdraw_history.py
+lighter/models/resp_change_account_tier.py
+lighter/models/resp_get_fast_bridge_info.py
+lighter/models/resp_send_tx.py
+lighter/models/resp_send_tx_batch.py
+lighter/models/resp_withdrawal_delay.py
+lighter/models/result_code.py
+lighter/models/risk_info.py
+lighter/models/risk_parameters.py
lighter/models/simple_order.py
lighter/models/status.py
lighter/models/sub_accounts.py
+lighter/models/ticker.py
lighter/models/trade.py
lighter/models/trades.py
+lighter/models/transfer_fee_info.py
+lighter/models/transfer_history.py
+lighter/models/transfer_history_item.py
lighter/models/tx.py
lighter/models/tx_hash.py
lighter/models/tx_hashes.py
lighter/models/txs.py
+lighter/models/validator_info.py
lighter/models/withdraw_history.py
lighter/models/withdraw_history_item.py
lighter/models/zk_lighter_info.py
lighter/py.typed
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 560dcb3..5fc6d13 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,6 @@ Class | Method | HTTP request | Description
*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_active_orders**](docs/OrderApi.md#account_active_orders) | **GET** /api/v1/accountActiveOrders | accountActiveOrders
*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
@@ -158,7 +157,6 @@ Class | Method | HTTP request | Description
- [PublicPoolShare](docs/PublicPoolShare.md)
- [PublicPools](docs/PublicPools.md)
- [ReqGetAccount](docs/ReqGetAccount.md)
- - [ReqGetAccountActiveOrders](docs/ReqGetAccountActiveOrders.md)
- [ReqGetAccountApiKeys](docs/ReqGetAccountApiKeys.md)
- [ReqGetAccountByL1Address](docs/ReqGetAccountByL1Address.md)
- [ReqGetAccountInactiveOrders](docs/ReqGetAccountInactiveOrders.md)
diff --git a/docs/Account.md b/docs/Account.md
index d866ec5..21e0c49 100644
--- a/docs/Account.md
+++ b/docs/Account.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
**total_order_count** | **int** | |
+**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**status** | **int** | |
**collateral** | **str** | |
diff --git a/docs/AccountApi.md b/docs/AccountApi.md
index 869552e..24bcb76 100644
--- a/docs/AccountApi.md
+++ b/docs/AccountApi.md
@@ -9,6 +9,7 @@ Method | HTTP request | Description
[**account_metadata**](AccountApi.md#account_metadata) | **GET** /api/v1/accountMetadata | accountMetadata
[**accounts_by_l1_address**](AccountApi.md#accounts_by_l1_address) | **GET** /api/v1/accountsByL1Address | accountsByL1Address
[**apikeys**](AccountApi.md#apikeys) | **GET** /api/v1/apikeys | apikeys
+[**change_account_tier**](AccountApi.md#change_account_tier) | **POST** /api/v1/changeAccountTier | changeAccountTier
[**l1_metadata**](AccountApi.md#l1_metadata) | **GET** /api/v1/l1Metadata | l1Metadata
[**liquidations**](AccountApi.md#liquidations) | **GET** /api/v1/liquidations | liquidations
[**pnl**](AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
@@ -375,6 +376,81 @@ No authorization required
[[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)
+# **change_account_tier**
+> RespChangeAccountTier change_account_tier(account_index, new_tier, authorization=authorization, auth=auth)
+
+changeAccountTier
+
+Change account tier
+
+### Example
+
+
+```python
+import lighter
+from lighter.models.resp_change_account_tier import RespChangeAccountTier
+from lighter.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
+# See configuration.py for a list of all supported configuration parameters.
+configuration = lighter.Configuration(
+ host = "https://mainnet.zklighter.elliot.ai"
+)
+
+
+# Enter a context with an instance of the API client
+async with lighter.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = lighter.AccountApi(api_client)
+ account_index = 56 # int |
+ new_tier = 'new_tier_example' # str |
+ authorization = 'authorization_example' # str | make required after integ is done (optional)
+ auth = 'auth_example' # str | made optional to support header auth clients (optional)
+
+ try:
+ # changeAccountTier
+ api_response = await api_instance.change_account_tier(account_index, new_tier, authorization=authorization, auth=auth)
+ print("The response of AccountApi->change_account_tier:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AccountApi->change_account_tier: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **account_index** | **int**| |
+ **new_tier** | **str**| |
+ **authorization** | **str**| make required after integ is done | [optional]
+ **auth** | **str**| made optional to support header auth clients | [optional]
+
+### Return type
+
+[**RespChangeAccountTier**](RespChangeAccountTier.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad request | - |
+
+[[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)
+
# **l1_metadata**
> L1Metadata l1_metadata(l1_address, authorization=authorization, auth=auth)
diff --git a/docs/AccountLimits.md b/docs/AccountLimits.md
index 8dbe1f8..0ca7ba2 100644
--- a/docs/AccountLimits.md
+++ b/docs/AccountLimits.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**code** | **int** | |
**message** | **str** | | [optional]
**max_llp_percentage** | **int** | |
+**user_tier** | **str** | |
## Example
diff --git a/docs/AccountMarginStats.md b/docs/AccountMarginStats.md
new file mode 100644
index 0000000..2fedfac
--- /dev/null
+++ b/docs/AccountMarginStats.md
@@ -0,0 +1,34 @@
+# AccountMarginStats
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**collateral** | **str** | |
+**portfolio_value** | **str** | |
+**leverage** | **str** | |
+**available_balance** | **str** | |
+**margin_usage** | **str** | |
+**buying_power** | **str** | |
+
+## Example
+
+```python
+from lighter.models.account_margin_stats import AccountMarginStats
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AccountMarginStats from a JSON string
+account_margin_stats_instance = AccountMarginStats.from_json(json)
+# print the JSON string representation of the object
+print(AccountMarginStats.to_json())
+
+# convert the object into a dict
+account_margin_stats_dict = account_margin_stats_instance.to_dict()
+# create an instance of AccountMarginStats from a dict
+account_margin_stats_from_dict = AccountMarginStats.from_dict(account_margin_stats_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/AccountPosition.md b/docs/AccountPosition.md
index 4b30c56..c75cece 100644
--- a/docs/AccountPosition.md
+++ b/docs/AccountPosition.md
@@ -18,6 +18,8 @@ Name | Type | Description | Notes
**unrealized_pnl** | **str** | |
**realized_pnl** | **str** | |
**total_funding_paid_out** | **str** | | [optional]
+**margin_mode** | **int** | |
+**allocated_margin** | **str** | |
## Example
diff --git a/docs/AccountStats.md b/docs/AccountStats.md
index aa261f7..89aaab6 100644
--- a/docs/AccountStats.md
+++ b/docs/AccountStats.md
@@ -11,6 +11,8 @@ Name | Type | Description | Notes
**available_balance** | **str** | |
**margin_usage** | **str** | |
**buying_power** | **str** | |
+**cross_stats** | [**AccountMarginStats**](AccountMarginStats.md) | |
+**total_stats** | [**AccountMarginStats**](AccountMarginStats.md) | |
## Example
diff --git a/docs/DetailedAccount.md b/docs/DetailedAccount.md
index eef0ef4..7331ceb 100644
--- a/docs/DetailedAccount.md
+++ b/docs/DetailedAccount.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
**total_order_count** | **int** | |
+**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**status** | **int** | |
**collateral** | **str** | |
@@ -22,6 +23,7 @@ Name | Type | Description | Notes
**referral_points_percentage** | **str** | Remove After FE uses L1 meta endpoint |
**positions** | [**List[AccountPosition]**](AccountPosition.md) | |
**total_asset_value** | **str** | |
+**cross_asset_value** | **str** | |
**pool_info** | [**PublicPoolInfo**](PublicPoolInfo.md) | |
**shares** | [**List[PublicPoolShare]**](PublicPoolShare.md) | |
diff --git a/docs/InfoApi.md b/docs/InfoApi.md
new file mode 100644
index 0000000..1078327
--- /dev/null
+++ b/docs/InfoApi.md
@@ -0,0 +1,150 @@
+# lighter.InfoApi
+
+All URIs are relative to *https://mainnet.zklighter.elliot.ai*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**transfer_fee_info**](InfoApi.md#transfer_fee_info) | **GET** /api/v1/transferFeeInfo | transferFeeInfo
+[**withdrawal_delay**](InfoApi.md#withdrawal_delay) | **GET** /api/v1/withdrawalDelay | withdrawalDelay
+
+
+# **transfer_fee_info**
+> TransferFeeInfo transfer_fee_info(account_index, authorization=authorization, auth=auth, to_account_index=to_account_index)
+
+transferFeeInfo
+
+Transfer fee info
+
+### Example
+
+
+```python
+import lighter
+from lighter.models.transfer_fee_info import TransferFeeInfo
+from lighter.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
+# See configuration.py for a list of all supported configuration parameters.
+configuration = lighter.Configuration(
+ host = "https://mainnet.zklighter.elliot.ai"
+)
+
+
+# Enter a context with an instance of the API client
+async with lighter.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = lighter.InfoApi(api_client)
+ account_index = 56 # int |
+ authorization = 'authorization_example' # str | (optional)
+ auth = 'auth_example' # str | (optional)
+ to_account_index = -1 # int | (optional) (default to -1)
+
+ try:
+ # transferFeeInfo
+ api_response = await api_instance.transfer_fee_info(account_index, authorization=authorization, auth=auth, to_account_index=to_account_index)
+ print("The response of InfoApi->transfer_fee_info:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling InfoApi->transfer_fee_info: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **account_index** | **int**| |
+ **authorization** | **str**| | [optional]
+ **auth** | **str**| | [optional]
+ **to_account_index** | **int**| | [optional] [default to -1]
+
+### Return type
+
+[**TransferFeeInfo**](TransferFeeInfo.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad request | - |
+
+[[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)
+
+# **withdrawal_delay**
+> RespWithdrawalDelay withdrawal_delay()
+
+withdrawalDelay
+
+Withdrawal delay in seconds
+
+### Example
+
+
+```python
+import lighter
+from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
+from lighter.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
+# See configuration.py for a list of all supported configuration parameters.
+configuration = lighter.Configuration(
+ host = "https://mainnet.zklighter.elliot.ai"
+)
+
+
+# Enter a context with an instance of the API client
+async with lighter.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = lighter.InfoApi(api_client)
+
+ try:
+ # withdrawalDelay
+ api_response = await api_instance.withdrawal_delay()
+ print("The response of InfoApi->withdrawal_delay:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling InfoApi->withdrawal_delay: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**RespWithdrawalDelay**](RespWithdrawalDelay.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad request | - |
+
+[[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)
+
diff --git a/docs/OrderApi.md b/docs/OrderApi.md
index 3c7deb3..c7386cc 100644
--- a/docs/OrderApi.md
+++ b/docs/OrderApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
[**exchange_stats**](OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
[**export**](OrderApi.md#export) | **GET** /api/v1/export | export
[**order_book_details**](OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
+[**order_book_orders**](OrderApi.md#order_book_orders) | **GET** /api/v1/orderBookOrders | orderBookOrders
[**order_books**](OrderApi.md#order_books) | **GET** /api/v1/orderBooks | orderBooks
[**recent_trades**](OrderApi.md#recent_trades) | **GET** /api/v1/recentTrades | recentTrades
[**trades**](OrderApi.md#trades) | **GET** /api/v1/trades | trades
@@ -307,6 +308,77 @@ No authorization required
[[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)
+# **order_book_orders**
+> OrderBookOrders order_book_orders(market_id, limit)
+
+orderBookOrders
+
+Get order book orders
+
+### Example
+
+
+```python
+import lighter
+from lighter.models.order_book_orders import OrderBookOrders
+from lighter.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
+# See configuration.py for a list of all supported configuration parameters.
+configuration = lighter.Configuration(
+ host = "https://mainnet.zklighter.elliot.ai"
+)
+
+
+# Enter a context with an instance of the API client
+async with lighter.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = lighter.OrderApi(api_client)
+ market_id = 56 # int |
+ limit = 56 # int |
+
+ try:
+ # orderBookOrders
+ api_response = await api_instance.order_book_orders(market_id, limit)
+ print("The response of OrderApi->order_book_orders:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OrderApi->order_book_orders: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **market_id** | **int**| |
+ **limit** | **int**| |
+
+### Return type
+
+[**OrderBookOrders**](OrderBookOrders.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad request | - |
+
+[[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)
+
# **order_books**
> OrderBooks order_books(market_id=market_id)
diff --git a/docs/OrderBookOrders.md b/docs/OrderBookOrders.md
new file mode 100644
index 0000000..960e274
--- /dev/null
+++ b/docs/OrderBookOrders.md
@@ -0,0 +1,34 @@
+# OrderBookOrders
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+**total_asks** | **int** | |
+**asks** | [**List[SimpleOrder]**](SimpleOrder.md) | |
+**total_bids** | **int** | |
+**bids** | [**List[SimpleOrder]**](SimpleOrder.md) | |
+
+## Example
+
+```python
+from lighter.models.order_book_orders import OrderBookOrders
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of OrderBookOrders from a JSON string
+order_book_orders_instance = OrderBookOrders.from_json(json)
+# print the JSON string representation of the object
+print(OrderBookOrders.to_json())
+
+# convert the object into a dict
+order_book_orders_dict = order_book_orders_instance.to_dict()
+# create an instance of OrderBookOrders from a dict
+order_book_orders_from_dict = OrderBookOrders.from_dict(order_book_orders_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/PublicPool.md b/docs/PublicPool.md
index 35bac90..884d3b3 100644
--- a/docs/PublicPool.md
+++ b/docs/PublicPool.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
**total_order_count** | **int** | |
+**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**status** | **int** | |
**collateral** | **str** | |
@@ -21,6 +22,7 @@ Name | Type | Description | Notes
**can_invite** | **bool** | Remove After FE uses L1 meta endpoint |
**referral_points_percentage** | **str** | Remove After FE uses L1 meta endpoint |
**total_asset_value** | **str** | |
+**cross_asset_value** | **str** | |
**pool_info** | [**PublicPoolInfo**](PublicPoolInfo.md) | |
**account_share** | [**PublicPoolShare**](PublicPoolShare.md) | | [optional]
diff --git a/docs/ReqGetOrderBookOrders.md b/docs/ReqGetOrderBookOrders.md
new file mode 100644
index 0000000..7f543eb
--- /dev/null
+++ b/docs/ReqGetOrderBookOrders.md
@@ -0,0 +1,30 @@
+# ReqGetOrderBookOrders
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**market_id** | **int** | |
+**limit** | **int** | |
+
+## Example
+
+```python
+from lighter.models.req_get_order_book_orders import ReqGetOrderBookOrders
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReqGetOrderBookOrders from a JSON string
+req_get_order_book_orders_instance = ReqGetOrderBookOrders.from_json(json)
+# print the JSON string representation of the object
+print(ReqGetOrderBookOrders.to_json())
+
+# convert the object into a dict
+req_get_order_book_orders_dict = req_get_order_book_orders_instance.to_dict()
+# create an instance of ReqGetOrderBookOrders from a dict
+req_get_order_book_orders_from_dict = ReqGetOrderBookOrders.from_dict(req_get_order_book_orders_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/ReqGetTransferFeeInfo.md b/docs/ReqGetTransferFeeInfo.md
new file mode 100644
index 0000000..84824f7
--- /dev/null
+++ b/docs/ReqGetTransferFeeInfo.md
@@ -0,0 +1,31 @@
+# ReqGetTransferFeeInfo
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**auth** | **str** | | [optional]
+**account_index** | **int** | |
+**to_account_index** | **int** | | [optional] [default to -1]
+
+## Example
+
+```python
+from lighter.models.req_get_transfer_fee_info import ReqGetTransferFeeInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReqGetTransferFeeInfo from a JSON string
+req_get_transfer_fee_info_instance = ReqGetTransferFeeInfo.from_json(json)
+# print the JSON string representation of the object
+print(ReqGetTransferFeeInfo.to_json())
+
+# convert the object into a dict
+req_get_transfer_fee_info_dict = req_get_transfer_fee_info_instance.to_dict()
+# create an instance of ReqGetTransferFeeInfo from a dict
+req_get_transfer_fee_info_from_dict = ReqGetTransferFeeInfo.from_dict(req_get_transfer_fee_info_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/ReqGetTransferHistory.md b/docs/ReqGetTransferHistory.md
new file mode 100644
index 0000000..cb548fa
--- /dev/null
+++ b/docs/ReqGetTransferHistory.md
@@ -0,0 +1,31 @@
+# ReqGetTransferHistory
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_index** | **int** | |
+**auth** | **str** | made optional to support header auth clients | [optional]
+**cursor** | **str** | | [optional]
+
+## Example
+
+```python
+from lighter.models.req_get_transfer_history import ReqGetTransferHistory
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReqGetTransferHistory from a JSON string
+req_get_transfer_history_instance = ReqGetTransferHistory.from_json(json)
+# print the JSON string representation of the object
+print(ReqGetTransferHistory.to_json())
+
+# convert the object into a dict
+req_get_transfer_history_dict = req_get_transfer_history_instance.to_dict()
+# create an instance of ReqGetTransferHistory from a dict
+req_get_transfer_history_from_dict = ReqGetTransferHistory.from_dict(req_get_transfer_history_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/RespChangeAccountTier.md b/docs/RespChangeAccountTier.md
new file mode 100644
index 0000000..62cd493
--- /dev/null
+++ b/docs/RespChangeAccountTier.md
@@ -0,0 +1,30 @@
+# RespChangeAccountTier
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+
+## Example
+
+```python
+from lighter.models.resp_change_account_tier import RespChangeAccountTier
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RespChangeAccountTier from a JSON string
+resp_change_account_tier_instance = RespChangeAccountTier.from_json(json)
+# print the JSON string representation of the object
+print(RespChangeAccountTier.to_json())
+
+# convert the object into a dict
+resp_change_account_tier_dict = resp_change_account_tier_instance.to_dict()
+# create an instance of RespChangeAccountTier from a dict
+resp_change_account_tier_from_dict = RespChangeAccountTier.from_dict(resp_change_account_tier_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/RespSendTx.md b/docs/RespSendTx.md
new file mode 100644
index 0000000..5d58479
--- /dev/null
+++ b/docs/RespSendTx.md
@@ -0,0 +1,32 @@
+# RespSendTx
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+**tx_hash** | **str** | |
+**predicted_execution_time_ms** | **int** | |
+
+## Example
+
+```python
+from lighter.models.resp_send_tx import RespSendTx
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RespSendTx from a JSON string
+resp_send_tx_instance = RespSendTx.from_json(json)
+# print the JSON string representation of the object
+print(RespSendTx.to_json())
+
+# convert the object into a dict
+resp_send_tx_dict = resp_send_tx_instance.to_dict()
+# create an instance of RespSendTx from a dict
+resp_send_tx_from_dict = RespSendTx.from_dict(resp_send_tx_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/RespSendTxBatch.md b/docs/RespSendTxBatch.md
new file mode 100644
index 0000000..1b02a5b
--- /dev/null
+++ b/docs/RespSendTxBatch.md
@@ -0,0 +1,32 @@
+# RespSendTxBatch
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+**tx_hash** | **List[str]** | |
+**predicted_execution_time_ms** | **int** | |
+
+## Example
+
+```python
+from lighter.models.resp_send_tx_batch import RespSendTxBatch
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RespSendTxBatch from a JSON string
+resp_send_tx_batch_instance = RespSendTxBatch.from_json(json)
+# print the JSON string representation of the object
+print(RespSendTxBatch.to_json())
+
+# convert the object into a dict
+resp_send_tx_batch_dict = resp_send_tx_batch_instance.to_dict()
+# create an instance of RespSendTxBatch from a dict
+resp_send_tx_batch_from_dict = RespSendTxBatch.from_dict(resp_send_tx_batch_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/RespWithdrawalDelay.md b/docs/RespWithdrawalDelay.md
new file mode 100644
index 0000000..5178729
--- /dev/null
+++ b/docs/RespWithdrawalDelay.md
@@ -0,0 +1,29 @@
+# RespWithdrawalDelay
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**seconds** | **int** | |
+
+## Example
+
+```python
+from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RespWithdrawalDelay from a JSON string
+resp_withdrawal_delay_instance = RespWithdrawalDelay.from_json(json)
+# print the JSON string representation of the object
+print(RespWithdrawalDelay.to_json())
+
+# convert the object into a dict
+resp_withdrawal_delay_dict = resp_withdrawal_delay_instance.to_dict()
+# create an instance of RespWithdrawalDelay from a dict
+resp_withdrawal_delay_from_dict = RespWithdrawalDelay.from_dict(resp_withdrawal_delay_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/RiskInfo.md b/docs/RiskInfo.md
index 065091b..2984f0a 100644
--- a/docs/RiskInfo.md
+++ b/docs/RiskInfo.md
@@ -5,11 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**collateral** | **str** | |
-**total_account_value** | **str** | |
-**initial_margin_req** | **str** | |
-**maintenance_margin_req** | **str** | |
-**close_out_margin_req** | **str** | |
+**cross_risk_parameters** | [**RiskParameters**](RiskParameters.md) | |
+**isolated_risk_parameters** | [**List[RiskParameters]**](RiskParameters.md) | |
## Example
diff --git a/docs/RiskParameters.md b/docs/RiskParameters.md
new file mode 100644
index 0000000..26f9e61
--- /dev/null
+++ b/docs/RiskParameters.md
@@ -0,0 +1,34 @@
+# RiskParameters
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**market_id** | **int** | |
+**collateral** | **str** | |
+**total_account_value** | **str** | |
+**initial_margin_req** | **str** | |
+**maintenance_margin_req** | **str** | |
+**close_out_margin_req** | **str** | |
+
+## Example
+
+```python
+from lighter.models.risk_parameters import RiskParameters
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RiskParameters from a JSON string
+risk_parameters_instance = RiskParameters.from_json(json)
+# print the JSON string representation of the object
+print(RiskParameters.to_json())
+
+# convert the object into a dict
+risk_parameters_dict = risk_parameters_instance.to_dict()
+# create an instance of RiskParameters from a dict
+risk_parameters_from_dict = RiskParameters.from_dict(risk_parameters_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/Trade.md b/docs/Trade.md
index 35203a1..ac611a0 100644
--- a/docs/Trade.md
+++ b/docs/Trade.md
@@ -19,12 +19,16 @@ Name | Type | Description | Notes
**is_maker_ask** | **bool** | |
**block_height** | **int** | |
**timestamp** | **int** | |
+**taker_fee** | **int** | |
**taker_position_size_before** | **str** | |
**taker_entry_quote_before** | **str** | |
**taker_initial_margin_fraction_before** | **int** | |
+**taker_position_sign_changed** | **bool** | |
+**maker_fee** | **int** | |
**maker_position_size_before** | **str** | |
**maker_entry_quote_before** | **str** | |
**maker_initial_margin_fraction_before** | **int** | |
+**maker_position_sign_changed** | **bool** | |
## Example
diff --git a/docs/TransactionApi.md b/docs/TransactionApi.md
index c9e472f..4308aa3 100644
--- a/docs/TransactionApi.md
+++ b/docs/TransactionApi.md
@@ -10,6 +10,7 @@ Method | HTTP request | Description
[**next_nonce**](TransactionApi.md#next_nonce) | **GET** /api/v1/nextNonce | nextNonce
[**send_tx**](TransactionApi.md#send_tx) | **POST** /api/v1/sendTx | sendTx
[**send_tx_batch**](TransactionApi.md#send_tx_batch) | **POST** /api/v1/sendTxBatch | sendTxBatch
+[**transfer_history**](TransactionApi.md#transfer_history) | **GET** /api/v1/transfer/history | transfer_history
[**tx**](TransactionApi.md#tx) | **GET** /api/v1/tx | tx
[**tx_from_l1_tx_hash**](TransactionApi.md#tx_from_l1_tx_hash) | **GET** /api/v1/txFromL1TxHash | txFromL1TxHash
[**txs**](TransactionApi.md#txs) | **GET** /api/v1/txs | txs
@@ -315,7 +316,7 @@ No authorization required
[[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)
# **send_tx**
-> TxHash send_tx(tx_type, tx_info, price_protection=price_protection)
+> RespSendTx send_tx(tx_type, tx_info, price_protection=price_protection)
sendTx
@@ -326,7 +327,7 @@ You need to sign the transaction body before sending it to the server. More deta
```python
import lighter
-from lighter.models.tx_hash import TxHash
+from lighter.models.resp_send_tx import RespSendTx
from lighter.rest import ApiException
from pprint import pprint
@@ -367,7 +368,7 @@ Name | Type | Description | Notes
### Return type
-[**TxHash**](TxHash.md)
+[**RespSendTx**](RespSendTx.md)
### Authorization
@@ -388,7 +389,7 @@ No authorization required
[[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)
# **send_tx_batch**
-> TxHashes send_tx_batch(tx_types, tx_infos)
+> RespSendTxBatch send_tx_batch(tx_types, tx_infos)
sendTxBatch
@@ -399,7 +400,7 @@ You need to sign the transaction body before sending it to the server. More deta
```python
import lighter
-from lighter.models.tx_hashes import TxHashes
+from lighter.models.resp_send_tx_batch import RespSendTxBatch
from lighter.rest import ApiException
from pprint import pprint
@@ -438,7 +439,7 @@ Name | Type | Description | Notes
### Return type
-[**TxHashes**](TxHashes.md)
+[**RespSendTxBatch**](RespSendTxBatch.md)
### Authorization
@@ -458,6 +459,81 @@ No authorization required
[[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)
+# **transfer_history**
+> TransferHistory transfer_history(account_index, authorization=authorization, auth=auth, cursor=cursor)
+
+transfer_history
+
+Get transfer history
+
+### Example
+
+
+```python
+import lighter
+from lighter.models.transfer_history import TransferHistory
+from lighter.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://mainnet.zklighter.elliot.ai
+# See configuration.py for a list of all supported configuration parameters.
+configuration = lighter.Configuration(
+ host = "https://mainnet.zklighter.elliot.ai"
+)
+
+
+# Enter a context with an instance of the API client
+async with lighter.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = lighter.TransactionApi(api_client)
+ account_index = 56 # int |
+ authorization = 'authorization_example' # str | make required after integ is done (optional)
+ auth = 'auth_example' # str | made optional to support header auth clients (optional)
+ cursor = 'cursor_example' # str | (optional)
+
+ try:
+ # transfer_history
+ api_response = await api_instance.transfer_history(account_index, authorization=authorization, auth=auth, cursor=cursor)
+ print("The response of TransactionApi->transfer_history:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TransactionApi->transfer_history: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **account_index** | **int**| |
+ **authorization** | **str**| make required after integ is done | [optional]
+ **auth** | **str**| made optional to support header auth clients | [optional]
+ **cursor** | **str**| | [optional]
+
+### Return type
+
+[**TransferHistory**](TransferHistory.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad request | - |
+
+[[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)
+
# **tx**
> EnrichedTx tx(by, value)
@@ -670,7 +746,7 @@ No authorization required
[[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)
# **withdraw_history**
-> WithdrawHistory withdraw_history(account_index, authorizatio=authorizatio, auth=auth, cursor=cursor, filter=filter)
+> WithdrawHistory withdraw_history(account_index, authorization=authorization, auth=auth, cursor=cursor, filter=filter)
withdraw_history
@@ -697,14 +773,14 @@ async with lighter.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lighter.TransactionApi(api_client)
account_index = 56 # int |
- authorizatio = 'authorizatio_example' # str | make required after integ is done (optional)
+ authorization = 'authorization_example' # str | make required after integ is done (optional)
auth = 'auth_example' # str | made optional to support header auth clients (optional)
cursor = 'cursor_example' # str | (optional)
filter = 'filter_example' # str | (optional)
try:
# withdraw_history
- api_response = await api_instance.withdraw_history(account_index, authorizatio=authorizatio, auth=auth, cursor=cursor, filter=filter)
+ api_response = await api_instance.withdraw_history(account_index, authorization=authorization, auth=auth, cursor=cursor, filter=filter)
print("The response of TransactionApi->withdraw_history:\n")
pprint(api_response)
except Exception as e:
@@ -719,7 +795,7 @@ async with lighter.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**account_index** | **int**| |
- **authorizatio** | **str**| make required after integ is done | [optional]
+ **authorization** | **str**| make required after integ is done | [optional]
**auth** | **str**| made optional to support header auth clients | [optional]
**cursor** | **str**| | [optional]
**filter** | **str**| | [optional]
diff --git a/docs/TransferFeeInfo.md b/docs/TransferFeeInfo.md
new file mode 100644
index 0000000..52c9c27
--- /dev/null
+++ b/docs/TransferFeeInfo.md
@@ -0,0 +1,31 @@
+# TransferFeeInfo
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+**transfer_fee_usdc** | **int** | |
+
+## Example
+
+```python
+from lighter.models.transfer_fee_info import TransferFeeInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of TransferFeeInfo from a JSON string
+transfer_fee_info_instance = TransferFeeInfo.from_json(json)
+# print the JSON string representation of the object
+print(TransferFeeInfo.to_json())
+
+# convert the object into a dict
+transfer_fee_info_dict = transfer_fee_info_instance.to_dict()
+# create an instance of TransferFeeInfo from a dict
+transfer_fee_info_from_dict = TransferFeeInfo.from_dict(transfer_fee_info_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/TransferHistory.md b/docs/TransferHistory.md
new file mode 100644
index 0000000..f005cc3
--- /dev/null
+++ b/docs/TransferHistory.md
@@ -0,0 +1,32 @@
+# TransferHistory
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | |
+**message** | **str** | | [optional]
+**transfers** | [**List[TransferHistoryItem]**](TransferHistoryItem.md) | |
+**cursor** | **str** | |
+
+## Example
+
+```python
+from lighter.models.transfer_history import TransferHistory
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of TransferHistory from a JSON string
+transfer_history_instance = TransferHistory.from_json(json)
+# print the JSON string representation of the object
+print(TransferHistory.to_json())
+
+# convert the object into a dict
+transfer_history_dict = transfer_history_instance.to_dict()
+# create an instance of TransferHistory from a dict
+transfer_history_from_dict = TransferHistory.from_dict(transfer_history_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/TransferHistoryItem.md b/docs/TransferHistoryItem.md
new file mode 100644
index 0000000..4d7f5df
--- /dev/null
+++ b/docs/TransferHistoryItem.md
@@ -0,0 +1,37 @@
+# TransferHistoryItem
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | |
+**amount** | **str** | |
+**timestamp** | **int** | |
+**type** | **str** | |
+**from_l1_address** | **str** | |
+**to_l1_address** | **str** | |
+**from_account_index** | **int** | |
+**to_account_index** | **int** | |
+**tx_hash** | **str** | |
+
+## Example
+
+```python
+from lighter.models.transfer_history_item import TransferHistoryItem
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of TransferHistoryItem from a JSON string
+transfer_history_item_instance = TransferHistoryItem.from_json(json)
+# print the JSON string representation of the object
+print(TransferHistoryItem.to_json())
+
+# convert the object into a dict
+transfer_history_item_dict = transfer_history_item_instance.to_dict()
+# create an instance of TransferHistoryItem from a dict
+transfer_history_item_from_dict = TransferHistoryItem.from_dict(transfer_history_item_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/lighter/__init__.py b/lighter/__init__.py
index 47e98fc..8d68c6a 100644
--- a/lighter/__init__.py
+++ b/lighter/__init__.py
@@ -23,6 +23,7 @@
from lighter.api.bridge_api import BridgeApi
from lighter.api.candlestick_api import CandlestickApi
from lighter.api.funding_api import FundingApi
+from lighter.api.info_api import InfoApi
from lighter.api.notification_api import NotificationApi
from lighter.api.order_api import OrderApi
from lighter.api.referral_api import ReferralApi
@@ -44,6 +45,7 @@
from lighter.models.account import Account
from lighter.models.account_api_keys import AccountApiKeys
from lighter.models.account_limits import AccountLimits
+from lighter.models.account_margin_stats import AccountMarginStats
from lighter.models.account_market_stats import AccountMarketStats
from lighter.models.account_metadata import AccountMetadata
from lighter.models.account_metadatas import AccountMetadatas
@@ -88,6 +90,7 @@
from lighter.models.order_book_depth import OrderBookDepth
from lighter.models.order_book_detail import OrderBookDetail
from lighter.models.order_book_details import OrderBookDetails
+from lighter.models.order_book_orders import OrderBookOrders
from lighter.models.order_book_stats import OrderBookStats
from lighter.models.order_books import OrderBooks
from lighter.models.orders import Orders
@@ -124,6 +127,7 @@
from lighter.models.req_get_liquidation_infos import ReqGetLiquidationInfos
from lighter.models.req_get_next_nonce import ReqGetNextNonce
from lighter.models.req_get_order_book_details import ReqGetOrderBookDetails
+from lighter.models.req_get_order_book_orders import ReqGetOrderBookOrders
from lighter.models.req_get_order_books import ReqGetOrderBooks
from lighter.models.req_get_position_funding import ReqGetPositionFunding
from lighter.models.req_get_public_pools import ReqGetPublicPools
@@ -133,17 +137,27 @@
from lighter.models.req_get_recent_trades import ReqGetRecentTrades
from lighter.models.req_get_referral_points import ReqGetReferralPoints
from lighter.models.req_get_trades import ReqGetTrades
+from lighter.models.req_get_transfer_fee_info import ReqGetTransferFeeInfo
+from lighter.models.req_get_transfer_history import ReqGetTransferHistory
from lighter.models.req_get_tx import ReqGetTx
from lighter.models.req_get_withdraw_history import ReqGetWithdrawHistory
+from lighter.models.resp_change_account_tier import RespChangeAccountTier
from lighter.models.resp_get_fast_bridge_info import RespGetFastBridgeInfo
+from lighter.models.resp_send_tx import RespSendTx
+from lighter.models.resp_send_tx_batch import RespSendTxBatch
+from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
from lighter.models.result_code import ResultCode
from lighter.models.risk_info import RiskInfo
+from lighter.models.risk_parameters import RiskParameters
from lighter.models.simple_order import SimpleOrder
from lighter.models.status import Status
from lighter.models.sub_accounts import SubAccounts
from lighter.models.ticker import Ticker
from lighter.models.trade import Trade
from lighter.models.trades import Trades
+from lighter.models.transfer_fee_info import TransferFeeInfo
+from lighter.models.transfer_history import TransferHistory
+from lighter.models.transfer_history_item import TransferHistoryItem
from lighter.models.tx import Tx
from lighter.models.tx_hash import TxHash
from lighter.models.tx_hashes import TxHashes
diff --git a/lighter/api/__init__.py b/lighter/api/__init__.py
index 5b548eb..a238373 100644
--- a/lighter/api/__init__.py
+++ b/lighter/api/__init__.py
@@ -7,6 +7,7 @@
from lighter.api.bridge_api import BridgeApi
from lighter.api.candlestick_api import CandlestickApi
from lighter.api.funding_api import FundingApi
+from lighter.api.info_api import InfoApi
from lighter.api.notification_api import NotificationApi
from lighter.api.order_api import OrderApi
from lighter.api.referral_api import ReferralApi
diff --git a/lighter/api/account_api.py b/lighter/api/account_api.py
index a0f00da..aa7263c 100644
--- a/lighter/api/account_api.py
+++ b/lighter/api/account_api.py
@@ -28,6 +28,7 @@
from lighter.models.liquidation_infos import LiquidationInfos
from lighter.models.position_fundings import PositionFundings
from lighter.models.public_pools import PublicPools
+from lighter.models.resp_change_account_tier import RespChangeAccountTier
from lighter.models.sub_accounts import SubAccounts
from lighter.api_client import ApiClient, RequestSerialized
@@ -1478,6 +1479,325 @@ def _apikeys_serialize(
+ @validate_call
+ async def change_account_tier(
+ self,
+ account_index: StrictInt,
+ new_tier: StrictStr,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RespChangeAccountTier:
+ """changeAccountTier
+
+ Change account tier
+
+ :param account_index: (required)
+ :type account_index: int
+ :param new_tier: (required)
+ :type new_tier: str
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_account_tier_serialize(
+ account_index=account_index,
+ new_tier=new_tier,
+ authorization=authorization,
+ auth=auth,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespChangeAccountTier",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def change_account_tier_with_http_info(
+ self,
+ account_index: StrictInt,
+ new_tier: StrictStr,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RespChangeAccountTier]:
+ """changeAccountTier
+
+ Change account tier
+
+ :param account_index: (required)
+ :type account_index: int
+ :param new_tier: (required)
+ :type new_tier: str
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_account_tier_serialize(
+ account_index=account_index,
+ new_tier=new_tier,
+ authorization=authorization,
+ auth=auth,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespChangeAccountTier",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def change_account_tier_without_preload_content(
+ self,
+ account_index: StrictInt,
+ new_tier: StrictStr,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """changeAccountTier
+
+ Change account tier
+
+ :param account_index: (required)
+ :type account_index: int
+ :param new_tier: (required)
+ :type new_tier: str
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._change_account_tier_serialize(
+ account_index=account_index,
+ new_tier=new_tier,
+ authorization=authorization,
+ auth=auth,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespChangeAccountTier",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _change_account_tier_serialize(
+ self,
+ account_index,
+ new_tier,
+ authorization,
+ auth,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ if authorization is not None:
+ _header_params['authorization'] = authorization
+ # process the form parameters
+ if auth is not None:
+ _form_params.append(('auth', auth))
+ if account_index is not None:
+ _form_params.append(('account_index', account_index))
+ if new_tier is not None:
+ _form_params.append(('new_tier', new_tier))
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'multipart/form-data'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v1/changeAccountTier',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
@validate_call
async def l1_metadata(
self,
diff --git a/lighter/api/info_api.py b/lighter/api/info_api.py
new file mode 100644
index 0000000..9e2591a
--- /dev/null
+++ b/lighter/api/info_api.py
@@ -0,0 +1,597 @@
+# 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
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from pydantic import StrictInt, StrictStr
+from typing import Optional
+from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
+from lighter.models.transfer_fee_info import TransferFeeInfo
+
+from lighter.api_client import ApiClient, RequestSerialized
+from lighter.api_response import ApiResponse
+from lighter.rest import RESTResponseType
+
+
+class InfoApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ async def transfer_fee_info(
+ self,
+ account_index: StrictInt,
+ authorization: Optional[StrictStr] = None,
+ auth: Optional[StrictStr] = None,
+ to_account_index: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TransferFeeInfo:
+ """transferFeeInfo
+
+ Transfer fee info
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization:
+ :type authorization: str
+ :param auth:
+ :type auth: str
+ :param to_account_index:
+ :type to_account_index: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_fee_info_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ to_account_index=to_account_index,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferFeeInfo",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def transfer_fee_info_with_http_info(
+ self,
+ account_index: StrictInt,
+ authorization: Optional[StrictStr] = None,
+ auth: Optional[StrictStr] = None,
+ to_account_index: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TransferFeeInfo]:
+ """transferFeeInfo
+
+ Transfer fee info
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization:
+ :type authorization: str
+ :param auth:
+ :type auth: str
+ :param to_account_index:
+ :type to_account_index: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_fee_info_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ to_account_index=to_account_index,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferFeeInfo",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def transfer_fee_info_without_preload_content(
+ self,
+ account_index: StrictInt,
+ authorization: Optional[StrictStr] = None,
+ auth: Optional[StrictStr] = None,
+ to_account_index: Optional[StrictInt] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """transferFeeInfo
+
+ Transfer fee info
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization:
+ :type authorization: str
+ :param auth:
+ :type auth: str
+ :param to_account_index:
+ :type to_account_index: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_fee_info_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ to_account_index=to_account_index,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferFeeInfo",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _transfer_fee_info_serialize(
+ self,
+ account_index,
+ authorization,
+ auth,
+ to_account_index,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if auth is not None:
+
+ _query_params.append(('auth', auth))
+
+ if account_index is not None:
+
+ _query_params.append(('account_index', account_index))
+
+ if to_account_index is not None:
+
+ _query_params.append(('to_account_index', to_account_index))
+
+ # process the header parameters
+ if authorization is not None:
+ _header_params['authorization'] = authorization
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v1/transferFeeInfo',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ async def withdrawal_delay(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RespWithdrawalDelay:
+ """withdrawalDelay
+
+ Withdrawal delay in seconds
+
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._withdrawal_delay_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespWithdrawalDelay",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def withdrawal_delay_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RespWithdrawalDelay]:
+ """withdrawalDelay
+
+ Withdrawal delay in seconds
+
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._withdrawal_delay_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespWithdrawalDelay",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def withdrawal_delay_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """withdrawalDelay
+
+ Withdrawal delay in seconds
+
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._withdrawal_delay_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RespWithdrawalDelay",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _withdrawal_delay_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v1/withdrawalDelay',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/lighter/api/order_api.py b/lighter/api/order_api.py
index b4f7f4a..396ea69 100644
--- a/lighter/api/order_api.py
+++ b/lighter/api/order_api.py
@@ -22,6 +22,7 @@
from lighter.models.exchange_stats import ExchangeStats
from lighter.models.export_data import ExportData
from lighter.models.order_book_details import OrderBookDetails
+from lighter.models.order_book_orders import OrderBookOrders
from lighter.models.order_books import OrderBooks
from lighter.models.orders import Orders
from lighter.models.trades import Trades
@@ -1262,6 +1263,286 @@ def _order_book_details_serialize(
+ @validate_call
+ async def order_book_orders(
+ self,
+ market_id: StrictInt,
+ limit: Annotated[int, Field(le=100, strict=True, ge=1)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> OrderBookOrders:
+ """orderBookOrders
+
+ Get order book orders
+
+ :param market_id: (required)
+ :type market_id: int
+ :param limit: (required)
+ :type limit: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._order_book_orders_serialize(
+ market_id=market_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OrderBookOrders",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def order_book_orders_with_http_info(
+ self,
+ market_id: StrictInt,
+ limit: Annotated[int, Field(le=100, strict=True, ge=1)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[OrderBookOrders]:
+ """orderBookOrders
+
+ Get order book orders
+
+ :param market_id: (required)
+ :type market_id: int
+ :param limit: (required)
+ :type limit: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._order_book_orders_serialize(
+ market_id=market_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OrderBookOrders",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def order_book_orders_without_preload_content(
+ self,
+ market_id: StrictInt,
+ limit: Annotated[int, Field(le=100, strict=True, ge=1)],
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """orderBookOrders
+
+ Get order book orders
+
+ :param market_id: (required)
+ :type market_id: int
+ :param limit: (required)
+ :type limit: int
+ :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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._order_book_orders_serialize(
+ market_id=market_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OrderBookOrders",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _order_book_orders_serialize(
+ self,
+ market_id,
+ limit,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if market_id is not None:
+
+ _query_params.append(('market_id', market_id))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v1/orderBookOrders',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
@validate_call
async def order_books(
self,
diff --git a/lighter/api/transaction_api.py b/lighter/api/transaction_api.py
index efee466..066e564 100644
--- a/lighter/api/transaction_api.py
+++ b/lighter/api/transaction_api.py
@@ -22,8 +22,9 @@
from lighter.models.deposit_history import DepositHistory
from lighter.models.enriched_tx import EnrichedTx
from lighter.models.next_nonce import NextNonce
-from lighter.models.tx_hash import TxHash
-from lighter.models.tx_hashes import TxHashes
+from lighter.models.resp_send_tx import RespSendTx
+from lighter.models.resp_send_tx_batch import RespSendTxBatch
+from lighter.models.transfer_history import TransferHistory
from lighter.models.txs import Txs
from lighter.models.withdraw_history import WithdrawHistory
@@ -1301,7 +1302,7 @@ async def send_tx(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> TxHash:
+ ) -> RespSendTx:
"""sendTx
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
@@ -1345,7 +1346,7 @@ async def send_tx(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHash",
+ '200': "RespSendTx",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1377,7 +1378,7 @@ async def send_tx_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[TxHash]:
+ ) -> ApiResponse[RespSendTx]:
"""sendTx
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
@@ -1421,7 +1422,7 @@ async def send_tx_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHash",
+ '200': "RespSendTx",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1497,7 +1498,7 @@ async def send_tx_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHash",
+ '200': "RespSendTx",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1604,7 +1605,7 @@ async def send_tx_batch(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> TxHashes:
+ ) -> RespSendTxBatch:
"""sendTxBatch
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
@@ -1645,7 +1646,7 @@ async def send_tx_batch(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHashes",
+ '200': "RespSendTxBatch",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1676,7 +1677,7 @@ async def send_tx_batch_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[TxHashes]:
+ ) -> ApiResponse[RespSendTxBatch]:
"""sendTxBatch
You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
@@ -1717,7 +1718,7 @@ async def send_tx_batch_with_http_info(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHashes",
+ '200': "RespSendTxBatch",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1789,7 +1790,7 @@ async def send_tx_batch_without_preload_content(
)
_response_types_map: Dict[str, Optional[str]] = {
- '200': "TxHashes",
+ '200': "RespSendTxBatch",
'400': "ResultCode",
}
response_data = await self.api_client.call_api(
@@ -1876,6 +1877,318 @@ def _send_tx_batch_serialize(
+ @validate_call
+ async def transfer_history(
+ self,
+ account_index: StrictInt,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ cursor: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TransferHistory:
+ """transfer_history
+
+ Get transfer history
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :type auth: str
+ :param cursor:
+ :type cursor: 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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_history_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ cursor=cursor,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferHistory",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ async def transfer_history_with_http_info(
+ self,
+ account_index: StrictInt,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ cursor: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TransferHistory]:
+ """transfer_history
+
+ Get transfer history
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :type auth: str
+ :param cursor:
+ :type cursor: 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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_history_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ cursor=cursor,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferHistory",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ await response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ async def transfer_history_without_preload_content(
+ self,
+ account_index: StrictInt,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
+ cursor: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """transfer_history
+
+ Get transfer history
+
+ :param account_index: (required)
+ :type account_index: int
+ :param authorization: make required after integ is done
+ :type authorization: str
+ :param auth: made optional to support header auth clients
+ :type auth: str
+ :param cursor:
+ :type cursor: 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
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._transfer_history_serialize(
+ account_index=account_index,
+ authorization=authorization,
+ auth=auth,
+ cursor=cursor,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TransferHistory",
+ '400': "ResultCode",
+ }
+ response_data = await self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _transfer_history_serialize(
+ self,
+ account_index,
+ authorization,
+ auth,
+ cursor,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if account_index is not None:
+
+ _query_params.append(('account_index', account_index))
+
+ if auth is not None:
+
+ _query_params.append(('auth', auth))
+
+ if cursor is not None:
+
+ _query_params.append(('cursor', cursor))
+
+ # process the header parameters
+ if authorization is not None:
+ _header_params['authorization'] = authorization
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v1/transfer/history',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
@validate_call
async def tx(
self,
@@ -2703,7 +3016,7 @@ def _txs_serialize(
async def withdraw_history(
self,
account_index: StrictInt,
- authorizatio: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
cursor: Optional[StrictStr] = None,
filter: Optional[StrictStr] = None,
@@ -2726,8 +3039,8 @@ async def withdraw_history(
:param account_index: (required)
:type account_index: int
- :param authorizatio: make required after integ is done
- :type authorizatio: str
+ :param authorization: make required after integ is done
+ :type authorization: str
:param auth: made optional to support header auth clients
:type auth: str
:param cursor:
@@ -2758,7 +3071,7 @@ async def withdraw_history(
_param = self._withdraw_history_serialize(
account_index=account_index,
- authorizatio=authorizatio,
+ authorization=authorization,
auth=auth,
cursor=cursor,
filter=filter,
@@ -2787,7 +3100,7 @@ async def withdraw_history(
async def withdraw_history_with_http_info(
self,
account_index: StrictInt,
- authorizatio: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
cursor: Optional[StrictStr] = None,
filter: Optional[StrictStr] = None,
@@ -2810,8 +3123,8 @@ async def withdraw_history_with_http_info(
:param account_index: (required)
:type account_index: int
- :param authorizatio: make required after integ is done
- :type authorizatio: str
+ :param authorization: make required after integ is done
+ :type authorization: str
:param auth: made optional to support header auth clients
:type auth: str
:param cursor:
@@ -2842,7 +3155,7 @@ async def withdraw_history_with_http_info(
_param = self._withdraw_history_serialize(
account_index=account_index,
- authorizatio=authorizatio,
+ authorization=authorization,
auth=auth,
cursor=cursor,
filter=filter,
@@ -2871,7 +3184,7 @@ async def withdraw_history_with_http_info(
async def withdraw_history_without_preload_content(
self,
account_index: StrictInt,
- authorizatio: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
+ authorization: Annotated[Optional[StrictStr], Field(description=" make required after integ is done")] = None,
auth: Annotated[Optional[StrictStr], Field(description=" made optional to support header auth clients")] = None,
cursor: Optional[StrictStr] = None,
filter: Optional[StrictStr] = None,
@@ -2894,8 +3207,8 @@ async def withdraw_history_without_preload_content(
:param account_index: (required)
:type account_index: int
- :param authorizatio: make required after integ is done
- :type authorizatio: str
+ :param authorization: make required after integ is done
+ :type authorization: str
:param auth: made optional to support header auth clients
:type auth: str
:param cursor:
@@ -2926,7 +3239,7 @@ async def withdraw_history_without_preload_content(
_param = self._withdraw_history_serialize(
account_index=account_index,
- authorizatio=authorizatio,
+ authorization=authorization,
auth=auth,
cursor=cursor,
filter=filter,
@@ -2950,7 +3263,7 @@ async def withdraw_history_without_preload_content(
def _withdraw_history_serialize(
self,
account_index,
- authorizatio,
+ authorization,
auth,
cursor,
filter,
@@ -2991,8 +3304,8 @@ def _withdraw_history_serialize(
_query_params.append(('filter', filter))
# process the header parameters
- if authorizatio is not None:
- _header_params['authorizatio'] = authorizatio
+ 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 5fea2f6..125d38a 100644
--- a/lighter/models/__init__.py
+++ b/lighter/models/__init__.py
@@ -17,6 +17,7 @@
from lighter.models.account import Account
from lighter.models.account_api_keys import AccountApiKeys
from lighter.models.account_limits import AccountLimits
+from lighter.models.account_margin_stats import AccountMarginStats
from lighter.models.account_market_stats import AccountMarketStats
from lighter.models.account_metadata import AccountMetadata
from lighter.models.account_metadatas import AccountMetadatas
@@ -61,6 +62,7 @@
from lighter.models.order_book_depth import OrderBookDepth
from lighter.models.order_book_detail import OrderBookDetail
from lighter.models.order_book_details import OrderBookDetails
+from lighter.models.order_book_orders import OrderBookOrders
from lighter.models.order_book_stats import OrderBookStats
from lighter.models.order_books import OrderBooks
from lighter.models.orders import Orders
@@ -97,6 +99,7 @@
from lighter.models.req_get_liquidation_infos import ReqGetLiquidationInfos
from lighter.models.req_get_next_nonce import ReqGetNextNonce
from lighter.models.req_get_order_book_details import ReqGetOrderBookDetails
+from lighter.models.req_get_order_book_orders import ReqGetOrderBookOrders
from lighter.models.req_get_order_books import ReqGetOrderBooks
from lighter.models.req_get_position_funding import ReqGetPositionFunding
from lighter.models.req_get_public_pools import ReqGetPublicPools
@@ -106,17 +109,27 @@
from lighter.models.req_get_recent_trades import ReqGetRecentTrades
from lighter.models.req_get_referral_points import ReqGetReferralPoints
from lighter.models.req_get_trades import ReqGetTrades
+from lighter.models.req_get_transfer_fee_info import ReqGetTransferFeeInfo
+from lighter.models.req_get_transfer_history import ReqGetTransferHistory
from lighter.models.req_get_tx import ReqGetTx
from lighter.models.req_get_withdraw_history import ReqGetWithdrawHistory
+from lighter.models.resp_change_account_tier import RespChangeAccountTier
from lighter.models.resp_get_fast_bridge_info import RespGetFastBridgeInfo
+from lighter.models.resp_send_tx import RespSendTx
+from lighter.models.resp_send_tx_batch import RespSendTxBatch
+from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
from lighter.models.result_code import ResultCode
from lighter.models.risk_info import RiskInfo
+from lighter.models.risk_parameters import RiskParameters
from lighter.models.simple_order import SimpleOrder
from lighter.models.status import Status
from lighter.models.sub_accounts import SubAccounts
from lighter.models.ticker import Ticker
from lighter.models.trade import Trade
from lighter.models.trades import Trades
+from lighter.models.transfer_fee_info import TransferFeeInfo
+from lighter.models.transfer_history import TransferHistory
+from lighter.models.transfer_history_item import TransferHistoryItem
from lighter.models.tx import Tx
from lighter.models.tx_hash import TxHash
from lighter.models.tx_hashes import TxHashes
diff --git a/lighter/models/account.py b/lighter/models/account.py
index 93247c0..766387d 100644
--- a/lighter/models/account.py
+++ b/lighter/models/account.py
@@ -33,11 +33,12 @@ class Account(BaseModel):
l1_address: StrictStr
cancel_all_time: StrictInt
total_order_count: StrictInt
+ total_isolated_order_count: StrictInt
pending_order_count: StrictInt
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", "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", "status", "collateral"]
model_config = ConfigDict(
populate_by_name=True,
@@ -104,6 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"l1_address": obj.get("l1_address"),
"cancel_all_time": obj.get("cancel_all_time"),
"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"),
"status": obj.get("status"),
"collateral": obj.get("collateral")
diff --git a/lighter/models/account_limits.py b/lighter/models/account_limits.py
index d899264..81eff07 100644
--- a/lighter/models/account_limits.py
+++ b/lighter/models/account_limits.py
@@ -29,8 +29,9 @@ class AccountLimits(BaseModel):
code: StrictInt
message: Optional[StrictStr] = None
max_llp_percentage: StrictInt
+ user_tier: StrictStr
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["code", "message", "max_llp_percentage"]
+ __properties: ClassVar[List[str]] = ["code", "message", "max_llp_percentage", "user_tier"]
model_config = ConfigDict(
populate_by_name=True,
@@ -92,7 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"code": obj.get("code"),
"message": obj.get("message"),
- "max_llp_percentage": obj.get("max_llp_percentage")
+ "max_llp_percentage": obj.get("max_llp_percentage"),
+ "user_tier": obj.get("user_tier")
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/lighter/models/account_margin_stats.py b/lighter/models/account_margin_stats.py
new file mode 100644
index 0000000..bad64a8
--- /dev/null
+++ b/lighter/models/account_margin_stats.py
@@ -0,0 +1,110 @@
+# 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, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AccountMarginStats(BaseModel):
+ """
+ AccountMarginStats
+ """ # noqa: E501
+ collateral: StrictStr
+ portfolio_value: StrictStr
+ leverage: StrictStr
+ available_balance: StrictStr
+ margin_usage: StrictStr
+ buying_power: StrictStr
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["collateral", "portfolio_value", "leverage", "available_balance", "margin_usage", "buying_power"]
+
+ 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 AccountMarginStats 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 AccountMarginStats from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "collateral": obj.get("collateral"),
+ "portfolio_value": obj.get("portfolio_value"),
+ "leverage": obj.get("leverage"),
+ "available_balance": obj.get("available_balance"),
+ "margin_usage": obj.get("margin_usage"),
+ "buying_power": obj.get("buying_power")
+ })
+ # 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/account_position.py b/lighter/models/account_position.py
index c0e590f..655ba12 100644
--- a/lighter/models/account_position.py
+++ b/lighter/models/account_position.py
@@ -39,8 +39,10 @@ class AccountPosition(BaseModel):
unrealized_pnl: StrictStr
realized_pnl: StrictStr
total_funding_paid_out: Optional[StrictStr] = None
+ margin_mode: StrictInt
+ allocated_margin: StrictStr
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["market_id", "symbol", "initial_margin_fraction", "open_order_count", "pending_order_count", "position_tied_order_count", "sign", "position", "avg_entry_price", "position_value", "unrealized_pnl", "realized_pnl", "total_funding_paid_out"]
+ __properties: ClassVar[List[str]] = ["market_id", "symbol", "initial_margin_fraction", "open_order_count", "pending_order_count", "position_tied_order_count", "sign", "position", "avg_entry_price", "position_value", "unrealized_pnl", "realized_pnl", "total_funding_paid_out", "margin_mode", "allocated_margin"]
model_config = ConfigDict(
populate_by_name=True,
@@ -112,7 +114,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"position_value": obj.get("position_value"),
"unrealized_pnl": obj.get("unrealized_pnl"),
"realized_pnl": obj.get("realized_pnl"),
- "total_funding_paid_out": obj.get("total_funding_paid_out")
+ "total_funding_paid_out": obj.get("total_funding_paid_out"),
+ "margin_mode": obj.get("margin_mode"),
+ "allocated_margin": obj.get("allocated_margin")
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/lighter/models/account_stats.py b/lighter/models/account_stats.py
index 85e14c2..a992e76 100644
--- a/lighter/models/account_stats.py
+++ b/lighter/models/account_stats.py
@@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
+from lighter.models.account_margin_stats import AccountMarginStats
from typing import Optional, Set
from typing_extensions import Self
@@ -32,8 +33,10 @@ class AccountStats(BaseModel):
available_balance: StrictStr
margin_usage: StrictStr
buying_power: StrictStr
+ cross_stats: AccountMarginStats
+ total_stats: AccountMarginStats
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["collateral", "portfolio_value", "leverage", "available_balance", "margin_usage", "buying_power"]
+ __properties: ClassVar[List[str]] = ["collateral", "portfolio_value", "leverage", "available_balance", "margin_usage", "buying_power", "cross_stats", "total_stats"]
model_config = ConfigDict(
populate_by_name=True,
@@ -76,6 +79,12 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of cross_stats
+ if self.cross_stats:
+ _dict['cross_stats'] = self.cross_stats.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of total_stats
+ if self.total_stats:
+ _dict['total_stats'] = self.total_stats.to_dict()
# 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():
@@ -98,7 +107,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"leverage": obj.get("leverage"),
"available_balance": obj.get("available_balance"),
"margin_usage": obj.get("margin_usage"),
- "buying_power": obj.get("buying_power")
+ "buying_power": obj.get("buying_power"),
+ "cross_stats": AccountMarginStats.from_dict(obj["cross_stats"]) if obj.get("cross_stats") is not None else None,
+ "total_stats": AccountMarginStats.from_dict(obj["total_stats"]) if obj.get("total_stats") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/lighter/models/detailed_account.py b/lighter/models/detailed_account.py
index 56123c8..6fb47be 100644
--- a/lighter/models/detailed_account.py
+++ b/lighter/models/detailed_account.py
@@ -36,6 +36,7 @@ class DetailedAccount(BaseModel):
l1_address: StrictStr
cancel_all_time: StrictInt
total_order_count: StrictInt
+ total_isolated_order_count: StrictInt
pending_order_count: StrictInt
status: StrictInt
collateral: StrictStr
@@ -46,10 +47,11 @@ class DetailedAccount(BaseModel):
referral_points_percentage: StrictStr = Field(description=" Remove After FE uses L1 meta endpoint")
positions: List[AccountPosition]
total_asset_value: StrictStr
+ cross_asset_value: StrictStr
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", "pending_order_count", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "positions", "total_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", "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,
@@ -133,6 +135,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"l1_address": obj.get("l1_address"),
"cancel_all_time": obj.get("cancel_all_time"),
"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"),
"status": obj.get("status"),
"collateral": obj.get("collateral"),
@@ -143,6 +146,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"referral_points_percentage": obj.get("referral_points_percentage"),
"positions": [AccountPosition.from_dict(_item) for _item in obj["positions"]] if obj.get("positions") is not None else None,
"total_asset_value": obj.get("total_asset_value"),
+ "cross_asset_value": obj.get("cross_asset_value"),
"pool_info": PublicPoolInfo.from_dict(obj["pool_info"]) if obj.get("pool_info") is not None else None,
"shares": [PublicPoolShare.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None
})
diff --git a/lighter/models/order.py b/lighter/models/order.py
index 91d7885..47d6543 100644
--- a/lighter/models/order.py
+++ b/lighter/models/order.py
@@ -77,8 +77,8 @@ def time_in_force_validate_enum(cls, value):
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
- if value not in set(['in-progress', 'pending', 'open', 'filled', 'canceled', 'canceled-post-only', 'canceled-reduce-only', 'canceled-position-not-allowed', 'canceled-margin-not-allowed', 'canceled-too-much-slippage', 'canceled-not-enough-liquidity', 'canceled-self-trade', 'canceled-expired', 'canceled-oco', 'canceled-child']):
- raise ValueError("must be one of enum values ('in-progress', 'pending', 'open', 'filled', 'canceled', 'canceled-post-only', 'canceled-reduce-only', 'canceled-position-not-allowed', 'canceled-margin-not-allowed', 'canceled-too-much-slippage', 'canceled-not-enough-liquidity', 'canceled-self-trade', 'canceled-expired', 'canceled-oco', 'canceled-child')")
+ if value not in set(['in-progress', 'pending', 'open', 'filled', 'canceled', 'canceled-post-only', 'canceled-reduce-only', 'canceled-position-not-allowed', 'canceled-margin-not-allowed', 'canceled-too-much-slippage', 'canceled-not-enough-liquidity', 'canceled-self-trade', 'canceled-expired', 'canceled-oco', 'canceled-child', 'canceled-liquidation']):
+ raise ValueError("must be one of enum values ('in-progress', 'pending', 'open', 'filled', 'canceled', 'canceled-post-only', 'canceled-reduce-only', 'canceled-position-not-allowed', 'canceled-margin-not-allowed', 'canceled-too-much-slippage', 'canceled-not-enough-liquidity', 'canceled-self-trade', 'canceled-expired', 'canceled-oco', 'canceled-child', 'canceled-liquidation')")
return value
@field_validator('trigger_status')
diff --git a/lighter/models/order_book_orders.py b/lighter/models/order_book_orders.py
new file mode 100644
index 0000000..549d79c
--- /dev/null
+++ b/lighter/models/order_book_orders.py
@@ -0,0 +1,125 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from lighter.models.simple_order import SimpleOrder
+from typing import Optional, Set
+from typing_extensions import Self
+
+class OrderBookOrders(BaseModel):
+ """
+ OrderBookOrders
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ total_asks: StrictInt
+ asks: List[SimpleOrder]
+ total_bids: StrictInt
+ bids: List[SimpleOrder]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message", "total_asks", "asks", "total_bids", "bids"]
+
+ 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 OrderBookOrders 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,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in asks (list)
+ _items = []
+ if self.asks:
+ for _item in self.asks:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['asks'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in bids (list)
+ _items = []
+ if self.bids:
+ for _item in self.bids:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['bids'] = _items
+ # 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 OrderBookOrders from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "total_asks": obj.get("total_asks"),
+ "asks": [SimpleOrder.from_dict(_item) for _item in obj["asks"]] if obj.get("asks") is not None else None,
+ "total_bids": obj.get("total_bids"),
+ "bids": [SimpleOrder.from_dict(_item) for _item in obj["bids"]] if obj.get("bids") is not None else None
+ })
+ # 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/public_pool.py b/lighter/models/public_pool.py
index 0c32351..ba21cd1 100644
--- a/lighter/models/public_pool.py
+++ b/lighter/models/public_pool.py
@@ -35,6 +35,7 @@ class PublicPool(BaseModel):
l1_address: StrictStr
cancel_all_time: StrictInt
total_order_count: StrictInt
+ total_isolated_order_count: StrictInt
pending_order_count: StrictInt
status: StrictInt
collateral: StrictStr
@@ -44,10 +45,11 @@ class PublicPool(BaseModel):
can_invite: StrictBool = Field(description=" Remove After FE uses L1 meta endpoint")
referral_points_percentage: StrictStr = Field(description=" Remove After FE uses L1 meta endpoint")
total_asset_value: StrictStr
+ cross_asset_value: StrictStr
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", "pending_order_count", "status", "collateral", "account_index", "name", "description", "can_invite", "referral_points_percentage", "total_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", "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,
@@ -120,6 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"l1_address": obj.get("l1_address"),
"cancel_all_time": obj.get("cancel_all_time"),
"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"),
"status": obj.get("status"),
"collateral": obj.get("collateral"),
@@ -129,6 +132,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"can_invite": obj.get("can_invite"),
"referral_points_percentage": obj.get("referral_points_percentage"),
"total_asset_value": obj.get("total_asset_value"),
+ "cross_asset_value": obj.get("cross_asset_value"),
"pool_info": PublicPoolInfo.from_dict(obj["pool_info"]) if obj.get("pool_info") is not None else None,
"account_share": PublicPoolShare.from_dict(obj["account_share"]) if obj.get("account_share") is not None else None
})
diff --git a/lighter/models/req_get_fundings.py b/lighter/models/req_get_fundings.py
index f694ed6..d2fe9a5 100644
--- a/lighter/models/req_get_fundings.py
+++ b/lighter/models/req_get_fundings.py
@@ -38,8 +38,8 @@ class ReqGetFundings(BaseModel):
@field_validator('resolution')
def resolution_validate_enum(cls, value):
"""Validates the enum"""
- if value not in set(['1h']):
- raise ValueError("must be one of enum values ('1h')")
+ if value not in set(['1h', '1d']):
+ raise ValueError("must be one of enum values ('1h', '1d')")
return value
model_config = ConfigDict(
diff --git a/lighter/models/req_get_order_book_orders.py b/lighter/models/req_get_order_book_orders.py
new file mode 100644
index 0000000..52c008f
--- /dev/null
+++ b/lighter/models/req_get_order_book_orders.py
@@ -0,0 +1,103 @@
+# 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, Field, StrictInt
+from typing import Any, ClassVar, Dict, List
+from typing_extensions import Annotated
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReqGetOrderBookOrders(BaseModel):
+ """
+ ReqGetOrderBookOrders
+ """ # noqa: E501
+ market_id: StrictInt
+ limit: Annotated[int, Field(le=100, strict=True, ge=1)]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["market_id", "limit"]
+
+ 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 ReqGetOrderBookOrders 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 ReqGetOrderBookOrders from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "market_id": obj.get("market_id"),
+ "limit": obj.get("limit")
+ })
+ # 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_transfer_fee_info.py b/lighter/models/req_get_transfer_fee_info.py
new file mode 100644
index 0000000..1d053be
--- /dev/null
+++ b/lighter/models/req_get_transfer_fee_info.py
@@ -0,0 +1,104 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReqGetTransferFeeInfo(BaseModel):
+ """
+ ReqGetTransferFeeInfo
+ """ # noqa: E501
+ auth: Optional[StrictStr] = None
+ account_index: StrictInt
+ to_account_index: Optional[StrictInt] = -1
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["auth", "account_index", "to_account_index"]
+
+ 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 ReqGetTransferFeeInfo 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 ReqGetTransferFeeInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "auth": obj.get("auth"),
+ "account_index": obj.get("account_index"),
+ "to_account_index": obj.get("to_account_index") if obj.get("to_account_index") is not None else -1
+ })
+ # 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_transfer_history.py b/lighter/models/req_get_transfer_history.py
new file mode 100644
index 0000000..b6b75ba
--- /dev/null
+++ b/lighter/models/req_get_transfer_history.py
@@ -0,0 +1,104 @@
+# 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, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReqGetTransferHistory(BaseModel):
+ """
+ ReqGetTransferHistory
+ """ # noqa: E501
+ account_index: StrictInt
+ auth: Optional[StrictStr] = Field(default=None, description=" made optional to support header auth clients")
+ cursor: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["account_index", "auth", "cursor"]
+
+ 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 ReqGetTransferHistory 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 ReqGetTransferHistory from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "account_index": obj.get("account_index"),
+ "auth": obj.get("auth"),
+ "cursor": obj.get("cursor")
+ })
+ # 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/resp_change_account_tier.py b/lighter/models/resp_change_account_tier.py
new file mode 100644
index 0000000..35b6c15
--- /dev/null
+++ b/lighter/models/resp_change_account_tier.py
@@ -0,0 +1,102 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RespChangeAccountTier(BaseModel):
+ """
+ RespChangeAccountTier
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message"]
+
+ 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 RespChangeAccountTier 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 RespChangeAccountTier from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message")
+ })
+ # 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/resp_send_tx.py b/lighter/models/resp_send_tx.py
new file mode 100644
index 0000000..cc6adcc
--- /dev/null
+++ b/lighter/models/resp_send_tx.py
@@ -0,0 +1,106 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RespSendTx(BaseModel):
+ """
+ RespSendTx
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ tx_hash: StrictStr
+ predicted_execution_time_ms: StrictInt
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message", "tx_hash", "predicted_execution_time_ms"]
+
+ 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 RespSendTx 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 RespSendTx from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "tx_hash": obj.get("tx_hash"),
+ "predicted_execution_time_ms": obj.get("predicted_execution_time_ms")
+ })
+ # 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/resp_send_tx_batch.py b/lighter/models/resp_send_tx_batch.py
new file mode 100644
index 0000000..2b16358
--- /dev/null
+++ b/lighter/models/resp_send_tx_batch.py
@@ -0,0 +1,106 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RespSendTxBatch(BaseModel):
+ """
+ RespSendTxBatch
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ tx_hash: List[StrictStr]
+ predicted_execution_time_ms: StrictInt
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message", "tx_hash", "predicted_execution_time_ms"]
+
+ 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 RespSendTxBatch 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 RespSendTxBatch from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "tx_hash": obj.get("tx_hash"),
+ "predicted_execution_time_ms": obj.get("predicted_execution_time_ms")
+ })
+ # 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/resp_withdrawal_delay.py b/lighter/models/resp_withdrawal_delay.py
new file mode 100644
index 0000000..3add899
--- /dev/null
+++ b/lighter/models/resp_withdrawal_delay.py
@@ -0,0 +1,100 @@
+# 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
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RespWithdrawalDelay(BaseModel):
+ """
+ RespWithdrawalDelay
+ """ # noqa: E501
+ seconds: StrictInt
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["seconds"]
+
+ 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 RespWithdrawalDelay 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 RespWithdrawalDelay from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "seconds": obj.get("seconds")
+ })
+ # 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/risk_info.py b/lighter/models/risk_info.py
index 0186cc7..93d571e 100644
--- a/lighter/models/risk_info.py
+++ b/lighter/models/risk_info.py
@@ -17,8 +17,9 @@
import re # noqa: F401
import json
-from pydantic import BaseModel, ConfigDict, StrictStr
+from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
+from lighter.models.risk_parameters import RiskParameters
from typing import Optional, Set
from typing_extensions import Self
@@ -26,13 +27,10 @@ class RiskInfo(BaseModel):
"""
RiskInfo
""" # noqa: E501
- collateral: StrictStr
- total_account_value: StrictStr
- initial_margin_req: StrictStr
- maintenance_margin_req: StrictStr
- close_out_margin_req: StrictStr
+ cross_risk_parameters: RiskParameters
+ isolated_risk_parameters: List[RiskParameters]
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["collateral", "total_account_value", "initial_margin_req", "maintenance_margin_req", "close_out_margin_req"]
+ __properties: ClassVar[List[str]] = ["cross_risk_parameters", "isolated_risk_parameters"]
model_config = ConfigDict(
populate_by_name=True,
@@ -75,6 +73,16 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of cross_risk_parameters
+ if self.cross_risk_parameters:
+ _dict['cross_risk_parameters'] = self.cross_risk_parameters.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of each item in isolated_risk_parameters (list)
+ _items = []
+ if self.isolated_risk_parameters:
+ for _item in self.isolated_risk_parameters:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['isolated_risk_parameters'] = _items
# 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():
@@ -92,11 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)
_obj = cls.model_validate({
- "collateral": obj.get("collateral"),
- "total_account_value": obj.get("total_account_value"),
- "initial_margin_req": obj.get("initial_margin_req"),
- "maintenance_margin_req": obj.get("maintenance_margin_req"),
- "close_out_margin_req": obj.get("close_out_margin_req")
+ "cross_risk_parameters": RiskParameters.from_dict(obj["cross_risk_parameters"]) if obj.get("cross_risk_parameters") is not None else None,
+ "isolated_risk_parameters": [RiskParameters.from_dict(_item) for _item in obj["isolated_risk_parameters"]] if obj.get("isolated_risk_parameters") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/lighter/models/risk_parameters.py b/lighter/models/risk_parameters.py
new file mode 100644
index 0000000..2084032
--- /dev/null
+++ b/lighter/models/risk_parameters.py
@@ -0,0 +1,110 @@
+# 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
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RiskParameters(BaseModel):
+ """
+ RiskParameters
+ """ # noqa: E501
+ market_id: StrictInt
+ collateral: StrictStr
+ total_account_value: StrictStr
+ initial_margin_req: StrictStr
+ maintenance_margin_req: StrictStr
+ close_out_margin_req: StrictStr
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["market_id", "collateral", "total_account_value", "initial_margin_req", "maintenance_margin_req", "close_out_margin_req"]
+
+ 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 RiskParameters 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 RiskParameters from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "market_id": obj.get("market_id"),
+ "collateral": obj.get("collateral"),
+ "total_account_value": obj.get("total_account_value"),
+ "initial_margin_req": obj.get("initial_margin_req"),
+ "maintenance_margin_req": obj.get("maintenance_margin_req"),
+ "close_out_margin_req": obj.get("close_out_margin_req")
+ })
+ # 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/trade.py b/lighter/models/trade.py
index 7ee6ac6..0520475 100644
--- a/lighter/models/trade.py
+++ b/lighter/models/trade.py
@@ -40,12 +40,16 @@ class Trade(BaseModel):
is_maker_ask: StrictBool
block_height: StrictInt
timestamp: StrictInt
+ taker_fee: StrictInt
taker_position_size_before: StrictStr
taker_entry_quote_before: StrictStr
taker_initial_margin_fraction_before: StrictInt
+ taker_position_sign_changed: StrictBool
+ maker_fee: StrictInt
maker_position_size_before: StrictStr
maker_entry_quote_before: StrictStr
maker_initial_margin_fraction_before: StrictInt
+ maker_position_sign_changed: StrictBool
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["trade_id", "tx_hash", "type", "market_id", "size", "price", "usd_amount", "ask_id", "bid_id", "ask_account_id", "bid_account_id", "is_maker_ask", "block_height", "timestamp", "taker_fee", "taker_position_size_before", "taker_entry_quote_before", "taker_initial_margin_fraction_before", "taker_position_sign_changed", "maker_fee", "maker_position_size_before", "maker_entry_quote_before", "maker_initial_margin_fraction_before", "maker_position_sign_changed"]
diff --git a/lighter/models/transfer_fee_info.py b/lighter/models/transfer_fee_info.py
new file mode 100644
index 0000000..b4ee332
--- /dev/null
+++ b/lighter/models/transfer_fee_info.py
@@ -0,0 +1,104 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TransferFeeInfo(BaseModel):
+ """
+ TransferFeeInfo
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ transfer_fee_usdc: StrictInt
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message", "transfer_fee_usdc"]
+
+ 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 TransferFeeInfo 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 TransferFeeInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "transfer_fee_usdc": obj.get("transfer_fee_usdc")
+ })
+ # 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/transfer_history.py b/lighter/models/transfer_history.py
new file mode 100644
index 0000000..9c415e6
--- /dev/null
+++ b/lighter/models/transfer_history.py
@@ -0,0 +1,114 @@
+# 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
+from typing import Any, ClassVar, Dict, List, Optional
+from lighter.models.transfer_history_item import TransferHistoryItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TransferHistory(BaseModel):
+ """
+ TransferHistory
+ """ # noqa: E501
+ code: StrictInt
+ message: Optional[StrictStr] = None
+ transfers: List[TransferHistoryItem]
+ cursor: StrictStr
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["code", "message", "transfers", "cursor"]
+
+ 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 TransferHistory 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,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in transfers (list)
+ _items = []
+ if self.transfers:
+ for _item in self.transfers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['transfers'] = _items
+ # 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 TransferHistory from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "code": obj.get("code"),
+ "message": obj.get("message"),
+ "transfers": [TransferHistoryItem.from_dict(_item) for _item in obj["transfers"]] if obj.get("transfers") is not None else None,
+ "cursor": obj.get("cursor")
+ })
+ # 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/transfer_history_item.py b/lighter/models/transfer_history_item.py
new file mode 100644
index 0000000..dcebc4a
--- /dev/null
+++ b/lighter/models/transfer_history_item.py
@@ -0,0 +1,123 @@
+# 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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TransferHistoryItem(BaseModel):
+ """
+ TransferHistoryItem
+ """ # noqa: E501
+ id: StrictStr
+ amount: StrictStr
+ timestamp: StrictInt
+ type: StrictStr
+ from_l1_address: StrictStr
+ to_l1_address: StrictStr
+ from_account_index: StrictInt
+ to_account_index: StrictInt
+ tx_hash: StrictStr
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "amount", "timestamp", "type", "from_l1_address", "to_l1_address", "from_account_index", "to_account_index", "tx_hash"]
+
+ @field_validator('type')
+ def type_validate_enum(cls, value):
+ """Validates the enum"""
+ if value not in set(['L2TransferInflow', 'L2TransferOutflow']):
+ raise ValueError("must be one of enum values ('L2TransferInflow', 'L2TransferOutflow')")
+ 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 TransferHistoryItem 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 TransferHistoryItem from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "amount": obj.get("amount"),
+ "timestamp": obj.get("timestamp"),
+ "type": obj.get("type"),
+ "from_l1_address": obj.get("from_l1_address"),
+ "to_l1_address": obj.get("to_l1_address"),
+ "from_account_index": obj.get("from_account_index"),
+ "to_account_index": obj.get("to_account_index"),
+ "tx_hash": obj.get("tx_hash")
+ })
+ # 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/openapi.json b/openapi.json
index 870d264..1845067 100644
--- a/openapi.json
+++ b/openapi.json
@@ -84,55 +84,6 @@
"description": "Get account by account's index.
More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)