Exchange: triangulation, dated rates, provider trait, bid/ask #45
Labels
No labels
kind
bug
kind
enhancement
kind
refactor
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/lucre#45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Exchangestores one undated rate per pair and only converts through a directly stored pair. Real rate handling needs more:ExchangeRate::cross_withcan already derive the cross rate.Proposal
Four separable pieces, roughly in value order:
convertfalls back to a path through a configured base currency (or any shared currency) when the direct pair is missing, built oncross_with.HistoricalExchangeso the simple table stays simple.RateProvidertrait: a trait for fetching rates, withExchangeas the offline/cached implementation. The crate stays I/O-free; async and HTTP live in the caller or companion crates.convertpicks the correct side for the direction. TheSideenum already exists.Each piece can land as its own PR; this issue tracks the direction.
Split into four issues, one per piece: #47 (triangulation), #48 (dated rates), #49 (rate provider trait), #50 (two-sided quotes). Each carries the open design questions for that piece.