ad8dfa27d7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
715 B
Python
23 lines
715 B
Python
"""
|
|
Broker facade — routes all calls to either mt5_client or paper_client
|
|
depending on config.PAPER_TRADING. Import this module everywhere; never
|
|
import the underlying clients directly.
|
|
"""
|
|
|
|
from . import config
|
|
|
|
if config.PAPER_TRADING:
|
|
from .paper_client import ( # noqa: F401
|
|
connect, disconnect,
|
|
get_candles, get_tick, get_account_info,
|
|
get_open_positions, get_symbol_info, place_order,
|
|
ORDER_TYPE_BUY, ORDER_TYPE_SELL,
|
|
)
|
|
else:
|
|
from .mt5_client import ( # noqa: F401
|
|
connect, disconnect,
|
|
get_candles, get_tick, get_account_info,
|
|
get_open_positions, get_symbol_info, place_order,
|
|
ORDER_TYPE_BUY, ORDER_TYPE_SELL,
|
|
)
|