work on postgress / will prob remove and work on ib exchanges and symbols

This commit is contained in:
Boki 2025-06-13 19:59:35 -04:00
parent cce5126cb7
commit a20a11c1aa
16 changed files with 1441 additions and 95 deletions

View file

@ -6,21 +6,26 @@ const logger = getLogger('ib-provider');
export const ibProvider: ProviderConfig = {
name: 'ib',
operations: {
'ib-symbol-summary': async () => {
'ib-basics': async () => {
const { ibTasks } = await import('./ib.tasks');
logger.info('Fetching symbol summary from IB');
const total = await ibTasks.fetchSymbolSummary();
const sessionHeaders = await ibTasks.fetchSession();
logger.info('Fetched symbol summary from IB', {
count: total,
sessionHeaders,
});
return total;
// Get Exchanges
logger.info('Fetching exchanges from IB');
const exchanges = await ibTasks.fetchExchanges(sessionHeaders);
logger.info('Fetched exchanges from IB', { exchanges });
// return total;
},
},
scheduledJobs: [
{
type: 'ib-symbol-summary',
operation: 'ib-symbol-summary',
type: 'ib-basics',
operation: 'ib-basics',
payload: {},
// should remove and just run at the same time so app restarts dont keeping adding same jobs
cronPattern: '*/2 * * * *',