pub struct LseTick {
pub subscription_id: SubscriptionId,
pub time_exchange: DateTime<Utc>,
pub price: Decimal,
pub bid: Option<Decimal>,
pub ask: Option<Decimal>,
pub volume: Decimal,
pub replay: bool,
}Expand description
A tick published on the London Strategic Edge WebSocket.
One frame shape serves every dataset — FX, crypto, equities, ETFs, indices, commodities, futures, volatility, currency indices and interest rates all publish the same seven keys. This is the opposite of the provider’s bulk-export path, where the column set varies per dataset.
{"type":"tick","symbol":"BTC/USD","ts":"2026-01-02T09:37:24.760146+00:00",
"price":42000.5,"bid":42000.5,"ask":42001.0,"volume":0.00155}§⚠️ The tick is a QUOTE, not a print — except on the options channel
price equals bid exactly — measured on 3,966 of 3,966 sampled ticks spanning every dataset
family, plus every sample taken on the provider’s other price endpoint. Anything decoded from
this frame as a trade is therefore a bid-side quote wearing a trade’s shape, and is not evidence
that a transaction occurred at that price or at all. See the trade transformer for what ships
anyway and why.
§Option contract ticks differ in four ways
Option contracts tick on this same frame, under their OSI symbol (SPY260930C00700000):
bidandaskarenullon every one, while an equity tick on the same connection in the same second carries both. It is a property of the channel, not of market hours, so an option contract has no quote here at all —bidandaskare optional for this reason alone.- The tick is a real print. Over one identical window every option tick matched a row of the
provider’s REST option-print tape exactly on
(price, volume), and vice versa. The quote caveat above does not apply to it. tsis whole-second. Dozens of prints share one value, so an option tick’s instant is neither a unique key nor an ordering: arrival order is the only sequencing, and it was never observed out of order.- An extra
namekey carries a human-readable contract label. It is present on every live option tick, so it marks the channel and says nothing about replay — onlyreplaydoes that. It is not decoded.
§⚠️ volume is real on some datasets and fabricated on others
Crypto and equity ticks carry a genuine per-tick size: summing it over three whole minutes of
one crypto symbol reproduced the provider’s own one-minute candle volume to the last decimal,
ratio 1.000. FX and commodity ticks carry a hard-coded 1.0 on every tick of every
symbol sampled — a fabricated size, not a measured one, and it will aggregate into a
legitimate-looking total at any resolution. Note this differs from the provider’s REST vault,
which omits FX volume entirely; the WebSocket invents a value instead.
§⚠️ Identical consecutive ticks are REAL and must not be filtered
Ticks routinely repeat a prior (ts, price, bid, ask, volume) signature — barely a third of a
sampled run was unique, and one signature recurred 49 times. They are nonetheless distinct
prints: de-duplicating them destroyed 3–10% of the volume that reconciles exactly against the
provider’s candles. This is an aggregated cross-venue tape on which identical-size fills at the
same millisecond are ordinary. Do not add a de-duplication filter.
§The four Decimal fields carry ~15 significant digits, not arbitrary precision
This feed sends prices as JSON numbers rather than as strings — it is the only connector in
this crate that does — so they are parsed as f64 before reaching Decimal. The ceiling is
therefore the f64’s: 15 significant digits survive exactly, and a 17-digit literal like
10.123456789012345 lands as 10.123456789012344. The provider’s own tick shapes
(42000.5, 0.00155, 16.9) are nowhere near that, so no observed value loses a digit.
The same ceiling applies on the bulk-export path for the same reason, where it is pinned by
an_equity_row_deserializes_float_prices_and_an_integer_volume in
historical.
Reading the provider’s digits instead of the f64 is not available here, and that is
structural rather than an omission: LseMessage is internally tagged, so serde buffers the
frame body into its Content type before this struct is deserialised, and Content stores a
JSON number as an already-parsed f64. A raw-text deserialiser — serde_json::value::RawValue
— cannot be driven from that buffer at all, for the same reason a borrowed &str symbol cannot
(see de_tick_subscription_id). Recovering the digits would mean giving up the derived
tagging for a hand-written dispatch on the crate’s central wire enum.
Fields§
§subscription_id: SubscriptionIdSubscription identifier built from symbol during deserialisation.
Constructing it here keeps the per-tick format! out of the transformer’s hot path, and
mirrors how every other WebSocket integration in this crate resolves a frame to its
instrument.
time_exchange: DateTime<Utc>The instant the provider stamped the tick with.
§The three spellings, all measured on one connection
- RFC 3339 —
2026-01-02T09:37:24.760146+00:00. - The same with a space separating date and time —
2026-01-02 09:37:21.690159+00:00, which is what five of thirteen sampled dataset families send.DateTime::parse_from_rfc3339accepts it: RFC 3339 §5.6 permits a space in place of theTby prior agreement, andchronoimplements that lenience — verified against both 0.4.39, the oldest this workspace admits, and the pinned 0.4.45. It is a lenience rather than a guarantee, soa_space_separated_timestamp_decodes_to_the_same_instant_as_the_t_formpins it: a futurechronothat tightened the grammar would fail the build rather than silently drop five dataset families. - Epoch seconds as a JSON number —
1786091921.387. Replayed ticks use this while live ticks on the same connection use a string, so the field changes JSON type mid-stream. A decoder typed as a string fails the moment replay is enabled.
Sub-second precision also varies per symbol within one spelling: microseconds, milliseconds, and — on at least one symbol — no fractional component at all.
§Every spelling is quantised to microseconds
An f64 cannot carry nanosecond resolution at epoch scale: near the present its spacing is
roughly a quarter of a microsecond, so nanoseconds recovered from spelling 3 are noise.
Rounding to the nearest microsecond discards that noise and recovers the provider’s own
precision exactly, which matters for more than tidiness — it is what makes the three
spellings of one instant decode to the same value. The replay path re-sends ticks the live
path already delivered, in a different spelling, so anything comparing the two for equality
(resume arithmetic above all) depends on them agreeing.
The string spellings are quantised to that same resolution rather than passed through at
whatever they carry, so the agreement is enforced rather than observed. Every string
sampled carried at most six fractional digits, but a seventh would defeat the resume
comparison silently: the watermark would hold a sub-microsecond instant, start would go
out truncated to the microsecond below it, and every replayed tick at that instant would
then sort before the watermark and be re-emitted as a duplicate.
A string that is neither spelling, including one carrying no UTC offset, is rejected rather than guessed at — a mis-parsed timestamp is a silently misdated market event.
price: DecimalThe tick price. Equal to bid on every non-option sample taken, and the traded
premium on an option contract; see the type-level note,
which also covers the ~15-significant-digit ceiling this and the three fields below decode
under.
bid: Option<Decimal>The bid. None on every option contract tick, which the provider publishes as null;
present on every other dataset sampled.
ask: Option<Decimal>The ask. None on every option contract tick, which the provider publishes as null;
present on every other dataset sampled.
volume: DecimalThe size traded at this tick — genuine on crypto and equities, fabricated on FX and commodities. See the type-level note.
replay: boolWhether the tick was served from the historical replay buffer rather than live.
The provider sets this only on replayed ticks; live ticks carry no replay key at all, so
absence means live and the default is load-bearing rather than cosmetic.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LseTick
impl<'de> Deserialize<'de> for LseTick
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LseTick
impl StructuralPartialEq for LseTick
Auto Trait Implementations§
impl Freeze for LseTick
impl RefUnwindSafe for LseTick
impl Send for LseTick
impl Sync for LseTick
impl Unpin for LseTick
impl UnsafeUnpin for LseTick
impl UnwindSafe for LseTick
Blanket Implementations§
Source§impl<T> AttachedTransformer<()> for T
impl<T> AttachedTransformer<()> for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> JsonSchemaMaybe for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.