MT5Version

Return the MetaTrader 5 terminal version.

MT5Version()

Return Value

Returns the MetaTrader 5 terminal version, build and release date.

Note

The MT5Version() function returns connection status, trade server address and trading account number as a tuple.

The value is returned as a tuple of three values:

Type

Description

Sample value

integer

MetaTrader 5 terminal version

500

string

Build

'2007'

string

Build release date

'25 Feb 2019'

Example:

from datetime import datetime
from MetaTrader5 import *
 
# connect to MetaTrader 5
MT5Initialize()
# wait till MetaTrader 5 connects to the trade server
MT5WaitForTerminal()
# display data on connection status, server name and trading account
print(MT5TerminalInfo())
# display data on MetaTrader 5 version
print(MT5Version())
# shut down connection to the MetaTrader 5 terminal
MT5Shutdown()
Result:
>>> from datetime import datetime
>>> from MetaTrader5 import *
>>> MT5Initialize()
True
>>> MT5WaitForTerminal()
True
>>> print(MT5TerminalInfo())
[2, 'MetaQuotes-Demo', '16167573']
>>> print(MT5Version())
[500, 2009, '15 Mar 2019']
>>> MT5Shutdown()
True 

See also

MT5Initialize, MT5WaitForTerminal, MT5Shutdown, MT5TerminalInfo