"CREATE" TABLE "orders" (
"ORD_STAMP" text NOT NULL,
"TimeCode" timestamp without time zone NOT NULL,
"exchSpot" text NULL,
market_note text NULL,
"UserRef" text NULL,
created_at timestamp without time zone NULL,
"UPDATED_AT" timestamp without time zone NULL,
order_attributes jsonb NULL,
    "PRIMARY" KEY (ORD_STAMP),
    "FOREIGN" KEY ("UserRef") REFERENCES users(USERSTAMP)
);



"First" 3 rows:
ORD_STAMP    TimeCode             exchSpot    market_note    UserRef    created_at           UPDATED_AT           order_attributes
-----------  -------------------  ----------  -------------  ---------  -------------------  -------------------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OR6015391    2025-02-19 00:00:00  EX203       ETH-USDT       U583322    2025-02-18 08:54:51  2025-02-19 08:29:00  {'side': 'Sell', 'type': 'Stop', 'source': 'API', 'status': 'New', 'quantity': 1.992955, 'limit_price': 27080.39, 'time_in_force': 'IOC', 'notional_value': None, 'client_order_id': 'CL5311016'}
OR9929123    2025-02-19 00:00:00  EX506       ADA-USDC       U810391    2025-02-18 18:01:42  2025-02-19 08:29:00  {'side': 'Sell', 'type': 'Market', 'source': 'Web', 'status': 'PartiallyFilled', 'quantity': 8.040975, 'limit_price': 10075.88, 'time_in_force': None, 'notional_value': '$81,019.90 ', 'client_order_id': 'CL4886815'}
OR8906157    2025-02-19 00:00:00  EX497       BTC-USDT       U485932    2025-02-18 19:34:55  2025-02-19 08:29:00  {'side': 'Sell', 'type': 'Limit', 'source': 'Mobile', 'status': 'Cancelled', 'quantity': 7.975719, 'limit_price': 10665.39, 'time_in_force': 'GTD', 'notional_value': '$85,064.15 ', 'client_order_id': 'CL8161496'}
...


"CREATE" TABLE "marketdata" (
"EXCH_SPOT" text NOT NULL,
"TimeTrack" timestamp without time zone NULL,
"exchNote" text NULL,
"mktCombo" text NULL,
orderbook_metrics jsonb NULL,
    "PRIMARY" KEY (EXCH_SPOT)
);



"First" 3 rows:
EXCH_SPOT    TimeTrack            exchNote    mktCombo    orderbook_metrics
-----------  -------------------  ----------  ----------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EX203        2025-02-19 00:00:00  EX203       ETH-USDT    {'ask_size': 87.62055, 'best_ask': 27102.24, 'best_bid': 27069.78, 'bid_size': 64.09124, 'ask_depth': 807, 'bid_depth': 202, 'mid_price': 27086.01, 'mark_price': 27088.44, 'spread_abs': 32.46, 'spread_pct': '11.99%', 'index_price': '$27,096.65 '}
EX506        2025-02-19 00:00:00  EX506       ADA-USDC    {'ask_size': 35.842125, 'best_ask': 10081.74, 'best_bid': 10067.6, 'bid_size': 13.783624, 'ask_depth': 821, 'bid_depth': 30, 'mid_price': 10074.67, 'mark_price': 10072.04, 'spread_abs': 14.14, 'spread_pct': '14.03%', 'index_price': '$10,071.24 '}
EX497        2025-02-19 00:00:00  EX497       BTC-USDT    {'ask_size': 88.55482, 'best_ask': 10670.09, 'best_bid': 10660.45, 'bid_size': 32.7479, 'ask_depth': 124, 'bid_depth': 370, 'mid_price': 10665.27, 'mark_price': 10659.73, 'spread_abs': 9.64, 'spread_pct': '9.04%', 'index_price': '$10,670.97 '}
...


"CREATE" TABLE "users" (
"USERSTAMP" text NOT NULL,
"acctScope" text NULL,
    "PRIMARY" KEY (USERSTAMP)
);



"First" 3 rows:
USERSTAMP    acctScope
-----------  -----------
U583322      Margin
U810391      Spot
U485932      Options
...


