mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 00:38:07 +00:00
docs: 更新 lighter-python-main 文档,添加示例代码和 API 说明,重构部分内容以提高可读性
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# Account
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**account_type** | **int** | |
|
||||
**index** | **int** | |
|
||||
**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** | |
|
||||
**collateral** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account import Account
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Account from a JSON string
|
||||
account_instance = Account.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Account.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_dict = account_instance.to_dict()
|
||||
# create an instance of Account from a dict
|
||||
account_from_dict = Account.from_dict(account_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,930 @@
|
||||
# lighter.AccountApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**account**](AccountApi.md#account) | **GET** /api/v1/account | account
|
||||
[**account_limits**](AccountApi.md#account_limits) | **GET** /api/v1/accountLimits | accountLimits
|
||||
[**account_metadata**](AccountApi.md#account_metadata) | **GET** /api/v1/accountMetadata | accountMetadata
|
||||
[**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
|
||||
[**l1_metadata**](AccountApi.md#l1_metadata) | **GET** /api/v1/l1Metadata | l1Metadata
|
||||
[**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
|
||||
|
||||
|
||||
# **account**
|
||||
> DetailedAccounts account(by, value)
|
||||
|
||||
account
|
||||
|
||||
Get account by account's index. <br>More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.detailed_accounts import DetailedAccounts
|
||||
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)
|
||||
by = 'by_example' # str |
|
||||
value = 'value_example' # str |
|
||||
|
||||
try:
|
||||
# account
|
||||
api_response = await api_instance.account(by, value)
|
||||
print("The response of AccountApi->account:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->account: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**by** | **str**| |
|
||||
**value** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DetailedAccounts**](DetailedAccounts.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)
|
||||
|
||||
# **account_limits**
|
||||
> AccountLimits account_limits(account_index, authorization=authorization, auth=auth)
|
||||
|
||||
accountLimits
|
||||
|
||||
Get account limits
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.account_limits import AccountLimits
|
||||
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)
|
||||
account_index = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# accountLimits
|
||||
api_response = await api_instance.account_limits(account_index, authorization=authorization, auth=auth)
|
||||
print("The response of AccountApi->account_limits:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->account_limits: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AccountLimits**](AccountLimits.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)
|
||||
|
||||
# **account_metadata**
|
||||
> AccountMetadatas account_metadata(by, value, authorization=authorization, auth=auth)
|
||||
|
||||
accountMetadata
|
||||
|
||||
Get account metadatas
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.account_metadatas import AccountMetadatas
|
||||
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)
|
||||
by = 'by_example' # str |
|
||||
value = 'value_example' # str |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
|
||||
try:
|
||||
# accountMetadata
|
||||
api_response = await api_instance.account_metadata(by, value, authorization=authorization, auth=auth)
|
||||
print("The response of AccountApi->account_metadata:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->account_metadata: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**by** | **str**| |
|
||||
**value** | **str**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AccountMetadatas**](AccountMetadatas.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)
|
||||
|
||||
# **accounts_by_l1_address**
|
||||
> SubAccounts accounts_by_l1_address(l1_address)
|
||||
|
||||
accountsByL1Address
|
||||
|
||||
Get accounts by l1_address returns all accounts associated with the given L1 address
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.sub_accounts import SubAccounts
|
||||
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)
|
||||
l1_address = 'l1_address_example' # str |
|
||||
|
||||
try:
|
||||
# accountsByL1Address
|
||||
api_response = await api_instance.accounts_by_l1_address(l1_address)
|
||||
print("The response of AccountApi->accounts_by_l1_address:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->accounts_by_l1_address: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**l1_address** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SubAccounts**](SubAccounts.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)
|
||||
|
||||
# **apikeys**
|
||||
> AccountApiKeys apikeys(account_index, api_key_index=api_key_index)
|
||||
|
||||
apikeys
|
||||
|
||||
Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.account_api_keys import AccountApiKeys
|
||||
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)
|
||||
account_index = 56 # int |
|
||||
api_key_index = 255 # int | (optional) (default to 255)
|
||||
|
||||
try:
|
||||
# apikeys
|
||||
api_response = await api_instance.apikeys(account_index, api_key_index=api_key_index)
|
||||
print("The response of AccountApi->apikeys:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->apikeys: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**api_key_index** | **int**| | [optional] [default to 255]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AccountApiKeys**](AccountApiKeys.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)
|
||||
|
||||
# **change_account_tier**
|
||||
> RespChangeAccountTier change_account_tier(account_index, new_tier, authorization=authorization, auth=auth)
|
||||
|
||||
changeAccountTier
|
||||
|
||||
Change account tier
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.resp_change_account_tier import RespChangeAccountTier
|
||||
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)
|
||||
account_index = 56 # int |
|
||||
new_tier = 'new_tier_example' # str |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# changeAccountTier
|
||||
api_response = await api_instance.change_account_tier(account_index, new_tier, authorization=authorization, auth=auth)
|
||||
print("The response of AccountApi->change_account_tier:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->change_account_tier: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**new_tier** | **str**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**RespChangeAccountTier**](RespChangeAccountTier.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **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)
|
||||
|
||||
# **l1_metadata**
|
||||
> L1Metadata l1_metadata(l1_address, authorization=authorization, auth=auth)
|
||||
|
||||
l1Metadata
|
||||
|
||||
Get L1 metadata
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.l1_metadata import L1Metadata
|
||||
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)
|
||||
l1_address = 'l1_address_example' # str |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# l1Metadata
|
||||
api_response = await api_instance.l1_metadata(l1_address, authorization=authorization, auth=auth)
|
||||
print("The response of AccountApi->l1_metadata:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->l1_metadata: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**l1_address** | **str**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**L1Metadata**](L1Metadata.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)
|
||||
|
||||
# **liquidations**
|
||||
> LiquidationInfos liquidations(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, cursor=cursor)
|
||||
|
||||
liquidations
|
||||
|
||||
Get liquidation infos
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.liquidation_infos import LiquidationInfos
|
||||
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)
|
||||
account_index = 56 # int |
|
||||
limit = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
cursor = 'cursor_example' # str | (optional)
|
||||
|
||||
try:
|
||||
# liquidations
|
||||
api_response = await api_instance.liquidations(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, cursor=cursor)
|
||||
print("The response of AccountApi->liquidations:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->liquidations: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**limit** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
**cursor** | **str**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**LiquidationInfos**](LiquidationInfos.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)
|
||||
|
||||
# **pnl**
|
||||
> AccountPnL pnl(by, value, resolution, start_timestamp, end_timestamp, count_back, authorization=authorization, auth=auth, ignore_transfers=ignore_transfers)
|
||||
|
||||
pnl
|
||||
|
||||
Get account PnL chart
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.account_pn_l import AccountPnL
|
||||
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)
|
||||
by = 'by_example' # str |
|
||||
value = 'value_example' # str |
|
||||
resolution = 'resolution_example' # str |
|
||||
start_timestamp = 56 # int |
|
||||
end_timestamp = 56 # int |
|
||||
count_back = 56 # int |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
ignore_transfers = False # bool | (optional) (default to False)
|
||||
|
||||
try:
|
||||
# pnl
|
||||
api_response = await api_instance.pnl(by, value, resolution, start_timestamp, end_timestamp, count_back, authorization=authorization, auth=auth, ignore_transfers=ignore_transfers)
|
||||
print("The response of AccountApi->pnl:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->pnl: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**by** | **str**| |
|
||||
**value** | **str**| |
|
||||
**resolution** | **str**| |
|
||||
**start_timestamp** | **int**| |
|
||||
**end_timestamp** | **int**| |
|
||||
**count_back** | **int**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
**ignore_transfers** | **bool**| | [optional] [default to False]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AccountPnL**](AccountPnL.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, auth=auth, market_id=market_id, cursor=cursor, side=side)
|
||||
|
||||
positionFunding
|
||||
|
||||
Get accounts position fundings
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.position_fundings import PositionFundings
|
||||
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)
|
||||
account_index = 56 # int |
|
||||
limit = 56 # int |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
cursor = 'cursor_example' # str | (optional)
|
||||
side = all # str | (optional) (default to all)
|
||||
|
||||
try:
|
||||
# positionFunding
|
||||
api_response = await api_instance.position_funding(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, cursor=cursor, side=side)
|
||||
print("The response of AccountApi->position_funding:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->position_funding: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**limit** | **int**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
**cursor** | **str**| | [optional]
|
||||
**side** | **str**| | [optional] [default to all]
|
||||
|
||||
### Return type
|
||||
|
||||
[**PositionFundings**](PositionFundings.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**
|
||||
> 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)
|
||||
|
||||
publicPoolsMetadata
|
||||
|
||||
Get public pools metadata
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.resp_public_pools_metadata import RespPublicPoolsMetadata
|
||||
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:
|
||||
# publicPoolsMetadata
|
||||
api_response = await api_instance.public_pools_metadata(index, limit, authorization=authorization, auth=auth, filter=filter, account_index=account_index)
|
||||
print("The response of AccountApi->public_pools_metadata:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AccountApi->public_pools_metadata: %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
|
||||
|
||||
[**RespPublicPoolsMetadata**](RespPublicPoolsMetadata.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)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# AccountApiKeys
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**api_keys** | [**List[ApiKey]**](ApiKey.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_api_keys import AccountApiKeys
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountApiKeys from a JSON string
|
||||
account_api_keys_instance = AccountApiKeys.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountApiKeys.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_api_keys_dict = account_api_keys_instance.to_dict()
|
||||
# create an instance of AccountApiKeys from a dict
|
||||
account_api_keys_from_dict = AccountApiKeys.from_dict(account_api_keys_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# AccountLimits
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**max_llp_percentage** | **int** | |
|
||||
**user_tier** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_limits import AccountLimits
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountLimits from a JSON string
|
||||
account_limits_instance = AccountLimits.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountLimits.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_limits_dict = account_limits_instance.to_dict()
|
||||
# create an instance of AccountLimits from a dict
|
||||
account_limits_from_dict = AccountLimits.from_dict(account_limits_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# AccountMarginStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**collateral** | **str** | |
|
||||
**portfolio_value** | **str** | |
|
||||
**leverage** | **str** | |
|
||||
**available_balance** | **str** | |
|
||||
**margin_usage** | **str** | |
|
||||
**buying_power** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_margin_stats import AccountMarginStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountMarginStats from a JSON string
|
||||
account_margin_stats_instance = AccountMarginStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountMarginStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_margin_stats_dict = account_margin_stats_instance.to_dict()
|
||||
# create an instance of AccountMarginStats from a dict
|
||||
account_margin_stats_from_dict = AccountMarginStats.from_dict(account_margin_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# AccountMarketStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**daily_trades_count** | **int** | |
|
||||
**daily_base_token_volume** | **float** | |
|
||||
**daily_quote_token_volume** | **float** | |
|
||||
**weekly_trades_count** | **int** | |
|
||||
**weekly_base_token_volume** | **float** | |
|
||||
**weekly_quote_token_volume** | **float** | |
|
||||
**monthly_trades_count** | **int** | |
|
||||
**monthly_base_token_volume** | **float** | |
|
||||
**monthly_quote_token_volume** | **float** | |
|
||||
**total_trades_count** | **int** | |
|
||||
**total_base_token_volume** | **float** | |
|
||||
**total_quote_token_volume** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_market_stats import AccountMarketStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountMarketStats from a JSON string
|
||||
account_market_stats_instance = AccountMarketStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountMarketStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_market_stats_dict = account_market_stats_instance.to_dict()
|
||||
# create an instance of AccountMarketStats from a dict
|
||||
account_market_stats_from_dict = AccountMarketStats.from_dict(account_market_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# AccountMetadata
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**name** | **str** | |
|
||||
**description** | **str** | |
|
||||
**can_invite** | **bool** | Remove After FE uses L1 meta endpoint |
|
||||
**referral_points_percentage** | **str** | Remove After FE uses L1 meta endpoint |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_metadata import AccountMetadata
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountMetadata from a JSON string
|
||||
account_metadata_instance = AccountMetadata.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountMetadata.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_metadata_dict = account_metadata_instance.to_dict()
|
||||
# create an instance of AccountMetadata from a dict
|
||||
account_metadata_from_dict = AccountMetadata.from_dict(account_metadata_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# AccountMetadatas
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**account_metadatas** | [**List[AccountMetadata]**](AccountMetadata.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_metadatas import AccountMetadatas
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountMetadatas from a JSON string
|
||||
account_metadatas_instance = AccountMetadatas.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountMetadatas.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_metadatas_dict = account_metadatas_instance.to_dict()
|
||||
# create an instance of AccountMetadatas from a dict
|
||||
account_metadatas_from_dict = AccountMetadatas.from_dict(account_metadatas_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# AccountPnL
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**resolution** | **str** | |
|
||||
**pnl** | [**List[PnLEntry]**](PnLEntry.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_pn_l import AccountPnL
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountPnL from a JSON string
|
||||
account_pn_l_instance = AccountPnL.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountPnL.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_pn_l_dict = account_pn_l_instance.to_dict()
|
||||
# create an instance of AccountPnL from a dict
|
||||
account_pn_l_from_dict = AccountPnL.from_dict(account_pn_l_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# AccountPosition
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**symbol** | **str** | |
|
||||
**initial_margin_fraction** | **str** | |
|
||||
**open_order_count** | **int** | |
|
||||
**pending_order_count** | **int** | |
|
||||
**position_tied_order_count** | **int** | |
|
||||
**sign** | **int** | |
|
||||
**position** | **str** | |
|
||||
**avg_entry_price** | **str** | |
|
||||
**position_value** | **str** | |
|
||||
**unrealized_pnl** | **str** | |
|
||||
**realized_pnl** | **str** | |
|
||||
**liquidation_price** | **str** | |
|
||||
**total_funding_paid_out** | **str** | | [optional]
|
||||
**margin_mode** | **int** | |
|
||||
**allocated_margin** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_position import AccountPosition
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountPosition from a JSON string
|
||||
account_position_instance = AccountPosition.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountPosition.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_position_dict = account_position_instance.to_dict()
|
||||
# create an instance of AccountPosition from a dict
|
||||
account_position_from_dict = AccountPosition.from_dict(account_position_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# AccountStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**collateral** | **str** | |
|
||||
**portfolio_value** | **str** | |
|
||||
**leverage** | **str** | |
|
||||
**available_balance** | **str** | |
|
||||
**margin_usage** | **str** | |
|
||||
**buying_power** | **str** | |
|
||||
**cross_stats** | [**AccountMarginStats**](AccountMarginStats.md) | |
|
||||
**total_stats** | [**AccountMarginStats**](AccountMarginStats.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_stats import AccountStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountStats from a JSON string
|
||||
account_stats_instance = AccountStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_stats_dict = account_stats_instance.to_dict()
|
||||
# create an instance of AccountStats from a dict
|
||||
account_stats_from_dict = AccountStats.from_dict(account_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# AccountTradeStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**daily_trades_count** | **int** | |
|
||||
**daily_volume** | **float** | |
|
||||
**weekly_trades_count** | **int** | |
|
||||
**weekly_volume** | **float** | |
|
||||
**monthly_trades_count** | **int** | |
|
||||
**monthly_volume** | **float** | |
|
||||
**total_trades_count** | **int** | |
|
||||
**total_volume** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.account_trade_stats import AccountTradeStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AccountTradeStats from a JSON string
|
||||
account_trade_stats_instance = AccountTradeStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AccountTradeStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
account_trade_stats_dict = account_trade_stats_instance.to_dict()
|
||||
# create an instance of AccountTradeStats from a dict
|
||||
account_trade_stats_from_dict = AccountTradeStats.from_dict(account_trade_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Announcement
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**title** | **str** | |
|
||||
**content** | **str** | |
|
||||
**created_at** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.announcement import Announcement
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Announcement from a JSON string
|
||||
announcement_instance = Announcement.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Announcement.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
announcement_dict = announcement_instance.to_dict()
|
||||
# create an instance of Announcement from a dict
|
||||
announcement_from_dict = Announcement.from_dict(announcement_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# lighter.AnnouncementApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**announcement**](AnnouncementApi.md#announcement) | **GET** /api/v1/announcement | announcement
|
||||
|
||||
|
||||
# **announcement**
|
||||
> Announcements announcement()
|
||||
|
||||
announcement
|
||||
|
||||
Get announcement
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.announcements import Announcements
|
||||
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.AnnouncementApi(api_client)
|
||||
|
||||
try:
|
||||
# announcement
|
||||
api_response = await api_instance.announcement()
|
||||
print("The response of AnnouncementApi->announcement:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling AnnouncementApi->announcement: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**Announcements**](Announcements.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)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Announcements
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**announcements** | [**List[Announcement]**](Announcement.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.announcements import Announcements
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Announcements from a JSON string
|
||||
announcements_instance = Announcements.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Announcements.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
announcements_dict = announcements_instance.to_dict()
|
||||
# create an instance of Announcements from a dict
|
||||
announcements_from_dict = Announcements.from_dict(announcements_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# ApiKey
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**api_key_index** | **int** | |
|
||||
**nonce** | **int** | |
|
||||
**public_key** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.api_key import ApiKey
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ApiKey from a JSON string
|
||||
api_key_instance = ApiKey.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ApiKey.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
api_key_dict = api_key_instance.to_dict()
|
||||
# create an instance of ApiKey from a dict
|
||||
api_key_from_dict = ApiKey.from_dict(api_key_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Block
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**commitment** | **str** | |
|
||||
**height** | **int** | |
|
||||
**state_root** | **str** | |
|
||||
**priority_operations** | **int** | |
|
||||
**on_chain_l2_operations** | **int** | |
|
||||
**pending_on_chain_operations_pub_data** | **str** | |
|
||||
**committed_tx_hash** | **str** | |
|
||||
**committed_at** | **int** | |
|
||||
**verified_tx_hash** | **str** | |
|
||||
**verified_at** | **int** | |
|
||||
**txs** | [**List[Tx]**](Tx.md) | |
|
||||
**status** | **int** | |
|
||||
**size** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.block import Block
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Block from a JSON string
|
||||
block_instance = Block.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Block.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
block_dict = block_instance.to_dict()
|
||||
# create an instance of Block from a dict
|
||||
block_from_dict = Block.from_dict(block_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
# lighter.BlockApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**block**](BlockApi.md#block) | **GET** /api/v1/block | block
|
||||
[**blocks**](BlockApi.md#blocks) | **GET** /api/v1/blocks | blocks
|
||||
[**current_height**](BlockApi.md#current_height) | **GET** /api/v1/currentHeight | currentHeight
|
||||
|
||||
|
||||
# **block**
|
||||
> Blocks block(by, value)
|
||||
|
||||
block
|
||||
|
||||
Get block by its height or commitment
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.blocks import Blocks
|
||||
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.BlockApi(api_client)
|
||||
by = 'by_example' # str |
|
||||
value = 'value_example' # str |
|
||||
|
||||
try:
|
||||
# block
|
||||
api_response = await api_instance.block(by, value)
|
||||
print("The response of BlockApi->block:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling BlockApi->block: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**by** | **str**| |
|
||||
**value** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Blocks**](Blocks.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)
|
||||
|
||||
# **blocks**
|
||||
> Blocks blocks(limit, index=index, sort=sort)
|
||||
|
||||
blocks
|
||||
|
||||
Get blocks
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.blocks import Blocks
|
||||
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.BlockApi(api_client)
|
||||
limit = 56 # int |
|
||||
index = 56 # int | (optional)
|
||||
sort = asc # str | (optional) (default to asc)
|
||||
|
||||
try:
|
||||
# blocks
|
||||
api_response = await api_instance.blocks(limit, index=index, sort=sort)
|
||||
print("The response of BlockApi->blocks:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling BlockApi->blocks: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **int**| |
|
||||
**index** | **int**| | [optional]
|
||||
**sort** | **str**| | [optional] [default to asc]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Blocks**](Blocks.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)
|
||||
|
||||
# **current_height**
|
||||
> CurrentHeight current_height()
|
||||
|
||||
currentHeight
|
||||
|
||||
Get current height
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.current_height import CurrentHeight
|
||||
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.BlockApi(api_client)
|
||||
|
||||
try:
|
||||
# currentHeight
|
||||
api_response = await api_instance.current_height()
|
||||
print("The response of BlockApi->current_height:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling BlockApi->current_height: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**CurrentHeight**](CurrentHeight.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)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Blocks
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**total** | **int** | |
|
||||
**blocks** | [**List[Block]**](Block.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.blocks import Blocks
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Blocks from a JSON string
|
||||
blocks_instance = Blocks.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Blocks.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
blocks_dict = blocks_instance.to_dict()
|
||||
# create an instance of Blocks from a dict
|
||||
blocks_from_dict = Blocks.from_dict(blocks_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# lighter.BridgeApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fastbridge_info**](BridgeApi.md#fastbridge_info) | **GET** /api/v1/fastbridge/info | fastbridge_info
|
||||
|
||||
|
||||
# **fastbridge_info**
|
||||
> RespGetFastBridgeInfo fastbridge_info()
|
||||
|
||||
fastbridge_info
|
||||
|
||||
Get fast bridge info
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.resp_get_fast_bridge_info import RespGetFastBridgeInfo
|
||||
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.BridgeApi(api_client)
|
||||
|
||||
try:
|
||||
# fastbridge_info
|
||||
api_response = await api_instance.fastbridge_info()
|
||||
print("The response of BridgeApi->fastbridge_info:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling BridgeApi->fastbridge_info: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**RespGetFastBridgeInfo**](RespGetFastBridgeInfo.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)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# BridgeSupportedNetwork
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**chain_id** | **str** | |
|
||||
**explorer** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.bridge_supported_network import BridgeSupportedNetwork
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of BridgeSupportedNetwork from a JSON string
|
||||
bridge_supported_network_instance = BridgeSupportedNetwork.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(BridgeSupportedNetwork.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
bridge_supported_network_dict = bridge_supported_network_instance.to_dict()
|
||||
# create an instance of BridgeSupportedNetwork from a dict
|
||||
bridge_supported_network_from_dict = BridgeSupportedNetwork.from_dict(bridge_supported_network_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Candlestick
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**open** | **float** | |
|
||||
**high** | **float** | |
|
||||
**low** | **float** | |
|
||||
**close** | **float** | |
|
||||
**volume0** | **float** | |
|
||||
**volume1** | **float** | |
|
||||
**last_trade_id** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.candlestick import Candlestick
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Candlestick from a JSON string
|
||||
candlestick_instance = Candlestick.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Candlestick.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
candlestick_dict = candlestick_instance.to_dict()
|
||||
# create an instance of Candlestick from a dict
|
||||
candlestick_from_dict = Candlestick.from_dict(candlestick_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
# lighter.CandlestickApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**candlesticks**](CandlestickApi.md#candlesticks) | **GET** /api/v1/candlesticks | candlesticks
|
||||
[**fundings**](CandlestickApi.md#fundings) | **GET** /api/v1/fundings | fundings
|
||||
|
||||
|
||||
# **candlesticks**
|
||||
> Candlesticks candlesticks(market_id, resolution, start_timestamp, end_timestamp, count_back, set_timestamp_to_end=set_timestamp_to_end)
|
||||
|
||||
candlesticks
|
||||
|
||||
Get candlesticks
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.candlesticks import Candlesticks
|
||||
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.CandlestickApi(api_client)
|
||||
market_id = 56 # int |
|
||||
resolution = 'resolution_example' # str |
|
||||
start_timestamp = 56 # int |
|
||||
end_timestamp = 56 # int |
|
||||
count_back = 56 # int |
|
||||
set_timestamp_to_end = False # bool | (optional) (default to False)
|
||||
|
||||
try:
|
||||
# candlesticks
|
||||
api_response = await api_instance.candlesticks(market_id, resolution, start_timestamp, end_timestamp, count_back, set_timestamp_to_end=set_timestamp_to_end)
|
||||
print("The response of CandlestickApi->candlesticks:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CandlestickApi->candlesticks: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| |
|
||||
**resolution** | **str**| |
|
||||
**start_timestamp** | **int**| |
|
||||
**end_timestamp** | **int**| |
|
||||
**count_back** | **int**| |
|
||||
**set_timestamp_to_end** | **bool**| | [optional] [default to False]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Candlesticks**](Candlesticks.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)
|
||||
|
||||
# **fundings**
|
||||
> Fundings fundings(market_id, resolution, start_timestamp, end_timestamp, count_back)
|
||||
|
||||
fundings
|
||||
|
||||
Get fundings
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.fundings import Fundings
|
||||
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.CandlestickApi(api_client)
|
||||
market_id = 56 # int |
|
||||
resolution = 'resolution_example' # str |
|
||||
start_timestamp = 56 # int |
|
||||
end_timestamp = 56 # int |
|
||||
count_back = 56 # int |
|
||||
|
||||
try:
|
||||
# fundings
|
||||
api_response = await api_instance.fundings(market_id, resolution, start_timestamp, end_timestamp, count_back)
|
||||
print("The response of CandlestickApi->fundings:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CandlestickApi->fundings: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| |
|
||||
**resolution** | **str**| |
|
||||
**start_timestamp** | **int**| |
|
||||
**end_timestamp** | **int**| |
|
||||
**count_back** | **int**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Fundings**](Fundings.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)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Candlesticks
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**resolution** | **str** | |
|
||||
**candlesticks** | [**List[Candlestick]**](Candlestick.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.candlesticks import Candlesticks
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Candlesticks from a JSON string
|
||||
candlesticks_instance = Candlesticks.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Candlesticks.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
candlesticks_dict = candlesticks_instance.to_dict()
|
||||
# create an instance of Candlesticks from a dict
|
||||
candlesticks_from_dict = Candlesticks.from_dict(candlesticks_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ContractAddress
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**address** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.contract_address import ContractAddress
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ContractAddress from a JSON string
|
||||
contract_address_instance = ContractAddress.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ContractAddress.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
contract_address_dict = contract_address_instance.to_dict()
|
||||
# create an instance of ContractAddress from a dict
|
||||
contract_address_from_dict = ContractAddress.from_dict(contract_address_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# CurrentHeight
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**height** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.current_height import CurrentHeight
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CurrentHeight from a JSON string
|
||||
current_height_instance = CurrentHeight.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(CurrentHeight.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
current_height_dict = current_height_instance.to_dict()
|
||||
# create an instance of CurrentHeight from a dict
|
||||
current_height_from_dict = CurrentHeight.from_dict(current_height_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Cursor
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**next_cursor** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.cursor import Cursor
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Cursor from a JSON string
|
||||
cursor_instance = Cursor.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Cursor.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
cursor_dict = cursor_instance.to_dict()
|
||||
# create an instance of Cursor from a dict
|
||||
cursor_from_dict = Cursor.from_dict(cursor_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# DailyReturn
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**daily_return** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.daily_return import DailyReturn
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DailyReturn from a JSON string
|
||||
daily_return_instance = DailyReturn.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DailyReturn.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
daily_return_dict = daily_return_instance.to_dict()
|
||||
# create an instance of DailyReturn from a dict
|
||||
daily_return_from_dict = DailyReturn.from_dict(daily_return_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# DepositHistory
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**deposits** | [**List[DepositHistoryItem]**](DepositHistoryItem.md) | |
|
||||
**cursor** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.deposit_history import DepositHistory
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DepositHistory from a JSON string
|
||||
deposit_history_instance = DepositHistory.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DepositHistory.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
deposit_history_dict = deposit_history_instance.to_dict()
|
||||
# create an instance of DepositHistory from a dict
|
||||
deposit_history_from_dict = DepositHistory.from_dict(deposit_history_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# DepositHistoryItem
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**amount** | **str** | |
|
||||
**timestamp** | **int** | |
|
||||
**status** | **str** | |
|
||||
**l1_tx_hash** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.deposit_history_item import DepositHistoryItem
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DepositHistoryItem from a JSON string
|
||||
deposit_history_item_instance = DepositHistoryItem.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DepositHistoryItem.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
deposit_history_item_dict = deposit_history_item_instance.to_dict()
|
||||
# create an instance of DepositHistoryItem from a dict
|
||||
deposit_history_item_from_dict = DepositHistoryItem.from_dict(deposit_history_item_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# DetailedAccount
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**account_type** | **int** | |
|
||||
**index** | **int** | |
|
||||
**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** | |
|
||||
**collateral** | **str** | |
|
||||
**account_index** | **int** | |
|
||||
**name** | **str** | |
|
||||
**description** | **str** | |
|
||||
**can_invite** | **bool** | Remove After FE uses L1 meta endpoint |
|
||||
**referral_points_percentage** | **str** | Remove After FE uses L1 meta endpoint |
|
||||
**positions** | [**List[AccountPosition]**](AccountPosition.md) | |
|
||||
**total_asset_value** | **str** | |
|
||||
**cross_asset_value** | **str** | |
|
||||
**pool_info** | [**PublicPoolInfo**](PublicPoolInfo.md) | |
|
||||
**shares** | [**List[PublicPoolShare]**](PublicPoolShare.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.detailed_account import DetailedAccount
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DetailedAccount from a JSON string
|
||||
detailed_account_instance = DetailedAccount.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DetailedAccount.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
detailed_account_dict = detailed_account_instance.to_dict()
|
||||
# create an instance of DetailedAccount from a dict
|
||||
detailed_account_from_dict = DetailedAccount.from_dict(detailed_account_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# DetailedAccounts
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**total** | **int** | |
|
||||
**accounts** | [**List[DetailedAccount]**](DetailedAccount.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.detailed_accounts import DetailedAccounts
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DetailedAccounts from a JSON string
|
||||
detailed_accounts_instance = DetailedAccounts.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DetailedAccounts.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
detailed_accounts_dict = detailed_accounts_instance.to_dict()
|
||||
# create an instance of DetailedAccounts from a dict
|
||||
detailed_accounts_from_dict = DetailedAccounts.from_dict(detailed_accounts_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# DetailedCandlestick
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**open** | **float** | |
|
||||
**high** | **float** | |
|
||||
**low** | **float** | |
|
||||
**close** | **float** | |
|
||||
**volume0** | **float** | |
|
||||
**volume1** | **float** | |
|
||||
**last_trade_id** | **int** | |
|
||||
**trade_count** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.detailed_candlestick import DetailedCandlestick
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DetailedCandlestick from a JSON string
|
||||
detailed_candlestick_instance = DetailedCandlestick.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DetailedCandlestick.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
detailed_candlestick_dict = detailed_candlestick_instance.to_dict()
|
||||
# create an instance of DetailedCandlestick from a dict
|
||||
detailed_candlestick_from_dict = DetailedCandlestick.from_dict(detailed_candlestick_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# EnrichedTx
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**hash** | **str** | |
|
||||
**type** | **int** | |
|
||||
**info** | **str** | |
|
||||
**event_info** | **str** | |
|
||||
**status** | **int** | |
|
||||
**transaction_index** | **int** | |
|
||||
**l1_address** | **str** | |
|
||||
**account_index** | **int** | |
|
||||
**nonce** | **int** | |
|
||||
**expire_at** | **int** | |
|
||||
**block_height** | **int** | |
|
||||
**queued_at** | **int** | |
|
||||
**executed_at** | **int** | |
|
||||
**sequence_index** | **int** | |
|
||||
**parent_hash** | **str** | |
|
||||
**committed_at** | **int** | |
|
||||
**verified_at** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.enriched_tx import EnrichedTx
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of EnrichedTx from a JSON string
|
||||
enriched_tx_instance = EnrichedTx.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(EnrichedTx.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
enriched_tx_dict = enriched_tx_instance.to_dict()
|
||||
# create an instance of EnrichedTx from a dict
|
||||
enriched_tx_from_dict = EnrichedTx.from_dict(enriched_tx_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ExchangeStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**total** | **int** | |
|
||||
**order_book_stats** | [**List[OrderBookStats]**](OrderBookStats.md) | |
|
||||
**daily_usd_volume** | **float** | |
|
||||
**daily_trades_count** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.exchange_stats import ExchangeStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ExchangeStats from a JSON string
|
||||
exchange_stats_instance = ExchangeStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ExchangeStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
exchange_stats_dict = exchange_stats_instance.to_dict()
|
||||
# create an instance of ExchangeStats from a dict
|
||||
exchange_stats_from_dict = ExchangeStats.from_dict(exchange_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# ExportData
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**data_url** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.export_data import ExportData
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ExportData from a JSON string
|
||||
export_data_instance = ExportData.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ExportData.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
export_data_dict = export_data_instance.to_dict()
|
||||
# create an instance of ExportData from a dict
|
||||
export_data_from_dict = ExportData.from_dict(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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Funding
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**value** | **str** | |
|
||||
**rate** | **str** | |
|
||||
**direction** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.funding import Funding
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Funding from a JSON string
|
||||
funding_instance = Funding.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Funding.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
funding_dict = funding_instance.to_dict()
|
||||
# create an instance of Funding from a dict
|
||||
funding_from_dict = Funding.from_dict(funding_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# lighter.FundingApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**funding_rates**](FundingApi.md#funding_rates) | **GET** /api/v1/funding-rates | funding-rates
|
||||
|
||||
|
||||
# **funding_rates**
|
||||
> FundingRates funding_rates()
|
||||
|
||||
funding-rates
|
||||
|
||||
Get funding rates
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.funding_rates import FundingRates
|
||||
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.FundingApi(api_client)
|
||||
|
||||
try:
|
||||
# funding-rates
|
||||
api_response = await api_instance.funding_rates()
|
||||
print("The response of FundingApi->funding_rates:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling FundingApi->funding_rates: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**FundingRates**](FundingRates.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)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# FundingRate
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**exchange** | **str** | |
|
||||
**symbol** | **str** | |
|
||||
**rate** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.funding_rate import FundingRate
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FundingRate from a JSON string
|
||||
funding_rate_instance = FundingRate.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(FundingRate.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
funding_rate_dict = funding_rate_instance.to_dict()
|
||||
# create an instance of FundingRate from a dict
|
||||
funding_rate_from_dict = FundingRate.from_dict(funding_rate_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# FundingRates
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**funding_rates** | [**List[FundingRate]**](FundingRate.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.funding_rates import FundingRates
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of FundingRates from a JSON string
|
||||
funding_rates_instance = FundingRates.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(FundingRates.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
funding_rates_dict = funding_rates_instance.to_dict()
|
||||
# create an instance of FundingRates from a dict
|
||||
funding_rates_from_dict = FundingRates.from_dict(funding_rates_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Fundings
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**resolution** | **str** | |
|
||||
**fundings** | [**List[Funding]**](Funding.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.fundings import Fundings
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Fundings from a JSON string
|
||||
fundings_instance = Fundings.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Fundings.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
fundings_dict = fundings_instance.to_dict()
|
||||
# create an instance of Fundings from a dict
|
||||
fundings_from_dict = Fundings.from_dict(fundings_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
# lighter.InfoApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**transfer_fee_info**](InfoApi.md#transfer_fee_info) | **GET** /api/v1/transferFeeInfo | transferFeeInfo
|
||||
[**withdrawal_delay**](InfoApi.md#withdrawal_delay) | **GET** /api/v1/withdrawalDelay | withdrawalDelay
|
||||
|
||||
|
||||
# **transfer_fee_info**
|
||||
> TransferFeeInfo transfer_fee_info(account_index, authorization=authorization, auth=auth, to_account_index=to_account_index)
|
||||
|
||||
transferFeeInfo
|
||||
|
||||
Transfer fee info
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.transfer_fee_info import TransferFeeInfo
|
||||
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.InfoApi(api_client)
|
||||
account_index = 56 # int |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
to_account_index = -1 # int | (optional) (default to -1)
|
||||
|
||||
try:
|
||||
# transferFeeInfo
|
||||
api_response = await api_instance.transfer_fee_info(account_index, authorization=authorization, auth=auth, to_account_index=to_account_index)
|
||||
print("The response of InfoApi->transfer_fee_info:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling InfoApi->transfer_fee_info: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
**to_account_index** | **int**| | [optional] [default to -1]
|
||||
|
||||
### Return type
|
||||
|
||||
[**TransferFeeInfo**](TransferFeeInfo.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)
|
||||
|
||||
# **withdrawal_delay**
|
||||
> RespWithdrawalDelay withdrawal_delay()
|
||||
|
||||
withdrawalDelay
|
||||
|
||||
Withdrawal delay in seconds
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.resp_withdrawal_delay import RespWithdrawalDelay
|
||||
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.InfoApi(api_client)
|
||||
|
||||
try:
|
||||
# withdrawalDelay
|
||||
api_response = await api_instance.withdrawal_delay()
|
||||
print("The response of InfoApi->withdrawal_delay:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling InfoApi->withdrawal_delay: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**RespWithdrawalDelay**](RespWithdrawalDelay.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)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# L1Metadata
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**l1_address** | **str** | |
|
||||
**can_invite** | **bool** | |
|
||||
**referral_points_percentage** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.l1_metadata import L1Metadata
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of L1Metadata from a JSON string
|
||||
l1_metadata_instance = L1Metadata.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(L1Metadata.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
l1_metadata_dict = l1_metadata_instance.to_dict()
|
||||
# create an instance of L1Metadata from a dict
|
||||
l1_metadata_from_dict = L1Metadata.from_dict(l1_metadata_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# L1ProviderInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**chain_id** | **int** | |
|
||||
**network_id** | **int** | |
|
||||
**latest_block_number** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.l1_provider_info import L1ProviderInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of L1ProviderInfo from a JSON string
|
||||
l1_provider_info_instance = L1ProviderInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(L1ProviderInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
l1_provider_info_dict = l1_provider_info_instance.to_dict()
|
||||
# create an instance of L1ProviderInfo from a dict
|
||||
l1_provider_info_from_dict = L1ProviderInfo.from_dict(l1_provider_info_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# LiqTrade
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**price** | **str** | |
|
||||
**size** | **str** | |
|
||||
**taker_fee** | **str** | |
|
||||
**maker_fee** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.liq_trade import LiqTrade
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LiqTrade from a JSON string
|
||||
liq_trade_instance = LiqTrade.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LiqTrade.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
liq_trade_dict = liq_trade_instance.to_dict()
|
||||
# create an instance of LiqTrade from a dict
|
||||
liq_trade_from_dict = LiqTrade.from_dict(liq_trade_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Liquidation
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | |
|
||||
**market_id** | **int** | |
|
||||
**type** | **str** | |
|
||||
**trade** | [**LiqTrade**](LiqTrade.md) | |
|
||||
**info** | [**LiquidationInfo**](LiquidationInfo.md) | |
|
||||
**executed_at** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.liquidation import Liquidation
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Liquidation from a JSON string
|
||||
liquidation_instance = Liquidation.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Liquidation.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
liquidation_dict = liquidation_instance.to_dict()
|
||||
# create an instance of Liquidation from a dict
|
||||
liquidation_from_dict = Liquidation.from_dict(liquidation_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# LiquidationInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**positions** | [**List[AccountPosition]**](AccountPosition.md) | |
|
||||
**risk_info_before** | [**RiskInfo**](RiskInfo.md) | |
|
||||
**risk_info_after** | [**RiskInfo**](RiskInfo.md) | |
|
||||
**mark_prices** | **Dict[str, float]** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.liquidation_info import LiquidationInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LiquidationInfo from a JSON string
|
||||
liquidation_info_instance = LiquidationInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LiquidationInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
liquidation_info_dict = liquidation_info_instance.to_dict()
|
||||
# create an instance of LiquidationInfo from a dict
|
||||
liquidation_info_from_dict = LiquidationInfo.from_dict(liquidation_info_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# LiquidationInfos
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**liquidations** | [**List[Liquidation]**](Liquidation.md) | |
|
||||
**next_cursor** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.liquidation_infos import LiquidationInfos
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LiquidationInfos from a JSON string
|
||||
liquidation_infos_instance = LiquidationInfos.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LiquidationInfos.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
liquidation_infos_dict = liquidation_infos_instance.to_dict()
|
||||
# create an instance of LiquidationInfos from a dict
|
||||
liquidation_infos_from_dict = LiquidationInfos.from_dict(liquidation_infos_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# MarketInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**index_price** | **str** | |
|
||||
**mark_price** | **str** | |
|
||||
**open_interest** | **str** | |
|
||||
**last_trade_price** | **str** | |
|
||||
**current_funding_rate** | **str** | |
|
||||
**funding_rate** | **str** | |
|
||||
**funding_timestamp** | **int** | |
|
||||
**daily_base_token_volume** | **float** | |
|
||||
**daily_quote_token_volume** | **float** | |
|
||||
**daily_price_low** | **float** | |
|
||||
**daily_price_high** | **float** | |
|
||||
**daily_price_change** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.market_info import MarketInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of MarketInfo from a JSON string
|
||||
market_info_instance = MarketInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(MarketInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
market_info_dict = market_info_instance.to_dict()
|
||||
# create an instance of MarketInfo from a dict
|
||||
market_info_from_dict = MarketInfo.from_dict(market_info_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# NextNonce
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**nonce** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.next_nonce import NextNonce
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NextNonce from a JSON string
|
||||
next_nonce_instance = NextNonce.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(NextNonce.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
next_nonce_dict = next_nonce_instance.to_dict()
|
||||
# create an instance of NextNonce from a dict
|
||||
next_nonce_from_dict = NextNonce.from_dict(next_nonce_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
# lighter.NotificationApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**notification_ack**](NotificationApi.md#notification_ack) | **POST** /api/v1/notification/ack | notification_ack
|
||||
|
||||
|
||||
# **notification_ack**
|
||||
> ResultCode notification_ack(notif_id, account_index, authorization=authorization, auth=auth)
|
||||
|
||||
notification_ack
|
||||
|
||||
Ack notification
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.result_code import ResultCode
|
||||
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.NotificationApi(api_client)
|
||||
notif_id = 'notif_id_example' # str |
|
||||
account_index = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# notification_ack
|
||||
api_response = await api_instance.notification_ack(notif_id, account_index, authorization=authorization, auth=auth)
|
||||
print("The response of NotificationApi->notification_ack:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling NotificationApi->notification_ack: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**notif_id** | **str**| |
|
||||
**account_index** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ResultCode**](ResultCode.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **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)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Order
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**order_index** | **int** | |
|
||||
**client_order_index** | **int** | |
|
||||
**order_id** | **str** | |
|
||||
**client_order_id** | **str** | |
|
||||
**market_index** | **int** | |
|
||||
**owner_account_index** | **int** | |
|
||||
**initial_base_amount** | **str** | |
|
||||
**price** | **str** | |
|
||||
**nonce** | **int** | |
|
||||
**remaining_base_amount** | **str** | |
|
||||
**is_ask** | **bool** | |
|
||||
**base_size** | **int** | |
|
||||
**base_price** | **int** | |
|
||||
**filled_base_amount** | **str** | |
|
||||
**filled_quote_amount** | **str** | |
|
||||
**side** | **str** | TODO: remove this | [default to 'buy']
|
||||
**type** | **str** | |
|
||||
**time_in_force** | **str** | | [default to 'good-till-time']
|
||||
**reduce_only** | **bool** | |
|
||||
**trigger_price** | **str** | |
|
||||
**order_expiry** | **int** | |
|
||||
**status** | **str** | |
|
||||
**trigger_status** | **str** | |
|
||||
**trigger_time** | **int** | |
|
||||
**parent_order_index** | **int** | |
|
||||
**parent_order_id** | **str** | |
|
||||
**to_trigger_order_id_0** | **str** | |
|
||||
**to_trigger_order_id_1** | **str** | |
|
||||
**to_cancel_order_id_0** | **str** | |
|
||||
**block_height** | **int** | |
|
||||
**timestamp** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order import Order
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Order from a JSON string
|
||||
order_instance = Order.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Order.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_dict = order_instance.to_dict()
|
||||
# create an instance of Order from a dict
|
||||
order_from_dict = Order.from_dict(order_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,686 @@
|
||||
# lighter.OrderApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**account_active_orders**](OrderApi.md#account_active_orders) | **GET** /api/v1/accountActiveOrders | accountActiveOrders
|
||||
[**account_inactive_orders**](OrderApi.md#account_inactive_orders) | **GET** /api/v1/accountInactiveOrders | accountInactiveOrders
|
||||
[**exchange_stats**](OrderApi.md#exchange_stats) | **GET** /api/v1/exchangeStats | exchangeStats
|
||||
[**export**](OrderApi.md#export) | **GET** /api/v1/export | export
|
||||
[**order_book_details**](OrderApi.md#order_book_details) | **GET** /api/v1/orderBookDetails | orderBookDetails
|
||||
[**order_book_orders**](OrderApi.md#order_book_orders) | **GET** /api/v1/orderBookOrders | orderBookOrders
|
||||
[**order_books**](OrderApi.md#order_books) | **GET** /api/v1/orderBooks | orderBooks
|
||||
[**recent_trades**](OrderApi.md#recent_trades) | **GET** /api/v1/recentTrades | recentTrades
|
||||
[**trades**](OrderApi.md#trades) | **GET** /api/v1/trades | trades
|
||||
|
||||
|
||||
# **account_active_orders**
|
||||
> Orders account_active_orders(account_index, market_id, authorization=authorization, auth=auth)
|
||||
|
||||
accountActiveOrders
|
||||
|
||||
Get account active orders. `auth` can be generated using the SDK.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.orders import Orders
|
||||
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.OrderApi(api_client)
|
||||
account_index = 56 # int |
|
||||
market_id = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# accountActiveOrders
|
||||
api_response = await api_instance.account_active_orders(account_index, market_id, authorization=authorization, auth=auth)
|
||||
print("The response of OrderApi->account_active_orders:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->account_active_orders: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**market_id** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Orders**](Orders.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)
|
||||
|
||||
# **account_inactive_orders**
|
||||
> Orders account_inactive_orders(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, ask_filter=ask_filter, between_timestamps=between_timestamps, cursor=cursor)
|
||||
|
||||
accountInactiveOrders
|
||||
|
||||
Get account inactive orders
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.orders import Orders
|
||||
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.OrderApi(api_client)
|
||||
account_index = 56 # int |
|
||||
limit = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
ask_filter = -1 # int | (optional) (default to -1)
|
||||
between_timestamps = 'between_timestamps_example' # str | (optional)
|
||||
cursor = 'cursor_example' # str | (optional)
|
||||
|
||||
try:
|
||||
# accountInactiveOrders
|
||||
api_response = await api_instance.account_inactive_orders(account_index, limit, authorization=authorization, auth=auth, market_id=market_id, ask_filter=ask_filter, between_timestamps=between_timestamps, cursor=cursor)
|
||||
print("The response of OrderApi->account_inactive_orders:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->account_inactive_orders: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**limit** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
**ask_filter** | **int**| | [optional] [default to -1]
|
||||
**between_timestamps** | **str**| | [optional]
|
||||
**cursor** | **str**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Orders**](Orders.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)
|
||||
|
||||
# **exchange_stats**
|
||||
> ExchangeStats exchange_stats()
|
||||
|
||||
exchangeStats
|
||||
|
||||
Get exchange stats
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.exchange_stats import ExchangeStats
|
||||
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.OrderApi(api_client)
|
||||
|
||||
try:
|
||||
# exchangeStats
|
||||
api_response = await api_instance.exchange_stats()
|
||||
print("The response of OrderApi->exchange_stats:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->exchange_stats: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**ExchangeStats**](ExchangeStats.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)
|
||||
|
||||
# **export**
|
||||
> ExportData export(type, authorization=authorization, auth=auth, account_index=account_index, market_id=market_id)
|
||||
|
||||
export
|
||||
|
||||
Export data
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.export_data import ExportData
|
||||
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.OrderApi(api_client)
|
||||
type = 'type_example' # str |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
account_index = -1 # int | (optional) (default to -1)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
|
||||
try:
|
||||
# export
|
||||
api_response = await api_instance.export(type, authorization=authorization, auth=auth, account_index=account_index, market_id=market_id)
|
||||
print("The response of OrderApi->export:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->export: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**type** | **str**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
**account_index** | **int**| | [optional] [default to -1]
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ExportData**](ExportData.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)
|
||||
|
||||
# **order_book_details**
|
||||
> OrderBookDetails order_book_details(market_id=market_id)
|
||||
|
||||
orderBookDetails
|
||||
|
||||
Get order books metadata
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.order_book_details import OrderBookDetails
|
||||
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.OrderApi(api_client)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
|
||||
try:
|
||||
# orderBookDetails
|
||||
api_response = await api_instance.order_book_details(market_id=market_id)
|
||||
print("The response of OrderApi->order_book_details:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->order_book_details: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OrderBookDetails**](OrderBookDetails.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)
|
||||
|
||||
# **order_book_orders**
|
||||
> OrderBookOrders order_book_orders(market_id, limit)
|
||||
|
||||
orderBookOrders
|
||||
|
||||
Get order book orders
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.order_book_orders import OrderBookOrders
|
||||
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.OrderApi(api_client)
|
||||
market_id = 56 # int |
|
||||
limit = 56 # int |
|
||||
|
||||
try:
|
||||
# orderBookOrders
|
||||
api_response = await api_instance.order_book_orders(market_id, limit)
|
||||
print("The response of OrderApi->order_book_orders:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->order_book_orders: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| |
|
||||
**limit** | **int**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**OrderBookOrders**](OrderBookOrders.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)
|
||||
|
||||
# **order_books**
|
||||
> OrderBooks order_books(market_id=market_id)
|
||||
|
||||
orderBooks
|
||||
|
||||
Get order books metadata.<hr>**Response Description:**<br><br>1) **Taker and maker fees** are in percentage.<br>2) **Min base amount:** The amount of base token that can be traded in a single order.<br>3) **Min quote amount:** The amount of quote token that can be traded in a single order.<br>4) **Supported size decimals:** The number of decimal places that can be used for the size of the order.<br>5) **Supported price decimals:** The number of decimal places that can be used for the price of the order.<br>6) **Supported quote decimals:** Size Decimals + Quote Decimals.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.order_books import OrderBooks
|
||||
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.OrderApi(api_client)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
|
||||
try:
|
||||
# orderBooks
|
||||
api_response = await api_instance.order_books(market_id=market_id)
|
||||
print("The response of OrderApi->order_books:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->order_books: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OrderBooks**](OrderBooks.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)
|
||||
|
||||
# **recent_trades**
|
||||
> Trades recent_trades(market_id, limit)
|
||||
|
||||
recentTrades
|
||||
|
||||
Get recent trades
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.trades import Trades
|
||||
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.OrderApi(api_client)
|
||||
market_id = 56 # int |
|
||||
limit = 56 # int |
|
||||
|
||||
try:
|
||||
# recentTrades
|
||||
api_response = await api_instance.recent_trades(market_id, limit)
|
||||
print("The response of OrderApi->recent_trades:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->recent_trades: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**market_id** | **int**| |
|
||||
**limit** | **int**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Trades**](Trades.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)
|
||||
|
||||
# **trades**
|
||||
> Trades trades(sort_by, limit, authorization=authorization, auth=auth, market_id=market_id, account_index=account_index, order_index=order_index, sort_dir=sort_dir, cursor=cursor, var_from=var_from, ask_filter=ask_filter)
|
||||
|
||||
trades
|
||||
|
||||
Get trades
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.trades import Trades
|
||||
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.OrderApi(api_client)
|
||||
sort_by = 'sort_by_example' # str |
|
||||
limit = 56 # int |
|
||||
authorization = 'authorization_example' # str | (optional)
|
||||
auth = 'auth_example' # str | (optional)
|
||||
market_id = 255 # int | (optional) (default to 255)
|
||||
account_index = -1 # int | (optional) (default to -1)
|
||||
order_index = 56 # int | (optional)
|
||||
sort_dir = desc # str | (optional) (default to desc)
|
||||
cursor = 'cursor_example' # str | (optional)
|
||||
var_from = -1 # int | (optional) (default to -1)
|
||||
ask_filter = -1 # int | (optional) (default to -1)
|
||||
|
||||
try:
|
||||
# trades
|
||||
api_response = await api_instance.trades(sort_by, limit, authorization=authorization, auth=auth, market_id=market_id, account_index=account_index, order_index=order_index, sort_dir=sort_dir, cursor=cursor, var_from=var_from, ask_filter=ask_filter)
|
||||
print("The response of OrderApi->trades:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling OrderApi->trades: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**sort_by** | **str**| |
|
||||
**limit** | **int**| |
|
||||
**authorization** | **str**| | [optional]
|
||||
**auth** | **str**| | [optional]
|
||||
**market_id** | **int**| | [optional] [default to 255]
|
||||
**account_index** | **int**| | [optional] [default to -1]
|
||||
**order_index** | **int**| | [optional]
|
||||
**sort_dir** | **str**| | [optional] [default to desc]
|
||||
**cursor** | **str**| | [optional]
|
||||
**var_from** | **int**| | [optional] [default to -1]
|
||||
**ask_filter** | **int**| | [optional] [default to -1]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Trades**](Trades.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)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# OrderBook
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**symbol** | **str** | |
|
||||
**market_id** | **int** | |
|
||||
**status** | **str** | |
|
||||
**taker_fee** | **str** | |
|
||||
**maker_fee** | **str** | |
|
||||
**liquidation_fee** | **str** | |
|
||||
**min_base_amount** | **str** | |
|
||||
**min_quote_amount** | **str** | |
|
||||
**supported_size_decimals** | **int** | |
|
||||
**supported_price_decimals** | **int** | |
|
||||
**supported_quote_decimals** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book import OrderBook
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBook from a JSON string
|
||||
order_book_instance = OrderBook.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBook.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_dict = order_book_instance.to_dict()
|
||||
# create an instance of OrderBook from a dict
|
||||
order_book_from_dict = OrderBook.from_dict(order_book_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# OrderBookDepth
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**asks** | [**List[PriceLevel]**](PriceLevel.md) | |
|
||||
**bids** | [**List[PriceLevel]**](PriceLevel.md) | |
|
||||
**offset** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book_depth import OrderBookDepth
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBookDepth from a JSON string
|
||||
order_book_depth_instance = OrderBookDepth.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBookDepth.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_depth_dict = order_book_depth_instance.to_dict()
|
||||
# create an instance of OrderBookDepth from a dict
|
||||
order_book_depth_from_dict = OrderBookDepth.from_dict(order_book_depth_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# OrderBookDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**symbol** | **str** | |
|
||||
**market_id** | **int** | |
|
||||
**status** | **str** | |
|
||||
**taker_fee** | **str** | |
|
||||
**maker_fee** | **str** | |
|
||||
**liquidation_fee** | **str** | |
|
||||
**min_base_amount** | **str** | |
|
||||
**min_quote_amount** | **str** | |
|
||||
**supported_size_decimals** | **int** | |
|
||||
**supported_price_decimals** | **int** | |
|
||||
**supported_quote_decimals** | **int** | |
|
||||
**size_decimals** | **int** | |
|
||||
**price_decimals** | **int** | |
|
||||
**quote_multiplier** | **int** | |
|
||||
**default_initial_margin_fraction** | **int** | |
|
||||
**min_initial_margin_fraction** | **int** | |
|
||||
**maintenance_margin_fraction** | **int** | |
|
||||
**closeout_margin_fraction** | **int** | |
|
||||
**last_trade_price** | **float** | |
|
||||
**daily_trades_count** | **int** | |
|
||||
**daily_base_token_volume** | **float** | |
|
||||
**daily_quote_token_volume** | **float** | |
|
||||
**daily_price_low** | **float** | |
|
||||
**daily_price_high** | **float** | |
|
||||
**daily_price_change** | **float** | |
|
||||
**open_interest** | **float** | |
|
||||
**daily_chart** | **Dict[str, float]** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book_detail import OrderBookDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBookDetail from a JSON string
|
||||
order_book_detail_instance = OrderBookDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBookDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_detail_dict = order_book_detail_instance.to_dict()
|
||||
# create an instance of OrderBookDetail from a dict
|
||||
order_book_detail_from_dict = OrderBookDetail.from_dict(order_book_detail_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# OrderBookDetails
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**order_book_details** | [**List[OrderBookDetail]**](OrderBookDetail.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book_details import OrderBookDetails
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBookDetails from a JSON string
|
||||
order_book_details_instance = OrderBookDetails.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBookDetails.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_details_dict = order_book_details_instance.to_dict()
|
||||
# create an instance of OrderBookDetails from a dict
|
||||
order_book_details_from_dict = OrderBookDetails.from_dict(order_book_details_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# OrderBookOrders
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**total_asks** | **int** | |
|
||||
**asks** | [**List[SimpleOrder]**](SimpleOrder.md) | |
|
||||
**total_bids** | **int** | |
|
||||
**bids** | [**List[SimpleOrder]**](SimpleOrder.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book_orders import OrderBookOrders
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBookOrders from a JSON string
|
||||
order_book_orders_instance = OrderBookOrders.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBookOrders.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_orders_dict = order_book_orders_instance.to_dict()
|
||||
# create an instance of OrderBookOrders from a dict
|
||||
order_book_orders_from_dict = OrderBookOrders.from_dict(order_book_orders_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# OrderBookStats
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**symbol** | **str** | |
|
||||
**last_trade_price** | **float** | |
|
||||
**daily_trades_count** | **int** | |
|
||||
**daily_base_token_volume** | **float** | |
|
||||
**daily_quote_token_volume** | **float** | |
|
||||
**daily_price_change** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_book_stats import OrderBookStats
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBookStats from a JSON string
|
||||
order_book_stats_instance = OrderBookStats.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBookStats.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_book_stats_dict = order_book_stats_instance.to_dict()
|
||||
# create an instance of OrderBookStats from a dict
|
||||
order_book_stats_from_dict = OrderBookStats.from_dict(order_book_stats_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# OrderBooks
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**order_books** | [**List[OrderBook]**](OrderBook.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.order_books import OrderBooks
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of OrderBooks from a JSON string
|
||||
order_books_instance = OrderBooks.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(OrderBooks.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
order_books_dict = order_books_instance.to_dict()
|
||||
# create an instance of OrderBooks from a dict
|
||||
order_books_from_dict = OrderBooks.from_dict(order_books_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Orders
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**next_cursor** | **str** | | [optional]
|
||||
**orders** | [**List[Order]**](Order.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.orders import Orders
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of Orders from a JSON string
|
||||
orders_instance = Orders.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(Orders.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
orders_dict = orders_instance.to_dict()
|
||||
# create an instance of Orders from a dict
|
||||
orders_from_dict = Orders.from_dict(orders_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# PnLEntry
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**trade_pnl** | **float** | |
|
||||
**inflow** | **float** | |
|
||||
**outflow** | **float** | |
|
||||
**pool_pnl** | **float** | |
|
||||
**pool_inflow** | **float** | |
|
||||
**pool_outflow** | **float** | |
|
||||
**pool_total_shares** | **float** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.pn_l_entry import PnLEntry
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PnLEntry from a JSON string
|
||||
pn_l_entry_instance = PnLEntry.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PnLEntry.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
pn_l_entry_dict = pn_l_entry_instance.to_dict()
|
||||
# create an instance of PnLEntry from a dict
|
||||
pn_l_entry_from_dict = PnLEntry.from_dict(pn_l_entry_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# PositionFunding
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**timestamp** | **int** | |
|
||||
**market_id** | **int** | |
|
||||
**funding_id** | **int** | |
|
||||
**change** | **str** | |
|
||||
**rate** | **str** | |
|
||||
**position_size** | **str** | |
|
||||
**position_side** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.position_funding import PositionFunding
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PositionFunding from a JSON string
|
||||
position_funding_instance = PositionFunding.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PositionFunding.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
position_funding_dict = position_funding_instance.to_dict()
|
||||
# create an instance of PositionFunding from a dict
|
||||
position_funding_from_dict = PositionFunding.from_dict(position_funding_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# PositionFundings
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**position_fundings** | [**List[PositionFunding]**](PositionFunding.md) | |
|
||||
**next_cursor** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.position_fundings import PositionFundings
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PositionFundings from a JSON string
|
||||
position_fundings_instance = PositionFundings.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PositionFundings.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
position_fundings_dict = position_fundings_instance.to_dict()
|
||||
# create an instance of PositionFundings from a dict
|
||||
position_fundings_from_dict = PositionFundings.from_dict(position_fundings_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# PriceLevel
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**price** | **str** | |
|
||||
**size** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.price_level import PriceLevel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PriceLevel from a JSON string
|
||||
price_level_instance = PriceLevel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PriceLevel.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
price_level_dict = price_level_instance.to_dict()
|
||||
# create an instance of PriceLevel from a dict
|
||||
price_level_from_dict = PriceLevel.from_dict(price_level_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# PublicPool
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**account_type** | **int** | |
|
||||
**index** | **int** | |
|
||||
**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** | |
|
||||
**collateral** | **str** | |
|
||||
**account_index** | **int** | |
|
||||
**name** | **str** | |
|
||||
**description** | **str** | |
|
||||
**can_invite** | **bool** | Remove After FE uses L1 meta endpoint |
|
||||
**referral_points_percentage** | **str** | Remove After FE uses L1 meta endpoint |
|
||||
**total_asset_value** | **str** | |
|
||||
**cross_asset_value** | **str** | |
|
||||
**pool_info** | [**PublicPoolInfo**](PublicPoolInfo.md) | |
|
||||
**account_share** | [**PublicPoolShare**](PublicPoolShare.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.public_pool import PublicPool
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PublicPool from a JSON string
|
||||
public_pool_instance = PublicPool.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PublicPool.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
public_pool_dict = public_pool_instance.to_dict()
|
||||
# create an instance of PublicPool from a dict
|
||||
public_pool_from_dict = PublicPool.from_dict(public_pool_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# PublicPoolInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | **int** | |
|
||||
**operator_fee** | **str** | |
|
||||
**min_operator_share_rate** | **str** | |
|
||||
**total_shares** | **int** | |
|
||||
**operator_shares** | **int** | |
|
||||
**annual_percentage_yield** | **float** | |
|
||||
**daily_returns** | [**List[DailyReturn]**](DailyReturn.md) | |
|
||||
**share_prices** | [**List[SharePrice]**](SharePrice.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.public_pool_info import PublicPoolInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PublicPoolInfo from a JSON string
|
||||
public_pool_info_instance = PublicPoolInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PublicPoolInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
public_pool_info_dict = public_pool_info_instance.to_dict()
|
||||
# create an instance of PublicPoolInfo from a dict
|
||||
public_pool_info_from_dict = PublicPoolInfo.from_dict(public_pool_info_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# PublicPoolMetadata
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**account_index** | **int** | |
|
||||
**account_type** | **int** | |
|
||||
**name** | **str** | |
|
||||
**l1_address** | **str** | |
|
||||
**annual_percentage_yield** | **float** | |
|
||||
**status** | **int** | |
|
||||
**operator_fee** | **str** | |
|
||||
**total_asset_value** | **str** | |
|
||||
**total_shares** | **int** | |
|
||||
**account_share** | [**PublicPoolShare**](PublicPoolShare.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.public_pool_metadata import PublicPoolMetadata
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PublicPoolMetadata from a JSON string
|
||||
public_pool_metadata_instance = PublicPoolMetadata.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PublicPoolMetadata.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
public_pool_metadata_dict = public_pool_metadata_instance.to_dict()
|
||||
# create an instance of PublicPoolMetadata from a dict
|
||||
public_pool_metadata_from_dict = PublicPoolMetadata.from_dict(public_pool_metadata_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# PublicPoolShare
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**public_pool_index** | **int** | |
|
||||
**shares_amount** | **int** | |
|
||||
**entry_usdc** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.public_pool_share import PublicPoolShare
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PublicPoolShare from a JSON string
|
||||
public_pool_share_instance = PublicPoolShare.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PublicPoolShare.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
public_pool_share_dict = public_pool_share_instance.to_dict()
|
||||
# create an instance of PublicPoolShare from a dict
|
||||
public_pool_share_from_dict = PublicPoolShare.from_dict(public_pool_share_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# PublicPools
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | |
|
||||
**message** | **str** | | [optional]
|
||||
**total** | **int** | |
|
||||
**public_pools** | [**List[PublicPool]**](PublicPool.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.public_pools import PublicPools
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of PublicPools from a JSON string
|
||||
public_pools_instance = PublicPools.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(PublicPools.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
public_pools_dict = public_pools_instance.to_dict()
|
||||
# create an instance of PublicPools from a dict
|
||||
public_pools_from_dict = PublicPools.from_dict(public_pools_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
# lighter.ReferralApi
|
||||
|
||||
All URIs are relative to *https://mainnet.zklighter.elliot.ai*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**referral_points**](ReferralApi.md#referral_points) | **GET** /api/v1/referral/points | referral_points
|
||||
|
||||
|
||||
# **referral_points**
|
||||
> ReferralPoints referral_points(account_index, authorization=authorization, auth=auth)
|
||||
|
||||
referral_points
|
||||
|
||||
Get referral points
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import lighter
|
||||
from lighter.models.referral_points import ReferralPoints
|
||||
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.ReferralApi(api_client)
|
||||
account_index = 56 # int |
|
||||
authorization = 'authorization_example' # str | make required after integ is done (optional)
|
||||
auth = 'auth_example' # str | made optional to support header auth clients (optional)
|
||||
|
||||
try:
|
||||
# referral_points
|
||||
api_response = await api_instance.referral_points(account_index, authorization=authorization, auth=auth)
|
||||
print("The response of ReferralApi->referral_points:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling ReferralApi->referral_points: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**account_index** | **int**| |
|
||||
**authorization** | **str**| make required after integ is done | [optional]
|
||||
**auth** | **str**| made optional to support header auth clients | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ReferralPoints**](ReferralPoints.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)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ReferralPointEntry
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**l1_address** | **str** | |
|
||||
**total_points** | **int** | |
|
||||
**week_points** | **int** | |
|
||||
**total_reward_points** | **int** | |
|
||||
**week_reward_points** | **int** | |
|
||||
**reward_point_multiplier** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.referral_point_entry import ReferralPointEntry
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReferralPointEntry from a JSON string
|
||||
referral_point_entry_instance = ReferralPointEntry.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReferralPointEntry.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
referral_point_entry_dict = referral_point_entry_instance.to_dict()
|
||||
# create an instance of ReferralPointEntry from a dict
|
||||
referral_point_entry_from_dict = ReferralPointEntry.from_dict(referral_point_entry_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ReferralPoints
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**referrals** | [**List[ReferralPointEntry]**](ReferralPointEntry.md) | |
|
||||
**user_total_points** | **int** | |
|
||||
**user_last_week_points** | **int** | |
|
||||
**user_total_referral_reward_points** | **int** | |
|
||||
**user_last_week_referral_reward_points** | **int** | |
|
||||
**reward_point_multiplier** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.referral_points import ReferralPoints
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReferralPoints from a JSON string
|
||||
referral_points_instance = ReferralPoints.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReferralPoints.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
referral_points_dict = referral_points_instance.to_dict()
|
||||
# create an instance of ReferralPoints from a dict
|
||||
referral_points_from_dict = ReferralPoints.from_dict(referral_points_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# ReqExportData
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | | [optional]
|
||||
**account_index** | **int** | | [optional] [default to -1]
|
||||
**market_id** | **int** | | [optional]
|
||||
**type** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_export_data import ReqExportData
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqExportData from a JSON string
|
||||
req_export_data_instance = ReqExportData.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqExportData.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_export_data_dict = req_export_data_instance.to_dict()
|
||||
# create an instance of ReqExportData from a dict
|
||||
req_export_data_from_dict = ReqExportData.from_dict(req_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetAccount
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account import ReqGetAccount
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccount from a JSON string
|
||||
req_get_account_instance = ReqGetAccount.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccount.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_dict = req_get_account_instance.to_dict()
|
||||
# create an instance of ReqGetAccount from a dict
|
||||
req_get_account_from_dict = ReqGetAccount.from_dict(req_get_account_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# ReqGetAccountActiveOrders
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**market_id** | **int** | |
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_active_orders import ReqGetAccountActiveOrders
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountActiveOrders from a JSON string
|
||||
req_get_account_active_orders_instance = ReqGetAccountActiveOrders.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountActiveOrders.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_active_orders_dict = req_get_account_active_orders_instance.to_dict()
|
||||
# create an instance of ReqGetAccountActiveOrders from a dict
|
||||
req_get_account_active_orders_from_dict = ReqGetAccountActiveOrders.from_dict(req_get_account_active_orders_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetAccountApiKeys
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**api_key_index** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_api_keys import ReqGetAccountApiKeys
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountApiKeys from a JSON string
|
||||
req_get_account_api_keys_instance = ReqGetAccountApiKeys.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountApiKeys.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_api_keys_dict = req_get_account_api_keys_instance.to_dict()
|
||||
# create an instance of ReqGetAccountApiKeys from a dict
|
||||
req_get_account_api_keys_from_dict = ReqGetAccountApiKeys.from_dict(req_get_account_api_keys_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReqGetAccountByL1Address
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**l1_address** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_by_l1_address import ReqGetAccountByL1Address
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountByL1Address from a JSON string
|
||||
req_get_account_by_l1_address_instance = ReqGetAccountByL1Address.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountByL1Address.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_by_l1_address_dict = req_get_account_by_l1_address_instance.to_dict()
|
||||
# create an instance of ReqGetAccountByL1Address from a dict
|
||||
req_get_account_by_l1_address_from_dict = ReqGetAccountByL1Address.from_dict(req_get_account_by_l1_address_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# ReqGetAccountInactiveOrders
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
**account_index** | **int** | |
|
||||
**market_id** | **int** | | [optional]
|
||||
**ask_filter** | **int** | | [optional]
|
||||
**between_timestamps** | **str** | | [optional]
|
||||
**cursor** | **str** | | [optional]
|
||||
**limit** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_inactive_orders import ReqGetAccountInactiveOrders
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountInactiveOrders from a JSON string
|
||||
req_get_account_inactive_orders_instance = ReqGetAccountInactiveOrders.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountInactiveOrders.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_inactive_orders_dict = req_get_account_inactive_orders_instance.to_dict()
|
||||
# create an instance of ReqGetAccountInactiveOrders from a dict
|
||||
req_get_account_inactive_orders_from_dict = ReqGetAccountInactiveOrders.from_dict(req_get_account_inactive_orders_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetAccountLimits
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_limits import ReqGetAccountLimits
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountLimits from a JSON string
|
||||
req_get_account_limits_instance = ReqGetAccountLimits.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountLimits.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_limits_dict = req_get_account_limits_instance.to_dict()
|
||||
# create an instance of ReqGetAccountLimits from a dict
|
||||
req_get_account_limits_from_dict = ReqGetAccountLimits.from_dict(req_get_account_limits_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# ReqGetAccountMetadata
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
**auth** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_metadata import ReqGetAccountMetadata
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountMetadata from a JSON string
|
||||
req_get_account_metadata_instance = ReqGetAccountMetadata.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountMetadata.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_metadata_dict = req_get_account_metadata_instance.to_dict()
|
||||
# create an instance of ReqGetAccountMetadata from a dict
|
||||
req_get_account_metadata_from_dict = ReqGetAccountMetadata.from_dict(req_get_account_metadata_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# ReqGetAccountPnL
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | | [optional]
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
**resolution** | **str** | |
|
||||
**start_timestamp** | **int** | |
|
||||
**end_timestamp** | **int** | |
|
||||
**count_back** | **int** | |
|
||||
**ignore_transfers** | **bool** | | [optional] [default to False]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_pn_l import ReqGetAccountPnL
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountPnL from a JSON string
|
||||
req_get_account_pn_l_instance = ReqGetAccountPnL.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountPnL.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_pn_l_dict = req_get_account_pn_l_instance.to_dict()
|
||||
# create an instance of ReqGetAccountPnL from a dict
|
||||
req_get_account_pn_l_from_dict = ReqGetAccountPnL.from_dict(req_get_account_pn_l_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ReqGetAccountTxs
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**index** | **int** | | [optional]
|
||||
**limit** | **int** | | [optional]
|
||||
**by** | **str** | | [optional]
|
||||
**value** | **str** | | [optional]
|
||||
**types** | **List[int]** | | [optional]
|
||||
**auth** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_account_txs import ReqGetAccountTxs
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetAccountTxs from a JSON string
|
||||
req_get_account_txs_instance = ReqGetAccountTxs.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetAccountTxs.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_account_txs_dict = req_get_account_txs_instance.to_dict()
|
||||
# create an instance of ReqGetAccountTxs from a dict
|
||||
req_get_account_txs_from_dict = ReqGetAccountTxs.from_dict(req_get_account_txs_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetBlock
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_block import ReqGetBlock
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetBlock from a JSON string
|
||||
req_get_block_instance = ReqGetBlock.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetBlock.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_block_dict = req_get_block_instance.to_dict()
|
||||
# create an instance of ReqGetBlock from a dict
|
||||
req_get_block_from_dict = ReqGetBlock.from_dict(req_get_block_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetBlockTxs
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_block_txs import ReqGetBlockTxs
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetBlockTxs from a JSON string
|
||||
req_get_block_txs_instance = ReqGetBlockTxs.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetBlockTxs.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_block_txs_dict = req_get_block_txs_instance.to_dict()
|
||||
# create an instance of ReqGetBlockTxs from a dict
|
||||
req_get_block_txs_from_dict = ReqGetBlockTxs.from_dict(req_get_block_txs_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetByAccount
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**by** | **str** | |
|
||||
**value** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_by_account import ReqGetByAccount
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetByAccount from a JSON string
|
||||
req_get_by_account_instance = ReqGetByAccount.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetByAccount.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_by_account_dict = req_get_by_account_instance.to_dict()
|
||||
# create an instance of ReqGetByAccount from a dict
|
||||
req_get_by_account_from_dict = ReqGetByAccount.from_dict(req_get_by_account_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ReqGetCandlesticks
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**resolution** | **str** | |
|
||||
**start_timestamp** | **int** | |
|
||||
**end_timestamp** | **int** | |
|
||||
**count_back** | **int** | |
|
||||
**set_timestamp_to_end** | **bool** | | [optional] [default to False]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_candlesticks import ReqGetCandlesticks
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetCandlesticks from a JSON string
|
||||
req_get_candlesticks_instance = ReqGetCandlesticks.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetCandlesticks.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_candlesticks_dict = req_get_candlesticks_instance.to_dict()
|
||||
# create an instance of ReqGetCandlesticks from a dict
|
||||
req_get_candlesticks_from_dict = ReqGetCandlesticks.from_dict(req_get_candlesticks_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# ReqGetDepositHistory
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
**l1_address** | **str** | |
|
||||
**cursor** | **str** | | [optional]
|
||||
**filter** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_deposit_history import ReqGetDepositHistory
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetDepositHistory from a JSON string
|
||||
req_get_deposit_history_instance = ReqGetDepositHistory.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetDepositHistory.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_deposit_history_dict = req_get_deposit_history_instance.to_dict()
|
||||
# create an instance of ReqGetDepositHistory from a dict
|
||||
req_get_deposit_history_from_dict = ReqGetDepositHistory.from_dict(req_get_deposit_history_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetFastWithdrawInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_fast_withdraw_info import ReqGetFastWithdrawInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetFastWithdrawInfo from a JSON string
|
||||
req_get_fast_withdraw_info_instance = ReqGetFastWithdrawInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetFastWithdrawInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_fast_withdraw_info_dict = req_get_fast_withdraw_info_instance.to_dict()
|
||||
# create an instance of ReqGetFastWithdrawInfo from a dict
|
||||
req_get_fast_withdraw_info_from_dict = ReqGetFastWithdrawInfo.from_dict(req_get_fast_withdraw_info_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# ReqGetFundings
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**resolution** | **str** | |
|
||||
**start_timestamp** | **int** | |
|
||||
**end_timestamp** | **int** | |
|
||||
**count_back** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_fundings import ReqGetFundings
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetFundings from a JSON string
|
||||
req_get_fundings_instance = ReqGetFundings.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetFundings.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_fundings_dict = req_get_fundings_instance.to_dict()
|
||||
# create an instance of ReqGetFundings from a dict
|
||||
req_get_fundings_from_dict = ReqGetFundings.from_dict(req_get_fundings_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetL1Metadata
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
**l1_address** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_l1_metadata import ReqGetL1Metadata
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetL1Metadata from a JSON string
|
||||
req_get_l1_metadata_instance = ReqGetL1Metadata.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetL1Metadata.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_l1_metadata_dict = req_get_l1_metadata_instance.to_dict()
|
||||
# create an instance of ReqGetL1Metadata from a dict
|
||||
req_get_l1_metadata_from_dict = ReqGetL1Metadata.from_dict(req_get_l1_metadata_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReqGetL1Tx
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**hash** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_l1_tx import ReqGetL1Tx
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetL1Tx from a JSON string
|
||||
req_get_l1_tx_instance = ReqGetL1Tx.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetL1Tx.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_l1_tx_dict = req_get_l1_tx_instance.to_dict()
|
||||
# create an instance of ReqGetL1Tx from a dict
|
||||
req_get_l1_tx_from_dict = ReqGetL1Tx.from_dict(req_get_l1_tx_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReqGetLatestDeposit
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**l1_address** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_latest_deposit import ReqGetLatestDeposit
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetLatestDeposit from a JSON string
|
||||
req_get_latest_deposit_instance = ReqGetLatestDeposit.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetLatestDeposit.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_latest_deposit_dict = req_get_latest_deposit_instance.to_dict()
|
||||
# create an instance of ReqGetLatestDeposit from a dict
|
||||
req_get_latest_deposit_from_dict = ReqGetLatestDeposit.from_dict(req_get_latest_deposit_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# ReqGetLiquidationInfos
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | made optional to support header auth clients | [optional]
|
||||
**account_index** | **int** | |
|
||||
**market_id** | **int** | | [optional]
|
||||
**cursor** | **str** | | [optional]
|
||||
**limit** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_liquidation_infos import ReqGetLiquidationInfos
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetLiquidationInfos from a JSON string
|
||||
req_get_liquidation_infos_instance = ReqGetLiquidationInfos.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetLiquidationInfos.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_liquidation_infos_dict = req_get_liquidation_infos_instance.to_dict()
|
||||
# create an instance of ReqGetLiquidationInfos from a dict
|
||||
req_get_liquidation_infos_from_dict = ReqGetLiquidationInfos.from_dict(req_get_liquidation_infos_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetNextNonce
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**account_index** | **int** | |
|
||||
**api_key_index** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_next_nonce import ReqGetNextNonce
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetNextNonce from a JSON string
|
||||
req_get_next_nonce_instance = ReqGetNextNonce.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetNextNonce.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_next_nonce_dict = req_get_next_nonce_instance.to_dict()
|
||||
# create an instance of ReqGetNextNonce from a dict
|
||||
req_get_next_nonce_from_dict = ReqGetNextNonce.from_dict(req_get_next_nonce_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReqGetOrderBookDetails
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_order_book_details import ReqGetOrderBookDetails
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetOrderBookDetails from a JSON string
|
||||
req_get_order_book_details_instance = ReqGetOrderBookDetails.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetOrderBookDetails.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_order_book_details_dict = req_get_order_book_details_instance.to_dict()
|
||||
# create an instance of ReqGetOrderBookDetails from a dict
|
||||
req_get_order_book_details_from_dict = ReqGetOrderBookDetails.from_dict(req_get_order_book_details_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ReqGetOrderBookOrders
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | |
|
||||
**limit** | **int** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_order_book_orders import ReqGetOrderBookOrders
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetOrderBookOrders from a JSON string
|
||||
req_get_order_book_orders_instance = ReqGetOrderBookOrders.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetOrderBookOrders.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_order_book_orders_dict = req_get_order_book_orders_instance.to_dict()
|
||||
# create an instance of ReqGetOrderBookOrders from a dict
|
||||
req_get_order_book_orders_from_dict = ReqGetOrderBookOrders.from_dict(req_get_order_book_orders_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# ReqGetOrderBooks
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**market_id** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_order_books import ReqGetOrderBooks
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetOrderBooks from a JSON string
|
||||
req_get_order_books_instance = ReqGetOrderBooks.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetOrderBooks.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_order_books_dict = req_get_order_books_instance.to_dict()
|
||||
# create an instance of ReqGetOrderBooks from a dict
|
||||
req_get_order_books_from_dict = ReqGetOrderBooks.from_dict(req_get_order_books_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ReqGetPositionFunding
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | | [optional]
|
||||
**account_index** | **int** | |
|
||||
**market_id** | **int** | | [optional]
|
||||
**cursor** | **str** | | [optional]
|
||||
**limit** | **int** | |
|
||||
**side** | **str** | | [optional] [default to 'all']
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_position_funding import ReqGetPositionFunding
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetPositionFunding from a JSON string
|
||||
req_get_position_funding_instance = ReqGetPositionFunding.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetPositionFunding.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_position_funding_dict = req_get_position_funding_instance.to_dict()
|
||||
# create an instance of ReqGetPositionFunding from a dict
|
||||
req_get_position_funding_from_dict = ReqGetPositionFunding.from_dict(req_get_position_funding_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)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# ReqGetPublicPools
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**auth** | **str** | | [optional]
|
||||
**filter** | **str** | | [optional]
|
||||
**index** | **int** | |
|
||||
**limit** | **int** | |
|
||||
**account_index** | **int** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from lighter.models.req_get_public_pools import ReqGetPublicPools
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ReqGetPublicPools from a JSON string
|
||||
req_get_public_pools_instance = ReqGetPublicPools.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ReqGetPublicPools.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
req_get_public_pools_dict = req_get_public_pools_instance.to_dict()
|
||||
# create an instance of ReqGetPublicPools from a dict
|
||||
req_get_public_pools_from_dict = ReqGetPublicPools.from_dict(req_get_public_pools_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)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user