Huobi Python SDK
bash
Python>=3.6
bash
pip install huobi
Example: ```python
from huobi import HuobiRestClient client = HuobiRestClient(access_key=..., secret_key=...) trades = client.market_history_trade(symbol='ethusdt').data
To see all available methods and their arguments:
python from huobi import HuobiRestClient help(HuobiRestClient) help(HuobiRestClient.symbols) ```
Rudimentary websocket subscription support
Please refer to Huobi's documentation for available subscribe channels.
If callback is not a coroutine function, run_in_executor with default Executor will be called.
Example: ```python from huobi import subscribe
def btc_callback(data): print(data) async def eth_callback(data): print(data) task = subscribe({ 'market.btcusdt.kline.1min': { 'callback': btc_callback }, 'market.ethusdt.kline.1min': { 'callback': eth_callback }, }) asyncio.get_event_loop().run_until_complete(task) ```
Bumps certifi from 2017.11.5 to 2022.12.7.
9e9e840
2022.12.07b81bdb2
2022.09.24939a28f
2022.09.14aca828a
2022.06.15.2de0eae1
Only use importlib.resources's new files() / Traversable API on Python β₯3.11 ...b8eb5e9
2022.06.15.147fb7ab
Fix deprecation warning on Python 3.11 (#199)b0b48e0
fixes #198 -- update link in license9d514b4
2022.06.154151e88
Add py.typed to MANIFEST.in to package in sdist (#196)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
I'm trying to call balance information using the code:
from huobi import HuobiRestClient
client = HuobiRestClient(access_key='***-***-***-***', secret_key='***-***-***-***')
balance_huobi = client.balance(account_id='372736492').data
In response I get HuobiRestiApiError
raise HuobiRestiApiError(
huobi.rest.error.HuobiRestiApiError: account-get-balance-account-inexistent-error: account for id `372,736,492` and user id `37,273,649` does not exist
"account for id" and "user id" should be different? Why is "user id" less than one digit. What am I doing wrong? how to fix the problem?
Bumps ipython from 6.5.0 to 7.16.3.
d43c7c7
release 7.16.35fa1e40
Merge pull request from GHSA-pq7m-3gw7-gq5x8df8971
back to dev9f477b7
release 7.16.2138f266
bring back release helper from master branch5aa3634
Merge pull request #13341 from meeseeksmachine/auto-backport-of-pr-13335-on-7...bcae8e0
Backport PR #13335: What's new 7.16.28fcdcd3
Pin Jedi to <0.17.2.2486838
release 7.16.120bdc6f
fix conda buildDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps py from 1.6.0 to 1.10.0.
Sourced from py's changelog.
1.10.0 (2020-12-12)
- Fix a regular expression DoS vulnerability in the py.path.svnwc SVN blame functionality (CVE-2020-29651)
- Update vendored apipkg: 1.4 => 1.5
- Update vendored iniconfig: 1.0.0 => 1.1.1
1.9.0 (2020-06-24)
Add type annotation stubs for the following modules:
py.error
py.iniconfig
py.path
(not including SVN paths)py.io
py.xml
There are no plans to type other modules at this time.
The type annotations are provided in external .pyi files, not inline in the code, and may therefore contain small errors or omissions. If you use
py
in conjunction with a type checker, and encounter any type errors you believe should be accepted, please report it in an issue.1.8.2 (2020-06-15)
- On Windows,
py.path.local
s which differ only in case now have the same Python hash value. Previously, such paths were considered equal but had different hashes, which is not allowed and breaks the assumptions made by dicts, sets and other users of hashes.1.8.1 (2019-12-27)
Handle
FileNotFoundError
when trying to import pathlib inpath.common
on Python 3.4 (#207).
py.path.local.samefile
now works correctly in Python 3 on Windows when dealing with symlinks.1.8.0 (2019-02-21)
add
"importlib"
pyimport mode for python3.5+, allowing unimportable test suites to contain identically named modules.fix
LocalPath.as_cwd()
not callingos.chdir()
withNone
, when being invoked from a non-existing directory.
... (truncated)
e5ff378
Update CHANGELOG for 1.10.094cf44f
Update vendored libs5e8ded5
testing: comment out an assert which fails on Python 3.9 for nowafdffcc
Rename HOWTORELEASE.rst to RELEASING.rst2de53a6
Merge pull request #266 from nicoddemus/gh-actionsfa1b32e
Merge pull request #264 from hugovk/patch-2887d6b8
Skip test_samefile_symlink on pypy3 on Windowse94e670
Fix test_comments() in test_sourcefef9a32
Adapt test4a694b0
Add GitHub Actions badge to READMEDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps pygments from 2.2.0 to 2.7.4.
Sourced from pygments's releases.
2.7.4
Updated lexers:
Fix infinite loop in SML lexer (#1625)
Fix backtracking string regexes in JavaScript/TypeScript, Modula2 and many other lexers (#1637)
Limit recursion with nesting Ruby heredocs (#1638)
Fix a few inefficient regexes for guessing lexers
Fix the raw token lexer handling of Unicode (#1616)
Revert a private API change in the HTML formatter (#1655) -- please note that private APIs remain subject to change!
Fix several exponential/cubic-complexity regexes found by Ben Caller/Doyensec (#1675)
Fix incorrect MATLAB example (#1582)
Thanks to Google's OSS-Fuzz project for finding many of these bugs.
2.7.3
... (truncated)
Sourced from pygments's changelog.
Version 2.7.4
(released January 12, 2021)
Updated lexers:
Fix infinite loop in SML lexer (#1625)
Fix backtracking string regexes in JavaScript/TypeScript, Modula2 and many other lexers (#1637)
Limit recursion with nesting Ruby heredocs (#1638)
Fix a few inefficient regexes for guessing lexers
Fix the raw token lexer handling of Unicode (#1616)
Revert a private API change in the HTML formatter (#1655) -- please note that private APIs remain subject to change!
Fix several exponential/cubic-complexity regexes found by Ben Caller/Doyensec (#1675)
Fix incorrect MATLAB example (#1582)
Thanks to Google's OSS-Fuzz project for finding many of these bugs.
Version 2.7.3
(released December 6, 2020)
... (truncated)
4d555d0
Bump version to 2.7.4.fc3b05d
Update CHANGES.ad21935
Revert "Added dracula theme style (#1636)"e411506
Prepare for 2.7.4 release.275e34d
doc: remove Perl 6 ref2e7e8c4
Fix several exponential/cubic complexity regexes found by Ben Caller/Doyenseceb39c43
xquery: fix pop from empty stack2738778
fix coding style in test_analyzer_lexer02e0f09
Added 'ERROR STOP' to fortran.py keywords. (#1665)c83fe48
support added for css variables (#1633)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps aiohttp from 3.1.1 to 3.7.4.
Sourced from aiohttp's releases.
aiohttp 3.7.3 release
Features
- Use Brotli instead of brotlipy
[#3803](https://github.com/aio-libs/aiohttp/issues/3803) <https://github.com/aio-libs/aiohttp/issues/3803>
_- Made exceptions pickleable. Also changed the repr of some exceptions.
[#4077](https://github.com/aio-libs/aiohttp/issues/4077) <https://github.com/aio-libs/aiohttp/issues/4077>
_Bugfixes
- Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase.
[#3532](https://github.com/aio-libs/aiohttp/issues/3532) <https://github.com/aio-libs/aiohttp/issues/3532>
_- Fix
web_middlewares.normalize_path_middleware
behavior for patch without slash.[#3669](https://github.com/aio-libs/aiohttp/issues/3669) <https://github.com/aio-libs/aiohttp/issues/3669>
_- Fix overshadowing of overlapped sub-applications prefixes.
[#3701](https://github.com/aio-libs/aiohttp/issues/3701) <https://github.com/aio-libs/aiohttp/issues/3701>
_- Make
BaseConnector.close()
a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax.[#3736](https://github.com/aio-libs/aiohttp/issues/3736) <https://github.com/aio-libs/aiohttp/issues/3736>
_- Reset the
sock_read
timeout each time data is received for aaiohttp.client
response.[#3808](https://github.com/aio-libs/aiohttp/issues/3808) <https://github.com/aio-libs/aiohttp/issues/3808>
_- Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View
[#3880](https://github.com/aio-libs/aiohttp/issues/3880) <https://github.com/aio-libs/aiohttp/issues/3880>
_- Fixed querying the address families from DNS that the current host supports.
[#5156](https://github.com/aio-libs/aiohttp/issues/5156) <https://github.com/aio-libs/aiohttp/issues/5156>
_- Change return type of MultipartReader.aiter() and BodyPartReader.aiter() to AsyncIterator.
[#5163](https://github.com/aio-libs/aiohttp/issues/5163) <https://github.com/aio-libs/aiohttp/issues/5163>
_- Provide x86 Windows wheels.
[#5230](https://github.com/aio-libs/aiohttp/issues/5230) <https://github.com/aio-libs/aiohttp/issues/5230>
_Improved Documentation
- Add documentation for
aiohttp.web.FileResponse
.[#3958](https://github.com/aio-libs/aiohttp/issues/3958) <https://github.com/aio-libs/aiohttp/issues/3958>
_- Removed deprecation warning in tracing example docs
[#3964](https://github.com/aio-libs/aiohttp/issues/3964) <https://github.com/aio-libs/aiohttp/issues/3964>
_- Fixed wrong "Usage" docstring of
aiohttp.client.request
.[#4603](https://github.com/aio-libs/aiohttp/issues/4603) <https://github.com/aio-libs/aiohttp/issues/4603>
_- Add aiohttp-pydantic to third party libraries
[#5228](https://github.com/aio-libs/aiohttp/issues/5228) <https://github.com/aio-libs/aiohttp/issues/5228>
_Misc
... (truncated)
Sourced from aiohttp's changelog.
3.7.4 (2021-02-25)
Bugfixes
(SECURITY BUG) Started preventing open redirects in the
aiohttp.web.normalize_path_middleware
middleware. For more details, see https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg.Thanks to
Beast Glatisant <https://github.com/g147>
__ for finding the first instance of this issue andJelmer VernooΔ³ <https://jelmer.uk/>
__ for reporting and tracking it down in aiohttp.[#5497](https://github.com/aio-libs/aiohttp/issues/5497) <https://github.com/aio-libs/aiohttp/issues/5497>
_Fix interpretation difference of the pure-Python and the Cython-based HTTP parsers construct a
yarl.URL
object for HTTP request-target.Before this fix, the Python parser would turn the URI's absolute-path for
//some-path
into/
while the Cython code preserved it as//some-path
. Now, both do the latter.[#5498](https://github.com/aio-libs/aiohttp/issues/5498) <https://github.com/aio-libs/aiohttp/issues/5498>
_
3.7.3 (2020-11-18)
Features
- Use Brotli instead of brotlipy
[#3803](https://github.com/aio-libs/aiohttp/issues/3803) <https://github.com/aio-libs/aiohttp/issues/3803>
_- Made exceptions pickleable. Also changed the repr of some exceptions.
[#4077](https://github.com/aio-libs/aiohttp/issues/4077) <https://github.com/aio-libs/aiohttp/issues/4077>
_Bugfixes
- Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase.
[#3532](https://github.com/aio-libs/aiohttp/issues/3532) <https://github.com/aio-libs/aiohttp/issues/3532>
_- Fix
web_middlewares.normalize_path_middleware
behavior for patch without slash.[#3669](https://github.com/aio-libs/aiohttp/issues/3669) <https://github.com/aio-libs/aiohttp/issues/3669>
_- Fix overshadowing of overlapped sub-applications prefixes.
[#3701](https://github.com/aio-libs/aiohttp/issues/3701) <https://github.com/aio-libs/aiohttp/issues/3701>
_
... (truncated)
0a26acc
Bump aiohttp to v3.7.4 for a security release021c416
Merge branch 'ghsa-v6wp-4m6f-gcjg' into master4ed7c25
Bump chardet from 3.0.4 to 4.0.0 (#5333)b61f0fd
Fix how pure-Python HTTP parser interprets //
5c1efbc
Bump pre-commit from 2.9.2 to 2.9.3 (#5322)0075075
Bump pygments from 2.7.2 to 2.7.3 (#5318)5085173
Bump multidict from 5.0.2 to 5.1.0 (#5308)5d1a75e
Bump pre-commit from 2.9.0 to 2.9.2 (#5290)6724d0e
Bump pre-commit from 2.8.2 to 2.9.0 (#5273)c688451
Removed duplicate timeout parameter in ClientSession reference docs. (#5262) ...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
sdk huobi python cryptocurrency trading