kzhdev / alpaca_zorro_plugin

A Zorro Plugin for Alpaca Trade API.
https://zorro-project.com/
MIT License
14 stars 5 forks source link

AlpacaZorroPlugin

The AlpacaZorroPlugin is a powerful integration between Alpaca, a brokerage providing real-time market data and trading capabilities, and Zorro, an institutional-grade development tool for financial research and automated trading. With this plugin, you can seamlessly trade using Alpaca within the Zorro environment.

Installation

To install the plugin, follow these steps:

  1. download the latest release.
  2. Unzip the file.
  3. Copy teh Alpca.dll and the websocket_proxy folder into the plugin folder under Zorro's root path.
  4. Copy the AlpacaBrokderCommands.h file into the include folder under Zorro's root path.

Usage

To use the plugin, follow these steps:

  1. Generate an API Key on the Alpaca website.
  2. Open Zorro, select Alpaca.
  3. Enter the API Key in the User ID input box.
  4. Enter the Secret Key in the Password input box.

AlpacaPlugin Specific Config

Since version 1.0.0, the AlpacaZorroPlugin supports several optional Alpaca-specific configurations, which can be added to either the Zorro.ini or ZorroFix.ini file (preferred):

  AlpacaPaidDataPlan = 1                // 0 = False (Use Basic Data Plan), 1 = True (Use Pro Data Plan). Default to 1.
  AlpacaLogLevel = 0                    // 0 = OFF, 1 = ERROR, 2 = WARNING, 3 = INFO, 4 = DEBUG, 5 = TRACE. Default to 0.
  AlpacaLogType = 127                   // 1 = DEFAULT, 2 = ACCOUNT, 4 = BALANCE, 8 = POSITION, 16 = ORDER, 32 = HISTORY, 64 = MD, 128 = WEB_SOCKET_DATA,
                                        // 127 = DEFAULT | ACCOUNT | BALANCE | POSITION | ORDER | HISTORY | MD, 255 = ALL
  AlpacaUseWebsocket = 0                // 0 = Not use Websocket, 1 = Use Websocket. Default to 1.
  AlpacaFractionalLotAmount = 0.001     // The LotAmount for fractionable asset. Default to 1.

The Configurations are:

Features

TO-DO List

Build From Source

Bug Report

If you find any issues or have any suggestions, please report them in GitHub issues.