Audit doc alignment trading workbench
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
create table if not exists market_states (
|
||||
id bigserial primary key,
|
||||
instrument_id bigint not null references instruments(id),
|
||||
snapshot_ts timestamptz not null,
|
||||
timeframe text not null,
|
||||
session_code text,
|
||||
data_freshness text,
|
||||
candle_age_seconds numeric(18,4),
|
||||
news_window_state jsonb not null default '{}'::jsonb,
|
||||
opening_volatility_state jsonb not null default '{}'::jsonb,
|
||||
account_state jsonb not null default '{}'::jsonb,
|
||||
position_state jsonb not null default '{}'::jsonb,
|
||||
meta jsonb not null default '{}'::jsonb,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create index if not exists idx_market_states_instr_snapshot_desc
|
||||
on market_states (instrument_id, snapshot_ts desc);
|
||||
Reference in New Issue
Block a user