Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
README.md
docs/Account.md
docs/AccountAccountTradingModeEnum.md
docs/AccountAccountTypeEnum.md
docs/AccountApi.md
docs/AccountApiKeys.md
docs/AccountAsset.md
Expand All @@ -8,6 +10,7 @@ docs/AccountMetadata.md
docs/AccountMetadatas.md
docs/AccountPnL.md
docs/AccountPosition.md
docs/AccountPositionMarginModeEnum.md
docs/Announcement.md
docs/AnnouncementApi.md
docs/Announcements.md
Expand All @@ -33,6 +36,8 @@ docs/Deposit.md
docs/DepositHistory.md
docs/DepositHistoryItem.md
docs/DetailedAccount.md
docs/DetailedAccountAccountTradingModeEnum.md
docs/DetailedAccountAccountTypeEnum.md
docs/DetailedAccounts.md
docs/EnrichedTx.md
docs/ExchangeMetric.md
Expand Down Expand Up @@ -61,6 +66,7 @@ docs/LivepointsApi.md
docs/MarkPriceCandle.md
docs/MarkPriceCandles.md
docs/MarketConfig.md
docs/MarketConfigMarketMarginModeEnum.md
docs/MarketPriceChart.md
docs/MarketPriceCharts.md
docs/NextNonce.md
Expand All @@ -80,9 +86,13 @@ docs/PnLEntry.md
docs/PositionFunding.md
docs/PositionFundings.md
docs/PublicPoolInfo.md
docs/PublicPoolInfoStatusEnum.md
docs/PublicPoolMetadata.md
docs/PublicPoolMetadataAccountTypeEnum.md
docs/PublicPoolMetadataStatusEnum.md
docs/PublicPoolShare.md
docs/RFQEntry.md
docs/RFQEntryDirectionEnum.md
docs/RFQMetadata.md
docs/RFQResponseEntry.md
docs/Referral.md
Expand All @@ -95,6 +105,7 @@ docs/ReferralTotals.md
docs/ReqSetAccountMetadata.md
docs/RespChangeAccountTier.md
docs/RespCreateRFQ.md
docs/RespCreateRFQDirectionEnum.md
docs/RespGetApiTokens.md
docs/RespGetExchangeMetrics.md
docs/RespGetExecuteStats.md
Expand All @@ -104,17 +115,20 @@ docs/RespGetLeaseOptions.md
docs/RespGetLeases.md
docs/RespGetMakerOnlyApiKeys.md
docs/RespGetRFQ.md
docs/RespGetRFQDirectionEnum.md
docs/RespListRFQs.md
docs/RespPostApiToken.md
docs/RespPublicPoolsMetadata.md
docs/RespRespondToRFQ.md
docs/RespRespondToRFQDirectionEnum.md
docs/RespRevokeApiToken.md
docs/RespSendTx.md
docs/RespSendTxBatch.md
docs/RespSetMakerOnlyApiKeys.md
docs/RespSyntheticSpotInfo.md
docs/RespUpdateKickback.md
docs/RespUpdateRFQ.md
docs/RespUpdateRFQDirectionEnum.md
docs/RespUpdateReferralCode.md
docs/RespWithdrawalDelay.md
docs/ResultCode.md
Expand Down Expand Up @@ -170,13 +184,16 @@ lighter/configuration.py
lighter/exceptions.py
lighter/models/__init__.py
lighter/models/account.py
lighter/models/account_account_trading_mode_enum.py
lighter/models/account_account_type_enum.py
lighter/models/account_api_keys.py
lighter/models/account_asset.py
lighter/models/account_limits.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_position_margin_mode_enum.py
lighter/models/announcement.py
lighter/models/announcements.py
lighter/models/api_key.py
Expand All @@ -198,6 +215,8 @@ lighter/models/deposit.py
lighter/models/deposit_history.py
lighter/models/deposit_history_item.py
lighter/models/detailed_account.py
lighter/models/detailed_account_account_trading_mode_enum.py
lighter/models/detailed_account_account_type_enum.py
lighter/models/detailed_accounts.py
lighter/models/enriched_tx.py
lighter/models/exchange_metric.py
Expand All @@ -223,6 +242,7 @@ lighter/models/live_points_total.py
lighter/models/mark_price_candle.py
lighter/models/mark_price_candles.py
lighter/models/market_config.py
lighter/models/market_config_market_margin_mode_enum.py
lighter/models/market_price_chart.py
lighter/models/market_price_charts.py
lighter/models/next_nonce.py
Expand All @@ -240,7 +260,10 @@ lighter/models/pn_l_entry.py
lighter/models/position_funding.py
lighter/models/position_fundings.py
lighter/models/public_pool_info.py
lighter/models/public_pool_info_status_enum.py
lighter/models/public_pool_metadata.py
lighter/models/public_pool_metadata_account_type_enum.py
lighter/models/public_pool_metadata_status_enum.py
lighter/models/public_pool_share.py
lighter/models/referral.py
lighter/models/referral_code.py
Expand All @@ -251,6 +274,7 @@ lighter/models/referral_totals.py
lighter/models/req_set_account_metadata.py
lighter/models/resp_change_account_tier.py
lighter/models/resp_create_rfq.py
lighter/models/resp_create_rfq_direction_enum.py
lighter/models/resp_get_api_tokens.py
lighter/models/resp_get_exchange_metrics.py
lighter/models/resp_get_execute_stats.py
Expand All @@ -260,10 +284,12 @@ lighter/models/resp_get_lease_options.py
lighter/models/resp_get_leases.py
lighter/models/resp_get_maker_only_api_keys.py
lighter/models/resp_get_rfq.py
lighter/models/resp_get_rfq_direction_enum.py
lighter/models/resp_list_rfqs.py
lighter/models/resp_post_api_token.py
lighter/models/resp_public_pools_metadata.py
lighter/models/resp_respond_to_rfq.py
lighter/models/resp_respond_to_rfq_direction_enum.py
lighter/models/resp_revoke_api_token.py
lighter/models/resp_send_tx.py
lighter/models/resp_send_tx_batch.py
Expand All @@ -272,9 +298,11 @@ lighter/models/resp_synthetic_spot_info.py
lighter/models/resp_update_kickback.py
lighter/models/resp_update_referral_code.py
lighter/models/resp_update_rfq.py
lighter/models/resp_update_rfq_direction_enum.py
lighter/models/resp_withdrawal_delay.py
lighter/models/result_code.py
lighter/models/rfq_entry.py
lighter/models/rfq_entry_direction_enum.py
lighter/models/rfq_metadata.py
lighter/models/rfq_response_entry.py
lighter/models/risk_info.py
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@ Class | Method | HTTP request | Description

<!-- AUTOGEN:MODELS -->
- [Account](docs/Account.md)
- [AccountAccountTradingModeEnum](docs/AccountAccountTradingModeEnum.md)
- [AccountAccountTypeEnum](docs/AccountAccountTypeEnum.md)
- [AccountApiKeys](docs/AccountApiKeys.md)
- [AccountAsset](docs/AccountAsset.md)
- [AccountLimits](docs/AccountLimits.md)
- [AccountMetadata](docs/AccountMetadata.md)
- [AccountMetadatas](docs/AccountMetadatas.md)
- [AccountPnL](docs/AccountPnL.md)
- [AccountPosition](docs/AccountPosition.md)
- [AccountPositionMarginModeEnum](docs/AccountPositionMarginModeEnum.md)
- [Announcement](docs/Announcement.md)
- [Announcements](docs/Announcements.md)
- [ApiKey](docs/ApiKey.md)
Expand All @@ -170,6 +173,8 @@ Class | Method | HTTP request | Description
- [DepositHistory](docs/DepositHistory.md)
- [DepositHistoryItem](docs/DepositHistoryItem.md)
- [DetailedAccount](docs/DetailedAccount.md)
- [DetailedAccountAccountTradingModeEnum](docs/DetailedAccountAccountTradingModeEnum.md)
- [DetailedAccountAccountTypeEnum](docs/DetailedAccountAccountTypeEnum.md)
- [DetailedAccounts](docs/DetailedAccounts.md)
- [EnrichedTx](docs/EnrichedTx.md)
- [ExchangeMetric](docs/ExchangeMetric.md)
Expand All @@ -195,6 +200,7 @@ Class | Method | HTTP request | Description
- [MarkPriceCandle](docs/MarkPriceCandle.md)
- [MarkPriceCandles](docs/MarkPriceCandles.md)
- [MarketConfig](docs/MarketConfig.md)
- [MarketConfigMarketMarginModeEnum](docs/MarketConfigMarketMarginModeEnum.md)
- [MarketPriceChart](docs/MarketPriceChart.md)
- [MarketPriceCharts](docs/MarketPriceCharts.md)
- [NextNonce](docs/NextNonce.md)
Expand All @@ -212,9 +218,13 @@ Class | Method | HTTP request | Description
- [PositionFunding](docs/PositionFunding.md)
- [PositionFundings](docs/PositionFundings.md)
- [PublicPoolInfo](docs/PublicPoolInfo.md)
- [PublicPoolInfoStatusEnum](docs/PublicPoolInfoStatusEnum.md)
- [PublicPoolMetadata](docs/PublicPoolMetadata.md)
- [PublicPoolMetadataAccountTypeEnum](docs/PublicPoolMetadataAccountTypeEnum.md)
- [PublicPoolMetadataStatusEnum](docs/PublicPoolMetadataStatusEnum.md)
- [PublicPoolShare](docs/PublicPoolShare.md)
- [RFQEntry](docs/RFQEntry.md)
- [RFQEntryDirectionEnum](docs/RFQEntryDirectionEnum.md)
- [RFQMetadata](docs/RFQMetadata.md)
- [RFQResponseEntry](docs/RFQResponseEntry.md)
- [Referral](docs/Referral.md)
Expand All @@ -226,6 +236,7 @@ Class | Method | HTTP request | Description
- [ReqSetAccountMetadata](docs/ReqSetAccountMetadata.md)
- [RespChangeAccountTier](docs/RespChangeAccountTier.md)
- [RespCreateRFQ](docs/RespCreateRFQ.md)
- [RespCreateRFQDirectionEnum](docs/RespCreateRFQDirectionEnum.md)
- [RespGetApiTokens](docs/RespGetApiTokens.md)
- [RespGetExchangeMetrics](docs/RespGetExchangeMetrics.md)
- [RespGetExecuteStats](docs/RespGetExecuteStats.md)
Expand All @@ -235,17 +246,20 @@ Class | Method | HTTP request | Description
- [RespGetLeases](docs/RespGetLeases.md)
- [RespGetMakerOnlyApiKeys](docs/RespGetMakerOnlyApiKeys.md)
- [RespGetRFQ](docs/RespGetRFQ.md)
- [RespGetRFQDirectionEnum](docs/RespGetRFQDirectionEnum.md)
- [RespListRFQs](docs/RespListRFQs.md)
- [RespPostApiToken](docs/RespPostApiToken.md)
- [RespPublicPoolsMetadata](docs/RespPublicPoolsMetadata.md)
- [RespRespondToRFQ](docs/RespRespondToRFQ.md)
- [RespRespondToRFQDirectionEnum](docs/RespRespondToRFQDirectionEnum.md)
- [RespRevokeApiToken](docs/RespRevokeApiToken.md)
- [RespSendTx](docs/RespSendTx.md)
- [RespSendTxBatch](docs/RespSendTxBatch.md)
- [RespSetMakerOnlyApiKeys](docs/RespSetMakerOnlyApiKeys.md)
- [RespSyntheticSpotInfo](docs/RespSyntheticSpotInfo.md)
- [RespUpdateKickback](docs/RespUpdateKickback.md)
- [RespUpdateRFQ](docs/RespUpdateRFQ.md)
- [RespUpdateRFQDirectionEnum](docs/RespUpdateRFQDirectionEnum.md)
- [RespUpdateReferralCode](docs/RespUpdateReferralCode.md)
- [RespWithdrawalDelay](docs/RespWithdrawalDelay.md)
- [ResultCode](docs/ResultCode.md)
Expand Down Expand Up @@ -280,3 +294,22 @@ Class | Method | HTTP request | Description

