get-exchanges.rst (1672B)
1 .. http:get:: /exchanges 2 3 Return information about exchanges configured for this merchant backend. 4 @since **v26**. 5 6 **Response:** 7 8 :http:statuscode:`200 OK`: 9 The body is a `ExchangeStatusResponse`. 10 :http:statuscode:`500 Internal Server Error`: 11 The server experienced an internal failure. 12 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 13 14 **Details:** 15 16 .. ts:def:: ExchangeStatusResponse 17 18 interface ExchangeStatusResponse { 19 20 exchanges: ExchangeStatusDetail[]; 21 22 } 23 24 .. ts:def:: ExchangeStatusDetail 25 26 interface ExchangeStatusDetail { 27 28 // Base URL of the exchange this is about. 29 exchange_url: string; 30 31 // Time when the backend will download ``/keys`` next. 32 next_download: Timestamp; 33 34 // Time when the current ``/keys`` response is expected to 35 // expire. Missing if we do not have one. 36 keys_expiration?: Timestamp; 37 38 // Map of (full) payto://-URLs of the exchange's bank accounts 39 // to the respective debit `AccountRestriction`. Useful to check 40 // if a deposit into the exchange is feasible. If no restriction 41 // applies to the account, the URL is mapped to "null"! 42 // Since **v30**. 43 debit_restrictions: Object; 44 45 // HTTP status code returned by the exchange when we asked for 46 // ``/keys``. 0 if we did not receive an HTTP status code. 47 // Usually 200 for success. 48 keys_http_status: Integer; 49 50 // Numeric `error code <error-codes>` indicating an 51 // error we had processing the ``/keys`` response. 52 keys_ec: Integer; 53 54 // Human-readable error description matching ``keys_ec``. 55 keys_hint: string; 56 57 }