delete-exchange.rst (966B)
1 .. ts:op:: deleteExchange 2 3 Delete an exchange and its associated resources. 4 5 **Request:** 6 7 The request arguments must be a `DeleteExchangeRequest` object. 8 9 **Response:** 10 11 On success, the result is an empty object. 12 13 **Side effects:** 14 15 Deletes the exchange and its associated resources. 16 17 **Expected errors:** 18 19 The caller can handle the following errors inline: 20 ``WALLET_EXCHANGE_ENTRY_USED``. 21 22 **Details:** 23 24 The operation fails with ``WALLET_EXCHANGE_ENTRY_USED`` when the 25 exchange still has associated resources (see 26 :ts:op:`getExchangeResources`), unless ``purge`` is set. Some 27 transactions related to the exchange (payments, peer payments and 28 refreshes) are kept even when purging. Deleting an exchange that 29 is not known to the wallet succeeds silently. 30 31 .. ts:def:: DeleteExchangeRequest 32 33 interface DeleteExchangeRequest { 34 exchangeBaseUrl: string; 35 36 // Delete the exchange even if it's in use. 37 purge?: boolean; 38 }