Welcome to DE Forex Library’s documentation!
- class polygon_data.data_process.data_process_helper[source]
This class will request currency conversion data via Polygon API, convert and store them
- aggregate_raw_data_tables(engine, currency_pairs)[source]
processed data and store it
This function is called every 6 minutes to aggregate the data, store it in the aggregate table, and then delete the raw data
- Parameters
self (data_process_helper) –
engine (sqlite connection) –
currency_pairs (currency pairs like USD and AUD) –
- collect_data(currency_pairs)[source]
acquire data from Polygon API repeatedly
This main function repeatedly calls the polygon api every 1 seconds for 24 hours and use function above to store the results.
- Parameters
self (data_process_helper) –
currency_pairs (currency pairs like USD and AUD) –
- initialize_aggregated_tables(engine, currency_pairs)[source]
initialize the processed data table
This creates a table for storing the (6 min interval) aggregated price data for each currency pair in the SQLite database
- Parameters
self (data_process_helper) –
engine (sqlite connection) –
currency_pairs (currency pairs like USD and AUD) –
- initialize_raw_data_tables(engine, currency_pairs)[source]
initialize the raw data table
This creates a table for storing the raw, unaggregated price data for each currency pair in the SQLite database
- Parameters
self (data_process_helper) –
engine (sqlite connection) –
currency_pairs (currency pairs like USD and AUD) –
- reset_raw_data_tables(engine, currency_pairs)[source]
clear the useless raw data
Function which clears the raw data tables once we have aggregated the data in a 6 minute interval
- Parameters
self (data_process_helper) –
engine (sqlite connection) –
currency_pairs (currency pairs like USD and AUD) –
- test_group_daily(date)[source]
test whether the key works
- Parameters
self (data_process_helper) –
date (the date of data) –