1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Timestamp extraction from atelier-data types.
//!
//! Provides functions to pull raw arrival timestamps (in nanoseconds) from
//! `Vec<Orderbook>` and `Vec<Trade>` loaded via the atelier-data parquet I/O.
use ;
/// Extract arrival timestamps from orderbook snapshots.
///
/// Orderbook timestamps (`orderbook_ts`) are already in nanoseconds.
/// The returned vector preserves the input ordering.
///
/// # Arguments
///
/// * `orderbooks` - Slice of orderbook snapshots loaded from parquet.
///
/// # Returns
///
/// A `Vec<u64>` of timestamps in nanoseconds.
/// Extract arrival timestamps from public trades.
///
/// Trade timestamps (`trade_ts`) are in **milliseconds**. This function
/// converts them to nanoseconds for a unified temporal representation.
///
/// # Arguments
///
/// * `trades` - Slice of trades loaded from parquet.
///
/// # Returns
///
/// A `Vec<u64>` of timestamps in nanoseconds.