Skip to content

Umaaas EUR minimum logic#247

Closed
pengying wants to merge 1 commit intomainfrom
cursor/umaaas-eur-minimum-logic-e0b2
Closed

Umaaas EUR minimum logic#247
pengying wants to merge 1 commit intomainfrom
cursor/umaaas-eur-minimum-logic-e0b2

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Mar 7, 2026

Add provider-level min/max amount fields to UMAAS API and implement client-side validation to align with Striga's BTC-denominated minimums.

The previous EUR minimum in UMAAS API lookup responses was misleading as it didn't account for Striga's underlying BTC-denominated minimum trade value. This caused payments that appeared valid to fail with BelowMinimumTradeValueError. This PR introduces fields to expose the actual provider limits and adds client-side validation to prevent such failures.


Slack Thread

Open in Web Open in Cursor 

The Striga exchange enforces a minimum trade value in BTC terms, which
when converted to EUR at current rates, is higher than the platform's
configured minAmount of 1 EUR. This causes quote creation to fail with
BelowMinimumTradeValueError for amounts like 5 USD (~4.28 EUR) that
are above the stated EUR minimum but below Striga's BTC minimum.

Changes:
- Add umaProviderMinAmount and umaProviderMaxAmount read-only fields to
  PlatformCurrencyConfig schema to surface provider-level constraints
- Update CurrencyPreference min/max descriptions to clarify they
  represent the effective limits (accounting for provider constraints)
- Update minAmount/maxAmount descriptions to explain the relationship
  with provider limits: effective min = max(minAmount, umaProviderMinAmount)
- Add client-side min/max validation in the sample frontend before
  creating a quote, with error messaging
- Update LookupResponse types to include min, max, and currency decimals
- Document provider-level limits in platform configuration guide
- Add AMOUNT_OUT_OF_RANGE error documentation with guidance on
  provider-level minimums (BTC-denominated floor converted to target currency)
- Update sending-payments guide with a warning about validating amounts
  against the effective min/max from the lookup response
- Update EUR example min from 100 to 500 to reflect realistic minimums

Co-authored-by: Peng Ying <pengying@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Mar 7, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@pengying pengying closed this Mar 9, 2026
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.

2 participants