SPY751.28 0.87%QQQ722.82 1.43%DIA530.09 0.42%IWM298.90 0.44%BTC63,139 0.86%ETH1,771.45 0.83%SOL81.20 1.53%DOGE0.0748 2.32%AAPL312.66 1.31%MSFT386.74 0.96%NVDA195.55 0.37%GOOGL366.46 1.82%META600.29 2.98%TSLA419.77 6.69%AMZN244.16 0.61%JPM337.72 1.43%UST10Y4.48% 0.04%UST2Y4.17% 0.03%FFR3.63% 0.00%DXY102.40 0.21%VIX15.83 1.67%GOLD4,143.00 0.29%OIL69.20 0.95%ZHVI428,600 1.80%SPY751.28 0.87%QQQ722.82 1.43%DIA530.09 0.42%IWM298.90 0.44%BTC63,139 0.86%ETH1,771.45 0.83%SOL81.20 1.53%DOGE0.0748 2.32%AAPL312.66 1.31%MSFT386.74 0.96%NVDA195.55 0.37%GOOGL366.46 1.82%META600.29 2.98%TSLA419.77 6.69%AMZN244.16 0.61%JPM337.72 1.43%UST10Y4.48% 0.04%UST2Y4.17% 0.03%FFR3.63% 0.00%DXY102.40 0.21%VIX15.83 1.67%GOLD4,143.00 0.29%OIL69.20 0.95%ZHVI428,600 1.80%
crypto: Binance/Coinbase · equities & commodities: Yahoo · rates: FRED · DXY: static
LEVRG / Modern Treasury

Asset bulk funding with Modern Treasury.

C#/.NET API caller library — later ported to Python/Django — that drives Ledger Transactions, Payment Orders, and Expected Payments for Home Equity Agreement asset funding batches.

Batch · BATCH-20260222
$3,604,400
17 assets funded · 02/22/2026
Assets in batch
20
17 funded · 3 pending
Wire destination
Title Co.
XYZ Title Co. · ACH wire
API library
Python
ported from C#/.NET · Django
Asset funding flow
Origination pipeline → MT Bulk Funding tool → portfolio
01
Origination
HEA agreement signed Asset ID generated Terms captured in PO
02
Bulk Funding Tool
Aggregate 17 funded assets Create 3 MT accounts/asset Build LT + Payment Order
03
MT Ledger Transaction
DR HEA Portfolio CR Cash — Funding Balanced double-entry
04
Payment Order
Wire aggregate to XYZ Title Co. $3,604,400
05
Asset Portfolio
17 assets · $3,604,400 Expected Payments created per fee
Asset portfolio · BATCH-20260222
20 HEA assets · 17 funded · $3,604,400 aggregate
02/22/2026
#Asset IDCityAmountFunding DateStatus
01714937485928108394Phoenix, AZ$285,00002/22/2026funded
02293847561029384756Denver, CO$127,50002/22/2026funded
03847291038475629104Austin, TX$392,00002/22/2026funded
04194837265047382910Nashville, TN$73,20002/22/2026funded
05563920184756291038Charlotte, NC$218,00002/22/2026funded
06729104856392018475Portland, OR$155,600pending
07384756291048372910Seattle, WA$427,00002/22/2026funded
08102938475629104837Minneapolis, MN$88,40002/22/2026funded
09475629104857392018Tampa, FL$312,00002/22/2026funded
10618473920184756293Columbus, OH$50,00002/22/2026funded
11937485629104857391Atlanta, GA$196,500pending
12284756391048273920San Antonio, TX$344,00002/22/2026funded
13103948576291048372Las Vegas, NV$261,80002/22/2026funded
14849201738465920173Baltimore, MD$109,00002/22/2026funded
15376291048574839201Indianapolis, IN$67,50002/22/2026funded
16502918374659201847Sacramento, CA$183,00002/22/2026funded
17738465920173849201Raleigh, NC$405,00002/22/2026funded
18291048372948576391Richmond, VA$234,500pending
19648392018475629104Kansas City, MO$92,80002/22/2026funded
20185739204756391048Salt Lake City, UT$168,20002/22/2026funded
17 funded assets total$3,604,400
Asset Detail
714937485928108394

The following sections trace this single asset through account creation, ledger recording, bulk payment order, and fee reconciliation via Expected Payments.

MT Ledger Accounts · 714937485928108394
3 accounts created · one per line item
Investment Payment
ID: 8834927610294857
normal_balance: debit · line_item: investment_payment
$285,000
↑ debit-normal
Origination Fees
ID: 3948271059274816
normal_balance: credit · line_item: origination_fees
$2,850
↑ credit-normal
Appraisal / Concessions
ID: 5610294857384920
normal_balance: credit · line_item: appraisal_concessions
$1,500
↑ credit-normal
MT Ledger hierarchy
FUNDING DATES → date → asset → line items
FUNDING DATES
02/22/2026
714937485928108394
Investment Payment
$285,000
Origination Fees
$2,850
Appraisal Fees(gross)
$3,500
Concessions−$2,000 coupon
−$2,000
Net appraisal EP$1,500
Python · create ledger accounts per asset
modern-treasury SDK · Django view layer
Step 1 of 3
# Django · Step 1 — create 3 MT LedgerAccounts under asset 714937485928108394
def create_asset_funding_accounts(client, asset_id: str, ledger_id: str) -> dict:
    line_items = [
        ("investment_payment",    "debit",  "Investment Payment"),
        ("origination_fees",      "credit", "Origination Fees"),
        ("appraisal_concessions", "credit", "Appraisal / Concessions"),
    ]
    accounts = {}
    for key, normal, label in line_items:
        acct = client.ledger_accounts.create(
            name=f"{asset_id} · {label}",
            currency="USD",
            ledger_id=ledger_id,
            normal_balance=normal,
            metadata={
                "asset_id":     asset_id,
                "funding_date": "2026-02-22",
                "line_item":    key,
                "batch_id":     "BATCH-20260222",
            },
        )
        accounts[key] = acct.id
    return accounts

# Returns:
# {
#   "investment_payment":    "8834927610294857",
#   "origination_fees":      "3948271059274816",
#   "appraisal_concessions": "5610294857384920",
# }
MT API · Ledger Transaction + Payment Order JSON
aggregate $3,604,400 · 17 assets · wire to title company
Step 2 of 3
POST /api/v1/ledger_transactions
{
  "description": "Bulk Funding · BATCH-20260222 · 17 assets",
  "effective_date": "2026-02-22",
  "status": "pending",
  "metadata": {
    "batch_id":    "BATCH-20260222",
    "asset_count": "17",
    "total_cents": "360440000"
  },
  "ledger_entries": [
    {
      "ledger_account_id": "HEA_PORTFOLIO_ACCOUNT_ID",
      "amount":    360440000,
      "direction": "debit"
    },
    {
      "ledger_account_id": "CASH_FUNDING_ACCOUNT_ID",
      "amount":    360440000,
      "direction": "credit"
    }
  ]
}
POST /api/v1/payment_orders
{
  "amount":    360440000,
  "direction": "credit",
  "type":      "wire",
  "originating_account_id": "CASH_FUNDING_ACCOUNT_ID",
  "receiving_account": {
    "name":           "XYZ Title Co.",
    "routing_number": "021000021",
    "account_number": "4829103847652910",
    "account_type":   "checking"
  },
  "metadata": {
    "batch_id":      "BATCH-20260222",
    "asset_count":   "17",
    "memo":          "HEA Bulk Funding 02/22/2026"
  }
}
Payment Order
aggregate wire · XYZ Title Co.
Amount$3,604,400
Directioncredit (outbound)
Typewire
RecipientXYZ Title Co.
Routing021000021
Account4829103847652910
BatchBATCH-20260222
Asset count17
INVESTMENT PAYMENT ONLY

This wire covers investment principal only. Origination and appraisal fees are tracked separately as Expected Payments and reconciled when received.

Fee breakdown · 714937485928108394
investment + fees + $2K concession coupon
Line ItemGrossAdj.Net
Investment Payment$285,000$285,000
Origination Fee$2,850$2,850
Appraisal Fee$3,500$2,000$1,500
Concession (coupon)$2,000$2,000

The $2,000 concession is applied against the appraisal fee — effectively a coupon reducing what the fund owes. Both fees return as Expected Payments. Only the investment payment is wired outbound via Payment Order.

Expected Payments · fee reconciliation
origination fee + net appraisal · MT auto-match on receipt
Step 3 of 3
# Expected Payment 1 — origination fee
ep_orig = client.expected_payments.create(
    internal_account_id=FEE_COLLECTION_ACCOUNT_ID,
    direction="credit",
    amount_lower_bound=285000,    # $2,850 in cents
    amount_upper_bound=285000,
    description="Origination Fee · 714937485928108394",
    metadata={
        "asset_id": "714937485928108394",
        "fee_type": "origination",
        "gross_cents": "285000",
    },
)

# Expected Payment 2 — appraisal fee net of $2,000 concession
ep_appr = client.expected_payments.create(
    internal_account_id=FEE_COLLECTION_ACCOUNT_ID,
    direction="credit",
    amount_lower_bound=150000,    # $1,500 net ($3,500 − $2,000 concession)
    amount_upper_bound=150000,
    description="Appraisal Fee (net concession) · 714937485928108394",
    metadata={
        "asset_id":       "714937485928108394",
        "fee_type":       "appraisal",
        "gross_cents":    "350000",
        "concession_cents": "200000",
        "net_cents":      "150000",
    },
)
Expected Payments
two fee EPs · 714937485928108394
EP · Origination Fee
direction: credit · inbound
status: pending
$2,850
EP · Appraisal Fee (net)
$3,500 gross − $2,000 concession
direction: credit · inbound
$1,500$2,000 applied
Total EP inbound$4,350

MT auto-matches incoming transactions to these Expected Payments by exact amount. On match, a webhook fires to Django which posts the closing Ledger Transaction entries — no manual reconciliation.