{"openapi":"3.0.3","info":{"title":"MetaRPC Cloud EA API","version":"1.0.0","description":"Manage Cloud Expert Advisors (EAs) on your MetaRPC MT4/MT5 terminals: upload, start (attach), list and monitor, read logs, stop and remove, the WebRequest allow-list, and the EA\u0027s \u0060MQL5\\Files\u0060.\n\nAuthentication: send your API key (the one at https://mrpc.pro/my, the same key you use for the MT4/MT5 APIs) in the \u0060APIKey\u0060 header. \u0060Authorization: Bearer YOUR_API_KEY\u0060 is accepted too. Every call acts only on the terminals and EAs of the account the key belongs to. No portal sign-in and no \u0060id\u0060 header are needed: the terminal is named in the request.\n\nFlow: GET /Ea/Accounts (find \u0060terminalId\u0060) -\u003E POST /Ea/Upload (library \u0060id\u0060) -\u003E POST /Ea/Attach (\u0060eaId\u0060) -\u003E GET /Ea/All, GET /Ea/Experts or GET /Ea/Logs -\u003E POST /Ea/Stop -\u003E POST /Ea/Start (same \u0060eaId\u0060) or POST /Ea/Remove.\n\nEvery route works for MT4 and MT5 EAs: the platform of an upload comes from its compiled file (.ex4 = MT4, .ex5 = MT5). POST /Ea/Start starts a stopped instance again with the same \u0060eaId\u0060, inputs and saved files; POST /Ea/Attach always starts a new instance. POST /Ea/DeleteUploaded deletes an EA from your library. The WebRequest allow-list is MT5 only.\n\nLimits: 600 requests per minute per address and 1200 per key; 10 wrong keys within a minute block that address until the minute is over (429 with Retry-After).\n\nGuide: https://mrpc.pro/cloud-ea-api.md"},"servers":[{"url":"https://back.mrpc.pro"}],"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":[{"name":"Accounts"},{"name":"EA library"},{"name":"EA instances"},{"name":"EA settings"},{"name":"EA files"}],"paths":{"/Ea/Accounts":{"get":{"tags":["Accounts"],"operationId":"EaAccounts","summary":"List your terminals","description":"Your terminals of one platform with their state. Use \u0060terminalId\u0060 in the EA calls. Listing never starts, restarts or bills a terminal.","parameters":[{"name":"platform","in":"query","required":true,"description":"MT4, MT5, CT or TL.","schema":{"type":"string","enum":["MT4","MT5","CT","TL"]}}],"responses":{"200":{"description":"Accounts.","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}}}},"400":{"description":"Unknown platform.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Account/Terminals":{"get":{"tags":["Accounts"],"operationId":"AccountTerminals","summary":"List all your terminals on every platform","description":"Every terminal and connection of your account on MT5, MT4, cTrader (CT) and TradeLocker (TL) in one call, with the same rows and state as /Ea/Accounts. Use \u0060state=running\u0060 to get only the running ones. A platform that cannot be listed right now is named in \u0060unavailable\u0060, and the others are still answered. A read-only key may call it. Listing never starts, restarts or bills a terminal.","parameters":[{"name":"state","in":"query","required":false,"description":"Keep only rows in this state (exact, case-insensitive), e.g. running, stopped, unreachable.","schema":{"type":"string"}}],"responses":{"200":{"description":"Terminals.","content":{"application/json":{"schema":{"type":"object","properties":{"terminals":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"unavailable":{"type":"array","items":{"type":"string","enum":["MT5","MT4","CT","TL"]},"description":"Platforms whose listing is unavailable right now (empty normally)."}}}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"503":{"description":"No platform could be listed right now.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/Account/Balance":{"get":{"tags":["Accounts"],"operationId":"AccountBalance","summary":"Service balance and hourly spend","description":"Your MetaRPC service balance (USD), what your running terminals, copiers and VPS cost per hour right now, and how many hours the balance lasts at that spend. The same figures as the runway line in the portal. A read-only key may call it. Asking never starts, stops or bills anything.","responses":{"200":{"description":"Balance and spend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Upload":{"post":{"tags":["EA library"],"operationId":"EaUpload","summary":"Upload an MT4 or MT5 EA to your library","description":"Upload a compiled EA: MT5 \u0060.ex5\u0060, MT4 \u0060.ex4\u0060, or a \u0060.zip\u0060 package whose main EA is one of them (with its DLLs, includes, files and an optional \u0060.set\u0060 file of input values). The platform comes from the compiled file and is returned as \u0060platform\u0060. Source files (\u0060.mq5\u0060, \u0060.mq4\u0060) are refused. Uploads over about 16 MB fail. Keep a package under 12 MB: a bigger one starts, but cannot be started again after a stop or a platform restart (the platform cannot keep its own copy of it). Above 64 MB the gateway answers with an HTML 413. It is stored in your library; start it with POST /Ea/Attach and the returned \u0060id\u0060 on a terminal of the same platform.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":".ex5, .ex4 or .zip; keep it under 12 MB."}}}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadEaResponse"}}}},"400":{"description":"No file, wrong file type (only compiled .ex5/.ex4 or a .zip), a .zip without a compiled EA, or an upload over the size limit (\u0060success\u0060 false, \u0060error\u0060 says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadEaResponse"}}}},"413":{"description":"Over 64 MB: refused by the gateway (HTML page)."},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Library":{"get":{"tags":["EA library"],"operationId":"EaLibrary","summary":"List your uploaded EAs of one platform","responses":{"200":{"description":"Your uploaded EAs of that platform, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UploadedEa"}}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"400":{"description":"\u0060platform\u0060 is not MT4 or MT5.","content":{"text/plain":{"schema":{"type":"string"}}}}},"parameters":[{"name":"platform","in":"query","required":false,"description":"MT5 (default when left out) or MT4.","schema":{"type":"string","enum":["MT5","MT4"],"default":"MT5"}}]}},"/Ea/DeleteUploaded":{"post":{"tags":["EA library"],"operationId":"EaDeleteUploaded","summary":"Delete an uploaded EA from your library","description":"Deletes the EA from your library (MT4 or MT5). EA instances already started from it keep running and can still be stopped and started: each instance has its own copy of the package.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUploadedEaRequest"}}}},"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUploadedEaResult"}}}},"400":{"description":"\u0060uploadedEaId\u0060 is missing.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"No EA with this id in your library.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string"}}}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Attach":{"post":{"tags":["EA instances"],"operationId":"EaAttach","summary":"Start an uploaded EA on one of your MT4 or MT5 terminals","description":"Starts the EA in its own isolated EA terminal, logged in to the same broker account as the parent terminal, which must be running. The call waits until the EA reports that it is running or has failed, which can take up to about 6 minutes: use a long client timeout. Each call starts a NEW instance with a new \u0060eaId\u0060 and empty \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060) and Global Variables: a stopped instance\u0027s saved files and queued uploads are not carried over (copy them with GET /Ea/Files and GET /Ea/File first). To resume a stopped instance with its state, use POST /Ea/Start instead. Send \u0060symbolName\u0060 and \u0060chartPeriod\u0060 explicitly: when they are left out the EA starts on EURUSD H1. Billing follows the Terms (https://mrpc.pro/terms) and the pricing on https://mrpc.pro.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachEaRequest"}}}},"responses":{"200":{"description":"Started (\u0060success\u0060 true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachEaResult"}}}},"400":{"description":"Not started. A missing or invalid field (uploadedEaId, symbolName, chartPeriod outside 1-21, platform other than MT4/MT5, or an MT4 chartPeriod other than 1, 5, 9, 11, 12, 15, 19, 20, 21) returns a short text; an EA that is not in your library, an EA of the other platform, a terminal that is not available or an EA that failed to start returns \u0060success\u0060 false with \u0060error\u0060.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachEaResult"}}}},"404":{"description":"No running terminal of yours with this id: not yours, stopped, or not of the \u0060platform\u0060 you sent (plain text).","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Experts":{"get":{"tags":["EA instances"],"operationId":"EaExperts","summary":"EAs on one terminal","parameters":[{"name":"terminalId","in":"query","required":true,"description":"Terminal id: \u0060terminalId\u0060 from GET /Ea/Accounts (the same id you send in the \u0060id\u0060 header of the MT4/MT5 APIs).","schema":{"type":"string"}},{"name":"platform","in":"query","required":true,"description":"MT4 or MT5.","schema":{"type":"string","enum":["MT4","MT5"]}}],"responses":{"200":{"description":"The terminal\u0027s EAs (removed EAs are not listed).","content":{"application/json":{"schema":{"type":"object","properties":{"experts":{"type":"array","items":{"$ref":"#/components/schemas/Expert"}}}}}}},"400":{"description":"Invalid terminal or platform (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"The terminal manager did not answer or did not confirm; refresh GET /Ea/Experts and retry.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/All":{"get":{"tags":["EA instances"],"operationId":"EaAll","summary":"Every EA of the account in one call","description":"Every EA on every terminal of the account, plus one status row per terminal. Only running terminals are asked; a terminal whose manager did not answer has \u0060error\u0060 set and is counted in \u0060failed\u0060 (ask again later). The answer can take a few seconds for hundreds of terminals: poll once a minute or less often.","parameters":[{"name":"platform","in":"query","required":false,"description":"MT4, MT5, or empty for both.","schema":{"type":"string","enum":["","MT4","MT5"]}}],"responses":{"200":{"description":"All EAs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllExperts"}}}},"400":{"description":"Unknown platform.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Logs":{"get":{"tags":["EA instances"],"operationId":"EaLogs","summary":"An EA\u0027s Experts or Journal log","description":"Only while the EA is running: its EA terminal and its log are removed when it stops, and the call then answers 502. Save the log before you stop an EA if you need it.","parameters":[{"name":"terminalId","in":"query","required":true,"description":"Terminal id: \u0060terminalId\u0060 from GET /Ea/Accounts (the same id you send in the \u0060id\u0060 header of the MT4/MT5 APIs).","schema":{"type":"string"}},{"name":"platform","in":"query","required":true,"description":"MT4 or MT5.","schema":{"type":"string","enum":["MT4","MT5"]}},{"name":"eaId","in":"query","required":true,"description":"EA instance id (\u0060eaId\u0060 from POST /Ea/Attach, GET /Ea/Experts or GET /Ea/All).","schema":{"type":"string","format":"uuid"}},{"name":"logType","in":"query","required":true,"description":"Experts or Journal.","schema":{"type":"string","enum":["Experts","Journal"]}}],"responses":{"200":{"description":"The last 500 rows.","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"}}}}}}},"400":{"description":"Invalid terminal, platform, EA or log type (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"The terminal manager did not answer, or the EA is not running (a stopped EA has no log any more).","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Stop":{"post":{"tags":["EA instances"],"operationId":"EaStop","summary":"Stop an EA","description":"Stops the EA instance and its EA terminal. Open positions and pending orders are NOT closed. The parent terminal keeps running.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaRef"}}}},"responses":{"200":{"description":"Stopped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaActionResult"}}}},"400":{"description":"Invalid terminal, platform or EA (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"The terminal manager did not answer or did not confirm; refresh GET /Ea/Experts and retry.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Start":{"post":{"tags":["EA instances"],"operationId":"EaStart","summary":"Start a stopped EA again (same instance)","description":"Starts a stopped EA instance again: the same \u0060eaId\u0060, with the package, inputs, symbol, timeframe and resource guards it was attached with and its saved \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060) and, on MT5, Global Variables. Works on an EA in state Stopped or TerminatedResourceLimit. The account terminal must be running. A removed EA cannot be started (404). After platform maintenance, a stopped EA that is not among the 20 newest EAs of its terminal is no longer listed and answers 404; attach it again. An EA that is already running answers 200 without a restart. The call waits until the EA reports that it is running or has failed, which can take up to about 6 minutes: use a long client timeout. MT5: the EA gets the WebRequest allow-list it was attached with; attach it again to apply a changed list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaRef"}}}},"responses":{"200":{"description":"Running (\u0060success\u0060 true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaActionResult"}}}},"400":{"description":"Invalid terminal, platform or EA (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA, the EA was removed, or (after maintenance) it is not among the 20 newest EAs of its terminal.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Not started: the account terminal is not running, or the EA failed to start (\u0060error\u0060 says why, e.g. it failed OnInit).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaStartRefused"}}}},"502":{"description":"The terminal manager did not answer or did not confirm the start; refresh GET /Ea/Experts and retry.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Remove":{"post":{"tags":["EA instances"],"operationId":"EaRemove","summary":"Remove a stopped EA","description":"Removes a stopped EA (state Stopped or TerminatedResourceLimit) from your lists and deletes its saved \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060) and, on MT5, Global Variables. Stop a running EA first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaRef"}}}},"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaActionResult"}}}},"400":{"description":"Invalid terminal, platform or EA (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"The EA is not in state Stopped or TerminatedResourceLimit (for example Running, Restarting or Error): stop it first.","content":{"text/plain":{"schema":{"type":"string"}}}},"502":{"description":"The terminal manager did not answer or did not confirm; refresh GET /Ea/Experts and retry.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/WebRequestUrls":{"get":{"tags":["EA settings"],"operationId":"GetEaWebRequestUrls","summary":"Read the WebRequest allow-list","responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRequestUrls"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}},"post":{"tags":["EA settings"],"operationId":"SetEaWebRequestUrls","summary":"Replace the WebRequest allow-list","description":"The public https hosts your MT5 EAs may call with MQL5 \u0060WebRequest\u0060. The list is stored on your account and applies to MT5 EAs attached afterwards: the EA starts once its list is in place, so \u0060WebRequest\u0060 works in \u0060OnInit\u0060 too. Unlisted URLs fail with MQL5 error 4014. An EA keeps the list it was attached with, also when it is started again with POST /Ea/Start: attach it again to apply a changed list. Rules: \u0060https://\u0060 only, host only (no path or query; a port is allowed), public host names (no IP addresses or internal names), up to 20. An empty list clears it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRequestUrls"}}}},"responses":{"200":{"description":"The stored list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebRequestUrls"}}}},"400":{"description":"Invalid list.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/Files":{"get":{"tags":["EA files"],"operationId":"EaFiles","summary":"List an EA\u0027s MQL5\\Files (MQL4\\Files)","description":"The saved copy of what the EA has under \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060 on MT4), saved every minute while it runs and when it stops (so it can be up to a minute old), plus your uploads it has not picked up yet (\u0060pending\u0060). At most 2,000 files and 8 MB per EA are kept; above that the Global Variables (MT5) and the newest files are kept and the rest is not saved.","parameters":[{"name":"eaId","in":"query","required":true,"description":"EA instance id (\u0060eaId\u0060 from POST /Ea/Attach, GET /Ea/Experts or GET /Ea/All).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaFiles"}}}},"400":{"description":"Invalid EA (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}},"/Ea/File":{"get":{"tags":["EA files"],"operationId":"EaFile","summary":"Download one file","parameters":[{"name":"eaId","in":"query","required":true,"description":"EA instance id (\u0060eaId\u0060 from POST /Ea/Attach, GET /Ea/Experts or GET /Ea/All).","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","required":true,"description":"Path below \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060 on MT4) with \u0060/\u0060 separators, for example \u0060config/limits.ini\u0060.","schema":{"type":"string"}}],"responses":{"200":{"description":"The file.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid EA or path (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"No such file (text), or not your EA (ProblemDetails).","content":{"text/plain":{"schema":{"type":"string"}}}},"413":{"description":"Too large to download here.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"429":{"description":"Too many requests from this address or key, or too many wrong keys from this address in the last minute. Wait for \u0060Retry-After\u0060 seconds.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}},"post":{"tags":["EA files"],"operationId":"UploadEaFile","summary":"Create or replace a file","description":"Puts a file into the EA\u0027s \u0060MQL5\\Files\u0060 (\u0060MQL4\\Files\u0060 on MT4), up to 2 MB. A running EA gets it within about 5 seconds. An instance the platform restarts (crash, host move, billing resume) gets it when it starts again; an EA you stopped gets it when you start it again with POST /Ea/Start. At most 50 waiting uploads and 4 MB in total per EA.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaFileUpload"}}}},"responses":{"200":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EaFileUploadResult"}}}},"400":{"description":"Invalid EA, path or base64 (short text, or a ProblemDetails body when a required body field is missing).","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not your terminal or EA.","content":{"application/problem\u002Bjson":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Larger than 2 MB. (A file over about 3 MB makes the request body exceed 4 MB and currently fails with 500.)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"50 uploads or 4 MB are already waiting for this EA (plain text, no Retry-After): let the running EA pick them up, then retry. Also the rate limit, with Retry-After.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"No key, an unknown key, or a locked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"APIKey","in":"header","description":"Your API key from https://mrpc.pro/my."},"Bearer":{"type":"http","scheme":"bearer","description":"The same API key as a bearer token."}},"schemas":{"AuthError":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"}},"example":{"message":"Not signed in or session expired. Please sign in again.","type":"UnauthorizedException"}},"Account":{"type":"object","properties":{"id":{"type":"string"},"terminalId":{"type":"string","description":"Use this id in the EA calls."},"platform":{"type":"string"},"login":{"type":"string"},"server":{"type":"string"},"name":{"type":"string"},"state":{"type":"string","description":"running, stopped, suspended, starting, queued, authorizing, syncing, wrong-password, expired, unreachable or unknown. Only \u0060running\u0060 (with \u0060canSwitch\u0060 true) can take an EA."},"canSwitch":{"type":"boolean"}}},"UploadEaResponse":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string","description":"Library id: \u0060uploadedEaId\u0060 in POST /Ea/Attach."},"fileName":{"type":"string"},"detectedEaName":{"type":"string","description":"The EA file name, extension included (for a .zip: the main .ex5/.ex4 inside it)."},"fileSize":{"type":"integer"},"isZip":{"type":"boolean"},"uploadedAtUtc":{"type":"string","format":"date-time"},"defaultParameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Input values from a \u0060.set\u0060 file inside an uploaded \u0060.zip\u0060; empty for a plain \u0060.ex5\u0060/\u0060.ex4\u0060 (the compiled EA\u0027s inputs are not read)."},"error":{"type":"string","nullable":true},"platform":{"type":"string","enum":["MT5","MT4"],"description":"The platform the EA runs on, from its compiled file."}}},"UploadedEa":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"detectedEaName":{"type":"string"},"platform":{"type":"string"},"fileSize":{"type":"integer"},"isZip":{"type":"boolean"},"uploadedAtUtc":{"type":"string","format":"date-time"},"defaultParameters":{"type":"object","additionalProperties":{"type":"string"}}}},"AttachEaRequest":{"type":"object","properties":{"terminalId":{"type":"string","description":"Your running MT4 or MT5 terminal (\u0060terminalId\u0060 from GET /Ea/Accounts)."},"platform":{"type":"string","enum":["MT5","MT4"],"description":"The terminal\u0027s platform; the uploaded EA must be of the same platform."},"uploadedEaId":{"type":"string","description":"\u0060id\u0060 from POST /Ea/Upload or GET /Ea/Library."},"symbolName":{"type":"string","example":"XAUUSD","description":"Chart symbol. Defaults to EURUSD when left out: send it."},"chartPeriod":{"type":"integer","minimum":1,"maximum":21,"description":"Defaults to 12 (H1) when left out: send it. 1 M1, 2 M2, 3 M3, 4 M4, 5 M5, 6 M6, 7 M10, 8 M12, 9 M15, 10 M20, 11 M30, 12 H1, 13 H2, 14 H3, 15 H4, 16 H6, 17 H8, 18 H12, 19 D1, 20 W1, 21 MN1. MT4 charts take only 1 M1, 5 M5, 9 M15, 11 M30, 12 H1, 15 H4, 19 D1, 20 W1, 21 MN1."},"eaParameters":{"type":"object","additionalProperties":{"type":"string"},"description":"EA inputs by name, values as strings. Inputs you leave out keep the EA\u0027s defaults.","example":{"Lots":"0.1"}},"maxCpuPercent":{"type":"number","default":20,"description":"CPU guard of the EA terminal, in percent."},"maxRamBytes":{"type":"integer","default":524288000,"description":"RAM guard of the EA terminal, in bytes."}},"required":["terminalId","platform","uploadedEaId"]},"AttachEaResult":{"type":"object","properties":{"success":{"type":"boolean"},"eaId":{"type":"string","description":"The new EA instance id."},"eaTerminalId":{"type":"string"},"parentSessionId":{"type":"string"},"eaName":{"type":"string"},"state":{"type":"string"},"processId":{"type":"integer"},"error":{"type":"string","nullable":true}}},"Expert":{"type":"object","properties":{"eaId":{"type":"string"},"eaName":{"type":"string"},"symbol":{"type":"string"},"period":{"type":"string","example":"M1"},"state":{"type":"string","description":"Running, Stopped, TerminatedResourceLimit, ..."},"startedAt":{"type":"string"},"cpuPercent":{"type":"number"},"ramBytes":{"type":"integer"},"maxCpuPercent":{"type":"number","nullable":true,"description":"CPU guard (percent) the EA was attached with; null when not known."},"maxRamBytes":{"type":"integer","nullable":true,"description":"RAM guard in bytes the EA was attached with; null when not known."}}},"AccountExpert":{"type":"object","properties":{"terminalId":{"type":"string"},"platform":{"type":"string"},"login":{"type":"string"},"server":{"type":"string"},"name":{"type":"string"},"eaId":{"type":"string"},"eaName":{"type":"string"},"symbol":{"type":"string"},"period":{"type":"string"},"state":{"type":"string"},"startedAt":{"type":"string"},"stoppedAt":{"type":"string"},"stopReason":{"type":"string"},"cpuPercent":{"type":"number"},"ramBytes":{"type":"integer"},"maxCpuPercent":{"type":"number","nullable":true,"description":"CPU guard (percent) the EA was attached with; null when not known."},"maxRamBytes":{"type":"integer","nullable":true,"description":"RAM guard in bytes the EA was attached with; null when not known."}}},"AccountTerminal":{"type":"object","properties":{"terminalId":{"type":"string"},"platform":{"type":"string"},"login":{"type":"string"},"server":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"experts":{"type":"integer"},"error":{"type":"string","nullable":true,"description":"Set when the terminal\u0027s manager did not answer this time."}}},"AllExperts":{"type":"object","properties":{"experts":{"type":"array","items":{"$ref":"#/components/schemas/AccountExpert"}},"terminals":{"type":"array","items":{"$ref":"#/components/schemas/AccountTerminal"}},"failed":{"type":"integer","description":"Number of terminals with \u0060error\u0060 set."}}},"LogEntry":{"type":"object","properties":{"time":{"type":"string"},"source":{"type":"string"},"message":{"type":"string"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"traceId":{"type":"string"}},"description":"Standard ASP.NET problem details."},"EaRef":{"type":"object","properties":{"terminalId":{"type":"string"},"platform":{"type":"string","enum":["MT4","MT5"]},"eaId":{"type":"string","format":"uuid"}},"required":["terminalId","platform","eaId"]},"EaActionResult":{"type":"object","properties":{"success":{"type":"boolean"},"eaId":{"type":"string"}}},"WebRequestUrls":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"maxItems":20,"example":["https://api.example.com"]}},"required":["urls"]},"EaFiles":{"type":"object","properties":{"eaId":{"type":"string"},"savedAtUtc":{"type":"string","format":"date-time","nullable":true},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"},"modifiedUtc":{"type":"string","format":"date-time"},"pending":{"type":"boolean","description":"Uploaded by you, not yet picked up by the EA."}}}}}},"EaFileUpload":{"type":"object","properties":{"eaId":{"type":"string"},"path":{"type":"string","example":"config/limits.ini"},"contentBase64":{"type":"string","description":"File content in base64, at most 2 MB decoded."}},"required":["eaId","path","contentBase64"]},"EaFileUploadResult":{"type":"object","properties":{"success":{"type":"boolean"},"eaId":{"type":"string"},"path":{"type":"string"},"size":{"type":"integer"},"queuedAtUtc":{"type":"string","format":"date-time"},"message":{"type":"string"}}},"EaStartRefused":{"type":"object","properties":{"success":{"type":"boolean","example":false},"eaId":{"type":"string"},"error":{"type":"string","description":"Why the EA did not start."}}},"DeleteUploadedEaRequest":{"type":"object","required":["uploadedEaId"],"properties":{"uploadedEaId":{"type":"string","description":"\u0060id\u0060 from POST /Ea/Upload or GET /Ea/Library."}}},"DeleteUploadedEaResult":{"type":"object","properties":{"success":{"type":"boolean"},"uploadedEaId":{"type":"string"}}},"Balance":{"type":"object","properties":{"balance":{"type":"number","description":"Service balance in USD."},"currency":{"type":"string","description":"Always USD."},"spendPerHour":{"type":"number","description":"What your account costs per hour now: running terminals (tier rate x EA multiplier), copiers and VPS."},"spendPerHourBy":{"type":"object","description":"spendPerHour split by service.","properties":{"terminals":{"type":"number"},"copiers":{"type":"number"},"vps":{"type":"number"}}},"hoursLeft":{"type":"number","nullable":true,"description":"Hours the balance lasts at spendPerHour. null only when nothing is charged now and the balance is above $0; 0 at or below $0."},"runsOutAtUtc":{"type":"string","format":"date-time","nullable":true,"description":"When the balance reaches $0 at this spend (UTC). null only when nothing is charged now and the balance is above $0; the time of the request at or below $0."},"terminalRatePerHour":{"type":"number","description":"The hourly rate of one terminal at your current monthly tier (before an EA multiplier)."},"monthToDateHours":{"type":"number","description":"Billed terminal hours this UTC month; they set the tier."},"tier":{"type":"integer","description":"Your current pricing tier."},"lowBalanceEmails":{"type":"boolean","description":"True when we e-mail you at about 72 h and 24 h of balance left and at $0."}}}}}}