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
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ lighter/models/binary_option_market_stats.py
lighter/models/block.py
lighter/models/blocks.py
lighter/models/bo_event_pn_l.py
lighter/models/bo_fee_tier.py
lighter/models/bo_outcome_pn_l.py
lighter/models/bridge_supported_network.py
lighter/models/bridge_supported_networks.py
Expand All @@ -232,6 +233,7 @@ lighter/models/exchange_metric.py
lighter/models/exchange_stats.py
lighter/models/execute_stat.py
lighter/models/export_data.py
lighter/models/fee_tiers.py
lighter/models/funding.py
lighter/models/funding_rate.py
lighter/models/funding_rates.py
Expand Down Expand Up @@ -322,6 +324,7 @@ lighter/models/share_price.py
lighter/models/simple_order.py
lighter/models/slippage_result.py
lighter/models/spot_order_book_detail.py
lighter/models/staking_fee_tier.py
lighter/models/status.py
lighter/models/strategy.py
lighter/models/sub_account_metadata.py
Expand All @@ -339,6 +342,7 @@ lighter/models/tx.py
lighter/models/tx_hash.py
lighter/models/txs.py
lighter/models/up_down_candle.py
lighter/models/user_fee_tier.py
lighter/models/user_referrals.py
lighter/models/validator_info.py
lighter/models/withdraw_history.py
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Class | Method | HTTP request | Description
*AccountApi* | [**accounts_by_l1_address**](docs/AccountApi.md#accounts_by_l1_address) | **GET** /api/v1/accountsByL1Address | accountsByL1Address
*AccountApi* | [**apikeys**](docs/AccountApi.md#apikeys) | **GET** /api/v1/apikeys | apikeys
*AccountApi* | [**change_account_tier**](docs/AccountApi.md#change_account_tier) | **POST** /api/v1/changeAccountTier | changeAccountTier
*AccountApi* | [**fee_tiers**](docs/AccountApi.md#fee_tiers) | **GET** /api/v1/feeTiers | feeTiers
*AccountApi* | [**get_maker_only_api_keys**](docs/AccountApi.md#get_maker_only_api_keys) | **GET** /api/v1/getMakerOnlyApiKeys | getMakerOnlyApiKeys
*AccountApi* | [**l1_metadata**](docs/AccountApi.md#l1_metadata) | **GET** /api/v1/l1Metadata | l1Metadata
*AccountApi* | [**leaderboard**](docs/AccountApi.md#leaderboard) | **GET** /api/v1/leaderboard | leaderboard
Expand Down Expand Up @@ -167,6 +168,7 @@ Class | Method | HTTP request | Description
- [Block](docs/Block.md)
- [Blocks](docs/Blocks.md)
- [BoEventPnL](docs/BoEventPnL.md)
- [BoFeeTier](docs/BoFeeTier.md)
- [BoOutcomePnL](docs/BoOutcomePnL.md)
- [BridgeSupportedNetwork](docs/BridgeSupportedNetwork.md)
- [BridgeSupportedNetworks](docs/BridgeSupportedNetworks.md)
Expand All @@ -188,6 +190,7 @@ Class | Method | HTTP request | Description
- [ExchangeStats](docs/ExchangeStats.md)
- [ExecuteStat](docs/ExecuteStat.md)
- [ExportData](docs/ExportData.md)
- [FeeTiers](docs/FeeTiers.md)
- [Funding](docs/Funding.md)
- [FundingRate](docs/FundingRate.md)
- [FundingRates](docs/FundingRates.md)
Expand Down Expand Up @@ -278,6 +281,7 @@ Class | Method | HTTP request | Description
- [SimpleOrder](docs/SimpleOrder.md)
- [SlippageResult](docs/SlippageResult.md)
- [SpotOrderBookDetail](docs/SpotOrderBookDetail.md)
- [StakingFeeTier](docs/StakingFeeTier.md)
- [Status](docs/Status.md)
- [Strategy](docs/Strategy.md)
- [SubAccountMetadata](docs/SubAccountMetadata.md)
Expand All @@ -295,6 +299,7 @@ Class | Method | HTTP request | Description
- [TxHash](docs/TxHash.md)
- [Txs](docs/Txs.md)
- [UpDownCandle](docs/UpDownCandle.md)
- [UserFeeTier](docs/UserFeeTier.md)
- [UserReferrals](docs/UserReferrals.md)
- [ValidatorInfo](docs/ValidatorInfo.md)
- [WithdrawHistory](docs/WithdrawHistory.md)
Expand Down
70 changes: 70 additions & 0 deletions docs/AccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Method | HTTP request | Description
[**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
[**fee_tiers**](AccountApi.md#fee_tiers) | **GET** /api/v1/feeTiers | feeTiers
[**get_maker_only_api_keys**](AccountApi.md#get_maker_only_api_keys) | **GET** /api/v1/getMakerOnlyApiKeys | getMakerOnlyApiKeys
[**l1_metadata**](AccountApi.md#l1_metadata) | **GET** /api/v1/l1Metadata | l1Metadata
[**leaderboard**](AccountApi.md#leaderboard) | **GET** /api/v1/leaderboard | leaderboard
Expand Down Expand Up @@ -470,6 +471,75 @@ 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)

# **fee_tiers**
> FeeTiers fee_tiers(filter=filter)

feeTiers

Get fee tiers. filter=perps|spot returns the regular user tiers (both market types share them). filter=bo returns BO volume tiers and LIT staking discount tiers; filter=all returns everything. An account's BO multiplier is the BO tier fee_rate times the staking fee_rate, applied to each BO market's maker/taker fee (see /api/v1/events) and then scaled by 1 - trade_price / settlement_cap.

### Example


```python
import lighter
from lighter.models.fee_tiers import FeeTiers
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)
filter = all # str | (optional) (default to all)

try:
# feeTiers
api_response = await api_instance.fee_tiers(filter=filter)
print("The response of AccountApi->fee_tiers:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountApi->fee_tiers: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**filter** | **str**| | [optional] [default to all]

### Return type

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

# **get_maker_only_api_keys**
> RespGetMakerOnlyApiKeys get_maker_only_api_keys(authorization, account_index)

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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**required_volume** | **int** | |
**fee_rate** | **float** | |

## Example

```python
from lighter.models.bo_fee_tier import BoFeeTier

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

# convert the object into a dict
bo_fee_tier_dict = bo_fee_tier_instance.to_dict()
# create an instance of BoFeeTier from a dict
bo_fee_tier_from_dict = BoFeeTier.from_dict(bo_fee_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)


10 changes: 5 additions & 5 deletions docs/EventApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description

events

Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.

### Example

Expand Down Expand Up @@ -42,8 +42,8 @@ async with lighter.ApiClient(configuration) as api_client:
limit = 56 # int | (optional)
tag = 'tag_example' # str | series tag; creator filter is optional (optional)
event_kind = 'event_kind_example' # str | (optional)
start_from = 56 # int | inclusive occurrence start, Unix milliseconds (optional)
start_before = 56 # int | exclusive occurrence start, Unix milliseconds (optional)
start_from = 56 # int | inclusive start_at, Unix milliseconds (optional)
start_before = 56 # int | exclusive start_at, Unix milliseconds (optional)
sort = id # str | (optional) (default to id)
order = desc # str | (optional) (default to desc)

Expand Down Expand Up @@ -71,8 +71,8 @@ Name | Type | Description | Notes
**limit** | **int**| | [optional]
**tag** | **str**| series tag; creator filter is optional | [optional]
**event_kind** | **str**| | [optional]
**start_from** | **int**| inclusive occurrence start, Unix milliseconds | [optional]
**start_before** | **int**| exclusive occurrence start, Unix milliseconds | [optional]
**start_from** | **int**| inclusive start_at, Unix milliseconds | [optional]
**start_before** | **int**| exclusive start_at, Unix milliseconds | [optional]
**sort** | **str**| | [optional] [default to id]
**order** | **str**| | [optional] [default to desc]

Expand Down
4 changes: 2 additions & 2 deletions docs/EventDetail.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Name | Type | Description | Notes
**tag** | **str** | |
**event_kind** | **str** | |
**recurrence_period_seconds** | **int** | |
**occurrence_start_at** | **int** | |
**occurrence_end_at** | **int** | |
**start_at** | **int** | |
**end_at** | **int** | |
**metadata** | **Dict[str, object]** | |
**order_books** | [**List[EventOrderBookEntry]**](EventOrderBookEntry.md) | |
**lifetime_quote_token_volume** | **float** | |
Expand Down
2 changes: 1 addition & 1 deletion docs/EventOrderBookEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**market_type** | **str** | |
**base_asset_id** | **int** | |
**quote_asset_id** | **int** | |
**status** | **str** | |
**status** | **str** | waiting-for-settlement and settled are binary options only |
**taker_fee** | **str** | |
**is_taker_fee_enabled** | **bool** | |
**maker_fee** | **str** | |
Expand Down
31 changes: 31 additions & 0 deletions docs/FeeTiers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# FeeTiers


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user_tiers** | [**List[UserFeeTier]**](UserFeeTier.md) | |
**bo_tiers** | [**List[BoFeeTier]**](BoFeeTier.md) | |
**staking_tiers** | [**List[StakingFeeTier]**](StakingFeeTier.md) | |

## Example

```python
from lighter.models.fee_tiers import FeeTiers

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

# convert the object into a dict
fee_tiers_dict = fee_tiers_instance.to_dict()
# create an instance of FeeTiers from a dict
fee_tiers_from_dict = FeeTiers.from_dict(fee_tiers_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)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**required_lit_stakes** | **int** | |
**fee_rate** | **float** | |

## Example

```python
from lighter.models.staking_fee_tier import StakingFeeTier

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

# convert the object into a dict
staking_fee_tier_dict = staking_fee_tier_instance.to_dict()
# create an instance of StakingFeeTier from a dict
staking_fee_tier_from_dict = StakingFeeTier.from_dict(staking_fee_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)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**level** | **int** | |
**maker_fee_ticks** | **int** | |
**taker_fee_ticks** | **int** | |
**required_lit_stakes** | **int** | |
**required_volume** | **int** | |

## Example

```python
from lighter.models.user_fee_tier import UserFeeTier

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

# convert the object into a dict
user_fee_tier_dict = user_fee_tier_instance.to_dict()
# create an instance of UserFeeTier from a dict
user_fee_tier_from_dict = UserFeeTier.from_dict(user_fee_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)


4 changes: 4 additions & 0 deletions lighter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
from lighter.models.block import Block
from lighter.models.blocks import Blocks
from lighter.models.bo_event_pn_l import BoEventPnL
from lighter.models.bo_fee_tier import BoFeeTier
from lighter.models.bo_outcome_pn_l import BoOutcomePnL
from lighter.models.bridge_supported_network import BridgeSupportedNetwork
from lighter.models.bridge_supported_networks import BridgeSupportedNetworks
Expand All @@ -87,6 +88,7 @@
from lighter.models.exchange_stats import ExchangeStats
from lighter.models.execute_stat import ExecuteStat
from lighter.models.export_data import ExportData
from lighter.models.fee_tiers import FeeTiers
from lighter.models.funding import Funding
from lighter.models.funding_rate import FundingRate
from lighter.models.funding_rates import FundingRates
Expand Down Expand Up @@ -177,6 +179,7 @@
from lighter.models.simple_order import SimpleOrder
from lighter.models.slippage_result import SlippageResult
from lighter.models.spot_order_book_detail import SpotOrderBookDetail
from lighter.models.staking_fee_tier import StakingFeeTier
from lighter.models.status import Status
from lighter.models.strategy import Strategy
from lighter.models.sub_account_metadata import SubAccountMetadata
Expand All @@ -194,6 +197,7 @@
from lighter.models.tx_hash import TxHash
from lighter.models.txs import Txs
from lighter.models.up_down_candle import UpDownCandle
from lighter.models.user_fee_tier import UserFeeTier
from lighter.models.user_referrals import UserReferrals
from lighter.models.validator_info import ValidatorInfo
from lighter.models.withdraw_history import WithdrawHistory
Expand Down
Loading
Loading