Journals

Create a Reverse Batch Journal Transaction (Many-to-One)

You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only.

Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed.

A successful response contains an array of JNLC journal objects. If any account or entry is invalid, the whole batch operation is canceled and no per-item error result is returned.

post/v1/journals/reverse_batch

Request

  • Base URL
    https://broker-api.giftcity.sandbox.in.alpaca.markets
  • URL
    https://broker-api.giftcity.sandbox.in.alpaca.markets/v1/journals/reverse_batch
  • Auth
    HTTP basic

Request body

entry_type'JNLC'

Only supports JNLC for now

to_accountstring

The destination of funds. Most likely is your Sweep Firm Account

Example request

{
  "entries": [
    {
      "amount": "10",
      "from_account": "8e00606a-c9ac-409a-ba45-f55e8f77984a"
    },
    {
      "amount": "100",
      "from_account": "b9b19618-22dd-4e80-8432-fc9e1ba0b27d"
    },
    {
      "amount": "100",
      "from_account": "c96a5e16-7fca-425a-b67b-0814d064bfc0"
    }
  ],
  "entry_type": "JNLC",
  "to_account": "8f8c8cee-2591-4f83-be12-82c659b5e748"
}

Response

OK

created_atstring date-time

The creation time when supplied by the endpoint.

currencystring required

Currency denomination of the journal.

descriptionstring required

The journal description.

from_accountstring uuid required

The account ID that initiated the journal.

idstring uuid required

The journal ID.

net_amountstring decimal nullable required

The cash amount, or null when not applicable.

pricestring decimal nullable required

The journaled security price, or null when not applicable.

qtystring decimal nullable required

The journaled security quantity, or null when not applicable.

settle_datestring date nullable required

The settlement date, or null until one is assigned.

status'pending' | 'canceled' | 'executed' | 'activity_created' | 'queued' | 'rejected' | 'deleted' | 'refused' | 'sent_to_clearing' | 'correct' required

Represents the status that a Journal instance can be in.

Current Values

queued Journal in queue to be processed. Journal is not processed yet.

sent_to_clearing Journal sent to be processed by Alpaca's booking system. The journal is not processed yet.

pending Journal pending to be processed as it requires manual approval from Alpaca operations (for example due to hitting JNLC daily limits).

executed Journal executed and balances updated for both sides of the journal transaction. This is not a final status, journals can be reversed if there is an error.

activity_created Non-trade activity has been created for journal (JNLC v2-only).

rejected Journal rejected. Please try again.

canceled Journal canceled. This is a FINAL status.

refused Journal refused. Please try again.

deleted Journal deleted. This is a FINAL status.

correct Journal is corrected. Previously executed journal is cancelled and a new journal is corrected amount is created. This is a FINAL status.

symbolstring nullable required

The journaled security symbol, or null for a cash journal.

system_datestring date nullable required

The booking-system date, or null until one is assigned.

to_accountstring uuid required

The account ID that received the journal.

entry_type'JNLC' required

Cash journal discriminator value.

transmitter_account_numberstring

Optional for JNLC journals. Maximum 255 characters. See more details about Travel Rule in our main documentation.

transmitter_addressstring

Optional for JNLC journals. Maximum 255 characters. See more details about Travel Rule in our main documentation.

transmitter_financial_institutionstring

Optional for JNLC journals. Maximum 255 characters. See more details about Travel Rule in our main documentation.

transmitter_namestring

Optional for JNLC journals. Maximum 255 characters. See more details about Travel Rule in our main documentation.

transmitter_timestampstring date-time

Optional for JNLC journals. RFC 3339 format. See more details about Travel Rule in our main documentation.

Example response

[
  {
    "currency": "USD",
    "description": "",
    "entry_type": "JNLC",
    "from_account": "8f8c8cee-2591-4f83-be12-82c659b5e748",
    "id": "56f106e5-25a4-4eee-96fa-25bb05dc86bc",
    "net_amount": "1000",
    "price": null,
    "qty": null,
    "settle_date": null,
    "status": "pending",
    "symbol": null,
    "system_date": null,
    "to_account": "399f85f1-cbbd-4eaa-a934-70027fb5c1de"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.