diff --git a/doc/api/content/algo/getting-started/development.md b/doc/api/content/algo/getting-started/development.md index e75ef5176..1b001a128 100644 --- a/doc/api/content/algo/getting-started/development.md +++ b/doc/api/content/algo/getting-started/development.md @@ -3,4 +3,13 @@ title = "Development" weight = 3 +++ -todo: write some code \ No newline at end of file +# Visual Studio Code + +In this section we're going to use a special feature of Visual Studio Code to do our editing. If you are using a different editor skip to the other editor section. + + + + +# Other Editor + +Good luck. 🦁🐯🐻 \ No newline at end of file diff --git a/doc/api/content/algo/getting-started/docker_config.png b/doc/api/content/algo/getting-started/docker_config.png new file mode 100644 index 000000000..d8fb57ac1 Binary files /dev/null and b/doc/api/content/algo/getting-started/docker_config.png differ diff --git a/doc/api/content/algo/getting-started/docker_tray.png b/doc/api/content/algo/getting-started/docker_tray.png new file mode 100644 index 000000000..f180c7a94 Binary files /dev/null and b/doc/api/content/algo/getting-started/docker_tray.png differ diff --git a/doc/api/content/algo/getting-started/download.md b/doc/api/content/algo/getting-started/download.md index dc385af80..49db5a307 100644 --- a/doc/api/content/algo/getting-started/download.md +++ b/doc/api/content/algo/getting-started/download.md @@ -3,8 +3,64 @@ title = "Download SDK" weight = 2 +++ -* Request access +## Request Access 🔑 -* Download .tar file +To start using the BTS Spark SDK you will need to request access though our sales department. Please email info@bluetradesys.com or call (919) 913-0850 and we will provide download credentials. -* unzip and `docker import` +## Download + +Download the latest SDK image here: spark_sdk.zip + +Unzip that folder into a working directory. Inside you should see something like this: + +``` +spark_sdk.img +spark_installer.exe +devcontainer.json +algo_template/ +bin/ +``` + +## Import + +Import the spark_sdk image into docker using the `docker load` command. +``` +docker load < spark_sdk.img +``` + +
+

If you see this error it means Docker Desktop is not running:

+error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. +
+ +Confirm that the image is loaded by running `docker images` which should list the new image. +``` +c:\bts> docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +bluetradingsystems/spark_sdk latest a6dde8add63a 2 weeks ago 2.51GB +``` + +## Run 🏃‍♀️ + +Start the docker container by running +``` +docker run -d -v %CD%:/sdk --name spark_sdk bluetradingsytems/spark_sdk +``` +
+If you are using Linux or Mac replace %CD% with $PWD. +
+ +## Success 🎉 +Docker is now running the spark SDK image. If you are on Windows or Mac it is running inside a virtual Linux machine. You can see that is is running by typing `docker ps` to list running docker containers. If you restart the Docker Desktop application you will need to start the spark_sdk image again using `docker start spark_sdk`. + +## Update + +To update your Spark SDK simply download an unzip a new spark_sdk.zip and use docker load to import the new spark_sdk.img. + +Then stop, remove and restart spark_sdk. +``` +c:\bts> docker stop spark_sdk +c:\bts> docker rm spark_sdk +c:\bts> docker run -d -v %cd%:/sdk --name spark_sdk bluetradingsytems/spark_sdk + +``` diff --git a/doc/api/content/algo/getting-started/install.md b/doc/api/content/algo/getting-started/install.md index 50d22277e..c4784b85c 100644 --- a/doc/api/content/algo/getting-started/install.md +++ b/doc/api/content/algo/getting-started/install.md @@ -5,19 +5,40 @@ weight = 1 These instructions assume you are using Microsoft Windows but you should be able to follow them on a Linux or Mac with minor modifications. +
+When there is a significant difference on non-Windows platforms it will be called out in a box like this one. +
+ The minimum hardware requirements for using the SDK are: -- **8 GB** RAM (preferably 16 GB or more) +- **12 GB** RAM (preferably 16 GB or more) - 4 CPU cores - 20 GB free hard disk space -The Spark SDK uses a tool called Docker to distribute all of the tools you need to build and test your trading algorithm ("Algo"). Once you have Docker installed you can download and run the latest SDK image. - -To use the Spark SDK you will need to install Docker. You don't need a C++ compiler as one is included in the spark SDK distribution. +The Spark SDK uses a tool called Docker to distribute all of the tools you need to build and test your trading algorithm ("Algo"). Once you have Docker installed you can download and import the Spark SDK image and be ready to start developing your Algo in a few minutes. ## Docker -* Install Docker -[Install Docker](https://www.docker.com/products/docker-desktop) +Download and install Docker Desktop for Windows/Mac. + +
+If you are using Linux follow the official install instructions for Docker for your distribution. +
+ +During the install Docker may ask you to enable virtualization support and reboot. + +Once Docker Desktop is installed and running it will create an icon in your system tray area that looks like the Docker logo. +![](../docker_tray.png) + +Right click on the tray icon and choose 'Settings' and choose the 'Advanced' tab. + +Ensure that the docker image has 8192 MB of memory and at least 2 cores. Memory that you assign to the docker image will not be available to Windows/Mac while Docker is running. CPU cores are shared with the host OS. Since you are going to use this image to compile your Algo it makes sense to allow Docker to use all available cores. + + ## Editor -* Install an editor \ No newline at end of file + +This documentation assumes you are going to use the +Visual Studio Code +editor to develop your Algo. The Spark SDK comes with a complete configuration for C++ development with VSCode so this is the simplest way to get started. However, if you are already familiar with a different editor you are welcome to use it. + + diff --git a/doc/api/content/algo/ref/lifecycle.md b/doc/api/content/algo/ref/lifecycle.md new file mode 100644 index 000000000..7b0b37456 --- /dev/null +++ b/doc/api/content/algo/ref/lifecycle.md @@ -0,0 +1,6 @@ ++++ +title = "Algo Lifecycle" +weight = 0 ++++ + +todo diff --git a/doc/api/sass/_base.scss b/doc/api/sass/_base.scss index 4805659a9..f5ad65103 100644 --- a/doc/api/sass/_base.scss +++ b/doc/api/sass/_base.scss @@ -86,8 +86,8 @@ pre { p code, li code { background-color: #f5f5f5; white-space: pre-wrap; - padding: 5px; - border-radius: 5px; + padding: 3px; + border-radius: 3px; font-size: 0.85rem; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 1px rgba(0,0,0,.1), 0 2px 1px -1px rgba(0,0,0,.12); } diff --git a/doc/api/sass/_layout.scss b/doc/api/sass/_layout.scss index c917f7fe3..fbd1bc483 100644 --- a/doc/api/sass/_layout.scss +++ b/doc/api/sass/_layout.scss @@ -22,6 +22,20 @@ header { } } +.linux { + padding: 25px 15px; + background: #eff0f1; + border-radius: 5px; + border: 1px solid #0072a2; +} + +.info { + padding: 25px 15px; + background: #ffffe0; + border-radius: 5px; + border: 1px solid #383838; +} + footer { text-align: center; diff --git a/doc/api/templates/shortcodes/linux.html b/doc/api/templates/shortcodes/linux.html new file mode 100644 index 000000000..7c931f3dd --- /dev/null +++ b/doc/api/templates/shortcodes/linux.html @@ -0,0 +1,3 @@ +
+ {{body}} +
\ No newline at end of file