2.0.2 • Published 3 years ago

alpaca-terminal v2.0.2

Weekly downloads
18
License
ISC
Repository
github
Last release
3 years ago

alpaca-terminal

version code build prettier

a command line terminal for trading with the Alpaca API

Contents

Features

  • View account information.
  • Buy and sell stocks.
  • Close positions with optional wildcards.
  • Cancel orders with optional wildcards.
  • View recent orders.
  • 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.

CommandAliases
helph ?
configconf cfg
accountacc a
buyb
sells
orderso
closec
cancelca
positionspos p
quitq

To Do

More is coming! This project is early in development.

Contributing

Pull requests are encouraged. 🙂

2.0.2

3 years ago

2.0.1

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.7

3 years ago