Journals
The Journal API allows you to create, cancel, and retrieve journals for a customer. You can use journals to move cash or securities between accounts. Journal requests are processed in real-time and are subjected to approvals.
POST/v1/journals
Create Journal
Use this endpoint to create a journal between two accounts.
Request Body
Parameter | Description | Type | Input |
---|---|---|---|
fromPortfolioId | Unique ID for the portfolio sending the journal | UUID | Required |
toPortfolioId | Unique ID for the portfolio receiving the journal | UUID | Required |
fromCustomerId | Unique ID for the customer sending the journal | UUID | Required |
toCustomerId | Unique ID for the customer receiving the journal | UUID | Required |
correspondentId | Unique ID for the correspondent | UUID | Required |
entryType | Type of journal entry ("CASH" or "SECURITY") | Enum | Required |
amount | Amount of the journal entry | Number | Required if entryType is CASH |
symbol | Symbol of the security | String | Required if entryType is SECURITY |
quantity | Quantity of the security | Number | Required if entryType is SECURITY |
description | Description of the journal entry | String | Required |
currency | Currency of the journal entry | String | Optional |
Success Response
JSON
201 Created{
"fromJournal": {
"firmId": "acf4d766-f99d-408d-8450-888d208188de",
"portfolioId": "869b7b4a-83c5-4444-8496-fcffc947a4c4",
"customerId": "46699f8e-4003-42f2-b0cc-bb064cc27d1e",
"correspondentId": "a3884657-e519-4d5e-b1e6-e2551ebe708e",
"direction": "SENT",
"amount": null,
"quantity": 1,
"symbol": "AMZN",
"currency": null,
"description": "A gift from your friend",
"entryType": "SECURITY",
"createdAt": "2024-08-30T15:06:00.937Z",
"updatedAt": "2024-08-30T15:06:00.937Z",
"journalId": "e98ac895-1966-489f-9901-b000a18f5b1a",
"status": "CREATED"
},
"toJournal": {
"firmId": "acf4d766-f99d-408d-8450-888d208188de",
"portfolioId": "0bea7102-5c7e-4bd0-9305-0f0364e4329a",
"customerId": "6acbbf7c-0674-4c98-9e4d-c24a0f5e1924",
"correspondentId": "a3884657-e519-4d5e-b1e6-e2551ebe708e",
"direction": "RECEIVED",
"amount": null,
"quantity": 1,
"symbol": "AMZN",
"currency": null,
"description": "A gift from your friend",
"entryType": "SECURITY",
"createdAt": "2024-08-30T15:06:01.121Z",
"updatedAt": "2024-08-30T15:06:01.121Z",
"journalId": "c4cbf9a1-1264-4d5b-8395-085e5ab8d2cd",
"status": "CREATED"
}
}
GET/v1/journals/{journalId}
Get Journal by ID
Use this endpoint to retrieve a journal entry.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
journalId | Unique ID for the journal | UUID | Required |
Success Response
JSON
200 OK{
"createdAt": "2024-08-30T01:13:47.653Z",
"updatedAt": "2024-08-30T01:13:47.653Z",
"journalId": "0c3e3c83-305b-4067-90fe-8c8bfb1df7dc",
"correspondentId": "a3884657-e519-4d5e-b1e6-e2551ebe708e",
"firmId": "acf4d766-f99d-408d-8450-888d208188de",
"portfolioId": "0bea7102-5c7e-4bd0-9305-0f0364e4329a",
"customerId": "6acbbf7c-0674-4c98-9e4d-c24a0f5e1924",
"amount": 25,
"direction": "RECEIVED",
"symbol": null,
"quantity": null,
"entryType": "CASH",
"currency": null,
"description": "Happy trading",
"status": "CREATED"
}
GET/v1/journals
Get Journals
Use this endpoint to retrieve all journals for a customer, portfolio or correspondent.
Query Parameters
Parameter | Description | Type | Input |
---|---|---|---|
customerId | Unique ID for the customer | UUID | Optional |
portfolioId | Unique ID for the portfolio | UUID | Optional |
correspondentId | Unique ID for the correspondent | UUID | Optional |
page | Page number | Number | Optional |
limit | Number of items per page | Number | Optional |
Success Response
JSON
200 OK{
"journals": [
{
"createdAt": "2024-08-30T01:13:47.653Z",
"updatedAt": "2024-08-30T01:13:47.653Z",
"journalId": "0c3e3c83-305b-4067-90fe-8c8bfb1df7dc",
"correspondentId": "a3884657-e519-4d5e-b1e6-e2551ebe708e",
"firmId": "acf4d766-f99d-408d-8450-888d208188de",
"portfolioId": "0bea7102-5c7e-4bd0-9305-0f0364e4329a",
"customerId": "6acbbf7c-0674-4c98-9e4d-c24a0f5e1924",
"amount": 25,
"direction": "RECEIVED",
"symbol": null,
"quantity": null,
"entryType": "CASH",
"currency": null,
"description": "Happy trading",
"status": "CREATED"
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 10,
"hasMore": false
}
}
DELETE/v1/journals/{journalId}/cancel
Cancel Journal
Use this endpoint to cancel a journal. Only "CREATED" or in "VERIFICATION" journals can be canceled.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
journalId | Unique ID for the journal | UUID | Required |
Success Response
JSON
200 OK{
"createdAt": "2024-08-30T01:13:47.653Z",
"updatedAt": "2024-08-30T01:13:47.653Z",
"journalId": "0c3e3c83-305b-4067-90fe-8c8bfb1df7dc",
"correspondentId": "a3884657-e519-4d5e-b1e6-e2551ebe708e",
"firmId": "acf4d766-f99d-408d-8450-888d208188de",
"portfolioId": "0bea7102-5c7e-4bd0-9305-0f0364e4329a",
"customerId": "6acbbf7c-0674-4c98-9e4d-c24a0f5e1924",
"amount": 25,
"direction": "RECEIVED",
"symbol": null,
"quantity": null,
"entryType": "CASH",
"currency": null,
"description": "Happy trading",
"status": "CANCELED"
}