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
16 changes: 0 additions & 16 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ docs/ReqGetAccountByL1Address.md
docs/ReqGetAccountInactiveOrders.md
docs/ReqGetAccountLimits.md
docs/ReqGetAccountMetadata.md
docs/ReqGetAccountPendingTxs.md
docs/ReqGetAccountPnL.md
docs/ReqGetAccountTxs.md
docs/ReqGetBlock.md
Expand Down Expand Up @@ -223,7 +222,6 @@ lighter/models/req_get_account_by_l1_address.py
lighter/models/req_get_account_inactive_orders.py
lighter/models/req_get_account_limits.py
lighter/models/req_get_account_metadata.py
lighter/models/req_get_account_pending_txs.py
lighter/models/req_get_account_pn_l.py
lighter/models/req_get_account_txs.py
lighter/models/req_get_block.py
Expand Down Expand Up @@ -283,18 +281,4 @@ lighter/rest.py
setup.cfg
test-requirements.txt
test/__init__.py
test/test_account_margin_stats.py
test/test_info_api.py
test/test_order_book_orders.py
test/test_req_get_order_book_orders.py
test/test_req_get_transfer_fee_info.py
test/test_req_get_transfer_history.py
test/test_resp_change_account_tier.py
test/test_resp_send_tx.py
test/test_resp_send_tx_batch.py
test/test_resp_withdrawal_delay.py
test/test_risk_parameters.py
test/test_transfer_fee_info.py
test/test_transfer_history.py
test/test_transfer_history_item.py
tox.ini
24 changes: 5 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,16 @@ All URIs are relative to *https://mainnet.zklighter.elliot.ai*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountApi* | [**account**](docs/AccountApi.md#account) | **GET** /api/v1/account | account
*AccountApi* | [**accounts**](docs/AccountApi.md#accounts) | **GET** /api/v1/accounts | accounts
*AccountApi* | [**accounts_by_l1_address**](docs/AccountApi.md#accounts_by_l1_address) | **GET** /api/v1/accountsByL1Address | accountsByL1Address
*AccountApi* | [**apikeys**](docs/AccountApi.md#apikeys) | **GET** /api/v1/apikeys | apikeys
*AccountApi* | [**fee_bucket**](docs/AccountApi.md#fee_bucket) | **GET** /api/v1/feeBucket | feeBucket
*AccountApi* | [**is_whitelisted**](docs/AccountApi.md#is_whitelisted) | **GET** /api/v1/isWhitelisted | isWhitelisted
*AccountApi* | [**pnl**](docs/AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
*AccountApi* | [**public_pools**](docs/AccountApi.md#public_pools) | **GET** /api/v1/publicPools | publicPools
*BlockApi* | [**block**](docs/BlockApi.md#block) | **GET** /api/v1/block | block
*BlockApi* | [**blocks**](docs/BlockApi.md#blocks) | **GET** /api/v1/blocks | blocks
*BlockApi* | [**current_height**](docs/BlockApi.md#current_height) | **GET** /api/v1/currentHeight | currentHeight
*CandlestickApi* | [**candlesticks**](docs/CandlestickApi.md#candlesticks) | **GET** /api/v1/candlesticks | candlesticks
*CandlestickApi* | [**fundings**](docs/CandlestickApi.md#fundings) | **GET** /api/v1/fundings | fundings
*InfoApi* | [**layer2_basic_info**](docs/InfoApi.md#layer2_basic_info) | **GET** /api/v1/layer2BasicInfo | layer2BasicInfo
*OrderApi* | [**account_inactive_orders**](docs/OrderApi.md#account_inactive_orders) | **GET** /api/v1/accountInactiveOrders | accountInactiveOrders
*OrderApi* | [**account_orders**](docs/OrderApi.md#account_orders) | **GET** /api/v1/accountOrders | accountOrders
*OrderApi* | [**exchange_stats**](docs/OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
*OrderApi* | [**order_book_details**](docs/OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
*OrderApi* | [**order_book_orders**](docs/OrderApi.md#order_book_orders) | **GET** /api/v1/orderBookOrders | orderBookOrders
Expand All @@ -91,12 +86,10 @@ Class | Method | HTTP request | Description
*OrderApi* | [**trades**](docs/OrderApi.md#trades) | **GET** /api/v1/trades | trades
*RootApi* | [**info**](docs/RootApi.md#info) | **GET** /info | info
*RootApi* | [**status**](docs/RootApi.md#status) | **GET** / | status
*TransactionApi* | [**account_pending_txs**](docs/TransactionApi.md#account_pending_txs) | **GET** /api/v1/accountPendingTxs | accountPendingTxs
*TransactionApi* | [**account_txs**](docs/TransactionApi.md#account_txs) | **GET** /api/v1/accountTxs | accountTxs
*TransactionApi* | [**block_txs**](docs/TransactionApi.md#block_txs) | **GET** /api/v1/blockTxs | blockTxs
*TransactionApi* | [**deposit_history**](docs/TransactionApi.md#deposit_history) | **GET** /api/v1/deposit/history | deposit_history
*TransactionApi* | [**next_nonce**](docs/TransactionApi.md#next_nonce) | **GET** /api/v1/nextNonce | nextNonce
*TransactionApi* | [**pending_txs**](docs/TransactionApi.md#pending_txs) | **GET** /api/v1/pendingTxs | pendingTxs
*TransactionApi* | [**send_tx**](docs/TransactionApi.md#send_tx) | **POST** /api/v1/sendTx | sendTx
*TransactionApi* | [**send_tx_batch**](docs/TransactionApi.md#send_tx_batch) | **POST** /api/v1/sendTxBatch | sendTxBatch
*TransactionApi* | [**tx**](docs/TransactionApi.md#tx) | **GET** /api/v1/tx | tx
Expand All @@ -114,7 +107,6 @@ Class | Method | HTTP request | Description
- [AccountPnL](docs/AccountPnL.md)
- [AccountPosition](docs/AccountPosition.md)
- [AccountStats](docs/AccountStats.md)
- [Accounts](docs/Accounts.md)
- [ApiKey](docs/ApiKey.md)
- [Block](docs/Block.md)
- [Blocks](docs/Blocks.md)
Expand All @@ -131,12 +123,9 @@ Class | Method | HTTP request | Description
- [DetailedCandlestick](docs/DetailedCandlestick.md)
- [EnrichedTx](docs/EnrichedTx.md)
- [ExchangeStats](docs/ExchangeStats.md)
- [FeeBucket](docs/FeeBucket.md)
- [Funding](docs/Funding.md)
- [Fundings](docs/Fundings.md)
- [IsWhitelisted](docs/IsWhitelisted.md)
- [L1ProviderInfo](docs/L1ProviderInfo.md)
- [Layer2BasicInfo](docs/Layer2BasicInfo.md)
- [Liquidation](docs/Liquidation.md)
- [MarketInfo](docs/MarketInfo.md)
- [NextNonce](docs/NextNonce.md)
Expand All @@ -160,16 +149,13 @@ Class | Method | HTTP request | Description
- [ReqGetAccountApiKeys](docs/ReqGetAccountApiKeys.md)
- [ReqGetAccountByL1Address](docs/ReqGetAccountByL1Address.md)
- [ReqGetAccountInactiveOrders](docs/ReqGetAccountInactiveOrders.md)
- [ReqGetAccountOrders](docs/ReqGetAccountOrders.md)
- [ReqGetAccountPendingTxs](docs/ReqGetAccountPendingTxs.md)
- [ReqGetAccountPnL](docs/ReqGetAccountPnL.md)
- [ReqGetAccountTxs](docs/ReqGetAccountTxs.md)
- [ReqGetBlock](docs/ReqGetBlock.md)
- [ReqGetBlockTxs](docs/ReqGetBlockTxs.md)
- [ReqGetByAccount](docs/ReqGetByAccount.md)
- [ReqGetCandlesticks](docs/ReqGetCandlesticks.md)
- [ReqGetDepositHistory](docs/ReqGetDepositHistory.md)
- [ReqGetFeeBucket](docs/ReqGetFeeBucket.md)
- [ReqGetFundings](docs/ReqGetFundings.md)
- [ReqGetL1Tx](docs/ReqGetL1Tx.md)
- [ReqGetLatestDeposit](docs/ReqGetLatestDeposit.md)
Expand All @@ -185,7 +171,6 @@ Class | Method | HTTP request | Description
- [ReqGetTrades](docs/ReqGetTrades.md)
- [ReqGetTx](docs/ReqGetTx.md)
- [ReqGetWithdrawHistory](docs/ReqGetWithdrawHistory.md)
- [ReqIsWhitelisted](docs/ReqIsWhitelisted.md)
- [ResultCode](docs/ResultCode.md)
- [SimpleOrder](docs/SimpleOrder.md)
- [Status](docs/Status.md)
Expand All @@ -199,14 +184,15 @@ Class | Method | HTTP request | Description
- [Txs](docs/Txs.md)
- [ValidatorInfo](docs/ValidatorInfo.md)
- [WithdrawHistory](docs/WithdrawHistory.md)
- [WithdrawHistoryCursor](docs/WithdrawHistoryCursor.md)
- [WithdrawHistoryItem](docs/WithdrawHistoryItem.md)
- [ZkLighterInfo](docs/ZkLighterInfo.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization
[//]: # (<a id="documentation-for-authorization"></a>)

Endpoints do not require authorization.
[//]: # (## Documentation For Authorization)

[//]: # ()
[//]: # (Endpoints do not require authorization.)


1 change: 1 addition & 0 deletions docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |

Expand Down
1 change: 1 addition & 0 deletions docs/DetailedAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |
**account_index** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/PnLEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**pool_pnl** | **float** | |
**pool_inflow** | **float** | |
**pool_outflow** | **float** | |
**pool_total_shares** | **float** | |

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/PublicPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**available_balance** | **str** | |
**status** | **int** | |
**collateral** | **str** | |
**account_index** | **int** | |
Expand Down
31 changes: 0 additions & 31 deletions docs/ReqGetAccountPendingTxs.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/ReqGetAccountTxs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**by** | **str** | | [optional]
**value** | **str** | | [optional]
**types** | **List[int]** | | [optional]
**auth** | **str** | | [optional]

## Example

Expand Down
8 changes: 6 additions & 2 deletions docs/TransactionApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Method | HTTP request | Description


# **account_txs**
> Txs account_txs(limit, by, value, index=index, types=types)
> Txs account_txs(limit, by, value, authorization=authorization, index=index, types=types, auth=auth)

accountTxs

Expand Down Expand Up @@ -47,12 +47,14 @@ async with lighter.ApiClient(configuration) as api_client:
limit = 56 # int |
by = 'by_example' # str |
value = 'value_example' # str |
authorization = 'authorization_example' # str | (optional)
index = 56 # int | (optional)
types = [56] # List[int] | (optional)
auth = 'auth_example' # str | (optional)

try:
# accountTxs
api_response = await api_instance.account_txs(limit, by, value, index=index, types=types)
api_response = await api_instance.account_txs(limit, by, value, authorization=authorization, index=index, types=types, auth=auth)
print("The response of TransactionApi->account_txs:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -69,8 +71,10 @@ Name | Type | Description | Notes
**limit** | **int**| |
**by** | **str**| |
**value** | **str**| |
**authorization** | **str**| | [optional]
**index** | **int**| | [optional]
**types** | [**List[int]**](int.md)| | [optional]
**auth** | **str**| | [optional]

### Return type

Expand Down
1 change: 0 additions & 1 deletion lighter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
from lighter.models.req_get_account_inactive_orders import ReqGetAccountInactiveOrders
from lighter.models.req_get_account_limits import ReqGetAccountLimits
from lighter.models.req_get_account_metadata import ReqGetAccountMetadata
from lighter.models.req_get_account_pending_txs import ReqGetAccountPendingTxs
from lighter.models.req_get_account_pn_l import ReqGetAccountPnL
from lighter.models.req_get_account_txs import ReqGetAccountTxs
from lighter.models.req_get_block import ReqGetBlock
Expand Down
32 changes: 32 additions & 0 deletions lighter/api/transaction_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ async def account_txs(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -77,10 +79,14 @@ async def account_txs(
:type by: str
:param value: (required)
:type value: str
:param authorization:
:type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
:param auth:
:type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -107,8 +113,10 @@ async def account_txs(
limit=limit,
by=by,
value=value,
authorization=authorization,
index=index,
types=types,
auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -136,8 +144,10 @@ async def account_txs_with_http_info(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -161,10 +171,14 @@ async def account_txs_with_http_info(
:type by: str
:param value: (required)
:type value: str
:param authorization:
:type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
:param auth:
:type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -191,8 +205,10 @@ async def account_txs_with_http_info(
limit=limit,
by=by,
value=value,
authorization=authorization,
index=index,
types=types,
auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -220,8 +236,10 @@ async def account_txs_without_preload_content(
limit: Annotated[int, Field(le=100, strict=True, ge=1)],
by: StrictStr,
value: StrictStr,
authorization: Optional[StrictStr] = None,
index: Optional[StrictInt] = None,
types: Optional[List[StrictInt]] = None,
auth: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -245,10 +263,14 @@ async def account_txs_without_preload_content(
:type by: str
:param value: (required)
:type value: str
:param authorization:
:type authorization: str
:param index:
:type index: int
:param types:
:type types: List[int]
:param auth:
:type auth: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand All @@ -275,8 +297,10 @@ async def account_txs_without_preload_content(
limit=limit,
by=by,
value=value,
authorization=authorization,
index=index,
types=types,
auth=auth,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -299,8 +323,10 @@ def _account_txs_serialize(
limit,
by,
value,
authorization,
index,
types,
auth,
_request_auth,
_content_type,
_headers,
Expand Down Expand Up @@ -342,7 +368,13 @@ def _account_txs_serialize(

_query_params.append(('types', types))

if auth is not None:

_query_params.append(('auth', auth))

# process the header parameters
if authorization is not None:
_header_params['authorization'] = authorization
# process the form parameters
# process the body parameter

Expand Down
1 change: 0 additions & 1 deletion lighter/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
from lighter.models.req_get_account_inactive_orders import ReqGetAccountInactiveOrders
from lighter.models.req_get_account_limits import ReqGetAccountLimits
from lighter.models.req_get_account_metadata import ReqGetAccountMetadata
from lighter.models.req_get_account_pending_txs import ReqGetAccountPendingTxs
from lighter.models.req_get_account_pn_l import ReqGetAccountPnL
from lighter.models.req_get_account_txs import ReqGetAccountTxs
from lighter.models.req_get_block import ReqGetBlock
Expand Down
Loading