Data API

A Data API Endpoint handles a Data API Request and relays the Data API Response.

Note

Historical resource counterparts (e.g. hist/<resource>) do not have corresponding low-level constructs. Instead, the base constructs accept an optional trade_date argument that, if specified, will automatically direct to the proper historical resource endpoint. While this implementation goes against a core design goal, it simplifies the architecture to a significant enough degree that it is ultimately justifiable.

A user is expected to create a request object from one of the subclasses of DataApiRequest. These requests can be passed to the corresponding endpoint object, which is a subclass of type DataApiEndpoint.

class orats.endpoints.data.api.DataApi(token=None, mock=False)

Low-level interface to the Data API.

A direct translation of the Data API that simply wraps the responses in structured Python objects.

__init__(token=None, mock=False)