-
Notifications
You must be signed in to change notification settings - Fork 11
Functions and Classes List
Axel Gard edited this page Sep 22, 2020
·
12 revisions
def | doc str |
---|---|
authentication_header() | get's key and returns key in json format |
api() | returns object for api |
exchange_open() | returns if exchange is open |
order(sym, qty, beh) | submit order and is a |
buy(qty, sym) | buys a stock. Takes int qty and a string sym |
sell(qty, sym) | sells a stock. Takes int qty and a string sym |
is_shortable(sym) | checks if stock can be shorted |
can_borrow(sym) | check whether the name is currently |
get_barset(sym, lim) | get's barset for stock for time period lim |
value_of_stock(sym) | takes a string sym. |
get_week_pl_change(sym) | % change over a week |
get_position() | create a list of all owned position |
is_tradable(sym) | return if the stock can be traded |
nasdaq_assets() | creates a list of all avilabel assets on NASDAQ |
exchange_lst() | returns a list of stock exchanges that is supported by alpaca |
stock_position(sym) | takes str sym (needs to stock symbol) |
owned_stock_qty(sym) | returns quantity of owned of a stock sym (str) |
current_price(sym) | returns the current price of given symbol (str) |
owned_stocks() | returns a list of owned stocks |
reformat_position(position) | reformat position to be float values |
stock_today_plpc(sym) | stock today's profit/loss percent |
stock_plpc(sym) | stock sym (str) Unrealized profit/loss percentage |
sell_list(lst) | takes a list of symbols (str) and sells all stocks in that list |
format_log_action(act, sym, qty) | formats info for logging |
log(log_data) | writes log data to file |
© Copyright 2024, Axel Gard | Get cira with pip