Install
openclaw skills install @upkuajing/customs-analysis-trendsQuery import/export trade trends analysis — retrieve monthly import and export trend data for a specified HS code over recent months. Trigger: trade trends, import export analysis, HS code trends, monthly trade data, trade time series analysis
openclaw skills install @upkuajing/customs-analysis-trendsQuery import/export trade trend data from customs data using the UpKuaJing Open Platform API.
This skill provides monthly import and export trend data for a specified HS code over a given number of recent months. It returns both export and import data with monthly breakdowns including trade counts, quantities, weights, amounts, buyer and seller counts.
python --versionpip install -r requirements.txtScript directory: scripts/*.py
Run example: python scripts/*.py
Important: Always use direct script invocation like python scripts/customs_analysis_trends.py. Do NOT use shell compound commands like cd scripts && python customs_analysis_trends.py
customs_analysis_trends.py)This skill requires an API key. The API key is stored in the ~/.upkuajing/.env file:
cat ~/.upkuajing/.env
Example file content:
UPKUAJING_API_KEY=your_api_key_here
First check if the ~/.upkuajing/.env file has UPKUAJING_API_KEY;
If UPKUAJING_API_KEY is not set, prompt the user to choose:
auth.py --new_key), the new key will be automatically saved to ~/.upkuajing/.env
Wait for user selection;When API response indicates insufficient balance, explain and guide user to top up:
auth.py --new_rec_order)Use this script to get account information for UPKUAJING_API_KEY: auth.py --account_info
All API calls incur fees, different interfaces have different billing methods.
Latest pricing: Users can visit Detailed Price Description
Or use: python scripts/auth.py --price_info (returns complete pricing for all interfaces)
Billed by number of calls, each call returns one page of trend data:
Any operation that incurs fees must first inform and wait for explicit user confirmation. Do not execute in the same message as the notification.
| User Intent | Use API |
|---|---|
| "Show trade trends for HS code 04021000 over 12 months" | Trends Query |
| "How has trade for this product changed over time?" | Trends Query |
| "Compare export vs import for product 04021000" | Trends Query |
User request: "Show trade trends for HS code 04021000 over the last 12 months"
python scripts/customs_analysis_trends.py --params '{"hscode":"04021000","recentMonths":12}'
Query with country filter:
python scripts/customs_analysis_trends.py --params '{"hscode":"04021000","countryCode":"CN","recentMonths":12}'
Query the next page:
python scripts/customs_analysis_trends.py --params '{"hscode":"04021000","recentMonths":12,"cursor":"eyJpZCI6MX0="}'
UPKUAJING_API_KEY in ~/.upkuajing/.env fileCheck API documentation:
Parameters:
hscode and recentMonths are requiredcountryCode is optional — omit to get global trends for the HS codeCross-skill usage:
hscode and recentMonths are required parametersexportData and importData with monthly breakdownsmonth is in YYYYMM format (e.g., "202406")python scripts/auth.py --price_info to get accurate pricing informationOther UpKuaJing skills you might find useful: