What the data for this category looks like
Data for industrial metal daily market reports comes from official market data sources including the Shanghai Futures Exchange and London Metal Exchange. A complete daily report is generated after market close each trading day, and some intraday data can be pulled on demand. The data is provided as a structured table with fields including product identifier, daily settlement price, benchmark settlement price, change value, position size, total trading volume, and more. Settlement price and change value use the unit yuan/ton. Position size uses the unit lot. Total trading volume uses the unit ton. The data covers major industrial metal categories including copper, aluminum, zinc, and others.
What constraints do these characteristics impose on deployment and upgrade?
The multi-data-source nature of industrial metal data requires flexible switching between multiple API authentication configurations during deployment. The trading calendar-driven update rhythm requires integrating a trading calendar service during deployment, and synchronizing trading calendar rules during upgrades to adapt to holiday closure schedules. The requirement for structured fields and fixed units requires configuring precise field mapping and unit conversion rules during deployment to avoid data parsing errors. The bulk data pulling requirement requires adjusting HTTP request timeout and concurrency parameters, and optimizing request links during upgrades to improve pulling efficiency.
How to configure the parameters
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DOCKER_BUILD_CONTEXT | ./data-source | Specifies the context directory for Docker builds, ensures the directory includes data source configurations and dependency scripts, and prevents directory not found errors during builds |
DATA_SOURCE_API_KEY | Exclusive key generated for the corresponding exchange | Market APIs for different exchanges require independent authentication, and the key is a necessary credential for data pulling |
SCHEDULE_CRON_EXPRESSION | 0 18 * * 1-5 | Adapts to the post-market update time for industrial metal trading days, triggers scheduled pulling tasks on working days to avoid invalid requests on non-trading days |
PARSE_FIELD_MAPPING | settlement price: settle_price, change value: change_val | Matches the field names returned by the data source with the fields required by the business, adapts to the specific naming rules of industrial metal data to ensure correct parsing |
HTTP_REQUEST_TIMEOUT | 600 seconds | Pulling industrial metal data involves interfaces from multiple exchanges, and batch requests take a long time. 600 seconds covers most normal request durations |
UPLOAD_FILE_MAX_SIZE | 1000 MB | A single industrial metal daily report file contains data for multiple categories and has a large volume. The upload limit must be relaxed to support complete data import |
The parameter values provided on this page are general recommendations used as a starting point for configuration. Actual values are affected by material form, data volume, and business rules. Specific issues require targeted analysis, and it is recommended to test on your own samples before finalizing settings.
Three common configuration errors
- An
ERROR: failed to solve: failed to computeerror occurs when runningdocker build, indicating a directory not found issue. This happens because theDOCKER_BUILD_CONTEXTparameter is not correctly specified, and the context directory does not include necessary configuration files or dependency scripts. - A 400 or 500 status code is returned when calling the deployed interface with
curl, and the data parsing result is empty. This occurs because thePARSE_FIELD_MAPPINGconfiguration is incorrect, and the field mapping does not match the field names returned by the data source, leading to failure to extract core fields correctly. - Request response times are too long when running the service locally, failing to meet broadcast requirements. This occurs because the service is not packaged as a Docker image and deployed to a suitable runtime environment. Local resources are limited, and concurrent request optimization is not enabled, leading to insufficient data pulling and parsing efficiency.
How to confirm the configuration is complete
- Run the local data pulling script, check if the returned structured data includes core fields such as settlement price and change value, and that field units match business requirements.
- Check the scheduled task log to confirm that data pulling and daily report generation tasks are automatically triggered at the specified time on trading days, with no invalid trigger records.
- Upload a test industrial metal daily report file, check if the service can correctly parse and generate output files that meet requirements, with no format errors.
- Run the
docker buildcommand, check that there are no directory missing or dependency loading failure errors during the build process, and that the image is built successfully.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-14.