API Request - Socket or HTTP API alongside OLE

I am primarily a Linux-based developer and have been using Amibroker for years. But using Amibroker basically means maintaining an environment something along the lines of a separate Windows Server/VirtualBox/Wine/Parallels/etc. This is expensive, time-consuming and introduces a lot of operational challenges when live trading. Amibroker could make this approach a lot simpler if it introduced a socket or HTTP-based API where we could run more easily with Wine without using OLE (see Has anyone recently tried using AB through Linux with WINE? Tomasz's comment that OLE does not work with Wine). However a platform-agnostic API would bypass this problem and make API development MUCH easier for non-Windows developers. I could easily imagine an approach where Amibroker runs an embedded web server for REST calls that wrap the current API functions, or a socket-based approach (like Interactive Brokers' TWS API). If you wrap the current API then this feature could be provided alongside the current API and not cause disruption or backward incompatibility.

Thanks in advance for this consideration and sorry if this is posted in the wrong forum thread - I didn't see an API-specfic forum.

Joel

I am also not particularly happy with OLE. The original Amiga version had REXX port which was standard for automation on Amiga and frankly way easier to use than OLE. The functionality provided by REXX was implemented via OLE on Windows platform because at that time (in 2000) there was little choice as REST APIs became popular way later.

REST API on surface looks great, but if I were to implement new automation API I would like to address also other goals that REST API is not being able to address easily (at least on first look). One of such goals is to be able to handle multiple running instances of AmiBroker and being able to talk to them all and/or separately to each running instance. This could be realized on Windows using WM_COPY_DATA message for IPC. And this would also work on WINE. Of course REST servers could be started with different ports for different running instances but this makes things complicated to use it as you don't have static port to talk to.

At the moment I am not saying yes and not saying no. I can't make any promises as there is little interest in alternative APIs.

@Tomasz I'm also interested in alternative APIs for the same reason, controlling multiple instances currently requires multiple logins with different user accounts.

I would like to suggest the simplest possible API -- the command line interface. Actions can be specified with command line arguments. Charts and text output can be captured in files.
One possible approach might look something like this:

amibroker scan --db myDbPath --apx myApxFile.apx --export myfile.csv
amibroker explore  --apx myApxFile.apx --export myfile.csv
amibroker optimize --apx myApxFile.apx --export myfile.csv
amibroker backtest --apx myApxFile.apx --export myfile.csv --chart <chart specification>:mychart.png
amibroker wftest   --apx myApxFile.apx --exportWF myWF.csv --exportResults myResults.csv --chart <chart specification>:mychart.png

This has the advantage of simple control of multiple instances. It also has some disadvantages, mainly that each command must restart AmiBroker. We would also need a way to specify multiple exported charts after a backtest or walk-forward test.