Skip to content

Releases: Dexalot/dexalot-sdk-python

v0.5.15

26 May 20:49
997dd07

Choose a tag to compare

What's Changed

Precision and security release covering CLOB, TRANSFER, and dependencies.

CLOB

  • All four write paths (add_order, add_limit_order_list, replace_order, cancel_add_list) now route amount/price encoding through Decimal-backed Utils.unit_conversion. Fixes T-TMDQ-01 rejections from inputs like 2933.0 whose int(value * 10**18) silently truncated to 2932999999999999737856.
  • replace_order now applies the display-decimal precision gate it previously skipped, matching the other three write paths.
  • Display-decimal precision is now enforced via REJECT-with-tolerance: inputs whose precision exceeds the pair's basedisplaydecimals / quotedisplaydecimals return Result.fail instead of being silently rounded (silent rounding caused silent slippage — a stop at 99.99 quietly becoming 99.9). A 1e-10 tolerance absorbs binary-float-representation noise (0.1 + 0.2, etc.).
  • mintrade_amnt / maxtrade_amnt enforced client-side as quote-token notional bounds before any on-chain submission.
  • Pairs whose metadata omits display decimals are now dropped at ingest with a WARNING instead of silently defaulting to 18 (which would mask contract rejections downstream).

TRANSFER

  • transfer_portfolio, deposit, withdraw, get_deposit_bridge_fee, transfer_token now use Decimal arithmetic for amount-to-wei conversion (same precision bug as CLOB).
  • get_portfolio_balance and get_all_portfolio_balances now use Decimal arithmetic for the wei-to-human display conversion, preserving precision for balances above ~2^53 wei.
  • add_gas / remove_gas standardized on Utils.unit_conversion for idiom consistency.

Validators

  • validate_positive_float renamed to validate_positive_number; now accepts Decimal and numeric str in addition to int / float (alias kept for one release). Callers wanting precision-exact arithmetic can pass Decimal('2933') or '2933.5'. bool is explicitly rejected.

Security

  • Pinned idna >= 3.15 (closes CVE-2026-45409) and urllib3 >= 2.7.0 (closes PYSEC-2026-141, PYSEC-2026-142). pip-audit is clean.

Docs

  • New README "Amount Precision and Display Decimals" section.
  • Six new CLAUDE.md entries under "Non-Obvious Decisions" covering the precision contract.
  • New .cursor/rules/precision-decimal-arithmetic.mdc pinning the helper-usage rule for all SDK source files.
  • Remediation plan entries O-1 through O-8 marked Resolved.

Behavioural changes

  • Inputs whose precision exceeds the pair's display decimals now return Result.fail(...) instead of being silently rounded. Callers must round explicitly or pass Decimal for full precision.
  • Orders outside [min_trade_amount, max_trade_amount] now fail in the SDK before any on-chain submission.
  • Pairs whose API record omits display decimals are no longer present in client.pairs.

PR: #8
Full Changelog: v0.5.14...v0.5.15

v0.5.14

09 May 20:56
364d5aa

Choose a tag to compare

What's Changed

  • Promote SDK to beta status (0.5.14): swap RFQ defects fixed, error info surfaced by @ngurmen in #7

Full Changelog: v0.5.13...v0.5.14

v0.5.13

29 Apr 17:57
0487ca9

Choose a tag to compare

What's Changed

  • chore: Prepare repo for PyPi distribution by @ngurmen in #1
  • docs: Add release workflow and tagging instructions by @ngurmen in #2
  • feat: SDK helpers for CLOB market data and chain token balances by @ngurmen in #3
  • feat: CI workflow, security gates, and Python 3.13/3.14 support by @ngurmen in #4
  • chore: release 0.5.13 + tighten CI security gates by @ngurmen in #5
  • build(release): upgrade pip in pypi.yml build tooling step by @ngurmen in #6

New Contributors

Full Changelog: v0.5.12...v0.5.13