Welcome to the how-to section of our documentation! Here, you’ll find some examples of how to do specific tasks using the Alpaca API in supported programming languages.

Before running these examples, it is recommended that you set the following environment variables to the corresponding values found on your dashboard. Please be aware of whether you’re using the values for your paper trading account or for your live trading account.


On Linux, this can be done with export ENV_VAR_NAME=DASHBOARD_VALUE. (You’ll probably want to add them to your ~/.bash_profile so they stay set when the machine restarts.) On Windows, you can instead use setx ENV_VAR_NAME "DASHBOARD_VALUE". After running these commands, you’ll want to open a new command prompt window so the varaibles are available.