Nyfed Markets

v0.2.1
io.github.pipeworx-io/nyfed-markets Checked 1 hour ago Published 28 days ago

New York Fed Markets Data APIs — markets.newyorkfed.org, keyless JSON, no auth wall.…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

nyfed_repo_operations

NY Fed Desk repo and reverse repo (ON RRP) operation RESULTS — the actual auctions the Desk ran, not a daily rate aggregate. Each operation: total submitted/accepted USD, counterparty counts, award rate(s), breakdown by security type (Treasury/Agency/MBS/SRF). No start_date/end_date -> today's operation(s) only (empty on weekends/holidays). With start_date/end_date -> a date-range search. Use for "today's ON RRP usage", "reverse repo take-up this week vs last", "who's using the SRF". Different from fred_get_series('RRPONTSYD') which only has the daily accepted total, no per-operation detail.

ParameterTypeDescription
end_datestringYYYY-MM-DD, inclusive.
limitnumberMax operations to return, newest first. Default 20, max 100.
operation_typestringrepo = Desk lends cash (RP); reverserepo = Desk borrows cash (ON RRP). Default all.
start_datestringYYYY-MM-DD, inclusive. Triggers a date-range search instead of "latest".
termstringFilter to overnight-only or term operations.

nyfed_seclending_operations

NY Fed Desk securities lending operation results — how much of the SOMA portfolio was lent out today (or in a date range), by operation (seclending = the daily program, extensions = extended-term lending). Returns total par amount submitted/accepted and, when cusips is given, per-security detail. Use for "how active is securities lending today", "was CUSIP X lent out this week".

ParameterTypeDescription
cusipsstringComma-separated CUSIP(s) to filter to (partial match).
end_datestringYYYY-MM-DD, inclusive.
limitnumberDefault 20, max 100.
operationstringDefault seclending.
start_datestringYYYY-MM-DD, inclusive.

nyfed_soma_holdings

System Open Market Account (SOMA) portfolio — the Fed's own securities holdings from QE/reinvestment. view=summary (default) gives total by asset bucket (bills, notesbonds, mbs, agencies, tips) over time — the series to read for "SOMA runoff this month". view=treasury/agency with as_of_date gives the full CUSIP-level holdings snapshot for that date (holding_type narrows to bills/notesbonds/frn/tips for treasury, or agency_debts/mbs/cmbs for agency). Pass cusip alone to look up one security's full holdings history regardless of view. Publishes on a ~1-week lag (as_of_date defaults to the la…

ParameterTypeDescription
as_of_datestringYYYY-MM-DD. Defaults to the latest published SOMA as-of date.
cusipstringA single security's CUSIP — overrides view and searches both Treasury and Agency holdings.
holding_typestringFor view=treasury: all|bills|notesbonds|frn|tips. For view=agency: all|agency_debts|mbs|cmbs.
limitnumberMax rows to return. Default 20, max 200.
viewstringDefault summary.

nyfed_reference_rates

The Desk's own reference-rate publications: SOFR, SOFRAI (30/90/180-day compounded averages + index), EFFR (effective fed funds), OBFR (overnight bank funding), TGCR/BGCR (tri-party general collateral rates). rate_type=all (default) returns the latest value of every rate in one call; a specific rate_type with number>1 returns that rate's recent history including percentile bands and traded volume — detail fred_get_series('SOFR') etc. does not carry (FRED has only the single daily value, no percentiles/volume).

ParameterTypeDescription
numbernumberHistory length when rate_type is not "all". Default 1 (latest only), max 100.
rate_typestringDefault all.

nyfed_primary_dealer_stats

FR 2004 weekly primary dealer positioning/transaction survey (aggregate across all primary dealers). mode=list_series (default) browses the keyid catalog — pass keyid_filter (e.g. "treasury", "mbs", "agency") to find the codes you want. mode=latest returns the most recent weekly values for matching keyids. Data is reported for the current "series break" window automatically (definitions can change across windows; pass seriesbreak explicitly to pin one — see mode=list_series output for window ids).

ParameterTypeDescription
keyid_filterstringSubstring to match against keyid or its description.
limitnumberDefault 50, max 200.
modestringDefault list_series.
seriesbreakstringPin a specific series-break window id (e.g. "SBN2024"). Defaults to the current window.