Skip to content

new updates#187

Open
bbalouki wants to merge 17 commits into
mainfrom
bbs-dev
Open

new updates#187
bbalouki wants to merge 17 commits into
mainfrom
bbs-dev

Conversation

@bbalouki

@bbalouki bbalouki commented Jun 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

bbalouki and others added 17 commits June 9, 2026 12:40
…ype hints

The _build_request filter excluded valid magic=0, deviation=0, sl=0.0, and
tp=0.0 values. Replaced the filter with an unconditional dict comprehension.
Also fixed the 'Invalide' typo in get_time() and added type annotations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
assert expr, ValueError(...) does not raise ValueError; it uses the
exception's string representation as the assertion message. Fixed with
an explicit guard using if/raise.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ount

- refresh() reloads live account data from the terminal mid-session
- __enter__/__exit__ enable 'with Account() as acc:' usage
- __repr__ and __str__ provide developer and user-facing representations
- Symbol info cache in get_symbol_info() avoids repeated terminal round-trips
- clear_symbol_cache() allows explicit cache invalidation
- Fixed null guard in get_currency_rates() to raise a clear error when symbol
  is not found instead of raising AttributeError on None
- Modernized all type hints to PEP 604/585 style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Retries decorated functions on InternalFailConnect or InternalFailTimeout
with configurable max_retries and exponential delay. Re-raises on the final
attempt to preserve the original exception.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p trade.py

The condition 'type != BMKT or type != SMKT' was always True, bypassing the
guard entirely. Fixed to 'and'. Also fixed 'loger' typo, double-space in
elif, and modernized all type hints to PEP 604/585.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'accountt_leverage' (double-t) was silently creating a new parameter
instead of binding to the intended one. Also modernized Optional/Union
type hints to PEP 604/585 style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
get_data_from_pos forwarded session_duration as a positional arg but
Rates.__init__ does not accept it, causing TypeError at runtime. Also
removed the 'object' base class and modernized type hints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The try/except around ConfigParser() caught and immediately re-raised,
adding no value. Removed it. Also modernized all List/Dict/Optional/Union
type hints to PEP 604/585 style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'raise e' resets the traceback to the re-raise site. Bare 'raise' keeps
the original call stack, making errors easier to diagnose.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ionType enum

int64_t_ONLY starts with a type-prefix token, making it an invalid
identifier. LONG_ONLY matches the MT5 constant semantics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… returns

- Added [[nodiscard]] to 32 value-returning virtual methods; shutdown()
  (void) is correctly left unannotated
- Fixed orders_total(), positions_total(), history_orders_total(), and
  history_deals_total() returning literal 0 instead of std::nullopt when
  handler is missing, corrupting the optional's has_value() state
- Fixed order_check() and order_send() returning empty structs instead of
  std::nullopt when handler is missing
- Added noexcept to shutdown()
- Updated doc comments to reflect std::nullopt semantics

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ValueError

Wrong-type values in the request dict (e.g. a string where int is expected)
previously propagated as a raw pybind11 cast_error. Now caught and re-raised
as a Python ValueError with the offending field name in the message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ixes

Added Account API section covering refresh(), context manager, symbol cache,
and retry_on_disconnect. Added What's New in 2.1.0 section summarising all
Python and C++ improvements made in this release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New Account features (refresh, context manager, repr/str, symbol cache)
and retry_on_disconnect constitute a minor version increment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bbalouki bbalouki requested a review from juniorep June 9, 2026 11:52
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