Skip to content
Merged

Spot #92

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
55 changes: 45 additions & 10 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
docs/Account.md
docs/AccountApi.md
docs/AccountApiKeys.md
docs/AccountAsset.md
docs/AccountLimits.md
docs/AccountMarginStats.md
docs/AccountMarketStats.md
Expand All @@ -14,9 +15,12 @@ docs/Announcement.md
docs/AnnouncementApi.md
docs/Announcements.md
docs/ApiKey.md
docs/Asset.md
docs/AssetDetails.md
docs/Block.md
docs/BlockApi.md
docs/Blocks.md
docs/Bridge.md
docs/BridgeApi.md
docs/BridgeSupportedNetwork.md
docs/Candlestick.md
Expand Down Expand Up @@ -46,28 +50,27 @@ docs/LiqTrade.md
docs/Liquidation.md
docs/LiquidationInfo.md
docs/LiquidationInfos.md
docs/MarketInfo.md
docs/MarketConfig.md
docs/NextNonce.md
docs/NotificationApi.md
docs/Order.md
docs/OrderApi.md
docs/OrderBook.md
docs/OrderBookDepth.md
docs/OrderBookDetail.md
docs/OrderBookDetails.md
docs/OrderBookOrders.md
docs/OrderBookStats.md
docs/OrderBooks.md
docs/Orders.md
docs/PerpsMarketStats.md
docs/PerpsOrderBookDetail.md
docs/PnLEntry.md
docs/PositionFunding.md
docs/PositionFundings.md
docs/PriceLevel.md
docs/PublicPool.md
docs/PublicPoolInfo.md
docs/PublicPoolMetadata.md
docs/PublicPoolShare.md
docs/PublicPools.md
docs/ReferralApi.md
docs/ReferralPointEntry.md
docs/ReferralPoints.md
Expand All @@ -81,8 +84,10 @@ docs/ReqGetAccountLimits.md
docs/ReqGetAccountMetadata.md
docs/ReqGetAccountPnL.md
docs/ReqGetAccountTxs.md
docs/ReqGetAssetDetails.md
docs/ReqGetBlock.md
docs/ReqGetBlockTxs.md
docs/ReqGetBridgesByL1Addr.md
docs/ReqGetByAccount.md
docs/ReqGetCandlesticks.md
docs/ReqGetDepositHistory.md
Expand All @@ -97,7 +102,6 @@ docs/ReqGetOrderBookDetails.md
docs/ReqGetOrderBookOrders.md
docs/ReqGetOrderBooks.md
docs/ReqGetPositionFunding.md
docs/ReqGetPublicPools.md
docs/ReqGetPublicPoolsMetadata.md
docs/ReqGetRangeWithCursor.md
docs/ReqGetRangeWithIndex.md
Expand All @@ -110,17 +114,23 @@ docs/ReqGetTransferHistory.md
docs/ReqGetTx.md
docs/ReqGetWithdrawHistory.md
docs/RespChangeAccountTier.md
docs/RespGetBridgesByL1Addr.md
docs/RespGetFastBridgeInfo.md
docs/RespGetIsNextBridgeFast.md
docs/RespPublicPoolsMetadata.md
docs/RespSendTx.md
docs/RespSendTxBatch.md
docs/RespUpdateKickback.md
docs/RespUpdateReferralCode.md
docs/RespWithdrawalDelay.md
docs/ResultCode.md
docs/RiskInfo.md
docs/RiskParameters.md
docs/RootApi.md
docs/SharePrice.md
docs/SimpleOrder.md
docs/SpotMarketStats.md
docs/SpotOrderBookDetail.md
docs/Status.md
docs/SubAccounts.md
docs/Ticker.md
Expand Down Expand Up @@ -160,6 +170,7 @@ lighter/exceptions.py
lighter/models/__init__.py
lighter/models/account.py
lighter/models/account_api_keys.py
lighter/models/account_asset.py
lighter/models/account_limits.py
lighter/models/account_margin_stats.py
lighter/models/account_market_stats.py
Expand All @@ -172,8 +183,11 @@ lighter/models/account_trade_stats.py
lighter/models/announcement.py
lighter/models/announcements.py
lighter/models/api_key.py
lighter/models/asset.py
lighter/models/asset_details.py
lighter/models/block.py
lighter/models/blocks.py
lighter/models/bridge.py
lighter/models/bridge_supported_network.py
lighter/models/candlestick.py
lighter/models/candlesticks.py
Expand All @@ -199,26 +213,25 @@ 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/market_config.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
lighter/models/order_book_stats.py
lighter/models/order_books.py
lighter/models/orders.py
lighter/models/perps_market_stats.py
lighter/models/perps_order_book_detail.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_metadata.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
Expand All @@ -231,8 +244,10 @@ lighter/models/req_get_account_limits.py
lighter/models/req_get_account_metadata.py
lighter/models/req_get_account_pn_l.py
lighter/models/req_get_account_txs.py
lighter/models/req_get_asset_details.py
lighter/models/req_get_block.py
lighter/models/req_get_block_txs.py
lighter/models/req_get_bridges_by_l1_addr.py
lighter/models/req_get_by_account.py
lighter/models/req_get_candlesticks.py
lighter/models/req_get_deposit_history.py
Expand All @@ -247,7 +262,6 @@ 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_public_pools_metadata.py
lighter/models/req_get_range_with_cursor.py
lighter/models/req_get_range_with_index.py
Expand All @@ -260,16 +274,22 @@ 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_bridges_by_l1_addr.py
lighter/models/resp_get_fast_bridge_info.py
lighter/models/resp_get_is_next_bridge_fast.py
lighter/models/resp_public_pools_metadata.py
lighter/models/resp_send_tx.py
lighter/models/resp_send_tx_batch.py
lighter/models/resp_update_kickback.py
lighter/models/resp_update_referral_code.py
lighter/models/resp_withdrawal_delay.py
lighter/models/result_code.py
lighter/models/risk_info.py
lighter/models/risk_parameters.py
lighter/models/share_price.py
lighter/models/simple_order.py
lighter/models/spot_market_stats.py
lighter/models/spot_order_book_detail.py
lighter/models/status.py
lighter/models/sub_accounts.py
lighter/models/ticker.py
Expand All @@ -291,4 +311,19 @@ lighter/rest.py
setup.cfg
test-requirements.txt
test/__init__.py
test/test_account_asset.py
test/test_asset.py
test/test_asset_details.py
test/test_bridge.py
test/test_market_config.py
test/test_perps_market_stats.py
test/test_perps_order_book_detail.py
test/test_req_get_asset_details.py
test/test_req_get_bridges_by_l1_addr.py
test/test_resp_get_bridges_by_l1_addr.py
test/test_resp_get_is_next_bridge_fast.py
test/test_resp_update_kickback.py
test/test_resp_update_referral_code.py
test/test_spot_market_stats.py
test/test_spot_order_book_detail.py
tox.ini
1 change: 0 additions & 1 deletion docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Name | Type | Description | Notes
**l1_address** | **str** | |
**cancel_all_time** | **int** | |
**total_order_count** | **int** | |
**total_isolated_order_count** | **int** | |
**pending_order_count** | **int** | |
**available_balance** | **str** | |
**status** | **int** | |
Expand Down
80 changes: 0 additions & 80 deletions docs/AccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Method | HTTP request | Description
[**liquidations**](AccountApi.md#liquidations) | **GET** /api/v1/liquidations | liquidations
[**pnl**](AccountApi.md#pnl) | **GET** /api/v1/pnl | pnl
[**position_funding**](AccountApi.md#position_funding) | **GET** /api/v1/positionFunding | positionFunding
[**public_pools**](AccountApi.md#public_pools) | **GET** /api/v1/publicPools | publicPools
[**public_pools_metadata**](AccountApi.md#public_pools_metadata) | **GET** /api/v1/publicPoolsMetadata | publicPoolsMetadata


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

# **public_pools**
> PublicPools public_pools(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)

publicPools

Get public pools

### Example


```python
import lighter
from lighter.models.public_pools import PublicPools
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)
index = 56 # int |
limit = 56 # int |
authorization = 'authorization_example' # str | (optional)
auth = 'auth_example' # str | (optional)
filter = 'filter_example' # str | (optional)
account_index = 56 # int | (optional)

try:
# publicPools
api_response = await api_instance.public_pools(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)
print("The response of AccountApi->public_pools:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountApi->public_pools: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**index** | **int**| |
**limit** | **int**| |
**authorization** | **str**| | [optional]
**auth** | **str**| | [optional]
**filter** | **str**| | [optional]
**account_index** | **int**| | [optional]

### Return type

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

# **public_pools_metadata**
> RespPublicPoolsMetadata public_pools_metadata(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)

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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**symbol** | **str** | |
**asset_id** | **int** | |
**balance** | **str** | |
**locked_balance** | **str** | |

## Example

```python
from lighter.models.account_asset import AccountAsset

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

# convert the object into a dict
account_asset_dict = account_asset_instance.to_dict()
# create an instance of AccountAsset from a dict
account_asset_from_dict = AccountAsset.from_dict(account_asset_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/AccountLimits.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Name | Type | Description | Notes
**code** | **int** | |
**message** | **str** | | [optional]
**max_llp_percentage** | **int** | |
**max_llp_amount** | **str** | |
**user_tier** | **str** | |
**can_create_public_pool** | **bool** | |

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/Announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**title** | **str** | |
**content** | **str** | |
**created_at** | **int** | |
**expired_at** | **int** | |

## Example

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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **int** | |
**symbol** | **str** | |
**l1_decimals** | **int** | |
**decimals** | **int** | |
**min_transfer_amount** | **str** | |
**min_withdrawal_amount** | **str** | |
**margin_mode** | **str** | |
**index_price** | **str** | |
**l1_address** | **str** | |

## Example

```python
from lighter.models.asset import Asset

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

# convert the object into a dict
asset_dict = asset_instance.to_dict()
# create an instance of Asset from a dict
asset_from_dict = Asset.from_dict(asset_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)


Loading