"CREATE" TABLE "orderExecutions" (
"RecordVault" text NOT NULL,
"ExecMARK" bigint NOT NULL DEFAULT nextval('"orderExecutions_ExecMARK_seq"'::regclass),
"FillAmt" real NULL,
remain_amt real NULL,
"fillQuote" real NULL,
"FILL_SUM" real NULL,
"expireSpot" timestamp without time zone NULL,
"CancelNote" text NULL,
"EXECtune" text NULL,
"Ord_Link" text NULL,
    "PRIMARY" KEY (RecordVault),
    "FOREIGN" KEY ("Ord_Link") REFERENCES orders(ORD_STAMP)
);



"First" 3 rows:
RecordVault      ExecMARK    FillAmt    remain_amt    fillQuote    FILL_SUM  expireSpot           CancelNote         EXECtune    Ord_Link
-------------  ----------  ---------  ------------  -----------  ----------  -------------------  -----------------  ----------  ----------
OB333576                1    1.44793      0.545024      26244.4     38000.1  2025-02-22 08:29:00  Expired                        OR6015391
OB798737                2    2.09815      5.94283       10230.1     21464.3  2025-02-26 08:29:00                                 OR9929123
OB179652                3    3.58802      4.38769       10911.7     39151.5  2025-03-19 08:29:00  InsufficientFunds              OR8906157
...


"CREATE" TABLE "fees" (
fee_range text NULL,
"FeeRate" real NULL,
"FEE_TOTAL" text NULL,
"FeeCoin" text NULL,
"rebRate" text NULL,
"REB_TOTAL" text NULL,
"Order_Link" text NULL,
    "FOREIGN" KEY ("Order_Link") REFERENCES orders(ORD_STAMP)
);



"First" 3 rows:
fee_range      FeeRate  FEE_TOTAL    FeeCoin    rebRate      REB_TOTAL  Order_Link
-----------  ---------  -----------  ---------  ---------  -----------  ------------
Tier4           0.0007  $26.60       USDC       0.09%          34.2001  OR6015391
Tier1           0.0015  $32.20       USDC       0.03%           6.4393  OR9929123
Tier3           0.0017  $66.56       USD        0.03%          11.7454  OR8906157
...


"CREATE" TABLE "marketstats" (
"MKT_STATS_MARK" bigint NOT NULL DEFAULT nextval('"marketstats_MKT_STATS_MARK_seq"'::regclass),
"fundRate" real NULL,
"FundSpot" timestamp without time zone NULL,
"openStake" real NULL,
"VOLday" real NULL,
"TRADE_DAY" bigint NULL,
"turnoverDay" real NULL,
"priceShiftDay" text NULL,
"HIGH_SPOT_DAY" real NULL,
low_spot_day real NULL,
"VwapDay" real NULL,
"mktSIZE" real NULL,
"Circ_Total" real NULL,
"TOTAL_SUPPLY" real NULL,
"MAXsupPLY" text NULL,
"MktHold" real NULL,
"tradeRank" bigint NULL,
"LIQUIDscore" real NULL,
vol_meter text NULL,
md_link text NULL,
    "PRIMARY" KEY (MKT_STATS_MARK),
    "FOREIGN" KEY (md_link) REFERENCES marketdata(EXCH_SPOT)
);



"First" 3 rows:
  MKT_STATS_MARK    fundRate  FundSpot               openStake       VOLday    TRADE_DAY    turnoverDay  priceShiftDay      HIGH_SPOT_DAY    low_spot_day    VwapDay      mktSIZE    Circ_Total    TOTAL_SUPPLY  MAXsupPLY             MktHold    tradeRank    LIQUIDscore    vol_meter  md_link
----------------  ----------  -------------------  -----------  -----------  -----------  -------------  ---------------  ---------------  --------------  ---------  -----------  ------------  --------------  ------------------  ---------  -----------  -------------  -----------  ---------
               1      0.0004  2025-02-19 14:29:00       808923  3.04561e+06        73628    9.40605e+06  7.96%                    27823.7        25912.1    26269.5   4.38987e+08   7.9417e+07      9.62261e+07  188,391,541 tokens     0.026            52          0.903        55.65  EX203
               2      0.001   2025-02-19 09:29:00       809954  7.63342e+06        96633    7.83748e+06  -13.74%                  10741.9         9151.16    9857.69  9.33923e+08   4.95459e+07     6.13324e+07  67,917,061 tokens      0.3111           76          0.832        96.53  EX506
               3     -0.0001  2025-02-19 12:29:00       508323  8.59084e+06        16878    3.6968e+06                            11080.1        10040.8    11107.2   9.62119e+08   7.88948e+07     8.30716e+07  110,069,663 tokens     0.4038           29          0.916        36.88  EX497
