Contents

listWithdrawalExchangeCandidatesread-only#

List exchanges suitable for presentation in a withdrawal chooser.

Request:

The request arguments must be a ListWithdrawalExchangeCandidatesRequest object. Omitted fields use their documented defaults.

Response:

On success, the result is a ListWithdrawalExchangeCandidatesResponse object.

Expected errors:

The caller can handle the following errors inline: WALLET_CORE_API_BAD_REQUEST.

Details:

Candidates are taken from the wallet’s exchange entries and from the builtin exchange list; ephemeral entries and entries with unknown currency are excluded. Demo and test exchanges are only included when withDemo or withTest are set. Combining presetOnly with withBuiltin: false is rejected with WALLET_CORE_API_BAD_REQUEST. Exchanges recently used for a withdrawal are sorted first, and recommendationReasons states why each candidate is suggested.

type ListWithdrawalExchangeCandidatesRequest =
  GetDefaultExchangesRequest;
interface ListWithdrawalExchangeCandidatesResponse {
  candidates: WithdrawalExchangeCandidate[];
}
interface WithdrawalExchangeCandidate {
  // A taler://withdraw-exchange URI for the exchange.
  talerUri: string;

  exchangeBaseUrl: string;

  currency: string;

  currencySpec: CurrencySpecification;

  exchangeEntryStatus: ExchangeEntryStatus;

  exchangeUpdateStatus: ExchangeUpdateStatus;

  source: ExchangeEntrySource;

  recommendationReasons: ExchangeRecommendationReason[];

  lastWithdrawal?: TalerPreciseTimestamp;
}
type ExchangeRecommendationReason =
  | "preset"
  | "user-added"
  | "previous-withdrawal"
  | "previously-used";