All URIs are relative to https://mainnet.zklighter.elliot.ai
| Method | HTTP request | Description |
|---|---|---|
| account_active_orders | GET /api/v1/accountActiveOrders | accountActiveOrders |
| account_inactive_orders | GET /api/v1/accountInactiveOrders | accountInactiveOrders |
| asset_details | GET /api/v1/assetDetails | assetDetails |
| exchange_metrics | GET /api/v1/exchangeMetrics | exchangeMetrics |
| exchange_stats | GET /api/v1/exchangeStats | exchangeStats |
| execute_stats | GET /api/v1/executeStats | executeStats |
| export | GET /api/v1/export | export |
| order_book_details | GET /api/v1/orderBookDetails | orderBookDetails |
| order_book_orders | GET /api/v1/orderBookOrders | orderBookOrders |
| order_books | GET /api/v1/orderBooks | orderBooks |
| recent_trades | GET /api/v1/recentTrades | recentTrades |
| trades | GET /api/v1/trades | trades |
Orders account_active_orders(account_index, market_id, authorization=authorization, auth=auth)
accountActiveOrders
Get account active orders. auth can be generated using the SDK.
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)| 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] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
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)| 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] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetDetails asset_details(asset_id=asset_id)
assetDetails
Get asset details
import lighter
from lighter.models.asset_details import AssetDetails
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)
asset_id = 0 # int | (optional) (default to 0)
try:
# assetDetails
api_response = await api_instance.asset_details(asset_id=asset_id)
print("The response of OrderApi->asset_details:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrderApi->asset_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| asset_id | int | [optional] [default to 0] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespGetExchangeMetrics exchange_metrics(period, kind, filter=filter, value=value)
exchangeMetrics
Get exchange metrics
import lighter
from lighter.models.resp_get_exchange_metrics import RespGetExchangeMetrics
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)
period = 'period_example' # str |
kind = 'kind_example' # str |
filter = 'filter_example' # str | (optional)
value = 'value_example' # str | (optional)
try:
# exchangeMetrics
api_response = await api_instance.exchange_metrics(period, kind, filter=filter, value=value)
print("The response of OrderApi->exchange_metrics:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrderApi->exchange_metrics: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| period | str | ||
| kind | str | ||
| filter | str | [optional] | |
| value | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExchangeStats exchange_stats()
exchangeStats
Get exchange stats
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)This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespGetExecuteStats execute_stats(period)
executeStats
Get execute stats
import lighter
from lighter.models.resp_get_execute_stats import RespGetExecuteStats
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)
period = 'period_example' # str |
try:
# executeStats
api_response = await api_instance.execute_stats(period)
print("The response of OrderApi->execute_stats:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrderApi->execute_stats: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| period | str |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExportData export(type, authorization=authorization, auth=auth, account_index=account_index, market_id=market_id, start_timestamp=start_timestamp, end_timestamp=end_timestamp, side=side, role=role, trade_type=trade_type)
export
Export data
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 | make required after integ is done (optional)
auth = 'auth_example' # str | made optional to support header auth clients (optional)
account_index = -1 # int | (optional) (default to -1)
market_id = 255 # int | (optional) (default to 255)
start_timestamp = 56 # int | (optional)
end_timestamp = 56 # int | (optional)
side = all # str | (optional) (default to all)
role = all # str | (optional) (default to all)
trade_type = all # str | (optional) (default to all)
try:
# export
api_response = await api_instance.export(type, authorization=authorization, auth=auth, account_index=account_index, market_id=market_id, start_timestamp=start_timestamp, end_timestamp=end_timestamp, side=side, role=role, trade_type=trade_type)
print("The response of OrderApi->export:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrderApi->export: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| type | str | ||
| authorization | str | make required after integ is done | [optional] |
| auth | str | made optional to support header auth clients | [optional] |
| account_index | int | [optional] [default to -1] | |
| market_id | int | [optional] [default to 255] | |
| start_timestamp | int | [optional] | |
| end_timestamp | int | [optional] | |
| side | str | [optional] [default to all] | |
| role | str | [optional] [default to all] | |
| trade_type | str | [optional] [default to all] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrderBookDetails order_book_details(market_id=market_id, filter=filter)
orderBookDetails
Get order books metadata
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)
filter = all # str | (optional) (default to all)
try:
# orderBookDetails
api_response = await api_instance.order_book_details(market_id=market_id, filter=filter)
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)| Name | Type | Description | Notes |
|---|---|---|---|
| market_id | int | [optional] [default to 255] | |
| filter | str | [optional] [default to all] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrderBookOrders order_book_orders(market_id, limit)
orderBookOrders
Get order book orders
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)| Name | Type | Description | Notes |
|---|---|---|---|
| market_id | int | ||
| limit | int |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrderBooks order_books(market_id=market_id, filter=filter)
orderBooks
Get order books metadata.
Response Description:
1) Taker and maker fees are in percentage.
2) Min base amount: The amount of base token that can be traded in a single order.
3) Min quote amount: The amount of quote token that can be traded in a single order.
4) Supported size decimals: The number of decimal places that can be used for the size of the order.
5) Supported price decimals: The number of decimal places that can be used for the price of the order.
6) Supported quote decimals: Size Decimals + Quote Decimals.
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)
filter = all # str | (optional) (default to all)
try:
# orderBooks
api_response = await api_instance.order_books(market_id=market_id, filter=filter)
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)| Name | Type | Description | Notes |
|---|---|---|---|
| market_id | int | [optional] [default to 255] | |
| filter | str | [optional] [default to all] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Trades recent_trades(market_id, limit)
recentTrades
Get recent trades
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)| Name | Type | Description | Notes |
|---|---|---|---|
| market_id | int | ||
| limit | int |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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, role=role, type=type, aggregate=aggregate)
trades
Get trades
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 | 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)
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)
role = all # str | (optional) (default to all)
type = all # str | (optional) (default to all)
aggregate = False # bool | (optional) (default to False)
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, role=role, type=type, aggregate=aggregate)
print("The response of OrderApi->trades:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrderApi->trades: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| sort_by | str | ||
| 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] | |
| 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] | |
| role | str | [optional] [default to all] | |
| type | str | [optional] [default to all] | |
| aggregate | bool | [optional] [default to False] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A successful response. | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]