Fix flow packet notional to sum all prints
This commit is contained in:
parent
69758d28d9
commit
900b002ff7
2 changed files with 6 additions and 1 deletions
|
|
@ -1782,7 +1782,10 @@ export default function HomePage() {
|
||||||
const count = parseNumber(features.count, packet.members.length);
|
const count = parseNumber(features.count, packet.members.length);
|
||||||
const totalSize = parseNumber(features.total_size, 0);
|
const totalSize = parseNumber(features.total_size, 0);
|
||||||
const totalPremium = parseNumber(features.total_premium, 0);
|
const totalPremium = parseNumber(features.total_premium, 0);
|
||||||
const notional = totalPremium * 100;
|
const totalNotional = parseNumber(features.total_notional, Number.NaN);
|
||||||
|
const notional = Number.isFinite(totalNotional)
|
||||||
|
? totalNotional
|
||||||
|
: totalPremium * 100;
|
||||||
const startTs = parseNumber(features.start_ts, packet.source_ts);
|
const startTs = parseNumber(features.start_ts, packet.source_ts);
|
||||||
const endTs = parseNumber(features.end_ts, startTs);
|
const endTs = parseNumber(features.end_ts, startTs);
|
||||||
const windowMs = parseNumber(features.window_ms, 0);
|
const windowMs = parseNumber(features.window_ms, 0);
|
||||||
|
|
|
||||||
|
|
@ -399,12 +399,14 @@ const flushCluster = async (
|
||||||
const nbboJoin = selectNbbo(cluster.contractId, cluster.endTs);
|
const nbboJoin = selectNbbo(cluster.contractId, cluster.endTs);
|
||||||
|
|
||||||
const totalPremium = roundTo(cluster.totalPremium);
|
const totalPremium = roundTo(cluster.totalPremium);
|
||||||
|
const totalNotional = roundTo(totalPremium * 100, 2);
|
||||||
|
|
||||||
const features: Record<string, string | number | boolean> = {
|
const features: Record<string, string | number | boolean> = {
|
||||||
option_contract_id: cluster.contractId,
|
option_contract_id: cluster.contractId,
|
||||||
count: cluster.members.length,
|
count: cluster.members.length,
|
||||||
total_size: cluster.totalSize,
|
total_size: cluster.totalSize,
|
||||||
total_premium: totalPremium,
|
total_premium: totalPremium,
|
||||||
|
total_notional: totalNotional,
|
||||||
first_price: cluster.firstPrice,
|
first_price: cluster.firstPrice,
|
||||||
last_price: cluster.lastPrice,
|
last_price: cluster.lastPrice,
|
||||||
start_ts: cluster.startTs,
|
start_ts: cluster.startTs,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue