0004: The first lock of the day fixes the rate for a pair
Status: Accepted ยท Date: 2026-09-30
Contextโ
Finance asked for one daily rate per committed line item, with edits keeping their rate unless the date changes. When the lock should happen (PO, invoice or payment) is still open.
Decisionโ
POST /fx/locks is idempotent per pair, business date and source. The first call stores a RateLock, and later calls
that day return it. Rates are immutable once stored. Callers keep lockId on the line.
Consequencesโ
- Every line committed on the same day uses the same rate.
- Lock timing is the caller's decision, so the open question doesn't block the build.