alpaca-terminal
v2.0.2
Published
a command line terminal for trading with the Alpaca API
Readme
alpaca-terminal
a command line terminal for trading with the Alpaca API
Contents
Features
- [x] View account information.
- [x] Buy and sell stocks.
- [x] Close positions with optional wildcards.
- [x] Cancel orders with optional wildcards.
- [x] View recent orders.
- [x] View positions.
Install
From NPM:
$ npm i -g alpaca-terminalUsage
Contents
Launching
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
>Config
To view all options type config.
> config
credentials.key xxxxxxxxxxxx
credentials.secret xxxxxxxxxxxxxxxxxxxxxxxxTo view a specific option type config <key>.
> config credentials.key
credentials.key xxxxxxxxxxxxTo set an option type config <key> <value>.
> config credentials.key mykey
credentials.key mykeyBuy
To buy a stock simply provide the symbol and amount.
> buy SPY 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4eSell
To sell a stock simply provide the symbol and amount.
> sell TSLA 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4eOrders
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-4861c29333d2Aliases
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 |
To Do
More is coming! This project is early in development.
Contributing
Pull requests are encouraged. 🙂
