Archives

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 from reporting_cutoff_time for 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, the transaction_timestamp of 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 types

Archives come in several data_type values — orders, customer_balances, settlement_balances, and cold_storage. The CSV fields below describe the default orders archive. 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.

FieldData TypeDescriptionPossible valuesApplying Transaction TypesCan be empty
transaction_timestampISO8601 formatted stringTimestamp of the transaction. Transactions related to customer orders use the submitted_at field as returned by the API. Includes microseconds.allNo
transaction_typeStringSpecifies 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 accountSettlement 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-swapallNo
transaction_idStringThe Id of the order that generated the transactionallNo
stateStringState of the transactioncompleted, cancelledallNo
reference_idStringThe reference id provided by the partner for the ordercustomer-buy, customer-sell, customer-send, customer-swapYes
settlement_operationStringOperation on the Partner's pre-funding settlement account if it was affected by the transactiondebit, creditsettlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sellYes
settlement_currencyStringCurrency of the affected settlement accountsettlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sellYes
settlement_amountNumberAmount affected on settlement account. Decimal precision depends on the currencysettlement-top-up, settlement-withdraw, settlement-fee, customer-buy, customer-sellYes
transaction_settlement_feeNumberAmount of fees charged to settlement account. It is included on the amount debited, or deducted before crediting the settlement account depending on the transaction typesettlement-top-up, settlement-withdrawYes
customer_idStringId of the affected customercustomer-buy, customer-sell, customer-receive, customer-send, customer-swapYes
customer_operationStringOperation on the Customer's asset account if it was affected by the transactiondebit, creditcustomer-buy, customer-sell, customer-receive, customer-send, customer-swapYes
customer_asset_currencyStringCurrency of the affected customer asset accountcustomer-buy, customer-sell, customer-receive, customer-send, customer-swapYes
customer_asset_amountNumberAmount affected on customer asset account. Decimal precision depends on the currencycustomer-buy, customer-sell, customer-receive, customer-send, customer-swapYes
transaction_asset_feeNumberAmount 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 typecustomer-receive, customer-sendYes
customer_fiat_currencyStringCustomer Fiat Currency reported by the partner for the transaction. It is the final payment by/to the customercustomer-buy, customer-sellYes
customer_fiat_amountNumberCustomer Fiat Amount reported by the partner for the transaction. It is the final payment by/to the customer. Decimal precision depends on the currencycustomer-buy, customer-sellYes
usd_amountNumberAmount in USD as referencesettlement-fee, customer-buy, customer-sell, customer-swapYes
counterpart_typeStringSpecifies the type of counterpartFor settlement-withdraw: bank_fiat_address. For customer-receive: blockchain_transaction. For customer-send: crypto_currency_address. For customer-swap: swap_ordersettlement-withdraw, customer-receive, customer-send, customer-swapYes
counterpart_valueStringValue of the counterpart depending on the typesettlement-withdraw, customer-receive, customer-send, customer-swapYes
counterpart_currencyStringCurrency of the counterpartsettlement-withdraw, customer-receive, customer-send, customer-swapYes
counterpart_amountNumberAmount 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 feessettlement-withdraw, customer-receive, customer-send, customer-swapYes
transaction_additional_dataStringAdditional data depending on the transaction typeFor 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 idsettlement-top-up, settlement-withdraw, customer-receive, customer-sendYes
partner_commission_feeNumberAmount 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