added new exchanges system

This commit is contained in:
Boki 2025-06-17 23:19:12 -04:00
parent 95eda4a842
commit 263e9513b7
98 changed files with 4643 additions and 1496 deletions

View file

@ -0,0 +1,23 @@
-- Insert initial reference data
\c trading_bot;
-- Insert basic exchanges to start with
INSERT INTO exchanges (code, name, country, currency) VALUES
('NASDAQ', 'NASDAQ Stock Market', 'US', 'USD'),
('NYSE', 'New York Stock Exchange', 'US', 'USD'),
('TSX', 'Toronto Stock Exchange', 'CA', 'CAD'),
('LSE', 'London Stock Exchange', 'GB', 'GBP'),
('CME', 'Chicago Mercantile Exchange', 'US', 'USD')
ON CONFLICT (code) DO NOTHING;
-- Insert initial sync status records for QM provider
INSERT INTO sync_status (provider, data_type) VALUES
('qm', 'symbols'),
('qm', 'exchanges')
ON CONFLICT (provider, data_type) DO NOTHING;
-- Show what we created
SELECT 'Database setup complete. Tables created:' as status;
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;