PowerShell
Works in Windows PowerShell 5.1 and PowerShell 7.
All examples assume the EA is running on the same computer with default ports. Order examples are for demo accounts.
Get a price
Section titled “Get a price”$api = "http://127.0.0.1:81"$q = Invoke-RestMethod "$api/v1/quote?symbol=EURUSD""{0} bid {1} ask {2}" -f $q.SYMBOL, $q.BID, $q.ASKExport economic calendar to CSV
Section titled “Export economic calendar to CSV”$cal = Invoke-RestMethod "$api/v1/calendar?from_date=2026.10.26 00:00:00&to_date=2026.10.31 23:59:59¤cy=USD"$cal.EVENTS | Select-Object TIME, EVENT_NAME, EVENT_IMPORTANCE, ACTUAL_VALUE, FORECAST_VALUE, PREVIOUS_VALUE | Export-Csv calendar.csv -NoTypeInformationStart-Process calendar.csvClose every open position (demo)
Section titled “Close every open position (demo)”$list = Invoke-RestMethod "$api/v1/order/list"foreach ($p in $list.OPENED) { Invoke-RestMethod -Method Post "$api/v1/order/close?ticket=$($p.TICKET)"}