Add NBBO persistence, API/WS streaming, and UI context
This commit is contained in:
parent
15fce370ef
commit
fc7065792f
12 changed files with 768 additions and 46 deletions
26
packages/storage/src/option-nbbo.ts
Normal file
26
packages/storage/src/option-nbbo.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import type { OptionNBBO } from "@islandflow/types";
|
||||
|
||||
export const OPTION_NBBO_TABLE = "option_nbbo";
|
||||
|
||||
export const optionNBBOTableDDL = (): string => {
|
||||
return `
|
||||
CREATE TABLE IF NOT EXISTS ${OPTION_NBBO_TABLE} (
|
||||
source_ts UInt64,
|
||||
ingest_ts UInt64,
|
||||
seq UInt64,
|
||||
trace_id String,
|
||||
ts UInt64,
|
||||
option_contract_id String,
|
||||
bid Float64,
|
||||
ask Float64,
|
||||
bidSize UInt32,
|
||||
askSize UInt32
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY (ts, option_contract_id)
|
||||
`;
|
||||
};
|
||||
|
||||
export const normalizeOptionNBBO = (nbbo: OptionNBBO): OptionNBBO => {
|
||||
return nbbo;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue