{"openapi":"3.0.3","info":{"title":"MetaRPC MT4 Client API","version":"1.0.0","description":"MetaRPC MT4 Client API \u2014 REST \u0026 WebSocket API specification for automated trading, quotes, and account management. Compatible with Postman, Insomnia, and Swagger UI."},"servers":[{"url":"https://mt4.mrpc.pro"}],"tags":[{"name":"Account Helper","description":"Account Helper operations"},{"name":"Charts","description":"Charts operations"},{"name":"Connection","description":"Connection operations"},{"name":"Demo Account","description":"Demo Account operations"},{"name":"Logs","description":"Logs operations"},{"name":"Market Info","description":"Market Info operations"},{"name":"Subscription Service","description":"Subscription Service operations"},{"name":"Trade Stats","description":"Trade Stats operations"},{"name":"Trading Helper","description":"Trading Helper operations"}],"paths":{"/ConnectEx":{"get":{"tags":["Connection"],"summary":"Creates terminal connection to the MT5 server by MT cluster name, waits for connection and returns Guid of it","description":"Creates terminal connection to the MT5 server by MT cluster name, waits for connection and returns Guid of it","operationId":"get-connectex","parameters":[{"name":"id","in":"header","required":false,"description":"Optional terminal identifier (GUID). Automatically generated by the server if omitted.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number. [Required]","schema":{"type":"integer","format":"int64","default":1124213727,"example":1124213727}},{"name":"password","in":"query","required":false,"description":"Password. [Required]","schema":{"type":"string","default":"1tjvjck","example":"1tjvjck"}},{"name":"mtClusterName","in":"query","required":false,"description":"MT cluster name. [Required]","schema":{"type":"string","default":"FreshForex-Demo","example":"FreshForex-Demo"}},{"name":"baseChartSymbol","in":"query","required":false,"description":"Base chart symbol [Optional]","schema":{"type":"string"}},{"name":"expertsToAdd","in":"query","required":false,"description":"EA files to add to terminal instance [Optional]","schema":{"type":"array","items":{"type":"string"}}},{"name":"timeoutSeconds","in":"query","required":false,"description":"Time waiting for terminal being connected (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":false,"description":"Optional terminal name or creator identifier [Optional]","schema":{"type":"string"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectExReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"terminalInstanceGuid":{"type":"string"},"terminalType":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"terminalInstanceGuid":"string","terminalType":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Connect":{"get":{"tags":["Connection"],"summary":"Creates terminal connection to the MT4 server and returns Guid of it","description":"Creates terminal connection to the MT4 server and returns Guid of it","operationId":"get-connect","parameters":[{"name":"id","in":"header","required":false,"description":"Optional terminal identifier (GUID). Automatically generated by the server if omitted.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number. [Required]","schema":{"type":"integer","format":"int64","default":501401178,"example":501401178}},{"name":"password","in":"query","required":false,"description":"Password. [Required]","schema":{"type":"string","default":"v8gctta","example":"v8gctta"}},{"name":"host","in":"query","required":false,"description":"Host - ip address or dns name. [Required]","schema":{"type":"string","default":"mt4-demo.roboforex.com","example":"mt4-demo.roboforex.com"}},{"name":"port","in":"query","required":false,"description":"Port. [Required]","schema":{"type":"integer","format":"int32","default":443,"example":443}},{"name":"expertsToAdd","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}},{"name":"timeoutSeconds","in":"query","required":false,"description":"Time waiting for terminal being connected (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":false,"description":"Optional terminal name or creator identifier [Optional]","schema":{"type":"string"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"terminalInstanceGuid":{"type":"string"},"terminalType":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"terminalInstanceGuid":"string","terminalType":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectProxy":{"get":{"tags":["Connection"],"summary":"Connect to account with user, password, host, port.","description":"Connect to account with user, password, host, port.","operationId":"get-connectproxy","parameters":[{"name":"id","in":"header","required":false,"description":"Optional terminal identifier (GUID). Automatically generated by the server if omitted.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number. [Required]","schema":{"type":"integer","format":"int64","default":500476959,"example":500476959}},{"name":"password","in":"query","required":false,"description":"Password. [Required]","schema":{"type":"string","default":"ehj4bod","example":"ehj4bod"}},{"name":"host","in":"query","required":false,"description":"Host - ip address or dns name. [Required]","schema":{"type":"string","default":"mt4-demo.roboforex.com","example":"mt4-demo.roboforex.com"}},{"name":"port","in":"query","required":false,"description":"Port. [Required]","schema":{"type":"integer","format":"int32","default":443,"example":443}},{"name":"proxyUser","in":"query","required":false,"description":"Proxy user [Required]","schema":{"type":"string","default":"ProxyUser123","example":"ProxyUser123"}},{"name":"proxyPassword","in":"query","required":false,"description":"Proxy password [Required]","schema":{"type":"string","default":"qwerty123","example":"qwerty123"}},{"name":"proxyHost","in":"query","required":false,"description":"Proxy server ip address [Required]","schema":{"type":"string","default":"65.108.126.217","example":"65.108.126.217"}},{"name":"proxyPort","in":"query","required":false,"description":"Proxy port [Required]","schema":{"type":"integer","format":"int32","default":1080,"example":1080}},{"name":"proxyType","in":"query","required":false,"description":"Proxy type. Put \u0027Socks5\u0027 for default parameters [Required]","schema":{"type":"string","enum":["None","Https","Socks4","Socks5"],"default":"Socks5","example":"Socks5"}},{"name":"expertsToAdd","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}},{"name":"timeoutSeconds","in":"query","required":false,"description":"Time waiting for terminal being connected (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":false,"description":"Optional terminal name or creator identifier [Optional]","schema":{"type":"string"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectProxyReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uniqueIdentifier":{"type":"string"},"terminalType":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"uniqueIdentifier":"string","terminalType":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/CheckConnect":{"get":{"tags":["Connection"],"summary":"Checks if terminal connection to MT4 server is alive","description":"Checks if terminal connection to MT4 server is alive","operationId":"get-checkconnect","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"CheckConnectReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uniqueIdentifier":{"type":"string"},"healthCheck":{"type":"object","properties":{"isAlive":{"type":"boolean"},"apiIsAlive":{"type":"boolean"},"terminalIsConnectedToMtServer":{"type":"boolean"}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"uniqueIdentifier":"string","healthCheck":{"isAlive":false,"apiIsAlive":false,"terminalIsConnectedToMtServer":false}}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectState":{"get":{"tags":["Connection"],"summary":"Returns detailed live connection state of this terminal instance","description":"Returns detailed live connection state of this terminal instance","operationId":"get-connectstate","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"ConnectStateReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"isConnected":{"type":"boolean"},"isAlive":{"type":"boolean"},"apiIsAlive":{"type":"boolean"},"server":{"type":"string"},"account":{"type":"integer"},"errorMessage":{"type":"string"},"timestamp":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"id":"string","state":"string","isConnected":false,"isAlive":false,"apiIsAlive":false,"server":"string","account":0,"errorMessage":"string","timestamp":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OnConnectState":{"get":{"tags":["Connection"],"summary":"Streams real-time connection state changes for specified or visible terminals","description":"[WebSocket Stream] Streams real-time connection state changes for specified or visible terminals","operationId":"get-onconnectstate","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"terminalIds","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OnConnectStateReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"isConnected":{"type":"boolean"},"isAlive":{"type":"boolean"},"apiIsAlive":{"type":"boolean"},"server":{"type":"string"},"account":{"type":"integer"},"errorMessage":{"type":"string"},"timestamp":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"id":"string","state":"string","isConnected":false,"isAlive":false,"apiIsAlive":false,"server":"string","account":0,"errorMessage":"string","timestamp":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectionStatus":{"get":{"tags":["Connection"],"summary":"Deprecated alias for ConnectState","description":"Deprecated alias for ConnectState","operationId":"get-connectionstatus","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"ConnectionStatusReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"isConnected":{"type":"boolean"},"isAlive":{"type":"boolean"},"apiIsAlive":{"type":"boolean"},"server":{"type":"string"},"account":{"type":"integer"},"errorMessage":{"type":"string"},"state":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"id":"string","isConnected":false,"isAlive":false,"apiIsAlive":false,"server":"string","account":0,"errorMessage":"string","state":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Disconnect":{"get":{"tags":["Connection"],"summary":"Close terminal connection to MT4 server","description":"Close terminal connection to MT4 server","operationId":"get-disconnect","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"reason","in":"query","required":false,"description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"DisconnectReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uniqueIdentifier":{"type":"string"},"fullLifeTimeSeconds":{"type":"integer"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"uniqueIdentifier":"string","fullLifeTimeSeconds":0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Reconnect":{"get":{"tags":["Connection"],"summary":"If you need to recreate terminal instance with the same id","description":"If you need to recreate terminal instance with the same id","operationId":"get-reconnect","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"forceReconnection","in":"query","required":false,"description":"Recreate a terminal instance even if current instance is alive","schema":{"type":"boolean"}}],"responses":{"200":{"description":"ReconnectReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"terminalWasRecreated":{"type":"boolean"},"terminalType":{"type":"string"},"terminalInstanceGuid":{"type":"string"},"oldTerminalFullLiveTimeSeconds":{"type":"integer"},"oldLogFiles":{"type":"array","items":{"type":"object","properties":{"logType":{"type":"string"},"fullPath":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"terminalWasRecreated":false,"terminalType":"","terminalInstanceGuid":"string","oldTerminalFullLiveTimeSeconds":0,"oldLogFiles":[{"logType":"","fullPath":"string","name":"string","content":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectByToken":{"get":{"tags":["Connection"],"summary":"Rebuild a terminal instance from a previously-saved token_details_mt4 row.","description":"Rebuild a terminal instance from a previously-saved token_details_mt4 row. The id header names the terminal to bring back; every credential (User/Password/Server or Host\u002BPort, proxy settings, servers.dat bytes, PfxFile, HardwareId, Build) is read from the DB. Same reply as ConnectEx so callers do not need a separate result path.","operationId":"get-connectbytoken","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"baseChartSymbol","in":"query","required":false,"description":"override the base chart symbol [Optional]","schema":{"type":"string"}},{"name":"timeoutSeconds","in":"query","required":false,"description":"override how long to wait for the terminal (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectExReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"terminalInstanceGuid":{"type":"string"},"terminalType":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"terminalInstanceGuid":"string","terminalType":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/GetBrokerServersByBrokerName":{"get":{"tags":["Connection"],"summary":"/GetBrokerServersByBrokerName","description":"","operationId":"get-getbrokerserversbybrokername","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"BrokerName","in":"query","required":false,"description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"GetBrokerServersByBrokerNameReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"logoUrl":{"type":"string"},"site":{"type":"string"},"access":{"type":"array","items":{"type":"string"}}}}}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"result":[{"company":"string","results":[{"name":"string","logoUrl":"string","site":"string","access":["string"]}]}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/GetId":{"get":{"tags":["Connection"],"summary":"Generates a deterministic GUID from user and password.","description":"Generates a deterministic GUID from user and password. The same user/password combination always produces the same GUID. Use this GUID as the \u0027id\u0027 header for Connect and other endpoints.","operationId":"get-getid","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number [Required]","schema":{"type":"string","default":"1124213727","example":"1124213727"}},{"name":"password","in":"query","required":false,"description":"Account password [Required]","schema":{"type":"string","default":"1tjvjck","example":"1tjvjck"}}],"responses":{"200":{"description":"GetIdReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"id":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Screenshot":{"get":{"tags":["Connection"],"summary":"Captures a screenshot of the terminal instance window.","description":"Captures a screenshot of the terminal instance window. Handled by Terminal Manager: the per-terminal in-process responder grabs the MT4 window and the manager returns the image. Requires \u0027id\u0027 header.","operationId":"get-screenshot","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"ScreenshotReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"imageData":{"type":"string"},"displayNumber":{"type":"integer"},"terminalId":{"type":"string"},"contentType":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"imageData":"string","displayNumber":0,"terminalId":"string","contentType":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectStream":{"get":{"tags":["Connection"],"summary":"Same as Connect but streams real-time progress events (incl.","description":"[WebSocket Stream] Same as Connect but streams real-time progress events (incl. live Journal/ Experts log lines) while the connection is established. Optional \u0027id\u0027 header \u2014 automatically generated by the server if omitted. Swagger does not support streaming \u2014 use /connect-stream interactive viewer.","operationId":"get-connectstream","parameters":[{"name":"id","in":"header","required":false,"description":"Optional terminal identifier (GUID). Automatically generated by the server if omitted.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number. [Required]","schema":{"type":"integer","format":"int64"}},{"name":"password","in":"query","required":false,"description":"Password. [Required]","schema":{"type":"string"}},{"name":"host","in":"query","required":false,"description":"Host - ip address or dns name. [Required]","schema":{"type":"string"}},{"name":"port","in":"query","required":false,"description":"Port. [Required]","schema":{"type":"integer","format":"int32"}},{"name":"expertsToAdd","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}},{"name":"timeoutSeconds","in":"query","required":false,"description":"Time waiting for terminal being connected (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":false,"description":"Optional terminal name or creator identifier [Optional]","schema":{"type":"string"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectStreamEvent object","content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string"},"message":{"type":"string"},"level":{"type":"string"},"elapsedMs":{"type":"integer"},"timestamp":{"type":"string"},"isFinal":{"type":"boolean"},"connectData":{"type":"object","properties":{"terminalInstanceGuid":{"type":"string"},"terminalType":{"type":"string"}}},"errorData":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"step":"string","message":"string","level":"string","elapsedMs":0,"timestamp":"","isFinal":false,"connectData":{"terminalInstanceGuid":"string","terminalType":""},"errorData":{"type":"","errorCode":"string","errorMessage":"string","mqlErrorCode":"","mqlErrorIntCode":0,"mqlErrorDescription":"string","stackTrace":"string","commandTypeName":"string","commandId":0,"properties":[{"errorArgKey":"string","errorArgValue":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/ConnectExStream":{"get":{"tags":["Connection"],"summary":"Same as ConnectEx but streams real-time progress events (incl.","description":"[WebSocket Stream] Same as ConnectEx but streams real-time progress events (incl. live Journal/ Experts log lines) while the connection is established. Optional \u0027id\u0027 header \u2014 automatically generated by the server if omitted. Swagger does not support streaming \u2014 use /connect-stream interactive viewer.","operationId":"get-connectexstream","parameters":[{"name":"id","in":"header","required":false,"description":"Optional terminal identifier (GUID). Automatically generated by the server if omitted.","schema":{"type":"string"}},{"name":"user","in":"query","required":false,"description":"Account number. [Required]","schema":{"type":"integer","format":"int64","default":1124213727,"example":1124213727}},{"name":"password","in":"query","required":false,"description":"Password. [Required]","schema":{"type":"string","default":"1tjvjck","example":"1tjvjck"}},{"name":"mtClusterName","in":"query","required":false,"description":"MT cluster name. [Required]","schema":{"type":"string","default":"FreshForex-Demo","example":"FreshForex-Demo"}},{"name":"baseChartSymbol","in":"query","required":false,"description":"Base chart symbol [Optional]","schema":{"type":"string"}},{"name":"expertsToAdd","in":"query","required":false,"description":"EA files to add to terminal instance [Optional]","schema":{"type":"array","items":{"type":"string"}}},{"name":"timeoutSeconds","in":"query","required":false,"description":"Time waiting for terminal being connected (default 60) [Optional]","schema":{"type":"integer","format":"int32"}},{"name":"name","in":"query","required":false,"description":"Optional terminal name or creator identifier [Optional]","schema":{"type":"string"}},{"name":"expiration","in":"query","required":false,"description":"Optional terminal lifetime in minutes. 0 (default) = infinite (trial max 15 min). [Optional]","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"ConnectStreamEvent object","content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string"},"message":{"type":"string"},"level":{"type":"string"},"elapsedMs":{"type":"integer"},"timestamp":{"type":"string"},"isFinal":{"type":"boolean"},"connectData":{"type":"object","properties":{"terminalInstanceGuid":{"type":"string"},"terminalType":{"type":"string"}}},"errorData":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"step":"string","message":"string","level":"string","elapsedMs":0,"timestamp":"","isFinal":false,"connectData":{"terminalInstanceGuid":"string","terminalType":""},"errorData":{"type":"","errorCode":"string","errorMessage":"string","mqlErrorCode":"","mqlErrorIntCode":0,"mqlErrorDescription":"string","stackTrace":"string","commandTypeName":"string","commandId":0,"properties":[{"errorArgKey":"string","errorArgValue":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/AccountSummary":{"get":{"tags":["Account Helper"],"summary":"Some information about account","description":"Some information about account","operationId":"get-accountsummary","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"AccountSummaryReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accountLogin":{"type":"integer"},"accountBalance":{"type":"number"},"accountEquity":{"type":"number"},"accountUserName":{"type":"string"},"accountLeverage":{"type":"integer"},"accountTradeMode":{"type":"string"},"accountCompanyName":{"type":"string"},"accountCurrency":{"type":"string"},"serverTime":{"type":"string"},"accountCredit":{"type":"number"},"isInvestor":{"type":"boolean"},"utcServerTimeShiftMinutes":{"type":"integer"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"accountLogin":0,"accountBalance":0.0,"accountEquity":0.0,"accountUserName":"string","accountLeverage":0,"accountTradeMode":"","accountCompanyName":"string","accountCurrency":"string","serverTime":"","accountCredit":0.0,"isInvestor":false,"utcServerTimeShiftMinutes":0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OpenedOrders":{"get":{"tags":["Account Helper"],"summary":"List of opened orders","description":"List of opened orders","operationId":"get-openedorders","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"sortType","in":"query","required":false,"description":"","schema":{"type":"string","enum":["SORT_BY_OPEN_TIME_ASC","SORT_BY_OPEN_TIME_DESC","SORT_BY_ORDER_TICKET_ID_ASC","SORT_BY_ORDER_TICKET_ID_DESC"]}}],"responses":{"200":{"description":"OpenedOrdersReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"orderInfos":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string"},"commision":{"type":"number"},"expirationTime":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"profit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"ticket":{"type":"integer"},"positionIndex":{"type":"integer"},"orderType":{"type":"string"},"sortIndex":{"type":"integer"},"openTime":{"type":"string"},"accountLogin":{"type":"integer"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"orderInfos":[{"comment":"string","commision":0.0,"expirationTime":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"profit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"ticket":0,"positionIndex":0,"orderType":"","sortIndex":0,"openTime":"","accountLogin":0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OpenedOrdersTickets":{"get":{"tags":["Account Helper"],"summary":"List of opened orders tickets","description":"List of opened orders tickets","operationId":"get-openedorderstickets","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"OpenedOrdersTicketsReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"integer"}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"tickets":[0]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OrdersHistory":{"get":{"tags":["Account Helper"],"summary":"Orders history with pagination and open date filters","description":"Orders history with pagination and open date filters","operationId":"get-ordershistory","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"inputSortMode","in":"query","required":false,"description":"","schema":{"type":"string","enum":["HISTORY_SORT_BY_OPEN_TIME_ASC","HISTORY_SORT_BY_OPEN_TIME_DESC","HISTORY_SORT_BY_CLOSE_TIME_ASC","HISTORY_SORT_BY_CLOSE_TIME_DESC","HISTORY_SORT_BY_ORDER_TICKET_ID_ASC","HISTORY_SORT_BY_ORDER_TICKET_ID_DESC"]}},{"name":"inputFrom","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}},{"name":"inputTo","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}},{"name":"pageNumber","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}},{"name":"itemsPerPage","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OrdersHistoryReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ordersInfo":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"string"},"commision":{"type":"number"},"expirationTime":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"profit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"ticket":{"type":"integer"},"positionIndex":{"type":"integer"},"orderType":{"type":"string"},"sortIndex":{"type":"integer"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"closePrice":{"type":"number"},"accountLogin":{"type":"integer"}}}},"totalCount":{"type":"integer"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"ordersInfo":[{"comment":"string","commision":0.0,"expirationTime":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"profit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"ticket":0,"positionIndex":0,"orderType":"","sortIndex":0,"openTime":"","closeTime":"","closePrice":0.0,"accountLogin":0}],"totalCount":0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/SymbolParamsMany":{"get":{"tags":["Account Helper"],"summary":"Full information about exact symbol, or all symbols","description":"Full information about exact symbol, or all symbols","operationId":"get-symbolparamsmany","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbolName","in":"query","required":false,"description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"SymbolParamsManyReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbolInfos":{"type":"array","items":{"type":"object","properties":{"isSelected":{"type":"boolean"},"visible":{"type":"boolean"},"sessionDeals":{"type":"integer"},"sessionBuyOrders":{"type":"integer"},"sessionSellOrders":{"type":"integer"},"volume":{"type":"integer"},"volumeHigh":{"type":"integer"},"VolumeLow":{"type":"integer"},"Time":{"type":"integer"},"Digits":{"type":"integer"},"SpreadFloat":{"type":"boolean"},"TicksBookDepth":{"type":"integer"},"TradeCalcMode":{"type":"string"},"TradeMode":{"type":"string"},"StartTime":{"type":"string"},"ExpirationTime":{"type":"string"},"TradeStopsLevel":{"type":"integer"},"TradeFreezeLevel":{"type":"integer"},"TradeExeMode":{"type":"string"},"SwapMode":{"type":"integer"},"SwapRollover3Days":{"type":"integer"},"TheLast":{"type":"number"},"LastHigh":{"type":"number"},"LastLow":{"type":"number"},"Point":{"type":"number"},"TradeTickValue":{"type":"number"},"TradeTickValueProfit":{"type":"number"},"TradeTickValueLoss":{"type":"number"},"TradeTickSize":{"type":"number"},"TradeContractSize":{"type":"number"},"VolumeMin":{"type":"number"},"VolumeMax":{"type":"number"},"VolumeStep":{"type":"number"},"VolumeLimit":{"type":"number"},"SwapLong":{"type":"number"},"SwapShort":{"type":"number"},"MarginInitial":{"type":"number"},"MarginMaintenance":{"type":"number"},"MarginLong":{"type":"number"},"MarginShort":{"type":"number"},"MarginLimit":{"type":"number"},"MarginStop":{"type":"number"},"MarginStopLimit":{"type":"number"},"SessionVolume":{"type":"number"},"SessionTurnover":{"type":"number"},"SessionInterest":{"type":"number"},"SessionBuyOrdersVolume":{"type":"number"},"SessionSellOrdersVolume":{"type":"number"},"SessionOpen":{"type":"number"},"SessionClose":{"type":"number"},"SessionAW":{"type":"number"},"SessionPriceSettlement":{"type":"number"},"SessionPriceLimitMin":{"type":"number"},"SessionPriceLimitMax":{"type":"number"},"Bid":{"type":"number"},"BidHigh":{"type":"number"},"BidLow":{"type":"number"},"AskHigh":{"type":"number"},"AskLow":{"type":"number"},"CurrencyBase":{"type":"string"},"CurrencyProfit":{"type":"string"},"CurrencyMargin":{"type":"string"},"Bank":{"type":"string"},"SymDescription":{"type":"string"},"Isin":{"type":"string"},"Path":{"type":"string"},"SymbolName":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"symbolInfos":[{"isSelected":false,"visible":false,"sessionDeals":0,"sessionBuyOrders":0,"sessionSellOrders":0,"volume":0,"volumeHigh":0,"VolumeLow":0,"Time":0,"Digits":0,"SpreadFloat":false,"TicksBookDepth":0,"TradeCalcMode":"","TradeMode":"","StartTime":"","ExpirationTime":"","TradeStopsLevel":0,"TradeFreezeLevel":0,"TradeExeMode":"","SwapMode":0,"SwapRollover3Days":0,"TheLast":0.0,"LastHigh":0.0,"LastLow":0.0,"Point":0.0,"TradeTickValue":0.0,"TradeTickValueProfit":0.0,"TradeTickValueLoss":0.0,"TradeTickSize":0.0,"TradeContractSize":0.0,"VolumeMin":0.0,"VolumeMax":0.0,"VolumeStep":0.0,"VolumeLimit":0.0,"SwapLong":0.0,"SwapShort":0.0,"MarginInitial":0.0,"MarginMaintenance":0.0,"MarginLong":0.0,"MarginShort":0.0,"MarginLimit":0.0,"MarginStop":0.0,"MarginStopLimit":0.0,"SessionVolume":0.0,"SessionTurnover":0.0,"SessionInterest":0.0,"SessionBuyOrdersVolume":0.0,"SessionSellOrdersVolume":0.0,"SessionOpen":0.0,"SessionClose":0.0,"SessionAW":0.0,"SessionPriceSettlement":0.0,"SessionPriceLimitMin":0.0,"SessionPriceLimitMax":0.0,"Bid":0.0,"BidHigh":0.0,"BidLow":0.0,"AskHigh":0.0,"AskLow":0.0,"CurrencyBase":"string","CurrencyProfit":"string","CurrencyMargin":"string","Bank":"string","SymDescription":"string","Isin":"string","Path":"string","SymbolName":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/TickValueWithSize":{"get":{"tags":["Account Helper"],"summary":"/TickValueWithSize","description":"","operationId":"get-tickvaluewithsize","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbolNames","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"TickValueWithSizeReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"infos":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"symbolName":{"type":"string"},"TradeTickValue":{"type":"number"},"TradeTickSize":{"type":"number"},"TradeContractSize":{"type":"number"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"infos":[{"index":0,"symbolName":"string","TradeTickValue":0.0,"TradeTickSize":0.0,"TradeContractSize":0.0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/GetEaParams":{"get":{"tags":["Charts"],"summary":"/GetEaParams","description":"","operationId":"get-geteaparams","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"eaFileName","in":"query","required":false,"description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"GetEaParamsReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eaName":{"type":"string"},"eaFound":{"type":"boolean"},"eaHasParams":{"type":"boolean"},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"eaName":"string","eaFound":false,"eaHasParams":false,"parameters":[{"name":"string","type":""}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OpenTerminalChartWithEa":{"get":{"tags":["Charts"],"summary":"/OpenTerminalChartWithEa","description":"","operationId":"get-openterminalchartwithea","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbolName","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"eaFileName","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"chartPeriod","in":"query","required":false,"description":"","schema":{"type":"string","enum":["MRPC_EA_CHART_PERIOD_CURRENT","MRPC_EA_CHART_PERIOD_M1","MRPC_EA_CHART_PERIOD_M2","MRPC_EA_CHART_PERIOD_M3","MRPC_EA_CHART_PERIOD_M4","MRPC_EA_CHART_PERIOD_M5","MRPC_EA_CHART_PERIOD_M6","MRPC_EA_CHART_PERIOD_M10","MRPC_EA_CHART_PERIOD_M12","MRPC_EA_CHART_PERIOD_M15","MRPC_EA_CHART_PERIOD_M20","MRPC_EA_CHART_PERIOD_M30","MRPC_EA_CHART_PERIOD_H1","MRPC_EA_CHART_PERIOD_H2","MRPC_EA_CHART_PERIOD_H3","MRPC_EA_CHART_PERIOD_H4","MRPC_EA_CHART_PERIOD_H6","MRPC_EA_CHART_PERIOD_H8","MRPC_EA_CHART_PERIOD_H12","MRPC_EA_CHART_PERIOD_D1","MRPC_EA_CHART_PERIOD_W1","MRPC_EA_CHART_PERIOD_MN1"]}},{"name":"eaParameters","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OpenTerminalChartWithEaReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chartId":{"type":"integer"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"chartId":0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Logs/Journal":{"get":{"tags":["Logs"],"summary":"Returns log entries from the terminal Journal tab.","description":"Returns log entries from the terminal Journal tab. The Journal tab contains system messages about terminal connection status, network activity, server synchronization and other internal events. Works regardless of which tab is currently active in the terminal UI.","operationId":"get-logs-journal","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"JournalReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"source":{"type":"string"},"message":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"rows":[{"time":"","source":"string","message":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Logs/OnJournal":{"get":{"tags":["Logs"],"summary":"Streams log entries from the terminal Journal tab in real-time.","description":"[WebSocket Stream] Streams log entries from the terminal Journal tab in real-time. Requires \u0027id\u0027 header with the terminal connection GUID returned by Connect.","operationId":"get-logs-onjournal","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"OnJournalReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"source":{"type":"string"},"message":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"rows":[{"time":"","source":"string","message":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Logs/Experts":{"get":{"tags":["Logs"],"summary":"Returns log entries from the terminal Experts tab.","description":"Returns log entries from the terminal Experts tab. The Experts tab contains messages from Expert Advisors (EAs), scripts and indicators including Print() output, initialization/deinitialization events and runtime errors. Works regardless of which tab is currently active in the terminal UI.","operationId":"get-logs-experts","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"JournalReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"source":{"type":"string"},"message":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"rows":[{"time":"","source":"string","message":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Logs/OnExperts":{"get":{"tags":["Logs"],"summary":"Streams log entries from the terminal Experts tab in real-time.","description":"[WebSocket Stream] Streams log entries from the terminal Experts tab in real-time. Requires \u0027id\u0027 header with the terminal connection GUID returned by Connect.","operationId":"get-logs-onexperts","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"OnJournalReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"source":{"type":"string"},"message":{"type":"string"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"rows":[{"time":"","source":"string","message":"string"}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/DemoAccount/FindCompanies":{"get":{"tags":["Demo Account"],"summary":"Search for broker companies by name (reads the wizard\u0027s broker ListView).","description":"Search for broker companies by name (reads the wizard\u0027s broker ListView).","operationId":"get-demoaccount-findcompanies","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"searchText","in":"query","required":false,"description":"","schema":{"type":"string","default":"MetaQuotes","example":"MetaQuotes"}},{"name":"timeoutSeconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"GuiDemoFindCompaniesReply object","content":{"application/json":{"schema":{"type":"object","properties":{"resultCode":{"type":"integer"},"companies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"shortName":{"type":"string"}}}},"debugLog":{"type":"string"}}},"example":{"resultCode":0,"companies":[{"name":"string","shortName":"string"}],"debugLog":"string"}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/DemoAccount/ServersAndAccountTypes":{"get":{"tags":["Demo Account"],"summary":"Get available servers and account types for a company.","description":"Get available servers and account types for a company.","operationId":"get-demoaccount-serversandaccounttypes","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"companyName","in":"query","required":false,"description":"","schema":{"type":"string","default":"MetaQuotes Ltd.","example":"MetaQuotes Ltd."}},{"name":"timeoutSeconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"GuiDemoServersAndTypesReply object","content":{"application/json":{"schema":{"type":"object","properties":{"resultCode":{"type":"integer"},"servers":{"type":"array","items":{"type":"string"}},"accountTypes":{"type":"array","items":{"type":"string"}},"deposits":{"type":"array","items":{"type":"string"}},"leverages":{"type":"array","items":{"type":"string"}},"debugLog":{"type":"string"}}},"example":{"resultCode":0,"servers":["string"],"accountTypes":["string"],"deposits":["string"],"leverages":["string"],"debugLog":"string"}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/DemoAccount/Open":{"get":{"tags":["Demo Account"],"summary":"Open a demo account.","description":"Open a demo account. Full wizard flow: search -\u003E select -\u003E fill form -\u003E register.","operationId":"get-demoaccount-open","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"company","in":"query","required":false,"description":"","schema":{"type":"string","default":"MetaQuotes Ltd.","example":"MetaQuotes Ltd."}},{"name":"firstName","in":"query","required":false,"description":"","schema":{"type":"string","default":"Test","example":"Test"}},{"name":"lastName","in":"query","required":false,"description":"","schema":{"type":"string","default":"User","example":"User"}},{"name":"email","in":"query","required":false,"description":"","schema":{"type":"string","default":"test@test.com","example":"test@test.com"}},{"name":"phone","in":"query","required":false,"description":"","schema":{"type":"string","default":"\u002B1234567890","example":"\u002B1234567890"}},{"name":"server","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"accountType","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"timeoutSeconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32","default":60,"example":60}}],"responses":{"200":{"description":"GuiDemoOpenAccountReply object","content":{"application/json":{"schema":{"type":"object","properties":{"resultCode":{"type":"integer"},"login":{"type":"string"},"password":{"type":"string"},"investor":{"type":"string"},"server":{"type":"string"},"debugLog":{"type":"string"}}},"example":{"resultCode":0,"login":"string","password":"string","investor":"string","server":"string","debugLog":"string"}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/DemoAccount/OpenStream":{"get":{"tags":["Demo Account"],"summary":"Same as OpenDemoAccount but streams real-time progress events.","description":"[WebSocket Stream] Same as OpenDemoAccount but streams real-time progress events. Swagger does not support streaming \u2014 use /demo-account-stream interactive viewer.","operationId":"get-demoaccount-openstream","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"company","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"firstName","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"lastName","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"server","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"accountType","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"timeoutSeconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"DemoAccountStreamEvent object","content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string"},"message":{"type":"string"},"level":{"type":"string"},"elapsedMs":{"type":"integer"},"timestamp":{"type":"string"},"isFinal":{"type":"boolean"},"accountData":{"type":"object","properties":{"resultCode":{"type":"integer"},"login":{"type":"string"},"password":{"type":"string"},"investor":{"type":"string"},"server":{"type":"string"},"debugLog":{"type":"string"}}}}},"example":{"step":"string","message":"string","level":"string","elapsedMs":0,"timestamp":"","isFinal":false,"accountData":{"resultCode":0,"login":"string","password":"string","investor":"string","server":"string","debugLog":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Quote":{"get":{"tags":["Market Info"],"summary":"Get quote","description":"Get quote","operationId":"get-quote","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"notOlderMilliseconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"QuoteReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"bid":{"type":"number"},"ask":{"type":"number"},"dateTime":{"type":"string"},"high":{"type":"number"},"low":{"type":"number"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"symbol":"string","bid":0.0,"ask":0.0,"dateTime":"","high":0.0,"low":0.0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/QuoteMany":{"get":{"tags":["Market Info"],"summary":"Latest quote for the specified symbol","description":"Latest quote for the specified symbol","operationId":"get-quotemany","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbols","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"QuoteManyReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"bid":{"type":"number"},"ask":{"type":"number"},"dateTime":{"type":"string"},"high":{"type":"number"},"low":{"type":"number"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"quotes":[{"symbol":"string","bid":0.0,"ask":0.0,"dateTime":"","high":0.0,"low":0.0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/Symbols":{"get":{"tags":["Market Info"],"summary":"/Symbols","description":"","operationId":"get-symbols","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"SymbolsReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"SymbolNameInfos":{"type":"array","items":{"type":"object","properties":{"symbolName":{"type":"string"},"symbolIndex":{"type":"integer"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"SymbolNameInfos":[{"symbolName":"string","symbolIndex":0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/QuoteHistory":{"get":{"tags":["Market Info"],"summary":"/QuoteHistory","description":"","operationId":"get-quotehistory","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"timeframe","in":"query","required":false,"description":"","schema":{"type":"string","enum":["QH_PERIOD_M1","QH_PERIOD_M5","QH_PERIOD_M15","QH_PERIOD_M30","QH_PERIOD_H1","QH_PERIOD_H4","QH_PERIOD_D1","QH_PERIOD_W1","QH_PERIOD_MN1"]}},{"name":"fromTime","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}},{"name":"toTime","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"QuoteHistoryReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"historicalQuotes":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"index":{"type":"integer"},"time":{"type":"string"},"open":{"type":"number"},"close":{"type":"number"},"high":{"type":"number"},"low":{"type":"number"},"realVolume":{"type":"integer"},"tickVolume":{"type":"integer"},"spread":{"type":"integer"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"historicalQuotes":[{"symbol":"string","index":0,"time":"","open":0.0,"close":0.0,"high":0.0,"low":0.0,"realVolume":0,"tickVolume":0,"spread":0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/SymbolSelect":{"get":{"tags":["Market Info"],"summary":"Selects a symbol in the Market Watch window or removes a symbol from the window https://docs.mql4.com/marketinformation/symbolselect","description":"Selects a symbol in the Market Watch window or removes a symbol from the window https://docs.mql4.com/marketinformation/symbolselect","operationId":"get-symbolselect","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"Symbol name","schema":{"type":"string"}},{"name":"select","in":"query","required":false,"description":"Switch. If the value is false, a symbol should be removed from MarketWatch, otherwise a symbol should be selected in this window. A symbol can\u0027t be removed if the symbol chart is open, or there are open positions for this symbol","schema":{"type":"boolean"}}],"responses":{"200":{"description":"SymbolSelectReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"success":false}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OnTrade":{"get":{"tags":["Subscription Service"],"summary":"Streams real-time order/trade events.","description":"[WebSocket Stream] Streams real-time order/trade events. Requires \u0027id\u0027 header returned by Connect/ConnectEx. Swagger does not support streaming \u2014 use /subscription-stream interactive viewer.","operationId":"get-ontrade","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}}],"responses":{"200":{"description":"OnTradeReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string"},"eventData":{"type":"object","properties":{"newOrders":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}},"updatedOrders":{"type":"array","items":{"type":"object","properties":{"previous":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}},"current":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}}}},"removedOrders":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}},"newHistoryOrders":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}},"updatedHistoryOrders":{"type":"array","items":{"type":"object","properties":{"previous":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}},"current":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}}}},"removedHistoryOrders":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"isHistory":{"type":"boolean"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"},"closePrice":{"type":"number"},"closeTime":{"type":"string"},"accountLogin":{"type":"integer"}}}}}},"accountInfo":{"type":"object","properties":{"balance":{"type":"number"},"credit":{"type":"number"},"equity":{"type":"number"},"margin":{"type":"number"},"freeMargin":{"type":"number"},"profit":{"type":"number"},"marginLevel":{"type":"number"},"login":{"type":"integer"}}},"terminalInstanceGuidId":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"type":"","eventData":{"newOrders":[{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}],"updatedOrders":[{"previous":{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0},"current":{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}}],"removedOrders":[{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}],"newHistoryOrders":[{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}],"updatedHistoryOrders":[{"previous":{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0},"current":{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}}],"removedHistoryOrders":[{"index":0,"ticket":0,"isHistory":false,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":"","closePrice":0.0,"closeTime":"","accountLogin":0}]},"accountInfo":{"balance":0.0,"credit":0.0,"equity":0.0,"margin":0.0,"freeMargin":0.0,"profit":0.0,"marginLevel":0.0,"login":0},"terminalInstanceGuidId":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OnOpenedOrdersTickets":{"get":{"tags":["Subscription Service"],"summary":"Streams the tickets of currently opened orders as they change.","description":"[WebSocket Stream] Streams the tickets of currently opened orders as they change. Requires \u0027id\u0027 header returned by Connect/ConnectEx. Swagger does not support streaming \u2014 use /subscription-stream interactive viewer.","operationId":"get-onopenedorderstickets","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"pullIntervalMilliseconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OnOpenedOrdersTicketsReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"positionTickets":{"type":"array","items":{"type":"integer"}},"pendingOrderTickets":{"type":"array","items":{"type":"integer"}},"serverTime":{"type":"string"},"terminalInstanceGuidId":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"positionTickets":[0],"pendingOrderTickets":[0],"serverTime":"","terminalInstanceGuidId":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OnOpenedOrdersProfit":{"get":{"tags":["Subscription Service"],"summary":"Streams the live profit of currently opened orders.","description":"[WebSocket Stream] Streams the live profit of currently opened orders. Requires \u0027id\u0027 header returned by Connect/ConnectEx. Swagger does not support streaming \u2014 use /subscription-stream interactive viewer.","operationId":"get-onopenedordersprofit","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"timerPeriodMilliseconds","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OnOpenedOrdersProfitReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string"},"openedOrdersWithProfitUpdated":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"ticket":{"type":"integer"},"comment":{"type":"string"},"commission":{"type":"number"},"expiration":{"type":"string"},"lots":{"type":"number"},"magicNumber":{"type":"integer"},"openPrice":{"type":"number"},"openTime":{"type":"string"},"orderProfit":{"type":"number"},"stopLoss":{"type":"number"},"swap":{"type":"number"},"symbol":{"type":"string"},"takeProfit":{"type":"number"},"type":{"type":"string"}}}},"accountInfo":{"type":"object","properties":{"balance":{"type":"number"},"credit":{"type":"number"},"equity":{"type":"number"},"margin":{"type":"number"},"freeMargin":{"type":"number"},"profit":{"type":"number"},"marginLevel":{"type":"number"},"login":{"type":"integer"}}},"terminalInstanceGuidId":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"type":"","openedOrdersWithProfitUpdated":[{"index":0,"ticket":0,"comment":"string","commission":0.0,"expiration":"","lots":0.0,"magicNumber":0,"openPrice":0.0,"openTime":"","orderProfit":0.0,"stopLoss":0.0,"swap":0.0,"symbol":"string","takeProfit":0.0,"type":""}],"accountInfo":{"balance":0.0,"credit":0.0,"equity":0.0,"margin":0.0,"freeMargin":0.0,"profit":0.0,"marginLevel":0.0,"login":0},"terminalInstanceGuidId":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OnSymbolTick":{"get":{"tags":["Subscription Service"],"summary":"Streams real-time ticks for the given symbols.","description":"[WebSocket Stream] Streams real-time ticks for the given symbols. Requires \u0027id\u0027 header returned by Connect/ConnectEx. Swagger does not support streaming \u2014 use /subscription-stream interactive viewer.","operationId":"get-onsymboltick","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbolNames","in":"query","required":false,"description":"","schema":{"type":"array","items":{"type":"string"},"default":"EURUSD,BTCUSD","example":"EURUSD,BTCUSD"}}],"responses":{"200":{"description":"OnSymbolTickReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbolTick":{"type":"object","properties":{"time":{"type":"string"},"bid":{"type":"number"},"ask":{"type":"number"},"last":{"type":"number"},"volume":{"type":"integer"},"timeMsc":{"type":"integer"},"symbol":{"type":"string"}}},"terminalInstanceGuidId":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"symbolTick":{"time":"","bid":0.0,"ask":0.0,"last":0.0,"volume":0,"timeMsc":0,"symbol":"string"},"terminalInstanceGuidId":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/TradeStats":{"get":{"tags":["Trade Stats"],"summary":"Trading statistics calculated from order history and open orders","description":"Trading statistics calculated from order history and open orders","operationId":"get-tradestats","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From datetime in format: yyyy-MM-ddTHH:mm:ss","schema":{"type":"string","default":"2024-01-01T00:00:00","example":"2024-01-01T00:00:00"}}],"responses":{"200":{"description":"TradeStatsReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object","properties":{"openTrades":{"type":"integer"},"openProfit":{"type":"number"},"dayProfit":{"type":"number"},"weekProfit":{"type":"number"},"monthProfit":{"type":"number"},"totalProfit":{"type":"number"}}},"maxBalanceDrawdownRaw":{"type":"number"},"maxBalanceDrawdownRelative":{"type":"number"},"maxEquityDrawdownRaw":{"type":"number"},"maxEquityDrawdownRelative":{"type":"number"},"markets":{"type":"array","items":{"type":"object","properties":{"marketName":{"type":"string"},"count":{"type":"integer"}}}},"profitability":{"type":"object","properties":{"wonTrades":{"type":"integer"},"wonTradesPercent":{"type":"number"},"lostTrades":{"type":"integer"},"lostTradesPercent":{"type":"number"}}},"pips":{"type":"number"},"lots":{"type":"number"},"comissions":{"type":"number"},"averageWin":{"type":"object","properties":{"averagePips":{"type":"number"},"averageUsd":{"type":"number"}}},"averageLost":{"type":"object","properties":{"averagePips":{"type":"number"},"averageUsd":{"type":"number"}}},"longsWon":{"type":"object","properties":{"wonCount":{"type":"integer"},"all":{"type":"integer"},"wonPersent":{"type":"number"}}},"shortsWon":{"type":"object","properties":{"wonCount":{"type":"integer"},"all":{"type":"integer"},"wonPersent":{"type":"number"}}},"bestTrade":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"worstTrade":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"bestTradePips":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"worstTradePips":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"averageTradeLength":{"type":"string"},"profitFactor":{"type":"number"},"standardDeviation":{"type":"number"},"sharpeRatio":{"type":"number"},"zScore":{"type":"object","properties":{"zScoreDecimal":{"type":"number"},"zScoreProbability":{"type":"number"}}},"expectancy":{"type":"object","properties":{"pips":{"type":"number"},"dollar":{"type":"number"}}},"ghpr":{"type":"number"},"trades":{"type":"integer"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"summary":{"openTrades":0,"openProfit":0.0,"dayProfit":0.0,"weekProfit":0.0,"monthProfit":0.0,"totalProfit":0.0},"maxBalanceDrawdownRaw":0.0,"maxBalanceDrawdownRelative":0.0,"maxEquityDrawdownRaw":0.0,"maxEquityDrawdownRelative":0.0,"markets":[{"marketName":"string","count":0}],"profitability":{"wonTrades":0,"wonTradesPercent":0.0,"lostTrades":0,"lostTradesPercent":0.0},"pips":0.0,"lots":0.0,"comissions":0.0,"averageWin":{"averagePips":0.0,"averageUsd":0.0},"averageLost":{"averagePips":0.0,"averageUsd":0.0},"longsWon":{"wonCount":0,"all":0,"wonPersent":0.0},"shortsWon":{"wonCount":0,"all":0,"wonPersent":0.0},"bestTrade":{"tiket":0,"date":"","profit":0.0},"worstTrade":{"tiket":0,"date":"","profit":0.0},"bestTradePips":{"tiket":0,"date":"","profit":0.0},"worstTradePips":{"tiket":0,"date":"","profit":0.0},"averageTradeLength":"string","profitFactor":0.0,"standardDeviation":0.0,"sharpeRatio":0.0,"zScore":{"zScoreDecimal":0.0,"zScoreProbability":0.0},"expectancy":{"pips":0.0,"dollar":0.0},"ghpr":0.0,"trades":0}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/TradeStatsEquityHistory":{"get":{"tags":["Trade Stats"],"summary":"Trading statistics with equity history chart points","description":"Trading statistics with equity history chart points","operationId":"get-tradestatsequityhistory","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From datetime in format: yyyy-MM-ddTHH:mm:ss","schema":{"type":"string","default":"2024-01-01T00:00:00","example":"2024-01-01T00:00:00"}},{"name":"excludeSameBars","in":"query","required":false,"description":"Return short version without equal bars","schema":{"type":"boolean"}}],"responses":{"200":{"description":"TradeStatsEquityHistoryReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"summary":{"type":"object","properties":{"openTrades":{"type":"integer"},"openProfit":{"type":"number"},"dayProfit":{"type":"number"},"weekProfit":{"type":"number"},"monthProfit":{"type":"number"},"totalProfit":{"type":"number"}}},"maxBalanceDrawdownRaw":{"type":"number"},"maxBalanceDrawdownRelative":{"type":"number"},"maxEquityDrawdownRaw":{"type":"number"},"maxEquityDrawdownRelative":{"type":"number"},"markets":{"type":"array","items":{"type":"object","properties":{"marketName":{"type":"string"},"count":{"type":"integer"}}}},"profitability":{"type":"object","properties":{"wonTrades":{"type":"integer"},"wonTradesPercent":{"type":"number"},"lostTrades":{"type":"integer"},"lostTradesPercent":{"type":"number"}}},"pips":{"type":"number"},"lots":{"type":"number"},"comissions":{"type":"number"},"averageWin":{"type":"object","properties":{"averagePips":{"type":"number"},"averageUsd":{"type":"number"}}},"averageLost":{"type":"object","properties":{"averagePips":{"type":"number"},"averageUsd":{"type":"number"}}},"longsWon":{"type":"object","properties":{"wonCount":{"type":"integer"},"all":{"type":"integer"},"wonPersent":{"type":"number"}}},"shortsWon":{"type":"object","properties":{"wonCount":{"type":"integer"},"all":{"type":"integer"},"wonPersent":{"type":"number"}}},"bestTrade":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"worstTrade":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"bestTradePips":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"worstTradePips":{"type":"object","properties":{"tiket":{"type":"integer"},"date":{"type":"string"},"profit":{"type":"number"}}},"averageTradeLength":{"type":"string"},"profitFactor":{"type":"number"},"standardDeviation":{"type":"number"},"sharpeRatio":{"type":"number"},"zScore":{"type":"object","properties":{"zScoreDecimal":{"type":"number"},"zScoreProbability":{"type":"number"}}},"expectancy":{"type":"object","properties":{"pips":{"type":"number"},"dollar":{"type":"number"}}},"ghpr":{"type":"number"},"trades":{"type":"integer"}}},"charts":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"balance":{"type":"number"},"equity":{"type":"number"},"balanceDrawdownRaw":{"type":"number"},"balanceDrawdownRelative":{"type":"number"},"equityDrawdownRaw":{"type":"number"},"equityDrawdownRelative":{"type":"number"},"realizedPl":{"type":"number"},"unrealizedPl":{"type":"number"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"stats":{"summary":{"openTrades":0,"openProfit":0.0,"dayProfit":0.0,"weekProfit":0.0,"monthProfit":0.0,"totalProfit":0.0},"maxBalanceDrawdownRaw":0.0,"maxBalanceDrawdownRelative":0.0,"maxEquityDrawdownRaw":0.0,"maxEquityDrawdownRelative":0.0,"markets":[{"marketName":"string","count":0}],"profitability":{"wonTrades":0,"wonTradesPercent":0.0,"lostTrades":0,"lostTradesPercent":0.0},"pips":0.0,"lots":0.0,"comissions":0.0,"averageWin":{"averagePips":0.0,"averageUsd":0.0},"averageLost":{"averagePips":0.0,"averageUsd":0.0},"longsWon":{"wonCount":0,"all":0,"wonPersent":0.0},"shortsWon":{"wonCount":0,"all":0,"wonPersent":0.0},"bestTrade":{"tiket":0,"date":"","profit":0.0},"worstTrade":{"tiket":0,"date":"","profit":0.0},"bestTradePips":{"tiket":0,"date":"","profit":0.0},"worstTradePips":{"tiket":0,"date":"","profit":0.0},"averageTradeLength":"string","profitFactor":0.0,"standardDeviation":0.0,"sharpeRatio":0.0,"zScore":{"zScoreDecimal":0.0,"zScoreProbability":0.0},"expectancy":{"pips":0.0,"dollar":0.0},"ghpr":0.0,"trades":0},"charts":[{"time":"","balance":0.0,"equity":0.0,"balanceDrawdownRaw":0.0,"balanceDrawdownRelative":0.0,"equityDrawdownRaw":0.0,"equityDrawdownRelative":0.0,"realizedPl":0.0,"unrealizedPl":0.0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/EquityHistory":{"get":{"tags":["Trade Stats"],"summary":"Equity history curve points with drawdown calculation","description":"Equity history curve points with drawdown calculation","operationId":"get-equityhistory","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From datetime in format: yyyy-MM-ddTHH:mm:ss","schema":{"type":"string","default":"2024-10-01T00:00:00","example":"2024-10-01T00:00:00"}},{"name":"excludeSameBars","in":"query","required":false,"description":"Return short version without equal bars","schema":{"type":"boolean"}}],"responses":{"200":{"description":"EquityHistoryReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"balance":{"type":"number"},"equity":{"type":"number"},"balanceDrawdownRaw":{"type":"number"},"balanceDrawdownRelative":{"type":"number"},"equityDrawdownRaw":{"type":"number"},"equityDrawdownRelative":{"type":"number"},"realizedPl":{"type":"number"},"unrealizedPl":{"type":"number"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"points":[{"time":"","balance":0.0,"equity":0.0,"balanceDrawdownRaw":0.0,"balanceDrawdownRelative":0.0,"equityDrawdownRaw":0.0,"equityDrawdownRelative":0.0,"realizedPl":0.0,"unrealizedPl":0.0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/TradeUnrealizedPL":{"get":{"tags":["Trade Stats"],"summary":"Maximum and minimum unrealized profit/loss per trade","description":"Maximum and minimum unrealized profit/loss per trade","operationId":"get-tradeunrealizedpl","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"From datetime in format: yyyy-MM-ddTHH:mm:ss","schema":{"type":"string","default":"2024-01-01T00:00:00","example":"2024-01-01T00:00:00"}}],"responses":{"200":{"description":"TradeUnrealizedPLReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"extrema":{"type":"array","items":{"type":"object","properties":{"ticket":{"type":"integer"},"symbol":{"type":"string"},"maxUnrealizedTime":{"type":"string"},"maxUnrealizedPl":{"type":"number"},"minUnrealizedTime":{"type":"string"},"minUnrealizedPl":{"type":"number"}}}}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"extrema":[{"ticket":0,"symbol":"string","maxUnrealizedTime":"","maxUnrealizedPl":0.0,"minUnrealizedTime":"","minUnrealizedPl":0.0}]}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OrderSend":{"get":{"tags":["Trading Helper"],"summary":"Send market or pending order","description":"Send market or pending order","operationId":"get-ordersend","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"Required, NOT EMPTY string","schema":{"type":"string"}},{"name":"operationType","in":"query","required":false,"description":"required","schema":{"type":"string","enum":["OC_OP_BUY","OC_OP_SELL","OC_OP_BUYLIMIT","OC_OP_SELLLIMIT","OC_OP_BUYSTOP","OC_OP_SELLSTOP"]}},{"name":"volume","in":"query","required":false,"description":"Required","schema":{"type":"number","format":"double"}},{"name":"price","in":"query","required":false,"description":"NOT required in case of Mt4_OP_BUY = 0; Mt4_OP_SELL = 1;","schema":{"type":"number","format":"double"}},{"name":"slippage","in":"query","required":false,"description":"not required default 0","schema":{"type":"integer","format":"int32"}},{"name":"stoploss","in":"query","required":false,"description":"not required default 0","schema":{"type":"number","format":"double"}},{"name":"takeprofit","in":"query","required":false,"description":"not required default 0","schema":{"type":"number","format":"double"}},{"name":"comment","in":"query","required":false,"description":"not required default null","schema":{"type":"string"}},{"name":"magicNumber","in":"query","required":false,"description":"not required default 0","schema":{"type":"integer","format":"int32"}},{"name":"expiration","in":"query","required":false,"description":"not required default null","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OrderSendReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ticket":{"type":"integer"},"volume":{"type":"number"},"price":{"type":"number"},"openTime":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"ticket":0,"volume":0.0,"price":0.0,"openTime":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OrderModify":{"get":{"tags":["Trading Helper"],"summary":"Modify market or pending order","description":"Modify market or pending order","operationId":"get-ordermodify","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"orderTicket","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}},{"name":"newPrice","in":"query","required":false,"description":"","schema":{"type":"number","format":"double"}},{"name":"newStopLoss","in":"query","required":false,"description":"","schema":{"type":"number","format":"double"}},{"name":"newTakeProfit","in":"query","required":false,"description":"","schema":{"type":"number","format":"double"}},{"name":"newExpiration","in":"query","required":false,"description":"","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OrderModifyReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"orderWasModified":{"type":"boolean"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"orderWasModified":false}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OrderCloseDelete":{"get":{"tags":["Trading Helper"],"summary":"Close market or pending order","description":"Close market or pending order","operationId":"get-orderclosedelete","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"orderTicket","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}},{"name":"lots","in":"query","required":false,"description":"","schema":{"type":"number","format":"double"}},{"name":"closingPrice","in":"query","required":false,"description":"","schema":{"type":"number","format":"double"}},{"name":"slippage","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OrderCloseDeleteReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"mode":{"type":"string"},"historyOrderComment":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"mode":"","historyOrderComment":"string"}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}},"/OrderCloseBy":{"get":{"tags":["Trading Helper"],"summary":"Close market order with opposite market order","description":"Close market order with opposite market order","operationId":"get-ordercloseby","parameters":[{"name":"id","in":"header","required":true,"description":"Terminal identifier (GUID). Required on every call.","schema":{"type":"string"}},{"name":"ticketToClose","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}},{"name":"oppositeTicketClosingBy","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OrderCloseByReply object","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"closePrice":{"type":"number"},"profit":{"type":"number"},"closeTime":{"type":"string"}}},"error":{"type":"object","properties":{"type":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"mqlErrorCode":{"type":"string"},"mqlErrorIntCode":{"type":"integer"},"mqlErrorDescription":{"type":"string"},"stackTrace":{"type":"string"},"commandTypeName":{"type":"string"},"commandId":{"type":"integer"},"properties":{"type":"array","items":{"type":"object","properties":{"errorArgKey":{"type":"string"},"errorArgValue":{"type":"string"}}}}}}}},"example":{"data":{"closePrice":0.0,"profit":0.0,"closeTime":""}}}}},"400":{"description":"ExceptionResult object","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"}},"required":["message","code"]},"example":{"message":"Invalid account","code":13}}}}}}}},"components":{"securitySchemes":{"TerminalId":{"type":"apiKey","name":"id","in":"header","description":"Terminal identifier (GUID) obtained via /ConnectEx or the Portal dashboard."}}},"security":[{"TerminalId":[]}]}