Changelog
v1.1.0 (2026-11-14)
Serialize requests sharing a command ID and isolate a connection after a timeout, cancellation, or send failure when sending may have begun. Late responses cannot complete later requests on that connection; the server-side result of an interrupted trade remains unknown and requires reconciliation.
Harden reconnect, close, disconnect-callback, and subscription-restoration lifecycle handling, with expanded offline regression coverage for connection generations and disconnect races.
Validate tick subscribe/unsubscribe response codes and retain the last confirmed local subscription set after rejection. A server can still reject removal of the final tick subscription; cleanup rejection is not success.
Extend observed build 6320 login and symbol-detail compatibility while keeping tick-price and historical-rate compatibility controls explicit. Observations from one server build do not certify another broker or build.
Add complete English and Simplified Chinese documentation, environment-based example credentials, and task-oriented safety, reliability, and troubleshooting guides.
Verify release tags against bilingual changelogs and source version fallbacks. Publish the same wheel/sdist artifacts that passed metadata and clean-wheel installation checks, and attach them to the GitHub Release.
v1.0.4 (2026-11-13)
Send a browser-compatible User-Agent during WebSocket connection setup for Web Terminal gateways that reject the default Python client identity.
Report nonzero login response codes as authentication errors. A truncated successful response remains a protocol error.
Reject repeated login on an active client; successful logout clears stored reconnect credentials. Serialize login, logout and close, and clean up failed reconnect attempts before retrying.
Reject nonzero rate response codes, ambiguous response lengths, and lengths that do not match the selected historical rate format. Configure
rate_bar_formator passbar_formatto select a known format explicitly.Preserve the legacy trade request layout by default. Add the opt-in
build_6090profile andTRADE_ACTION_MARKET_DEALfor the reported market execution format; callers can explicitly supplyaction_idandtype_flags.Reject invalid close-position IDs and stop automatic closing when the position, direction or matching symbol cannot be established.
The build 6090 profile is based on a contributor’s reported demo observations; this release has not independently verified broker compatibility.
v1.0.3 (2026-11-13)
Publish the project as
mt5-web-clienton PyPI; the Python import remainspymt5.
v1.0.1 (2026-04-02)
Fixed tick price normalization and partial tick update merging.
v1.0.0 (2026-03-21)
Production stable release
Fixed critical rate limiter cancellation safety bug —
acquire()is now fully cancellation-safe with lock held only during token checkFixed transport future leak on timeout — pending futures are now cleaned up when cancelled
Fixed disconnect callback race condition — close/recv_loop disconnect now serialized with
asyncio.LockReplaced
assertwith explicitSessionErrorfor missing credentials on reconnectImproved credential clearing — password is zero-filled before discard
Fixed silent error swallowing during logout in
close()— now logs at DEBUG levelFixed tick cache race condition — switched to
setdefault()for atomic deque creationFixed callback error handler isolation — individual handler failures no longer break the handler chain
Strengthened order validation — added checks for MODIFY, REMOVE, SLTP, CLOSE_BY actions; added SL/TP non-negative checks and volume overflow guard
Added configurable tick history limits with LRU eviction (
max_tick_symbolsparameter,clear_tick_history()method)Code formatting cleanup across all source files
1020+ offline unit tests, 99% test coverage
v0.9.0 (2026-03-20)
Currency mixin extraction, typed events, order manager, connection pool, protocol documentation
v0.8.0 (2026-03-19)
Major refactor — mixin architecture, custom exceptions, 99% test coverage
v0.7.0 (2026-03-17)
Added frontend-aligned onboarding commands:
request_opening_verification(cmd=27 structured flow),submit_opening_verification(cmd=40),open_demo_account(cmd=30),open_real_account(cmd=39)Added TOTP management helpers:
enable_otp/disable_otp(cmd=43)Added account-opening result dataclasses and document payload support
Added
propType=9time encoding support to the protocol codec for real-account birth-date serializationAdded experimental
send_bootstrap_command_52()helper for the only currently observable reserved command with repeatable live behaviorAdded official
MetaTrader5-style compatibility helpers for session, symbols, rates, orders/positions/history, DOM, andorder_send()Added best-effort local-formula compatibility helpers:
last_error(),order_calc_profit(),order_calc_margin()Added cached tick-history compatibility helpers:
copy_ticks_from()andcopy_ticks_range()over observedcmd=8pushesAdded local
order_check()compatibility pre-flight using symbol rules, cached prices, and local margin estimationExpanded
cmd=3account parsing to expose server/company/timezone and rights metadata from the current frontend account header, plus trade settings, leverage rules, and commission tablesAdded a conservative
terminal_info()compatibility helper derived fromcmd=3account/server metadataAdded a best-effort
version()compatibility helper that returns(500, build, release_date)fromcmd=3plus observed public Web Terminal build metadataTightened
mypycompatibility inclient.pyby making client-side error helpers and parsed schedule structures explicitly typedAdded
make checkandmake package-checktargets to mirror the main local CI preflight steps, including offlinebuild --no-isolationpackage verification andtwine checkmetadata validationExpanded
cmd=18symbol parsing to the current frontend schema, including bondface_value/accrued_interestplus nested trade settings, schedule, and subscription sectionsAdded best-effort bond profit/margin formulas for trade calc modes
37and39Fixed
cmd=22order-book subscription payloads to match the frontend’scount + symbol_idsformatRe-verified the public Web Terminal command surface against build 5687 (built on 2026-03-15)
v0.5.0 (2026-03-12)
New commands:
get_account(cmd=3),get_symbol_groups(cmd=9),get_spreads(cmd=20),subscribe_book(cmd=22),get_corporate_links(cmd=44)New push handlers:
on_trade_transaction(cmd=10),on_account_update(cmd=14),on_symbol_details(cmd=17),on_trade_result(cmd=19),on_book_update(cmd=23)Trading: All 9 order types including stop-limit, close-by, modify, cancel
TradeResult dataclass with retcode, description, deal, order, volume, price
AccountInfo dataclass with balance, equity, margin, leverage
SymbolInfo dataclass with name, symbol_id, digits, description
Symbol cache:
load_symbols(),get_symbol_info(),get_symbol_id()Auto reconnect with exponential backoff and credential re-use
Auto heartbeat with configurable interval
104 offline unit tests
CI/CD with GitHub Actions (Python 3.11/3.12/3.13 × Linux/macOS/Windows)
Sphinx documentation with ReadTheDocs integration
v0.1.0 (2026-03-01)
Initial release
Bootstrap handshake and AES-CBC encryption
Login, logout, ping
Symbol list (plain and gzip-compressed)
Tick subscription and push
Historical OHLCV rates
Position and order retrieval
Trade history (deals)
Basic trade request