/v1/meta
Spec
Δοκιμάστε το ζωντανά
10 δωρεάν κλήσεις την ημέρα — χωρίς εγγραφή, χωρίς κλειδί API. Μέσω του gateway του oanor.
Δουλεύει. Πάρε ένα κλειδί API και χρησιμοποίησέ το στο έργο σου.
Λάβετε ένα κλειδί APIΑποσπάσματα κώδικα
curl "https://api.oanor.com/financecalc-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/financecalc-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/financecalc-api/v1/meta");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/financecalc-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Παράδειγμα απόκρισης
Πραγματική απόκριση αυτού του endpoint, από τον τελευταίο έλεγχο υγείας.
{
"data": {
"name": "Investment Calculator API",
"notes": "Annuities are ordinary (payments at period end). Rates accept percent (10) or fraction (0.10). IRR uses a bracketed bisection; unconventional flows may have none or several. Nothing is stored.",
"version": "v1",
"endpoints": [
{
"path": "/v1/npv",
"params": {
"rate": "discount rate (percent or fraction)",
"cashflows": "[-1000,500,500,500]"
},
"returns": "the net present value"
},
{
"path": "/v1/irr",
"params": {
"cashflows": "[-1000,500,500,500]"
},
"returns": "the internal rate of return"
},
{
"path": "/v1/annuity",
"params": {
"rate": "per-period rate",
"payment": "or present_value or future_value (give exactly one)",
"periods": "number of periods"
},
"returns": "payment, present value and future value"
},
{
"path": "/v1/depreciation",
"params": {
"cost": "asset cost",
"life": "years",
"factor": "for declining balance (default 2)",
"method": "straight_line|declining_balance|sum_of_years",
"salvage": "salvage value (default 0)"
},
"returns": "the depreciation schedule"
},
{
"path": "/v1/meta",
"params": [],
"returns": "this document"
}
],
"description": "Investment and capital-budgeting maths as an API. The npv endpoint computes the net present value of a series of cash flows at a discount rate (the first flow is usually the negative initial investment). The irr endpoint finds the internal rate of return — the discount rate at which the net present value is zero — by a robust bracketed search. The annuity endpoint solves a level (ordinary) annuity: give the rate, the number of periods and any one of the payment, present value or future value, and it returns the other two. The depreciation endpoint builds a full year-by-year schedule by the straight-line, declining-balance (any factor, e.g. double-declining) or sum-of-the-years'-digits method, never depreciating below salvage value. Rates may be entered as a percentage or a fraction. Everything is computed locally and deterministically, so it is instant and private. Ideal for investment analysis and capital budgeting, accounting and finance tools, business planning, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is investment maths; for loans, mortgages and compound interest
…