<a id="documentation-for-authorization"></a>
<!-- /AUTOGEN:MODELS -->

## Regenerating from openapi.json

`openapi.json` comes from the backend `server.api` (goctl-swagger). Before running
openapi-generator (7.7.0, `-g python -c config.yaml`), normalize it with:

```sh
python3 scripts/openapi_postprocess.py openapi.json
```

goctl-swagger emits integer `options=` as strings (`["Cross:0", "Isolated:1"]`);
the script converts them to integer enums and, for named ones, adds a
`<Model><Field>Enum` `IntEnum` schema (e.g. `AccountPositionMarginModeEnum`) whose
members can be compared against the plain `int` field:

```python
if position.margin_mode == lighter.AccountPositionMarginModeEnum.Isolated:
...
```
4 changes: 2 additions & 2 deletions docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **int** | |
**message** | **str** | | [optional]
**account_type** | **int** | |
**account_trading_mode** | **int** | Classic&#x3D;0 and Unified&#x3D;1 |
**account_type** | **int** | See AccountAccountTypeEnum |
**account_trading_mode** | **int** | See AccountAccountTradingModeEnum |
**index** | **int** | |
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
Expand Down
13 changes: 13 additions & 0 deletions docs/AccountAccountTradingModeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AccountAccountTradingModeEnum

