Journals#

Create a Journal#

BrokerClient.create_journal(journal_data: CreateJournalRequest) Union[Journal, Dict[str, Any]]#

The journal API allows you to transfer cash and securities between accounts.

Creates a new journal request.

Parameters:

journal_data (CreateJournalRequest) – THe journal to be submitted.

Returns:

The submitted journal.

Return type:

Journal

Create a Batch Journal#

BrokerClient.create_batch_journal(batch_data: CreateBatchJournalRequest) Union[List[BatchJournalResponse], Dict[str, Any]]#

A batch journal moves assets from one account into many others.

Currently, cash batch journals are supported.

Parameters:

batch_data (CreateBatchJournalRequest) – The batch journals to be submitted.

Returns:

The submitted batch journals.

Return type:

BatchJournalResponse

Create a Reverse Batch Journal#

BrokerClient.create_reverse_batch_journal(reverse_batch_data: CreateReverseBatchJournalRequest) Union[List[BatchJournalResponse], Dict[str, Any]]#

A reverse batch journal moves assets into one account from many others.

Currently, cash reverse batch journals are supported.

Parameters:

reverse_batch_data (CreateReverseBatchJournalRequest) – The reverse batch journals to be submitted.

Returns:

The submitted reverse batch journals.

Return type:

BatchJournalResponse

Get all Journals#

BrokerClient.get_journals(journal_filter: Optional[GetJournalsRequest] = None) Union[List[Journal], Dict[str, Any]]#

Returns journals from the master list.

Parameters:

journal_filter (Optional[GetJournalsRequest]) – The parameters to filter the query by.

Returns:

The journals from the query.

Return type:

List[Journal]

Get Journal by ID#

BrokerClient.get_journal_by_id(journal_id: Union[UUID, str] = None) Union[Journal, Dict[str, Any]]#

Returns a specific journal by its id.

Parameters:

journal_id (Union[UUID, str]) – The id of the journal to retrieve.

Returns:

The journal with given id.

Return type:

Journal

Cancel Journal by ID#

BrokerClient.cancel_journal_by_id(journal_id: Union[UUID, str]) None#

Cancels a specific journal by its id.

Parameters:

journal_id (Union[UUID, str]) – The id of the journal to be cancelled.

Returns:

None