Historical Data#

CorporateActionsClient#

class alpaca.data.historical.corporate_actions.CorporateActionsClient(api_key: Optional[str] = None, secret_key: Optional[str] = None, oauth_token: Optional[str] = None, use_basic_auth: bool = False, raw_data: bool = False, url_override: Optional[str] = None)#

The REST client for interacting with Alpaca Corporate Actions API endpoints.

__init__(api_key: Optional[str] = None, secret_key: Optional[str] = None, oauth_token: Optional[str] = None, use_basic_auth: bool = False, raw_data: bool = False, url_override: Optional[str] = None) None#

Instantiates a Corporate Actions Client.

Parameters:
  • api_key (Optional[str], optional) – Alpaca API key. Defaults to None.

  • secret_key (Optional[str], optional) – Alpaca API secret key. Defaults to None.

  • oauth_token (Optional[str]) – The oauth token if authenticating via OAuth. Defaults to None.

  • use_basic_auth (bool, optional) – If true, API requests will use basic authorization headers.

  • raw_data (bool, optional) – If true, API responses will not be wrapped and raw responses will be returned from methods. Defaults to False. This has not been implemented yet.

  • url_override (Optional[str], optional) – If specified allows you to override the base url the client points to for proxy/testing.

Get Corporate Actions#

CorporateActionsClient.get_corporate_actions(request_params: CorporateActionsRequest) Union[Dict[str, Any], CorporateActionsSet]#

Returns corporate actions data

Parameters:

request_params (CorporateActionsRequest) – The request params to filter the corporate actions data