Named values of Account.account_trading_mode

## Enum

* `Simple` (value: `0`)

* `Unified` (value: `1`)

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


21 changes: 21 additions & 0 deletions docs/AccountAccountTypeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AccountAccountTypeEnum

Named values of Account.account_type

## Enum

* `Master` (value: `0`)

* `Sub` (value: `1`)

* `PublicPool` (value: `2`)

* `InsuranceFund` (value: `3`)

* `LighterStakingPool` (value: `4`)

* `TreasurySub` (value: `5`)

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


2 changes: 1 addition & 1 deletion docs/AccountPosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Name | Type | Description | Notes
**realized_pnl** | **str** | |
**liquidation_price** | **str** | |
**total_funding_paid_out** | **str** | | [optional]
**margin_mode** | **int** | |
**margin_mode** | **int** | See AccountPositionMarginModeEnum |
**allocated_margin** | **str** | |
**total_discount** | **str** | |
**margin_set_flag** | **int** | |
Expand Down
13 changes: 13 additions & 0 deletions docs/AccountPositionMarginModeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AccountPositionMarginModeEnum

Named values of AccountPosition.margin_mode

## Enum

* `Cross` (value: `0`)

* `Isolated` (value: `1`)

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


4 changes: 2 additions & 2 deletions docs/DetailedAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **int** | |
**message** | **str** | | [optional]
**account_type** | **int** | |
**account_trading_mode** | **int** | Classic&#x3D;0 and Unified&#x3D;1 | [optional]
**account_type** | **int** | See DetailedAccountAccountTypeEnum |
**account_trading_mode** | **int** | See DetailedAccountAccountTradingModeEnum | [optional]
**index** | **int** | |
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
Expand Down
13 changes: 13 additions & 0 deletions docs/DetailedAccountAccountTradingModeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DetailedAccountAccountTradingModeEnum

Named values of DetailedAccount.account_trading_mode

## Enum

* `Simple` (value: `0`)

* `Unified` (value: `1`)

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


21 changes: 21 additions & 0 deletions docs/DetailedAccountAccountTypeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# DetailedAccountAccountTypeEnum

Named values of DetailedAccount.account_type

## Enum

* `Master` (value: `0`)

* `Sub` (value: `1`)

* `PublicPool` (value: `2`)

* `InsuranceFund` (value: `3`)

* `LighterStakingPool` (value: `4`)

* `TreasurySub` (value: `5`)

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


2 changes: 1 addition & 1 deletion docs/MarketConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**market_margin_mode** | **int** | |
**market_margin_mode** | **int** | See MarketConfigMarketMarginModeEnum |
**insurance_fund_account_index** | **int** | |
**liquidation_mode** | **int** | |
**force_reduce_only** | **bool** | |
Expand Down
13 changes: 13 additions & 0 deletions docs/MarketConfigMarketMarginModeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# MarketConfigMarketMarginModeEnum

Named values of MarketConfig.market_margin_mode

## Enum

* `All` (value: `0`)

* `IsolatedForNonPools` (value: `1`)

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


Loading
Loading