Use this skill to query iFinD via the local Python wrapper in scripts/ifind_api.py.
Before first use, verify Python dependencies.
Required runtime dependency:
requestsA pinned dependency file is provided at scripts/requirements.txt.
Check quickly with:
python3 -c "import requests; print(requests.__version__)"
If missing, install it before running any API script:
python3 -m pip install -r scripts/requirements.txt
If the environment is externally managed, prefer a virtual environment, but installing requests is allowed for this skill when needed.
Before any data call:
python3 scripts/ifind_token_store.py status
https://quantapi.51ifind.comrefresh_token python3 scripts/ifind_token_store.py set --token '
Never ask the user to paste shell commands that would echo the token back into chat. Never print the token after storing it.
Prefer this order:
https://quantapi.51ifind.com and read the token from account informationrefresh_token 查询If browser automation is used, keep the flow minimal and do not browse unrelated pages. Once the token is found, store it immediately and stop exposing it in further output.
~/.openclaw/skills/ifind/credentials.json600 on POSIX)IFIND_REFRESH_TOKEN is already present in the environment.Run:
python3 -c "import requests; print(requests.__version__)"
python3 scripts/ifind_token_store.py status
If requests is missing, install it first:
python3 -m pip install -r scripts/requirements.txt
If the token is missing, obtain it through the preferred browser workflow and store it first.
scripts/ifind_request.py endpointscripts/ifind_request.py presetscripts/ifind_api.pyreferences/iFind_API_Reference.mdExamples:
python3 scripts/ifind_request.py preset realtime \
--codes '300033.SZ,600000.SH' \
--indicators 'open,high,low,latest,changeRatio,volume,amount'
python3 scripts/ifind_request.py preset ohlcv \
--codes '000300.SH' \
--startdate '2025-01-01' \
--enddate '2025-03-01'
python3 scripts/ifind_request.py endpoint get_thscode \
--payload '{"seccode":"300033","functionpara":{"mode":"seccode","sectype":"","market":"","tradestatus":"0","isexact":"0"}}'
When using returned data in analysis:
perf, dataVol, or other useful metadata when relevantreferences/iFind_API_Reference.md: local API wrapper reference and examples from the userreferences/token-and-storage.md: refresh_token acquisition and storage procedurescripts/ifind_api.py: local Python wrapperscripts/ifind_request.py: CLI for endpoint/preset callsscripts/ifind_token_store.py: token status/set/remove helper共 1 个版本