a command line terminal for trading with the Alpaca API
- View account information.
- Buy and sell stocks.
- Close positions with optional wildcards.
- Cancel orders with optional wildcards.
- View recent orders.
- View positions.
From NPM:
$ npm i -g alpaca-terminal
Open the terminal with the alpaca
or alpaca-terminal
command.
alpaca-terminal 2.0.0
type help or ? to view commands
> help
help [command]
config [key] [value]
account [field]
buy <symbol> <qty> [tif] [limit_price]
sell <symbol> <qty> [tif] [limit_price]
cancel <symbol|order_id|*>
close <symbol|*>
orders [status]
positions
quit
>
To view all options type config
.
> config
credentials.key xxxxxxxxxxxx
credentials.secret xxxxxxxxxxxxxxxxxxxxxxxx
To view a specific option type config <key>
.
> config credentials.key
credentials.key xxxxxxxxxxxx
To set an option type config <key> <value>
.
> config credentials.key mykey
credentials.key mykey
To buy a stock simply provide the symbol
and amount
.
> buy SPY 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4e
To sell a stock simply provide the symbol
and amount
.
> sell TSLA 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4e
To view your recent orders type orders
, optionally you can type
orders [status]
to see specific order types.
symbol side qty price status id
TSLA buy 1 - accepted a92af801-2c27-4f07-b55f-4861c29333d2
Below are the command aliases available.
Command | Aliases |
---|---|
help |
h ? |
config |
conf cfg |
account |
acc a |
buy |
b |
sell |
s |
orders |
o |
close |
c |
cancel |
ca |
positions |
pos p |
quit |
q |
More is coming! This project is early in development.
Feel free to contribute and PR to your 💖's content.