Releases: Dexalot/dexalot-sdk-python
Releases · Dexalot/dexalot-sdk-python
v0.5.15
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-backedUtils.unit_conversion. FixesT-TMDQ-01rejections from inputs like2933.0whoseint(value * 10**18)silently truncated to2932999999999999737856. replace_ordernow 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/quotedisplaydecimalsreturnResult.failinstead of being silently rounded (silent rounding caused silent slippage — a stop at99.99quietly becoming99.9). A1e-10tolerance absorbs binary-float-representation noise (0.1 + 0.2, etc.). mintrade_amnt/maxtrade_amntenforced 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_tokennow use Decimal arithmetic for amount-to-wei conversion (same precision bug as CLOB).get_portfolio_balanceandget_all_portfolio_balancesnow use Decimal arithmetic for the wei-to-human display conversion, preserving precision for balances above ~2^53 wei.add_gas/remove_gasstandardized onUtils.unit_conversionfor idiom consistency.
Validators
validate_positive_floatrenamed tovalidate_positive_number; now acceptsDecimaland numericstrin addition toint/float(alias kept for one release). Callers wanting precision-exact arithmetic can passDecimal('2933')or'2933.5'.boolis explicitly rejected.
Security
- Pinned
idna >= 3.15(closes CVE-2026-45409) andurllib3 >= 2.7.0(closes PYSEC-2026-141, PYSEC-2026-142).pip-auditis 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.mdcpinning 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 passDecimalfor 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
v0.5.13
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