AlpacaBroker¶
- class src.boatwright.Brokers.AlpacaBroker.AlpacaBroker(key=None, secret_key=None, broker_name=None, quote_symbol='USD', paper=True, debug=False)¶
Alpaca Broker
- Parameters:
key (str)
secret_key (str)
broker_name (str)
quote_symbol (str)
paper (bool)
- abstractmethod cancel_order(order_id)¶
cancels an open order returns “success” or “fail”
- get_account_balance(base_symbol)¶
Returns user account info for the specified base_symbol (i.e. how much BTC user has).
- get_product_info(base_symbol)¶
- abstractmethod limit_order(order)¶
place limit order
- Parameters:
order (LimitOrder)
- market_order(order)¶
place market order
- Parameters:
order (MarketOrder)
- step(data_row)¶
actions on each ‘step’
- update_aum()¶
update values for cash, stock/crypto/forex etc assets, and total aum :return: None