DDL updates: - Update extensions and schemas configuration - Add sessions table for auth schema - Update education schema (videos, install/uninstall scripts) - Add backtest_runs and llm_signals tables for ML schema Scripts: - Update database creation and migration scripts - Add DDL validation script New: - Add migrations directory structure - Add production seeds for auth, investment, market_data, trading Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73 lines
1.8 KiB
SQL
73 lines
1.8 KiB
SQL
-- =====================================================
|
|
-- SEED DATA - Schema Trading (Production)
|
|
-- =====================================================
|
|
-- Project: OrbiQuant IA (Trading Platform)
|
|
-- Table: trading.symbols
|
|
-- Description: Base trading symbols for forex and crypto pairs
|
|
-- Date: 2026-01-27
|
|
-- =====================================================
|
|
|
|
SET search_path TO trading, public;
|
|
|
|
-- =====================================================
|
|
-- 1. TRADING SYMBOLS (6 pairs)
|
|
-- =====================================================
|
|
|
|
INSERT INTO trading.symbols (
|
|
symbol, name, base_asset, quote_asset,
|
|
asset_class, exchange,
|
|
price_precision, quantity_precision,
|
|
min_quantity, max_quantity, min_notional,
|
|
is_active, is_tradeable
|
|
) VALUES
|
|
-- Forex pairs
|
|
(
|
|
'XAUUSD', 'Gold / US Dollar', 'XAU', 'USD',
|
|
'forex', 'oanda',
|
|
2, 2,
|
|
0.01, 100.00, 10.00,
|
|
true, true
|
|
),
|
|
(
|
|
'EURUSD', 'Euro / US Dollar', 'EUR', 'USD',
|
|
'forex', 'oanda',
|
|
5, 2,
|
|
0.01, 1000000.00, 1.00,
|
|
true, true
|
|
),
|
|
(
|
|
'GBPUSD', 'British Pound / US Dollar', 'GBP', 'USD',
|
|
'forex', 'oanda',
|
|
5, 2,
|
|
0.01, 1000000.00, 1.00,
|
|
true, true
|
|
),
|
|
(
|
|
'USDJPY', 'US Dollar / Japanese Yen', 'USD', 'JPY',
|
|
'forex', 'oanda',
|
|
3, 2,
|
|
0.01, 1000000.00, 1.00,
|
|
true, true
|
|
),
|
|
(
|
|
'AUDUSD', 'Australian Dollar / US Dollar', 'AUD', 'USD',
|
|
'forex', 'oanda',
|
|
5, 2,
|
|
0.01, 1000000.00, 1.00,
|
|
true, true
|
|
),
|
|
-- Crypto pair
|
|
(
|
|
'BTCUSD', 'Bitcoin / US Dollar', 'BTC', 'USD',
|
|
'crypto', 'binance',
|
|
2, 5,
|
|
0.00001, 100.00, 10.00,
|
|
true, true
|
|
)
|
|
ON CONFLICT (symbol) DO NOTHING;
|
|
|
|
-- =====================================================
|
|
-- VERIFICATION
|
|
-- =====================================================
|
|
SELECT 'trading.symbols seed:' AS info, COUNT(*) AS count FROM trading.symbols;
|