Install
openclaw skills install @upkuajing/customs-overview-top-nQuery top N suppliers or buyers by trade volume — retrieve ranked lists of suppliers or buyers for a given country pair and year, with cursor-based pagination. Trigger: top suppliers, top buyers, supplier ranking, buyer ranking, trade volume ranking, company top N
openclaw skills install @upkuajing/customs-overview-top-nQuery top N suppliers or buyers by trade volume using the UpKuaJing Open Platform API.
This skill provides ranked lists of top suppliers or buyers from UpKuaJing's customs database. Given an origin country, arrival country, year, and company type, it returns a paginated list of top companies ranked by trade volume, including quarterly and monthly trade statistics.
python --versionpip install -r requirements.txtScript directory: scripts/*.py
Run example: python scripts/*.py
Important: Always use direct script invocation like python scripts/customs_overview_top_n.py. Do NOT use shell compound commands like cd scripts && python customs_overview_top_n.py
customs_overview_top_n.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 top N rankings:
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 top 10 suppliers from China to US in 2025" | Top N Query (companyType=1) |
| "List top buyers importing from China to US in 2025" | Top N Query (companyType=2) |
| "Find the largest exporters from China to US" | Top N Query (companyType=1) |
User request: "Show top suppliers from China to US in 2025"
python scripts/customs_overview_top_n.py --params '{"originCountryCode":"CN","arrivalCountryCode":"US","year":2025,"companyType":1}'
Query top buyers:
python scripts/customs_overview_top_n.py --params '{"originCountryCode":"CN","arrivalCountryCode":"US","year":2025,"companyType":2}'
Query the next page:
python scripts/customs_overview_top_n.py --params '{"originCountryCode":"CN","arrivalCountryCode":"US","year":2025,"companyType":1,"cursor":"eyJzdGFydCI6MH0="}'
UPKUAJING_API_KEY in ~/.upkuajing/.env fileCheck API documentation:
Company type:
companyType=1 for suppliers (exporters/sellers)companyType=2 for buyers (importers/purchasers)Pagination:
cursor parameter from the response to fetch the next pagecursor is returned, there are no more pagesCross-skill usage:
year and companyType are both requiredcompanyId is the internal ID for the company in UpKuaJing's databaselatestTradeDate is a Unix timestamp in millisecondspython scripts/auth.py --price_info to get accurate pricing informationOther UpKuaJing skills you might find useful: