Documents#

Get Trade Documents For Account#

BrokerClient.get_trade_documents_for_account(account_id: Union[UUID, str], documents_filter: Optional[GetTradeDocumentsRequest] = None) Union[List[TradeDocument], Dict[str, Any]]#

Gets the list of TradeDocuments for an Account.

Parameters:
  • account_id (Union[UUID, str]) – The id of the Account you wish to retrieve documents for. str values will attempt to be upcast into UUID instances

  • documents_filter (Optional[GetTradeDocumentsRequest]) – The optional set of filters you can apply to filter the returned list.

Returns:

The filtered list of TradeDocuments

Return type:

List[TradeDocument]

Get Trade Document For Account By ID#

BrokerClient.get_trade_document_for_account_by_id(account_id: Union[UUID, str], document_id: Union[UUID, str]) Union[TradeDocument, Dict[str, Any]]#

Gets a single TradeDocument by its id

Parameters:
  • account_id (Union[UUID, str]) – The id of the Account that owns the document

  • document_id (Union[UUID, str]) – The id of the TradeDocument

Returns:

The requested TradeDocument

Return type:

TradeDocument

Raises:

APIError – Will raise an APIError if the account_id or a matching document_id for the account are not found.

Download Trade Document For Account By ID#

BrokerClient.download_trade_document_for_account_by_id(account_id: Union[UUID, str], document_id: Union[UUID, str], file_path: str) None#

Downloads a TradeDocument to file_path

Parameters:
  • account_id (Union[UUID, str]) – ID of the account to pull the document from

  • document_id (Union[UUID, str]) – ID of the document itself

  • file_path (str) – A full path for where to save the file to

Return type:

None