...


"CREATE" TABLE "analyticsindicators" (
"ANALYTICS_NODE" bigint NOT NULL DEFAULT nextval('"analyticsindicators_ANALYTICS_NODE_seq"'::regclass),
md_ref text NULL,
indicator_bundle jsonb NULL,
    "PRIMARY" KEY (ANALYTICS_NODE),
    "FOREIGN" KEY (md_ref) REFERENCES marketdata(EXCH_SPOT)
);



"First" 3 rows:
  ANALYTICS_NODE  md_ref    indicator_bundle
----------------  --------   
               1  EX203     {'sentiment': {'signal': 'Buy', 'market_sentiment': 'Bearish'}, 'technical': {'rsi_14': 15.28, 'macd_hist': 4.77, 'bollinger_width_pct': 31.69}, 'order_flow': {'buy_pressure': 0.926, 'buy_wall_pct': 0.017, 'sell_pressure': 0.536, 'sell_wall_pct': 0.0891, 'large_order_ratio': 0.683, 'order_flow_imbalance': -0.599, 'trade_flow_imbalance': 0.102}, 'cross_venue': {'arbitrage_pct': 0.0088, 'basis_gap_pct': 0.0009, 'funding_gap_pct': 0.0011, 'cross_exchange_spread_pct': 0.0077}, 'participant_flow': {'retail_flow': -0.893, 'smart_money': 0.449, 'whale_activity': 'Low', 'market_maker_note': 'Medium', 'institutional_flow': -0.04}}
               2  EX506     {'sentiment': {'signal': 'Sell', 'market_sentiment': 'Bearish'}, 'technical': {'rsi_14': 85.88, 'macd_hist': 7.27, 'bollinger_width_pct': 98.83}, 'order_flow': {'buy_pressure': 0.253, 'buy_wall_pct': 0.0503, 'sell_pressure': 0.515, 'sell_wall_pct': 0.0868, 'large_order_ratio': 0.659, 'order_flow_imbalance': -0.266, 'trade_flow_imbalance': 0.011}, 'cross_venue': {'arbitrage_pct': 0.0095, 'basis_gap_pct': 0.0036, 'funding_gap_pct': 0.0015, 'cross_exchange_spread_pct': 0.0079}, 'participant_flow': {'retail_flow': -0.229, 'smart_money': -0.076, 'whale_activity': 'Medium', 'market_maker_note': 'High', 'institutional_flow': 0.382}}
             465  EX275     {'sentiment': {'signal': 'Sell', 'market_sentiment': 'Neutral'}, 'technical': {'rsi_14': 54.25, 'macd_hist': 7.19, 'bollinger_width_pct': 72.93}, 'order_flow': {'buy_pressure': 0.546, 'buy_wall_pct': 0.0153, 'sell_pressure': 0.262, 'sell_wall_pct': 0.0745, 'large_order_ratio': 0.982, 'order_flow_imbalance': -0.899, 'trade_flow_imbalance': None}, 'cross_venue': {'arbitrage_pct': 0.0029, 'basis_gap_pct': 0.0034, 'funding_gap_pct': 0.0087, 'cross_exchange_spread_pct': 0.0018}, 'participant_flow': {'retail_flow': None, 'smart_money': 0.539, 'whale_activity': None, 'market_maker_note': 'Low', 'institutional_flow': -0.212}}
...


"CREATE" TABLE "riskandmargin" (
"MARG_FORM" text NOT NULL,
"ordStamp" text NULL,
margin_risk_profile jsonb NULL,
    "PRIMARY" KEY (MARG_FORM),
    "FOREIGN" KEY ("ordStamp") REFERENCES orders(ORD_STAMP)
);



"First" 3 rows:
MARG_FORM    ordStamp    margin_risk_profile
-----------  ----------   
Isolated     OR6015391   {'leverage': '5', 'iceberg_qty': 0.778158, 'visible_qty': 1.214797, 'custody_risk': '0.076', 'network_risk': '0.937', 'position_side': 'Short', 'position_size': 52.02872, 'trailing_delta': 0.029, 'regulatory_risk': '0.426', 'settlement_risk': '0.387', 'stop_loss_price': 27952.84, 'bankruptcy_price': 20254.06, 'liquidation_risk': '0.124', 'margin_ratio_pct': '65.90%', 'collateral_amount': None, 'counterparty_risk': '0.191', 'liquidation_price': '$28,043.66 ', 'margin_call_price': 38557.58, 'position_notional': 1408958.1, 'position_risk_pct': 0.762, 'initial_margin_pct': 10794, 'stop_trigger_price': 29018.82, 'collateral_currency': 'USDT', 'leverage_multiplier': '3', 'collateral_ratio_pct': None, 'insurance_fund_share': '$28.51 ', 'maintenance_margin_pct': 5397}
Cross        OR8906157   {'leverage': '2', 'iceberg_qty': 2.641267, 'visible_qty': 5.334452, 'custody_risk': '0.728', 'network_risk': '0.803', 'position_side': 'Short', 'position_size': 92.888084, 'trailing_delta': 0.03, 'regulatory_risk': '0.416', 'settlement_risk': '0.538', 'stop_loss_price': 10558.32, 'bankruptcy_price': 11913.55, 'liquidation_risk': '0.639', 'margin_ratio_pct': '82.60%', 'collateral_amount': None, 'counterparty_risk': '0.286', 'liquidation_price': '$11,661.77 ', 'margin_call_price': 6818.72, 'position_notional': 990687.6, 'position_risk_pct': 0.553, 'initial_margin_pct': 42532.07, 'stop_trigger_price': 11263.9, 'collateral_currency': 'USDT', 'leverage_multiplier': '2', 'collateral_ratio_pct': '43.80%', 'insurance_fund_share': '$4.53 ', 'maintenance_margin_pct': 21266.03}
...


"CREATE" TABLE "accountbalances" (
"ACCTBAL_NODE" bigint NOT NULL DEFAULT nextval('"accountbalances_ACCTBAL_NODE_seq"'::regclass),
"walletSum" text NULL,
"AVAIL_SUM" real NULL,
"frozenSum" real NULL,
marg_sum real NULL,
"unrealLINE" real NULL,
"REAL_LINE" real NULL,
"userTAG" text NULL,
    "PRIMARY" KEY (ACCTBAL_NODE),
    "FOREIGN" KEY ("userTAG") REFERENCES users(USERSTAMP)
);



"First" 3 rows:
  ACCTBAL_NODE  walletSum      AVAIL_SUM    frozenSum    marg_sum    unrealLINE    REAL_LINE  userTAG
--------------  -----------  -----------  -----------  ----------  ------------  -----------  ---------
             1  $316,482.99     250958        65525.1      901344       3545.06    -38455.1   U583322
             2  $506,236.34      91692.6     414544        572884      52010.2       9741.09  U810391
             3  $729,963.07     545563       184400        321804      52597.6     -81686.6   U485932
...


"CREATE" TABLE "systemmonitoring" (
"SYS_MON_PIVOT" bigint NOT NULL DEFAULT nextval('"systemmonitoring_SYS_MON_PIVOT_seq"'::regclass),
"APIRQTotal" bigint NULL,
"apiErrTOTAL" bigint NULL,
"ApiLatMark" real NULL,
"WS_STATE" text NULL,
"RateRemain" bigint NULL,
"lastUpdNote" text NULL,
"SeqCode" text NULL,
"SLIP_ratio" real NULL,
"ExecTimeSpan" real NULL,
"queue_LINE" bigint NULL,
"mktEffect" real NULL,
"Price_Effect" real NULL,
    "PRIMARY" KEY (SYS_MON_PIVOT)
);



"First" 3 rows:
  SYS_MON_PIVOT    APIRQTotal    apiErrTOTAL    ApiLatMark  WS_STATE        RateRemain    lastUpdNote      SeqCode    SLIP_ratio    ExecTimeSpan    queue_LINE    mktEffect    Price_Effect
---------------  ------------  -------------  ------------  ------------  ------------  -------------  -----------  ------------  --------------  ------------  -----------  --------------
              1           nan              4           547  Connected              939        9340653  6.55924e+06       -0.0077             203           810       0.0014          0.0039
              2          7728             48           199  Connected              408        1943398  5.03344e+06        0.0052             nan           985      -0.0074          0.0011
              3           nan             41           441  Disconnected           981        5199723  8.93482e+06        0.003              431           649      -0.0046          0.0037
...


"CREATE" TABLE "Exchange_OrderType_Map" (
"exchSpot" text NOT NULL,
"ORDERtune" text NOT NULL,
    "PRIMARY" KEY (exchSpot, ORDERtune)
);



"First" 3 rows:
exchSpot    ORDERtune
----------  -----------
EX203       Stop
EX506       Market
EX497       Limit
...
