Why is it needed?
AutoTrader Web is HTTP Rest API used for multi-client multi-broker automated trading. Directly using HTTP Rest APIs in code requires development expertise. So to make the process easy for our users, we provide programming specific libraries. These libraries are easy to use and any developer with basic programming skills can use it.
Most programming languages that come along with charting software do not have good support for execution of HTTP request. Hence we have built an easy to use communication mechanism, which uses plain text csv (comma separated value) files for communication. The Desktop Client is responsible for reading and writing to these files.
So programming languages with limited or no support for making HTTP requests can write commands to these csv files and then Desktop Client will execute these commands (Example, place/modify/cancel orders etc.).
When to use it?
It should be used when you are using following libraries provided by us:
- AmiBroker library
- Excel library or tools
- MetaTrader library
If you have coded your trading strategy in a programming language for which we do not provide built-in library and it does not have good support for making HTTP requests, then you can use the Desktop Client.
How to install?
You can simply download AutoTrader Desktop Client. There is no need to install it, just keep on your desktop and directly run it. This client can be run on any operating system (windows, mac, linux or ubuntu).
The client will ask you to install Java (if it is not already present on your system).
Windows users can download the setup from here.
Non-Windows users can download the setup from here. You will need to install Java, if you don’t have it installed on your computer. The file is self-executing JAR. You can directly run it.
In case you are not able to start it. Just run following command:
java -jar at-desktop.jar
This is a one time activity.
- Start the desktop client & go to settings tab
- Click the change button next to API Key
- You can find your API Key in AutoTrader Web (Settings -> API Key)
- Enter your API Key & click Save
Everyday when you start your trading, you need to do the following:
- Start the desktop client
- Click Monitor button
This will make sure that desktop client is listening to your commands.
To stop trading, simply click Stop button on Dashboard tab.
Connecting from other languages
If your trading strategy is coded in a programming language that does not have good HTTP support then you can use this Desktop Client.
Client Home Directory
This is the location where Desktop Client keeps it’s csv files that are used for communication. You can modify this path form settings.
Default Path: $USER_HOME_DIRECTORY/autotrader
User home directory path differs from one operating system to another.
This file is read by the desktop client as soon as it changes. So all of the commands are read from this file. Example, if you want to place/modify/cancel an order, then write the details in this file in comma separated value format.
Input Directory: $CLIENT_HOME_DIRCTORY/input
Input Files: commands.csv
Important: You must write a newline character (Enter) at the end of each line.
The desktop client continuously polls live portfolio snapshot (orders, positions, margins) from AutoTrader server. It writes those details in following files in a csv format.
Note: Each pseudo account will have it’s own separate files.
Output Directory: $CLIENT_HOME_DIRCTORY/output
The logs are present at C:\Users\<win-user>\autotrader\logs