PyMtApi5: implemented function MarketBookAdd, MarketBookRelease

This commit is contained in:
Vyacheslav Demidyuk
2025-01-23 23:28:55 +02:00
parent 9f4a247048
commit 7a7d1f33d9
2 changed files with 28 additions and 0 deletions
+10
View File
@@ -366,6 +366,16 @@ class Mt5ApiClient:
return (res["Result"]["From"], res["Result"]["To"])
return None
# MarketBookAdd
def market_book_add(self, symbol: str):
cmd_params = {"Symbol": symbol}
return self.__send_command(self.__get_default_expert(), Mt5CommandType.MarketBookAdd, cmd_params)
# MarketBookRelease
def market_book_release(self, symbol: str):
cmd_params = {"Symbol": symbol}
return self.__send_command(self.__get_default_expert(), Mt5CommandType.MarketBookRelease, cmd_params)
# Private methods
def __event_thread_func(self):