ExchangeΒΆ

class alchemist_lib.database.exchange.Exchange(exchange_name, website=None, timetable_id=None, price_data_source_name=None)[source]

Map class for table exchange.

  • exchange_name: String(150), primary_key.
  • website: String(500), null.
  • timetable_id: Integer, null, foreign_key(timetable.timetable_id).
  • price_data_source_name: String(150), null, foreign_key(price_data_source.price_data_source_name).
Relationships:
  • price_data_source: PriceDataSource instance. (One-to-Many)
  • timetable: Timetable instance. (One-to-Many)
  • brokers: List of Broker instances. (Many-to-Many)
__init__(exchange_name, website=None, timetable_id=None, price_data_source_name=None)

Costructor method.

Parameters:
  • exchange_name (str) – Name (or acronym) of the exchange.
  • website (str, optional) – Site of the exchange.
  • timetable_id (int, optional) – Timetable identification of trading hours. None if the market never ends.
  • price_data_source_name (int, optional) – Name that identify the data source for OHLCV and last_price data.