get-default-exchanges.rst (1648B)
1 .. ts:op:: getDefaultExchanges 2 :read-only: 3 :deprecated: 4 5 This operation is **deprecated**. Use 6 :ts:op:`listWithdrawalExchangeCandidates` instead. 7 8 List the default exchanges offered to the user for withdrawing. 9 10 **Request:** 11 12 The request arguments must be a `GetDefaultExchangesRequest` 13 object, as for :ts:op:`listWithdrawalExchangeCandidates`. 14 15 **Response:** 16 17 On success, the result is a `GetDefaultExchangesResponse` object. 18 19 **Expected errors:** 20 21 The caller can handle the following errors inline: 22 ``WALLET_CORE_API_BAD_REQUEST``. 23 24 **Details:** 25 26 The result is a reduced view of the withdrawal exchange 27 candidates, carrying only the withdrawal URI, currency and 28 currency specification of each candidate. 29 30 .. ts:def:: GetDefaultExchangesRequest 31 32 interface GetDefaultExchangesRequest { 33 // Only return production exchanges from the builtin exchange list. 34 // Cannot be combined with withBuiltin: false. 35 presetOnly?: boolean; 36 37 // Include exchanges from the builtin list. Defaults to true. 38 withBuiltin?: boolean; 39 40 // Include demo exchanges from the builtin list. Defaults to false. 41 withDemo?: boolean; 42 43 // Include test exchanges from the builtin list. Defaults to false. 44 withTest?: boolean; 45 } 46 47 .. ts:def:: GetDefaultExchangesResponse 48 49 interface GetDefaultExchangesResponse { 50 defaultExchanges: { 51 // A taler://withdraw-exchange URI for the exchange. 52 talerUri: string; 53 54 // Currency offered by the exchange. 55 currency: string; 56 57 // Currency spec for the currency offered by the exchange. 58 currencySpec: CurrencySpecification; 59 }[]; 60 }