From 5fb66154691c622d4a05b0a05f7e84cc514c9381 Mon Sep 17 00:00:00 2001 From: purelualight Date: Thu, 23 Apr 2026 22:02:56 +0800 Subject: [PATCH] chore: fix some minor issues Signed-off-by: purelualight --- README.md | 2 +- examples/README.md | 6 +++--- lighter/api_client.py | 2 +- lighter/nonce_manager.py | 2 +- lighter/paper_client/types.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b0d9eee..e937eac 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Python SDK for Lighter -## Requirements. +## Requirements Python 3.8+ diff --git a/examples/README.md b/examples/README.md index 172319b..e7ab394 100644 --- a/examples/README.md +++ b/examples/README.md @@ -26,7 +26,7 @@ - `create_grouped_ioc_with_attached_sl_tp.py` - creates an ask (sell) IoC order for 0.1 ETH - - along w/ the order, it sets up a Stop Loss (SL) and a Take Profit (TP) order for the whole size of the order + - along with the order, it sets up a Stop Loss (SL) and a Take Profit (TP) order for the whole size of the order - the size of the SL/TP will be equal to the executed size of the order - the SL/TP orders are canceled when the sign of your position changes @@ -62,14 +62,14 @@ What about the order types? Just as normal orders, SL/TP orders trigger an order - `send_batch_tx_http.py` - sends multiple orders in a single HTTP request - `send_batch_tx_ws.py` - - sends multiple orders in a single WS request` + - sends multiple orders in a single WS request Batch TXs will be executed back to back, without the possibility of other TXs interfering. ## Spot Trading To trade spot markets, you need to have spot USDC. USDC used in your perpetual account will be used as collateral for your cross-positions. USDC deposited in the spot account can only be used to buy spot assets. -To transfer USDC between spot <> perp balance, or vice verse, check out +To transfer USDC between spot <> perp balance, or vice versa, check out - `spot_self_transfer_perp_spot.py` - `spot_self_transfer_spot_perp.py` diff --git a/lighter/api_client.py b/lighter/api_client.py index c3c5849..ce9314a 100644 --- a/lighter/api_client.py +++ b/lighter/api_client.py @@ -60,7 +60,7 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { 'int': int, - 'long': int, # TODO remove as only py3 is supported? + 'long': int, # TODO remove as only py3 is supported? 'float': float, 'str': str, 'bool': bool, diff --git a/lighter/nonce_manager.py b/lighter/nonce_manager.py index c2c6db6..bc78188 100644 --- a/lighter/nonce_manager.py +++ b/lighter/nonce_manager.py @@ -9,7 +9,7 @@ def get_nonce_from_api(client: ApiClient, account_index: int, api_key: int) -> int: - # uses request to avoid async initialization + # uses requests to avoid async initialization req = requests.get( client.configuration.host + "/api/v1/nextNonce", params={"account_index": account_index, "api_key_index": api_key}, diff --git a/lighter/paper_client/types.py b/lighter/paper_client/types.py index 52a88de..100a2e1 100644 --- a/lighter/paper_client/types.py +++ b/lighter/paper_client/types.py @@ -51,7 +51,7 @@ class PaperHealthStatus(IntEnum): # in real Lighter, accounts pass through TAV < MMR and TAV < COMR states, # but the paper sim collapses them. Liquidation runs atomically with every # mark update, so any position whose mark crosses liquidation_price is wiped - # in the same tick. + # in the same tick. BANKRUPTCY = 4 def utc_now() -> datetime: