Skip to content

feat: add Credit & Sovereign Risk, Sanctions, Interest Rates APIs (14 endpoints)#15

Open
alexpipipi wants to merge 2 commits into
mainfrom
feat/api-coverage-sync
Open

feat: add Credit & Sovereign Risk, Sanctions, Interest Rates APIs (14 endpoints)#15
alexpipipi wants to merge 2 commits into
mainfrom
feat/api-coverage-sync

Conversation

@alexpipipi

Copy link
Copy Markdown
Contributor

New modules CreditRiskApi / SanctionsApi / InterestRatesApi (14 methods) + types + client facade + 25 tests. typecheck + 233/233 unit tests + build all pass.

Part of an updatelibs cross-repo sync adding 3 API families / 14 endpoints — Credit & Sovereign Risk (7), Sanctions/OFAC (4), Interest Rates (3) — across EODHD-openapi, Node SDK, Python SDK, Postman, and the Claude plugin. Sanctions uses bare query params (verified vs prometheus-web request classes + live prod); credit-risk & interest-rates use filter[...]. Bridge pre-push review (Codex + Gemini): no blockers.

Add three new API families to the Node.js/TypeScript SDK:

- Credit & Sovereign Risk (client.creditRisk): sovereign risk-premium,
  credit-ratings, cds-spreads, default-spreads; corporate cmdi, hqm-yields;
  cds-market aggregates (7 endpoints)
- Sanctions (client.sanctions): entities, vessels, programs, sources
  (4 endpoints)
- Interest Rates & Spreads (client.interestRates): reference-rates,
  policy-rates, funding-stress (3 endpoints)

All endpoints use filter[...] / page[offset] / page[limit] params and return
the {data, meta, links} envelope. funding-stress has no pagination. Adds param
and response interfaces to types.ts, new api modules, direct-property + facade
methods on the client with JSDoc, and URL-delegation tests.
Verified against prometheus-web request classes + live prod: the Sanctions
endpoints take bare query params, not the filter[...] convention used by the
Credit Risk and Interest Rates families.

- SanctionsEntitiesParams: source ('ofac'), type
  (individual|entity|vessel|aircraft), program, country, q (search, min 2),
  active (boolean | 'true' | 'false', serializes to 'true'/'false'), plus
  page[offset]/page[limit]
- SanctionsVesselsParams: source ('ofac'), imo, flag, vessel_type, q,
  program, plus page[offset]/page[limit]
- programs/sources unchanged (pagination only)
- Response item interfaces unchanged (entity_type, is_active, imo_number are
  response fields)
- Updated JSDoc examples and URL-delegation tests to assert bare query keys
  and absence of legacy filter[/filter%5B keys

AI pre-commit review (Codex + Gemini) applied: active accepts boolean for
better DX; test asserts against literal filter[ and filter%5B forms rather
than the brittle 'filter' substring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant