Click or drag to resize

MT5API Class

Main class to trade and get data
Inheritance Hierarchy
SystemObject
  mtapi.mt5MT5API

Namespace: mtapi.mt5
Assembly: mt5api (in mt5api.dll) Version: 5.3677.1.2
Syntax
public class MT5API

The MT5API type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyAccount Account information
Public propertyAccountCompanyName Company name
Public propertyAccountCurrency Account currency
Public propertyAccountEquity Account equity.
Public propertyAccountFreeMargin Account free margin
Public propertyAccountMargin Account used margin
Public propertyAccountMethod Netting or hedging
Public propertyAccountProfit Account profit
Public propertyClusterMembers Cluster members
Public propertyClusterSummary Cluster general information.
Public propertyCommonKey 
Public propertyConnected Check connection state.
Public propertyConnectTime Time when connected to server
Public propertyEnableAllOrderUpdates Enable order updates events Cancelling, Started, Filled, Unknown.
Public propertyHost Host
Public propertyId For user purposes
Public propertyLastQuoteTime Last quote time, refreshing goes with using incoming quotes.
Public propertyPassword Account Password
Public propertyPfxFile Certificate *.pfx file
Public propertyPfxFilePassword Pfx file password
Public propertyPort Port
Public propertyProcessServerMessagesInThread If you need so subscribe all symbols on each mt4 put 'true' to speed up application
Public propertyServerDetails Fresh server details recieved from server during connect.
Public propertyServerTime Server time, refreshing goes with using incoming quotes.
Public propertyServerTimeZoneInMinutes Offset from UTC in mionutes
Public propertyUser Account number
Top
Methods
 NameDescription
Public methodChangePassword 
Public methodConnect Connect to server.
Public methodConvertToTimeframe 
Public methodDisconnect Disconnect from server
Public methodDownloadOrderHistory Downaload order history.
Public methodDownloadQuoteHistoryMonth 
Public methodDownloadQuoteHistoryToday 
Public methodGetAskTickValue Tick value in base currency
Public methodGetBidTickValue Tick value in base currency
Public methodGetContractSize Contruct size
Public methodGetOpenedOrders Opened orders
Public methodGetQuote Latest quote for the symbol.
Public methodGetQuoteTask Latest quote for the symbol.
Public methodGetRequestId Get uniq request ID for async trading
Public methodGetTickSize Tick size
Public methodGetTickValue Tick value
Public methodIsQuoteSession 
Public methodIsSubscribed Check subscribe trading instrument.
Public methodIsTradeSession 
Public methodStatic memberLoadServersDat(Byte) Read server.dat
Public methodStatic memberLoadServersDat(String) Read server.dat
Public methodOrderClose Send order close request and wait for execution.
Public methodOrderCloseAsync Send order close request and don't wait execution. Use OnOrderProgress event to get result.
Public methodOrderModify Modify order
Public methodOrderModifyAsync OrderModifyAsync
Public methodOrderSend Send order and don't wait execution. Use OnOrderProgress event to get result.
Public methodOrderSendAsync Send order and don't wait execution. Use OnOrderProgress event to get result.
Public methodStatic memberRequestDemoAccount 
Public methodRequestOrderHistory(DateTime, DateTime) Reuest closed orders.
Public methodRequestOrderHistory(Int32, Int32, ListT) 
Public methodRequestQuoteHistoryMonth Request 1 minute bar hsitory for one month back from specifeid date
Public methodRequestQuoteHistoryToday Request 1 minute bar hsitory for today
Public methodRequestQuoteHistoryTodayInternal 
Public methodSubscribe(String) Subscribe trading instrument.
Public methodSubscribe(String) Subscribe trading instruments.
Public methodSubscriptions List of subscribed symbols
Public methodUnsubscribe(String) Unsubscribe trading instrument.
Public methodUnsubscribe(String) Unsubscribe trading instruments.
Public methodUpdateProfits 
Top
Events
 NameDescription
Public eventOnConnectProgress 
Public eventOnOrderHistory 
Public eventOnOrderProgress Open/close progress of the order before ticket number assign.
Public eventOnOrderUpdate 
Public eventOnQuote 
Public eventOnQuoteHistory Quote history event. Use RequestQuoteHistory to request history.
Public eventOnSymbolsUpdate 
Top
Fields
 NameDescription
Public fieldConnectTimeout Milliseconds. Throw ConnectException if not connected at this period.
Public fieldDownloadQuoteHistoryTimeout 
Public fieldExecutionTimeout Maximum ms to wait for execution
Public fieldGetQuoteTimeoutMs 
Public fieldLastServerMessageTime Local time of last server message.
Public fieldNoServerMessagesTimeout Force reconnect if no quotes for some number of milliseconds.
Public fieldPlacedType Manually or by expert
Public fieldProcessEventTimeoutMs 
Public fieldProxyEnable 
Public fieldProxyHost 
Public fieldProxyPassword 
Public fieldProxyPort 
Public fieldProxyType 
Public fieldProxyUser 
Public fieldServer Host
Public fieldSymbols Symbols information
Top
See Also