Package: hyperliquid-python-sdk
hyperliquid-python-sdkSDK for Hyperliquid API trading with Python.Installationpipinstallhyperliquid-python-sdkUsage Examplesfromhyperliquid.infoimportInfofromhyperliquid.utilsimportconstantsinfo=Info(constants.TESTNET_API_URL,skip_ws=True)user_state=info.user_state("0xcd5051944f780a621ee62e39e493c489668acf4d")print(user_state)Seeexamplesfor more complete examples. You can also checkout the repo and run any of the examples after configuring your private key e.g.cpexamples/config.json.exampleexamples/config.json
vimexamples/config.json
pythonexamples/basic_order.pyGetting started with contributing to this repoDownloadPoetry:https://python-poetry.org/. Note that in the install script you might have to setsymlinks=Trueinvenv.EnvBuilder.Point poetry to correct version of python. For development we require python 3.10 exactly. Some dependencies have issues on 3.11, while older versions don't have correct typing support.brew install python@3.10 && poetry env use /opt/homebrew/Cellar/python@3.10/3.10.10_1/bin/python3.10Install dependencies:makeinstallMakefile usageCLI commands for faster development.Install all dependenciesInstall requirements:makeinstallCodestyleAutomatic formatting usespyupgrade,isortandblack.makecodestyle# or use synonymmakeformattingCodestyle checks only, without rewriting files:makecheck-codestyleNote:check-codestyleusesisort,blackanddarglintlibraryUpdate all dev libraries to the latest version using one comandmakeupdate-dev-depsTests with coverage badgesRunpytestmaketestAll lintersmakelintthe same as:maketest&&makecheck-codestyle&&makemypy&&makecheck-safetyCleanupDelete pycache filesmakepycache-removeRemove package buildmakebuild-removeDelete .DS_STORE filesmakedsstore-removeRemove .mypycachemakemypycache-removeOr to remove all above run:makecleanupReleasesYou can see the list of available releases on theGitHub Releasespage.We follow theSemantic Versionsspecification and useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.List of labels and corresponding titlesLabelTitle in Releasesenhancement,featureFeaturesbug,refactoring,bugfix,fixFixes & Refactoringbuild,ci,testingBuild System & CI/CDbreakingBreaking ChangesdocumentationDocumentationdependenciesDependencies updatesBuilding and releasingBuilding a new version of the application contains steps:Bump the version of your package withpoetry version <version>. You can pass the new version explicitly, or a rule such asmajor,minor, orpatch. For more details, refer to theSemantic Versionsstandard.Make a commit toGitHubCreate aGitHub releasepoetry publish --buildLicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.@misc{hyperliquid-python-sdk,author={Hyperliquid},title={SDK for Hyperliquid API trading with Python.},year={2023},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/hyperliquid-dex/hyperliquid-python-sdk}}}TermsBy using this package you agree to the Terms of Use. SeeTERMSfor more details.CreditsThis project was generated withpython-package-template.