CSV files of all transactions that affect balances for the Bank Partner and the Customers.
The Archives are CSV files of all transactions that affect balances for the Bank Partner and the Customers.
Please note that for these endpoints to work, some manual configuration is required since there are some settings that have to be customized for each partner, please contact us at [email protected] and specify the following for the feature to be available to you:
reporting_cutoff_time: This represents the time of day when an archive for a date finishes. This can be configured to meet your accounting needs, a typical value is midnight (00:00)reporting_window: This is the time in minutes to the past fromreporting_cutoff_timefor which transactions will be included, a typical value for this is 1440 (24 hours)timezone: This is your preferred timezone, you might want to specify that your cutoff_time is 18:00 hs GMT-3. A typical value is UTC, but the system can perform the calculation on your behalf if you specify this setting. Please note that this only affects which transactions are included in the archive for a day, thetransaction_timestampof each record is still represented in UTC.
In short, for each date we have:
reporting_cutoff_time - reporting_window <= transaction_timestamp < reporting_cutoff_time
Example:
Assuming:
- reporting_cutoff_time: 0:00
- reporting_window: 1440
- timezone: UTC
The system will generate an archive for:
2021-11-05: Will contain transactions from 2021-11-04T00:00:00.000000 to 2021-11-05T23:59:59.999999 inclusive, that is 2021-11-04T00:00:00.000000 <= X < 2021-11-05T00:00:00.000000
2021-11-06: 2021-10-05T00:00:00.000000 <= X < 2021-11-06T00:00:00.000000
... and so on and so forth
The archive for YYYY-MM-DD corresponds to the transactions up to the reporting_cutoff_time of that DD, going back an amount of reporting_window minutes.
Multiple archive typesArchives come in several
data_typevalues —orders,customer_balances,settlement_balances, andcold_storage. The CSV fields below describe the defaultordersarchive. See Archive Data Types for what every type contains and how to choose one.
CSV fields reference
The fields below describe the orders archive (data_type=orders), which holds one row per transaction.
| Field | Data Type | Description | Possible values | Applying Transaction Types | Can be empty |
|---|---|---|---|---|---|
| transaction_timestamp | ISO8601 formatted string | Timestamp of the transaction. Transactions related to customer orders use the submitted_at field as returned by the API. Includes microseconds. | all | No | |
| transaction_type | String | Specifies the type of transaction. Based on this type, the transaction may affect the Partner's pre-funding settlement account and/or the customer's asset account | Settlement only: settlement-top-up, settlement-withdraw, settlement-swap-referral, settlement-commission. Settlement and Customer: customer-buy, customer-sell. Customer only: customer-receive, customer-send, customer-swap | all | No |
| transaction_id | String | The Id of the order that generated the transaction | all | No | |
| state | String | State of the transaction | completed, cancelled | all | No |
| reference_id | String | The reference id provided by the partner for the order | customer-buy, customer-sell, customer-send, customer-swap | Yes | |
| settlement_operation | String | Operation on the Partner's pre-funding settlement account if it was affected by the transaction | debit, credit | settlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sell | Yes |
| settlement_currency | String | Currency of the affected settlement account | settlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sell | Yes | |
| settlement_amount | Number | Amount affected on settlement account. Decimal precision depends on the currency | settlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sell | Yes | |
| transaction_settlement_fee | Number | Amount of fees charged to settlement account. It is included on the amount debited, or deducted before crediting the settlement account depending on the transaction type | settlement-top-up, settlement-withdraw | Yes | |
| customer_id | String | Id of the affected customer | customer-buy, customer-sell, customer-receive, customer-send, customer-swap | Yes | |
| customer_operation | String | Operation on the Customer's asset account if it was affected by the transaction | debit, credit | customer-buy, customer-sell, customer-receive, customer-send, customer-swap | Yes |
| customer_asset_currency | String | Currency of the affected customer asset account | customer-buy, customer-sell, customer-receive, customer-send, customer-swap | Yes | |
| customer_asset_amount | Number | Amount affected on customer asset account. Decimal precision depends on the currency | customer-buy, customer-sell, customer-receive, customer-send, customer-swap | Yes | |
| transaction_asset_fee | Number | Amount of fees charged to customer asset account. It is included on the amount debited to the asset, or deducted before crediting the asset depending on the transaction type | customer-receive, customer-send | Yes | |
| customer_fiat_currency | String | Customer Fiat Currency reported by the partner for the transaction. It is the final payment by/to the customer | customer-buy, customer-sell | Yes | |
| customer_fiat_amount | Number | Customer Fiat Amount reported by the partner for the transaction. It is the final payment by/to the customer. Decimal precision depends on the currency | customer-buy, customer-sell | Yes | |
| usd_amount | Number | Amount in USD as reference | settlement-fee, customer-buy, customer-sell, customer-swap | Yes | |
| counterpart_type | String | Specifies the type of counterpart | For settlement-withdraw: bank_fiat_address. For customer-receive: blockchain_transaction. For customer-send: crypto_currency_address. For customer-swap: swap_order | settlement-withdraw, customer-receive, customer-send, customer-swap | Yes |
| counterpart_value | String | Value of the counterpart depending on the type | settlement-withdraw, customer-receive, customer-send, customer-swap | Yes | |
| counterpart_currency | String | Currency of the counterpart | settlement-withdraw, customer-receive, customer-send, customer-swap | Yes | |
| counterpart_amount | Number | Amount of the counterpart. On Send and Withdraw, the amount is what was actually sent after deducting fees. On Receive, the amount is the total received before applying fees | settlement-withdraw, customer-receive, customer-send, customer-swap | Yes | |
| transaction_additional_data | String | Additional data depending on the transaction type | For settlement-top-up/withdraw: Transaction id and/or reference code. For settlement-commission: Lirium Order Id. For customer-send (on-chain): Blockchain transaction id. For customer-send (transfer): Lirium order id. For customer-receive (on-chain): Receiving address. For customer-receive (transfer): Lirium order id | settlement-top-up, settlement-withdraw, customer-receive, customer-send | Yes |
| partner_commission_fee | Number | Amount of partner commission fees collected by Lirium. customer-buy and customer-sell transactions have positive values (commission collected from customer). settlement-commission transactions have negative values (commission credited to settlement account) |
Sample file
You can download a sample archive file, just like it'll be generated by the system, from here
