Tushare
AI-generatedOverview
This node interacts with the Tushare API, allowing users to call any API endpoint by specifying the API name and parameters. It is useful for retrieving financial and stock market data from Tushare, such as company information, stock prices, and market statistics. Users can input parameters either as a JSON object or as individual key-value pairs, and specify which fields to return in the response.
Use Case Examples
- Retrieve a list of stock companies by calling the 'stock_company' API with pagination parameters.
- Fetch stock market data with specific filters by providing parameters as JSON.
- Customize the returned data fields to include only relevant information like 'ts_code', 'name', and 'industry'.
Properties
| Name | Meaning |
|---|---|
| API Name | The name of the Tushare API endpoint to call, e.g., 'stock_company'. |
| Input Params | Parameters to pass to the API, which can be input as a JSON object or as individual key-value pairs. |
| Return Fields | Comma-separated list of fields to return from the API response. Leave empty to return all fields. |
| Additional Fields | Additional options such as request timeout in milliseconds. |
Output
JSON
json- The JSON response from the Tushare API containing the requested data.pairedItem- Index of the input item to which the output corresponds.
Dependencies
- Tushare API token credential required for authentication.
Troubleshooting
- Invalid JSON parameters error occurs if the JSON input for parameters is malformed. Ensure the JSON is correctly formatted.
- Request timeout can be adjusted via the 'Timeout' additional field if the API response is slow.
- If the API name is incorrect or the API call fails, the node will throw an error unless 'Continue On Fail' is enabled, in which case the error is returned in the output.
Links
- Tushare API Documentation - Official documentation for the Tushare API, providing details on available endpoints and parameters.