alpaca-terminal

2.0.2 • Public • Published

alpaca-terminal

version code build prettier

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-terminal

Usage

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 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

Buy

To buy a stock simply provide the symbol and amount.

> buy SPY 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4e

Sell

To sell a stock simply provide the symbol and amount.

> sell TSLA 1
placed with ID 1184e1b7-2aa9-471e-8ec0-0981d1c35e4e

Orders

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

Aliases

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. 🙂

Readme

Keywords

none

Package Sidebar

Install

npm i alpaca-terminal

Weekly Downloads

1

Version

2.0.2

License

ISC

Unpacked Size

38.9 kB

Total Files

35

Last publish

Collaborators

  • master-chief