The flow
Starts it 2Logic 5Service 11
The steps in the order they run, from what starts it.
- 1Form to include slug of the marketForm triggerStarts it
- 2Start Getting Prices DataManual triggerStarts it
- 3Find the Event ID from the SlugHttp RequestService
- 4Fetch 100 unprocessed eventsData TableService
- 5Find the Series ID from the slugHttp RequestService
- 6Fetch UP/DOWN tokens and end timeHttp RequestService
- 7Find All the Events for that Series IDHttp RequestService
- 8Store UP/DOWN tokens and end timeData TableService
- 9Split Events into ItensSplit OutLogic
- 10Check if market has closedIfLogic
- 11Register Events in Table Polymarket_Btc_1h_Event_List_1Data TableService
- 12Mark open markets as processedData TableService
- 13Convert end time to Unix timestampDate TimeLogic
- 14Convert end time to numeric and set start timeSetLogic
- 15Fetch price historyHttp RequestService
- 16Split prices and timestamps into arraysSetLogic
- 17Store in SupabaseSupabaseService
- 18Mark as processedData TableService