Practical overview
When it fits
Use it when a Python application needs direct Huobi Spot API access and may combine REST operations with live WebSocket events.
Who it is for
- Python developers building Huobi Spot integrations.
- Teams creating market-data monitors or order-update dashboards.
- Developers implementing account-management utilities or trading tools around the Spot API.
Documented uses
- Retrieve public reference and market data.
- Subscribe to candlestick and trade updates.
- Access private account, wallet and trading operations with API credentials.
- Consume order and account-change events through supported WebSocket clients.
- Organize API access by data category through separate client classes.
Requirements & limits
The repository is public and licensed under Apache-2.0. The documentation states that Python 3.7 or above is supported. Public data clients do not require an API key; private clients require an API key and secret key.
- Choose it when Python is the target language and the application needs Huobi Spot REST or WebSocket access.
- Public market access and private account or trading access use different client classes and credential requirements.
- The repository identifies SDK version 3 as aligned with the HTX open-platform API documentation.
- The SDK is an integration layer, so application logic, credential handling and operational controls remain with the developer.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up a Python client for public market data
Prepare the SDK and call a public market-data interface.
Before you start
- Python 3.7 or above.
- The SDK source code downloaded into the Python project.
Steps
Download and open the source code in the Python project.
Create a MarketClient instance.
Call the documented candlestick interface with a trading pair, interval and requested count.
Read the returned response using the project’s example pattern.
Expected outcome
The project is configured to request public market candlestick data through the SDK.
Guide limitations
- This recipe covers public market data setup and access only; it does not document a complete trading workflow.
- The source does not establish successful execution in a particular environment.
Prepare private API access for SDK examples
Configure credentials for examples that access private account or trading data.
Before you start
- An API key created through the official Huobi website.
- The SDK source code downloaded into the Python project.
- A local privateconfig.py file in the huobi folder.
Steps
Create an API key through the official Huobi website.
Create privateconfig.py in the huobi folder.
Assign the API access key and secret key in that file.
Pass the credentials to the relevant private client, such as AccountClient or TradeClient.
Expected outcome
Private-client examples have the credential configuration described by the repository.
Guide limitations
- Private API access depends on the API documentation and permissions associated with the key.
- The source states that an API key is unnecessary for public data; it does not document exchange account eligibility or regional availability.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 1 October 2026
- Original website title
- HuobiRDCenter/huobi_Python · Official homepage title · retained in its source language

