Just-In-Time Securities Funding #

Alpaca offers Just-In-Time (JIT) Securities funding which is available for select partners only. When a partner is JIT enabled, Alpaca’s system calculates the difference between inflow and outflow account activity and assesses a single wire amount. Inflows to Alpaca typically consist of executed buy trades, while outflows to the partner are made up of executed sell trades and dividend payments. Should the inflows exceed the outflows across your account base, you will be responsible for sending the funds to Alpaca in time for settlement. If the opposite is true, Alpaca will initiate the wire on the morning of settlement equal to the difference between the outflows and the inflows.

Working on JIT Funding?

See Get Started with Just-In-Time Funding for Broker API for a walkthrough of JIT and the APIs involved in the integration.


JIT Reports #

JIT Securities reports are made available through the API and can be accessed within the hour after 11:30 PM EST on the trade date (T+0). The reports communicate transaction-level details as well as overall settlement amounts, transfer direction, and payment timing.

Parameter Data Type Notes
detail content-type = application/csv Contains all activities that impact cash throughout the trading session including executed trades, trading fees, and corporate actions that involve cash allocations.
net_summary content-type = application/csv Consists of three columns and a single row, which lists the net money movement to or from Alpaca for T0, T1, and T2.
net_payment content-type = application/pdf Highlights the net amount due to Alpaca by settlement or to the partner on the date of settlement in a formalized invoice format.
net_payment_final content-type = application/pdf Includes additional information to account for T+0 and T+1 settling activity to clarify settlement journaling reconciliation. This report is generated after trading session close on T+1.

Retrieving JIT Reports #

GET /v1/transfers/jit/reports

Request #

Sample Request #

{
  "report_type": "net_summary.csv",
  "system_date": "07-15-2021"
}

Parameters #

Parameter Type Required Notes
report_type ENUM.ReportType
Required
system_date string/date
Required
Date of file generation
asset_class string
Optional
The asset class to retrieve for.

Response #

A JIT Securities report in the form of the appropriate content type.

ENUM.ReportType #

Name Description
detail Detail report, content-type = application/csv
net_summary Net Summary report, content-type = application/csv
net_payment Net Payment report, content-type = application/pdf
net_payment_final Net Payment Final report, content-type = application/pdf
gross_summary Gross Summary report, content-type = application/pdf
gross_payment Gross Payment report, content-type = application/pdf
gross_payment_final Gross Payment Final report, content-type = application/pdf

Detail.CSV #

Attribute Type Requirement Notes
trns_id string/UUID
Required
The transaction ID
external_id string/UUID
Required
The partner’s transaction ID
summary_categrory ENUM.SummaryCategoryType
Required
Assigning the transaction to the corresponding settlement date money movement
account_id string/UUID
Required
The account ID
account_no string
Required
The account number
symbol string
Required
Symbol or asset ID to identify the asset to trade
system_date string/date
Required
The date the transaction was recorded or updated
trade_date string/date
Required
The trade date
trade_time string/time
Optional
The transaction time (EST) for trading activity
settle_date string/date
Required
The settlement date
entry_type ENUM.EntryType
Required
side string
Required
buy or sell for trading activity
qty decimal
Required
Quantity of securities in the transaction
price decimal
Required
Price of the security in the transaction
gross_amt decimal
Required
Gross payment amount
commission decimal
Required
Commission on the transaction
net_amt decimal
Required
The gross payment less the commission for a transaction
description string
Required
Description of the transaction
status ENUM.StatusType
Required
order_id string/UUID
Required
The order ID
client_order_id string/UUID
Required
The partner’s order ID

Net_Summary.CSV #

Attribute Type Requirement Notes
t0 decimal
Required
Net amount due for t0 settling activity where a negative value represents money due to Alpaca
t1 decimal
Required
Net amount due for t1 settling activity where a negative value represents money due to Alpaca
t2 decimal
Required
Net amount due for t2 settling activity where a negative value represents money due to Alpaca

ENUM.SummaryCategoryType #

Name Description
in_t0 A T+0 settling transaction that results in money due to Alpaca
in_t1 A T+1 settling transaction that results in money due to Alpaca
in_t2 A T+2 settling transaction that results in money due to Alpaca
out_t0 A T+0 settling transaction that results in money due to the partner
out_t1 A T+1 settling transaction that results in money due to the partner
out_t2 A T+2 settling transaction that results in money due to the partner
jit_journal Journal entries generated by the JIT journaling job to flatten customer debits and credits

ENUM.EntryType #

Name Description
CSD Cash Disbursement (+)
DIV Dividend
DIVNRA Dividend Adjusted (NRA Withheld)
FEE Trading related fees
INT Interest (Credit/Margin)
JNLC Journal Entry (Cash)
MA Merger/Acquisition
REORG Reorg Coporate Action
TRD Trade

ENUM.StatusType #

Name Description
executed The order has been filled, and no further updates will occur for the order.
canceled The order has been canceled, and no further updates will occur for the order. This can be either due to a cancel request by the user, or the order has been canceled by the exchanges due to its time-in-force.
correct The order has been corrected, and no further updates will occur for the order.

Daily Trading Limit Object #

The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change.

{
  "daily_net_limit_in_use": "150804",
  "daily_net_limit": "1000000"
}

Attributes #

Attribute Type Notes
daily_net_limit_in_use string/decimal The real time net value of cash inflows (buy trades, etc.) with cash outflows (sell trades, dividends, etc). This will be dynamic throughout the day based on user activity, with executed orders being reset at the start of the next trading day.
daily_net_limit string/decimal The net buying limit that can be reached before further cash outflow trading activity is restricted. Please reach out to learn more about how this limit is determined.

Retrieving Daily Trading Limits #

GET /v1/transfers/jit/limits

Request #

No request parameters

Response #

Returns the JIT Securities Daily Trading Limit Object based off of real time calculations.

Retrieving JIT Ledgers #

GET /v1/transfers/jit/ledgers

Request #

No request parameters

Response #

The response is an array of objects that correspond to each ledger account, each of whichcontain the following attributes.

Attributes

Attribute Type Notes
id string/uuid The ledger ID
ledger_name string The ledger name
status string ENUM.LedgerStatus
created_at string/timestamp Creation time in UNI X format

Sample Response

{
   "common_stock":[
      {
         "id":"2896b9e2-3198-44cd-a08e-4cc4079aee33",
         "ledger_name":"Securities JIT IN",
         "status":"active",
         "created_at":"1653532627"
      },
      {
         "id":"7f88e5a2-8662-449c-8bd0-07cf5bc7632e",
         "ledger_name":"Just In Time Out Wash - JITS",
         "status":"active",
         "created_at":"1653532763"
      },
      {
         "id":"8090a021-33ea-4b9d-8586-c91df416d952",
         "ledger_name":"Just In Time Receivables - JITS",
         "status":"active",
         "created_at":"1653532805"
      },
      {
         "id":"92b2095b-6370-483e-b6e9-5483bcc0fc1c",
         "ledger_name":"Securities JIT JT",
         "status":"active",
         "created_at":"1653532681"
      }
   ],
   "crypto": []
}

Retrieving JIT Ledger Balances #

GET /v1/transfers/jit/{ledger_id}/balances

Request #

Parameters

Attribute Type Requirement Notes
start_date string/date
Required
The start date (inclusive) of the ledgerbalances and activities.
end_date string/date
Required
The end date (inclusive) of the ledgerbalances and activities.

Response #

The response is an array of objects that correspond to each ledger account, each of whichcontain the following attributes.

Attributes

Attribute Type Notes
id string/uuid The ledger ID
ledger_no string The ledger account number
ledger_name string The ledger name
transactions array ofobjects TransactionObject
starting_balance number Ledger balance at the beginning of thedate range
ending_balance number Ledger balance at the end of thedate range
activity_amount number The number of transactions related to the ledger during the specified daterange

Sample Response

{
   "id":"06b9d76e-1733-460c-844e-48d1ae0f10c3",
   "ledger_no":"JTRJITS00",
   "ledger_name":"Just In Time Receivable - JIT",
   "transactions":[
      {
         "account_id":"06b9d76e-1733-460c-844e-48d1ae0f10c3",
         "account_no":"JTRJITS00",
         "account_name":"Just In Time Receivable - JITS",
         "system_date":"2022-06-09",
         "entry_type":"JNLC",
         "description":"debit balance = 4184.36, base_rate = 0.0375, spread = 0.05",
         "contra_account_name":"Just In Time Interest Income",
         "amount":"1",
         "balance":"4185.36"
      },
      {
         "account_id":"06b9d76e-1733-460c-844e-48d1ae0f10c3",
         "account_no":"JTRJITS00",
         "account_name":"Just In Time Receivable - JITS",
         "system_date":"2022-06-10",
         "entry_type":"JNLC",
         "description":"debit balance = 4185.36, base_rate = 0.0375, spread = 0.05",
         "contra_account_name":"Just In Time Interest Income",
         "amount":"1",
         "balance":"4186.36"
      }
   ],
   "starting_balance":4184.36,
   "ending_balance":4186.36,
   "activity_amount":2
}

Transaction Object #

Attributes

Attribute Type Notes
account_id string/uuid The ledger ID
account_no string The ledger account number
account_name string The ledger name
system_date string/date Date of transaction
entry_type string Type of transaction
description string Plain text overview of thetransaction
contra_account_name string Contra account of transaction
amount string/number Total amount of the transaction
balance string/number Ending balance after thetransaction has been applied
Edit Edit this page