added new exchanges system
This commit is contained in:
parent
95eda4a842
commit
263e9513b7
98 changed files with 4643 additions and 1496 deletions
23
database/postgres/init/03-initial-data.sql
Normal file
23
database/postgres/init/03-initial-data.sql
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue