get-history-outgoing.rst (2650B)
1 .. http:get:: /history/outgoing 2 3 Return a list of transactions made by the exchange, typically to a merchant. 4 5 **Request:** 6 7 :query limit: *Optional.* 8 At most return the given number of results. Negative for descending by ``row_id``, positive for ascending by ``row_id``. Defaults to ``-20``. Since protocol **v2**. 9 :query offset: *Optional.* 10 Starting ``row_id`` for :ref:`pagination <row-id-pagination>`. Since protocol **v2**. 11 :query timeout_ms: *Optional.* 12 Timeout in milliseconds, for :ref:`long-polling <long-polling>`, to wait for at least one element to be shown. Only useful if *limit* is positive. Since protocol **v2**. 13 :query delta: *Optional.* 14 Deprecated in protocol **v2**. Use *limit* instead. 15 :query start: *Optional.* 16 Deprecated in protocol **v2**. Use *offset* instead. 17 :query long_poll_ms: *Optional.* 18 Deprecated in protocol **v2**. Use *timeout_ms* instead. 19 20 **Response:** 21 22 :http:statuscode:`200 OK`: 23 JSON object of type `OutgoingHistory`. 24 :http:statuscode:`204 No content`: 25 There are not transactions to report (under the given filter). 26 :http:statuscode:`400 Bad request`: 27 Request malformed. The bank replies with an `ErrorDetail` object. 28 :http:statuscode:`401 Unauthorized`: 29 Authentication failed, likely the credentials are wrong. 30 :http:statuscode:`404 Not found`: 31 The endpoint is wrong or the user name is unknown. The bank replies with an `ErrorDetail` object. 32 33 **Details:** 34 35 .. ts:def:: OutgoingHistory 36 37 interface OutgoingHistory { 38 // Array of outgoing transactions. 39 outgoing_transactions: OutgoingBankTransaction[]; 40 41 // Full payto URI to identify the sender of funds. 42 // This must be one of the exchange's bank accounts. 43 // Credit account is shared by all incoming transactions 44 // as per the nature of the request. 45 debit_account: string; 46 } 47 48 .. ts:def:: OutgoingBankTransaction 49 50 interface OutgoingBankTransaction { 51 // Opaque identifier of the returned record. 52 row_id: SafeUint64; 53 54 // Date of the transaction. 55 date: Timestamp; 56 57 // Amount transferred. 58 amount: Amount; 59 60 // Fee paid by the debtor. 61 // If not null, debtor actually paid amount + debit_fee 62 // @since **v3** 63 debit_fee?: Amount; 64 65 // Full payto URI to identify the receiver of funds. 66 credit_account: string; 67 68 // The wire transfer ID in the outgoing transaction. 69 wtid: ShortHashCode; 70 71 // Base URL of the exchange. 72 exchange_base_url: string; 73 74 // Optional additional metadata. 75 // @since **v5** 76 metadata?: string; 77 }