#duration
4 APIs with this tag
Bond / Fixed-Income Performance API
What is moving across the bond market, by duration and credit, computed live from Yahoo Finance via the major fixed-income ETFs (no key, nothing stored). Bonds are the other half of every portfolio, and their moves are the cleanest read on interest rates and credit: when long Treasuries (TLT) fall, the market is pricing higher long rates; when high-yield (HYG) lags investment-grade (LQD), credit risk is being repriced. For every fixed-income ETF — Treasuries from ultra-short to 20-year-plus, investment-grade and high-yield credit, TIPS, munis, emerging-market and aggregate bonds — this measures the change on the day, the week and the month, the 52-week high and low and where the price sits in that range, tagged by category and rate sensitivity. The board endpoint returns the whole complex ranked by daily change with the gainers and losers and a category breakdown. The bond endpoint returns one ETF's performance card. The bonds endpoint lists what is covered. The fixed-income performance / bond-board cut — distinct from the government-bond-yield, yield-curve, central-bank-rate and bond-pricing-math APIs. Remember: a bond ETF's price moves inverse to its yield.
api.oanor.com/bondperformance-api
Bond Pricing API
Fixed-income bond maths as an API, computed locally and deterministically. The price endpoint computes a bond's price from its face value, coupon rate, yield to maturity, years to maturity and coupon frequency — Price = Σ coupon/(1+y)ᵗ + face/(1+y)ⁿ with y the periodic yield — and reports the clean price as a percent of par, the annual coupon, the current yield and whether the bond trades at a premium, discount or par. The yield endpoint inverts this, solving for the yield to maturity that matches a given market price by bisection, with the current yield. The duration endpoint computes the Macaulay duration (the cash-flow-weighted average time), the modified duration (which approximates the percent price change per 1 % yield move), the convexity and the DV01 (the price change per basis point). A zero-coupon bond is just coupon rate 0. Everything is computed locally and deterministically, so it is instant and private. Ideal for fintech, fixed-income, treasury and portfolio app developers, bond-analytics and risk tools, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bond analytics; for option pricing use an options API and for NPV and IRR an NPV API.
api.oanor.com/bond-api
Duration API
Work with ISO-8601 durations — the PnYnMnDTnHnMnS strings (P3Y6M4DT12H30M5S, PT1H30M) used across calendars, scheduling, video metadata, billing periods and APIs. Parse a duration into its components and a total in seconds and milliseconds; format a number of seconds (or individual year/month/week/day/hour/minute/second fields) back into a canonical ISO-8601 string; humanise any duration into readable text ("1 hour and 30 minutes"); and measure the exact duration between two instants (ISO timestamps or unix epochs) as both an ISO-8601 string and a precise second count. Years and months use documented calendar averages and are clearly flagged as approximate. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. Distinct from date/time parsing and relative-time ("3 hours ago") formatting.
api.oanor.com/duration-api
DateTime API
A fast, fully-local date and time toolkit (UTC): parse any date string or unix timestamp into ISO, unix and components with the ISO week number, day-of-year and leap-year flag; format dates with custom tokens (YYYY-MM-DD, weekday and month names, and more); add or subtract month-aware durations; compute the difference between two dates in every unit plus a human-readable summary; and convert between unix timestamps and ISO. Every endpoint accepts input via the query string or the request body. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for scheduling, billing periods, reminders, analytics and any date arithmetic. (For the current time in a specific timezone, see the oanor Time API.)
api.oanor.com/datetime-api