Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ docs/FundingApi.md
docs/FundingRate.md
docs/FundingRates.md
docs/Fundings.md
docs/HistoricalTradesExportData.md
docs/InfoApi.md
docs/L1Metadata.md
docs/L1ProviderInfo.md
Expand Down Expand Up @@ -77,6 +78,8 @@ docs/PartnerStats.md
docs/PendingUnlock.md
docs/PerpsOrderBookDetail.md
docs/PnLEntry.md
docs/PnlLeaderboard.md
docs/PnlLeaderboardEntry.md
docs/PositionFunding.md
docs/PositionFundings.md
docs/PublicPoolInfo.md
Expand All @@ -91,6 +94,8 @@ docs/ReferralCode.md
docs/ReferralPointEntry.md
docs/ReferralPoints.md
docs/ReferralProgramKickback.md
docs/ReferralStat.md
docs/ReferralStats.md
docs/ReferralTotals.md
docs/ReqSetAccountMetadata.md
docs/RespChangeAccountTier.md
Expand Down Expand Up @@ -208,6 +213,7 @@ lighter/models/funding.py
lighter/models/funding_rate.py
lighter/models/funding_rates.py
lighter/models/fundings.py
lighter/models/historical_trades_export_data.py
lighter/models/l1_metadata.py
lighter/models/l1_provider_info.py
lighter/models/layer1_basic_info.py
Expand Down Expand Up @@ -237,6 +243,8 @@ lighter/models/partner_stats.py
lighter/models/pending_unlock.py
lighter/models/perps_order_book_detail.py
lighter/models/pn_l_entry.py
lighter/models/pnl_leaderboard.py
lighter/models/pnl_leaderboard_entry.py
lighter/models/position_funding.py
lighter/models/position_fundings.py
lighter/models/public_pool_info.py
Expand All @@ -247,6 +255,8 @@ lighter/models/referral_code.py
lighter/models/referral_point_entry.py
lighter/models/referral_points.py
lighter/models/referral_program_kickback.py
lighter/models/referral_stat.py
lighter/models/referral_stats.py
lighter/models/referral_totals.py
lighter/models/req_set_account_metadata.py
lighter/models/resp_change_account_tier.py
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Class | Method | HTTP request | Description
*AccountApi* | [**lit_lease**](docs/AccountApi.md#lit_lease) | **POST** /api/v1/litLease | litLease
*AccountApi* | [**partner_stats**](docs/AccountApi.md#partner_stats) | **GET** /api/v1/partnerStats | partnerStats
*AccountApi* | [**pnl**](docs/AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
*AccountApi* | [**pnl_leaderboard**](docs/AccountApi.md#pnl_leaderboard) | **GET** /api/v1/pnlLeaderboard | pnlLeaderboard
*AccountApi* | [**position_funding**](docs/AccountApi.md#position_funding) | **GET** /api/v1/positionFunding | positionFunding
*AccountApi* | [**public_pools_metadata**](docs/AccountApi.md#public_pools_metadata) | **GET** /api/v1/publicPoolsMetadata | publicPoolsMetadata
*AccountApi* | [**referral_user_referrals**](docs/AccountApi.md#referral_user_referrals) | **GET** /api/v1/referral/userReferrals | userReferrals
Expand Down Expand Up @@ -110,6 +111,7 @@ Class | Method | HTTP request | Description
*OrderApi* | [**asset_details**](docs/OrderApi.md#asset_details) | **GET** /api/v1/assetDetails | assetDetails
*OrderApi* | [**exchange_metrics**](docs/OrderApi.md#exchange_metrics) | **GET** /api/v1/exchangeMetrics | exchangeMetrics
*OrderApi* | [**exchange_stats**](docs/OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
*OrderApi* | [**export_historical_trades**](docs/OrderApi.md#export_historical_trades) | **GET** /api/v1/export/historicalTrades | export_historicalTrades
*OrderApi* | [**execute_stats**](docs/OrderApi.md#execute_stats) | **GET** /api/v1/executeStats | executeStats
*OrderApi* | [**export**](docs/OrderApi.md#export) | **GET** /api/v1/export | export
*OrderApi* | [**order_book_details**](docs/OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
Expand All @@ -121,6 +123,7 @@ Class | Method | HTTP request | Description
*ReferralApi* | [**referral_get**](docs/ReferralApi.md#referral_get) | **GET** /api/v1/referral/get | referral_get
*ReferralApi* | [**referral_kickback_update**](docs/ReferralApi.md#referral_kickback_update) | **POST** /api/v1/referral/kickback/update | referral_kickback_update
*ReferralApi* | [**referral_points**](docs/ReferralApi.md#referral_points) | **GET** /api/v1/referral/points | referral_points
*ReferralApi* | [**referral_stats**](docs/ReferralApi.md#referral_stats) | **GET** /api/v1/referral/stats | referral_stats
*ReferralApi* | [**referral_update**](docs/ReferralApi.md#referral_update) | **POST** /api/v1/referral/update | referral_update
*ReferralApi* | [**referral_use**](docs/ReferralApi.md#referral_use) | **POST** /api/v1/referral/use | referral_use
*RootApi* | [**info**](docs/RootApi.md#info) | **GET** /info | info
Expand Down Expand Up @@ -179,6 +182,7 @@ Class | Method | HTTP request | Description
- [Funding](docs/Funding.md)
- [FundingRate](docs/FundingRate.md)
- [FundingRates](docs/FundingRates.md)
- [HistoricalTradesExportData](docs/HistoricalTradesExportData.md)
- [Fundings](docs/Fundings.md)
- [L1Metadata](docs/L1Metadata.md)
- [L1ProviderInfo](docs/L1ProviderInfo.md)
Expand Down Expand Up @@ -208,6 +212,8 @@ Class | Method | HTTP request | Description
- [PartnerStats](docs/PartnerStats.md)
- [PendingUnlock](docs/PendingUnlock.md)
- [PerpsOrderBookDetail](docs/PerpsOrderBookDetail.md)
- [PnlLeaderboard](docs/PnlLeaderboard.md)
- [PnlLeaderboardEntry](docs/PnlLeaderboardEntry.md)
- [PnLEntry](docs/PnLEntry.md)
- [PositionFunding](docs/PositionFunding.md)
- [PositionFundings](docs/PositionFundings.md)
Expand All @@ -218,6 +224,8 @@ Class | Method | HTTP request | Description
- [RFQMetadata](docs/RFQMetadata.md)
- [RFQResponseEntry](docs/RFQResponseEntry.md)
- [Referral](docs/Referral.md)
- [ReferralStat](docs/ReferralStat.md)
- [ReferralStats](docs/ReferralStats.md)
- [ReferralCode](docs/ReferralCode.md)
- [ReferralPointEntry](docs/ReferralPointEntry.md)
- [ReferralPoints](docs/ReferralPoints.md)
Expand Down
90 changes: 86 additions & 4 deletions docs/AccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Method | HTTP request | Description
[**lit_lease**](AccountApi.md#lit_lease) | **POST** /api/v1/litLease | litLease
[**partner_stats**](AccountApi.md#partner_stats) | **GET** /api/v1/partnerStats | partnerStats
[**pnl**](AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
[**pnl_leaderboard**](AccountApi.md#pnl_leaderboard) | **GET** /api/v1/pnlLeaderboard | pnlLeaderboard
[**position_funding**](AccountApi.md#position_funding) | **GET** /api/v1/positionFunding | positionFunding
[**public_pools_metadata**](AccountApi.md#public_pools_metadata) | **GET** /api/v1/publicPoolsMetadata | publicPoolsMetadata
[**referral_user_referrals**](AccountApi.md#referral_user_referrals) | **GET** /api/v1/referral/userReferrals | userReferrals
Expand Down Expand Up @@ -401,7 +402,7 @@ No authorization required

changeAccountTier

Change account tier. You can only perform this action once every 24 hours, and with no orders or positions open.
Change account type (applies to both master, and subaccounts). Downgrades can be performed once every 24 hours.

### Example

Expand Down Expand Up @@ -612,11 +613,11 @@ 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)

# **leaderboard**
> Leaderboard leaderboard(type, authorization=authorization, l1_address=l1_address, competition_id=competition_id)
> Leaderboard leaderboard(type, authorization=authorization, l1_address=l1_address, competition_id=competition_id, auth=auth)

leaderboard

Get points leaderboard. Type should be all.
Get points leaderboard

### Example

Expand All @@ -642,10 +643,11 @@ async with lighter.ApiClient(configuration) as api_client:
authorization = 'authorization_example' # str | (optional)
l1_address = 'l1_address_example' # str | (optional)
competition_id = 'competition_id_example' # str | (optional)
auth = 'auth_example' # str | (optional)

try:
# leaderboard
api_response = await api_instance.leaderboard(type, authorization=authorization, l1_address=l1_address, competition_id=competition_id)
api_response = await api_instance.leaderboard(type, authorization=authorization, l1_address=l1_address, competition_id=competition_id, auth=auth)
print("The response of AccountApi->leaderboard:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -663,6 +665,7 @@ Name | Type | Description | Notes
**authorization** | **str**| | [optional]
**l1_address** | **str**| | [optional]
**competition_id** | **str**| | [optional]
**auth** | **str**| | [optional]

### Return type

Expand Down Expand Up @@ -1136,6 +1139,85 @@ 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)

# **pnl_leaderboard**
> PnlLeaderboard pnl_leaderboard(time_window, sort_by, sort_dir, limit, offset, search=search)

pnlLeaderboard

Get pnl leaderboard

### Example


```python
import lighter
from lighter.models.pnl_leaderboard import PnlLeaderboard
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)
time_window = all # str | (default to all)
sort_by = pnl # str | (default to pnl)
sort_dir = desc # str | (default to desc)
limit = 56 # int |
offset = 56 # int |
search = 'search_example' # str | (optional)

try:
# pnlLeaderboard
api_response = await api_instance.pnl_leaderboard(time_window, sort_by, sort_dir, limit, offset, search=search)
print("The response of AccountApi->pnl_leaderboard:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountApi->pnl_leaderboard: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**time_window** | **str**| | [default to all]
**sort_by** | **str**| | [default to pnl]
**sort_dir** | **str**| | [default to desc]
**limit** | **int**| |
**offset** | **int**| |
**search** | **str**| | [optional]

### Return type

[**PnlLeaderboard**](PnlLeaderboard.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)

# **position_funding**
> PositionFundings position_funding(account_index, limit, authorization=authorization, cursor=cursor, side=side, start_timestamp=start_timestamp, end_timestamp=end_timestamp, market_ids=market_ids)

Expand Down
1 change: 1 addition & 0 deletions docs/AccountMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**can_rfq** | **bool** | |
**can_rfq_market_ids** | **List[str]** | |
**metadata** | [**SubAccountMetadata**](SubAccountMetadata.md) | |
**agent_enabled** | **bool** | |

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/DetailedAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Name | Type | Description | Notes
**cross_maintenance_margin_requirement** | **str** | |
**can_rfq_market_ids** | **List[str]** | |
**metadata** | [**SubAccountMetadata**](SubAccountMetadata.md) | |
**agent_enabled** | **bool** | |

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/FundingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description

funding-rates

Get funding rates
Get funding rates across venues. For real-time funding rates, use the market_stats WebSocket channel.

### Example

Expand Down
32 changes: 32 additions & 0 deletions docs/HistoricalTradesExportData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# HistoricalTradesExportData


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **int** | |
**message** | **str** | | [optional]
**data_url** | **str** | |
**expires_at** | **str** | |

## Example

```python
from lighter.models.historical_trades_export_data import HistoricalTradesExportData

# TODO update the JSON string below
json = "{}"
# create an instance of HistoricalTradesExportData from a JSON string
historical_trades_export_data_instance = HistoricalTradesExportData.from_json(json)
# print the JSON string representation of the object
print(HistoricalTradesExportData.to_json())

# convert the object into a dict
historical_trades_export_data_dict = historical_trades_export_data_instance.to_dict()
# create an instance of HistoricalTradesExportData from a dict
historical_trades_export_data_from_dict = HistoricalTradesExportData.from_dict(historical_trades_export_data_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)


2 changes: 2 additions & 0 deletions docs/LiqTrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Name | Type | Description | Notes
**taker_fee** | **str** | |
**maker_fee** | **str** | |
**transaction_time** | **int** | |
**bid_account_id** | **int** | |
**ask_account_id** | **int** | |

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/LivepointsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description

livePoints_total

Get live points total for an account
Get RH live points total for an account

### Example

Expand Down
1 change: 1 addition & 0 deletions docs/Order.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Name | Type | Description | Notes
**integrator_maker_fee** | **str** | |
**integrator_taker_fee** | **str** | |
**order_flags** | **int** | |
**order_version** | **int** | |

## Example

Expand Down
Loading
Loading