- Clone the repository
- Sign up for Alpaca and get API keys
- Insert your Alpaca API keys into a file called
.env
like this:
API_KEY=<insert API key>
SECRET_API_KEY=<insert secret API key>
- Run
npm install
- Run
node index.js
-
Install typescript globally: npm i typescript -g
-
Go to your project directory and link typescript to the project: cd npm link typescript
-
Add type: module in package.json "type": "module" in package.json
-
Execute ts-node using npx: npx ts-node .ts