Skip to content

feat(pricingx): swappable market-price Provider + Yahoo/CoinGecko/Manual - #17

Merged
ihsanarifr merged 1 commit into
mainfrom
feature/pricingx
Jul 1, 2026
Merged

feat(pricingx): swappable market-price Provider + Yahoo/CoinGecko/Manual#17
ihsanarifr merged 1 commit into
mainfrom
feature/pricingx

Conversation

@ihsanarifr

Copy link
Copy Markdown
Member

Adds a PriceProvider abstraction (Category + GetPrice) with a Registry, exact decimal prices (moneyx; source numeric text parsed directly, never float), and:

  • Yahoo: IDX stocks (.JK) and indices (^JKSE for IHSG) via the chart endpoint.
  • CoinGecko: crypto prices in IDR.
  • Manual: in-memory prices for manual-valued assets (P2P/crowdfunding/SBN) + tests.

Tests use httptest mocks (BBCA.JK 9525.50, bitcoin 1.65B IDR, registry lookup). Needed by Cuanku's price-worker (US2/US8 benchmark feed).

Summary

Checklist

  • Tests added or updated (run make test → green)
  • Coverage thresholds met (make coverage — core ≥ 85%, security ≥ 95%)
  • Godoc comments on all exported identifiers
  • CHANGELOG.md updated under [Unreleased]
  • No breaking changes OR marked with ! in commit / BREAKING CHANGE: footer
  • go mod tidy run — no stale entries in go.sum
  • make lint passes with zero new warnings
  • Benchmarks added for new hot-path functions (if applicable)

Related Issues

Adds a PriceProvider abstraction (Category + GetPrice) with a Registry, exact
decimal prices (moneyx; source numeric text parsed directly, never float), and:
- Yahoo: IDX stocks (.JK) and indices (^JKSE for IHSG) via the chart endpoint.
- CoinGecko: crypto prices in IDR.
- Manual: in-memory prices for manual-valued assets (P2P/crowdfunding/SBN) + tests.

Tests use httptest mocks (BBCA.JK 9525.50, bitcoin 1.65B IDR, registry lookup).
Needed by Cuanku's price-worker (US2/US8 benchmark feed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ihsanarifr
ihsanarifr merged commit 41107e6 into main Jul 1, 2026
6 checks passed
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