taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-monitoring-reserves.rst (2630B)


      1 .. http:get:: /monitoring/reserves
      2 
      3   Get a list of reserves stored by the auditor.
      4 
      5   The following query parameters are optional, and can be used to customise the response:
      6 
      7   **Request:**
      8 
      9   :query limit: A signed integer, indicating how many elements relative to the offset query parameter should be returned. The default value is -20.
     10   :query offset: An unsigned integer, indicating from which row onward to return elements. The default value is INT_MAX.
     11 
     12 
     13   With the default settings, the endpoint returns at most the 20 latest elements.
     14 
     15   **Response:**
     16 
     17   :http:statuscode:`200 OK`:
     18     The auditor responds with a top level array of :ts:type:`Reserves` objects. If no elements could be found, an empty array is returned
     19   :http:statuscode:`400 Bad request`:
     20     The request is malformed. Returned with an
     21     ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code.
     22   :http:statuscode:`401 Unauthorized`:
     23     The request lacks valid authentication credentials.
     24     The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``.
     25   :http:statuscode:`500 Internal Server Error`:
     26     The server experienced an internal error.
     27     The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED`` or
     28     ``TALER_EC_GENERIC_DB_FETCH_FAILED`` error code.
     29 
     30 
     31   **Details:**
     32 
     33   .. ts:def:: Reserves
     34 
     35     interface Reserves {
     36 
     37       // Unique row identifier
     38       auditor_reserves_rowid : Integer;
     39 
     40       // Public key of the reserve
     41       reserve_pub : EddsaPublicKey;
     42 
     43       // Amount in the balance
     44       reserve_balance : Amount;
     45 
     46       // Reserve losses are incurred if (a) a reserve is
     47       // incorrectly credited from a recoup for a non-revoked
     48       // coin, or (b) if the exchange allowed more digital cash
     49       // to be withdrawn from a reserve than the balance of the
     50       // reserve should have permitted.  FIXME: We may want to
     51       // distinguish these two cases in the future.
     52       reserve_loss : Amount;
     53 
     54       // Amount earned by charging withdraw fees
     55       withdraw_fee_balance : Amount;
     56 
     57       // Amount earned by charging a closing fee on the reserve
     58       close_fee_balance : Amount;
     59 
     60       // Total purse fees earned from this reserve
     61       purse_fee_balance : Amount;
     62 
     63       // Total reserve open fees earned from the reserve
     64       open_fee_balance : Amount;
     65 
     66       // Total reserve history fees earned from this reserve
     67       history_fee_balance : Amount;
     68 
     69       // When the purse expires
     70       expiration_date : Timestamp;
     71 
     72       // Who created the account
     73       origin_account : string;
     74 
     75     }
     76 
     77   .. note::
     78 
     79     This endpoint is still experimental. The endpoint will be further developed as needed.