Skip to content

Update parameter types according to API docs#73

Merged
ex10ded merged 2 commits intox10xchange:starknetfrom
lethaale:params
Feb 2, 2026
Merged

Update parameter types according to API docs#73
ex10ded merged 2 commits intox10xchange:starknetfrom
lethaale:params

Conversation

@lethaale
Copy link
Contributor

https://api.docs.extended.exchange/#get-trades
params market is not required => set as Optional

https://api.docs.extended.exchange/#get-fees
params market is not required => set as Optional

https://api.docs.extended.exchange/#get-current-leverage
params market is not required => set as Optional

https://api.docs.extended.exchange/#get-candles-history
params limit is required => removed Optional

Copilot AI review requested due to automatic review settings January 21, 2026 13:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates parameter types in several API client methods to align with the official Extended Exchange API documentation. The changes make optional parameters that were incorrectly marked as required, and mark one previously optional parameter as required according to the API specification.

Changes:

  • Updated get_candles_history to make the limit parameter required (removed Optional)
  • Updated get_trades, get_fees, and get_leverage to make the market_names parameter optional
  • Added a helpful comment in an example file suggesting testnet configuration option

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
x10/perpetual/trading_client/markets_information_module.py Made limit parameter required in get_candles_history method
x10/perpetual/trading_client/account_module.py Made market_names parameter optional in get_trades, get_fees, and get_leverage methods
examples/01_create_limit_order.py Added clarifying comment about testnet configuration option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ex10ded
ex10ded previously approved these changes Jan 26, 2026
@ex10ded
Copy link
Contributor

ex10ded commented Jan 26, 2026

@lethaale thanks of this, it looks good - just one small issue, it's failing the linter check. Could you run black on the codebase to fix the issue

Run make lint
black --check --diff --target-version py310 --line-length 120 ./examples ./tests ./x10
--- /home/runner/work/python_sdk/python_sdk/examples/01_create_limit_order.py	2026-01-26 12:44:27.387955+00:00
+++ /home/runner/work/python_sdk/python_sdk/examples/01_create_limit_order.py	2026-01-26 12:44:43.599799+00:00
@@ -10,11 +10,11 @@
 from x10.perpetual.orders import OrderSide, TimeInForce
 from x10.perpetual.trading_client import PerpetualTradingClient
 
 LOGGER = logging.getLogger()
 MARKET_NAME = ETH_USD_MARKET
-ENDPOINT_CONFIG = MAINNET_CONFIG # replace with TESTNET_CONFIG for testnet
+ENDPOINT_CONFIG = MAINNET_CONFIG  # replace with TESTNET_CONFIG for testnet
 
 
 async def run_example():
     env_config = init_env()
     stark_account = StarkPerpetualAccount(
would reformat /home/runner/work/python_sdk/python_sdk/examples/01_create_limit_order.py

Oh no! 💥 💔 💥
1 file would be reformatted, 78 files would be left unchanged.
make: *** [Makefile:6: lint] Error 1
Error: Process completed with exit code 2.

@lethaale
Copy link
Contributor Author

lethaale commented Jan 26, 2026

Just pushed!

@ex10ded ex10ded merged commit 6f2cc43 into x10xchange:starknet Feb 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants