Debt Lines

Get a debt line's principal against its limit, what it can still draw, its next payment and any overdue fees

Changed on
get/debt-lines/{id}/position

Request

Path parameters

idstring required

An object id with prefix

Example:user_0123456789ABCDEFGHIJKLMNOPq

Query parameters

datestring date

UTC date to compute the position for, the caller's today: it sets the next payment's due date and the days of interest projected until then; today by default

Example:2024-01-15

Response

Successful operation

datestring date required

UTC date the position is computed for

currencystring required

currency of the debt line

principalinteger required

outstanding principal: settled plus the draws in flight, which count from the day they are made since they are expected to settle that day

available_to_drawinteger required

limit amount minus principal, floored at 0; whether a draw is allowed at all also depends on the terms status and the checks in /status

deficitinteger required

principal above the limit amount; 0 while within the limit

interest_ratenumber

effective annual interest rate of the current step: its margin, plus today's SOFR unless the rate is fixed; omitted without a current step

daily_interestinteger

interest one day accrues on the principal (draws in flight included, as if settled) at interest_rate, rounded; a draw still in flight when the nightly accrual runs accrues nothing that day; omitted without a current step

creditinteger

credit the fees ledger holds (deposits above the fees charged, the debits in flight counted as paid), which pays the next payments down; next_payment's credit_applied is the part the 1st uses and the rest carries over; omitted when there is none

Example response

{
  "date": "2024-01-15",
  "currency": "USD",
  "principal": 10000,
  "limit": {
    "amount": 10000,
    "max_principal": 10000,
    "advance_rate": 0.05,
    "eligible_balance": 10000,
    "collateral": 10000,
    "borrowing_base": 10000,
    "metric_month": "2024-01"
  },
  "available_to_draw": 10000,
  "deficit": 10000,
  "interest_rate": 0.05,
  "daily_interest": 10000,
  "next_payment": {
    "due_on": "2024-01-15",
    "amount": 10000,
    "projected_interest": 10000,
    "min_payment_top_up": 10000,
    "past_due": 10000,
    "credit_applied": 10000,
    "accrued": 10000,
    "accrued_through": "2024-01-15"
  },
  "overdue": {
    "amount": 10000,
    "due_on": "2024-01-15",
    "days_late": 42
  },
  "credit": 10000
}

Changes