How to get deposit and withdrawal record by code?

 
Hello, 
I am seeking a method to get deposit and withdrawal record by code. MT4 and mT5, any idea and experience share ? Many thanks. 
 
For MQL5, the deal type of "DEAL_TYPE_BALANCE" may be of use, but I have never used it, so have no experience with it.
 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Fernando Carreiro #:
For MQL5, the deal type of "DEAL_TYPE_BALANCE" may be of use, but I have never used it, so have no experience with it.
Alright, will try tonight later 
 
Yip Sin Hang #:
Alright, will try tonight later 
Will try to find for mt4 as well