Strategies – Framework [proxy]

When running multiple strategies distributed over multiple servers, it would be nice if we didn’t have to set up an endpoint for each bot.

But rather having a central entry point for all strategies accessible from a single URL, for instance

NPM Proxy

This is exactly what the NPM Package taapi-strategies-proxy does. In a nutshell, it simply reroutes requests to the configured bots using the bot-ids, to wherever they might be located in the cloud.


Simply create a new folder for this proxy, install the NPM package and configure the available bots.

> mkdir taapi-strategies-proxy
> npm init -f
> npm install --save taapi-strategies-proxy


    env: "dev"
    port: 3001

    user: "user"
    pass: "pass"

        heartbeatUrl: ""

        bot_key: ""

hosts: [
  "phobos": "", # Server 1
  "deimos": "", # Server 1 different port
  "titan": "" # Server 2

If you noticed in the previous chapters, we reserved the first port number 3001 and configured our bots to run on port 3002 and up. This reservation is thus for this proxy. But it can run on any port you want.

As you can see, we simply tell this proxy, where the different bots a running, and requests to this proxy will simply be rerouted based on the bot-id. For instance:


This request will be routed to server 1 running on port 3003

Run time

We’ll expand on this section a little later, and leave you with the overall idea. And this is to launch this proxy whichever way you’d like, and map a domain name to your servers IP, along with creating an SSL certificate.


We do have a public Docker image that’ll make things easier:


We’re now have all the components ready to install our UI web interface.