Python Algorithmic Trading Cookbook
上QQ阅读APP看书,第一时间看更新

Fetching Financial Data

Having financial data handy is essential for carrying out algorithmic trading. Financial data can be both static and dynamic in nature. Static financial data is data that doesn't change during trading hours. Static data consists of lists of financial instruments, the attributes of financial instruments, the circuit limits of financial instruments, and the recorded close price of the last trading day. Dynamic financial data is data that may change continuously during trading hours. Dynamic data consists of market depth, the last traded prices, the time and quantity of financial instruments, and the recorded high and low prices of the day. This chapter includes recipes on fetching various types of financial data.

The following is a list of the recipes in this chapter:

  • Fetching the list of financial instruments
  • Attributes of a financial instrument
  • Expiry of financial instruments
  • Circuit limits of a financial instrument
  • The market depth of a financial instrument
  • The total pending buy quantity of a financial instrument
  • The total pending sell quantity of a financial instrument
  • The total volume traded for the day of a financial instrument
  • The last traded price of a financial instrument
  • The last traded time of a financial instrument
  • The last traded quantity of a financial instrument
  • The recorded open price of the day of a financial instrument
  • The recorded highest price of the day of a financial instrument
  • The recorded lowest price of the day of a financial instrument
  • The recorded close price of the last traded day of a financial instrument