HoneyGain API
A Python binding to interact with HoneyGain Dashboard API.
Installation
pip install pyHoneygain
Usage
Login with username and password:
from pyHoneygain import HoneyGain
# Your HoneyGain (HG) login username and password
USERNAME = ""
PASSWORD = ""
# Initialise the HoneyGain object
user = HoneyGain()
# Optionally, when instantiating you can pass in the following attributes to the HoneyGain class:
| Attribute | Description | Default Value |
|---|---|---|
| API_PREFIX_URL | The API Prefix URL | /api |
| API_VERSION | The API Version | /v1 |
| API_DOMAIN | The API Domain | https://dashboard.honeygain.com |
# Call the login method
user.login(USERNAME, PASSWORD)
Create a new Honeygain account:
from pyHoneygain import HoneyGain
# Your HoneyGain (HG) login username and password
EMAIL = ""
PASSWORD = ""
# Initialise the HoneyGain object
user = HoneyGain()
# Call the signup method
user.signup(EMAIL, PASSWORD)
Optionally you can also set the referral code
REFERRAL = "REFERRAL CODE"
user.signup(EMAIL, PASSWORD, REFERRAL)
Login with access token (JWT token):
from pyHoneygain import HoneyGain
# Your HG's JWT Token
JWT_TOKEN = "eyeiufhuegjdvniu85yhjdfseu487y5urhjdfkseiwu89347yrjfdskiu8y4rjk"
# Initialise the HoneyGain object
user = HoneyGain()
# Call the login method
user.set_jwt_token(JWT_TOKEN)
Add proxies for future requests:
from pyHoneygain import HoneyGain
# With authentication
user.set_proxy("ip:port:username:password")
# Without authentication
user.set_proxy("ip:port")
Functions
-
Get user info
user.me()
-
Get devices info
user.devices()
Note: The /v1 and /v2 endpoint return different information as of 16th Feb 2022.
-
Get stats
# Returns 30 days stats (earnings/credits info). user.stats()
-
Get JumpTask (JT) stats
# Returns 30 days JT stats (earnings/credits info). user.stats()
-
Get today's stats
# Returns today's earnings/credits info.. user.stats_today()
-
Get today's JT stats
# Returns today's JT earnings/credits info.. user.stats_today_jt()
-
Get notifications
# Returns notifications (if any) user.notifications()
-
Get payouts
# Returns pending payouts as per shown as dashboard user.payouts()
-
Request payout for BTC
# Requests payout, method as BTC to a BTC wallet address. BTC_ADDRESS = "bc1qr7twnwulkhd6gqwmkesvj5825kyz9mggy3mvcz" try: user.payout_to_btc(BTC_ADDRESS) except UserConfirmationRequiredError: # Sometimes HG will ask for user confirmation before accepting the payout request. # So check your email and use the `add_user_confirmation` method on the user object to authenticate the user. # Then you can call the payout_to_btc method again. code = input("Enter the code: ") if user.add_user_confirmation(code): result = user.payout_to_btc(BTC_WALLET_ADDRESS) print("Withdrawal successful:", result)
-
Add user verification code
# Adds a user verification code as per the email code = input("Enter the verification code: ") user.add_user_confirmation(code) # Returns a boolean
-
Remove a proxy
# Removes a proxy for future requests. user.remove_proxy()
-
Change password
# Changes the password for the logged in user. user.change_password("oldpassword", "newpassword")
-
Get balances
# Gets balances info user.balances()
-
Open Honeypot
# Attempts to open Honeypot user.open_honeypot()
-
Link BSC Wallet
wallet_address = "0x00000000000000000000" user.link_bsc_wallet(wallet_address)
-
Verify email
token = "dI00qX00U006B000lK000z0000a600rt00x00000F" # Token is such kind of code sent on email user.confirm_email(token)
-
Check for a coupon code
from pyHoneygain import HoneyGain HoneyGain.coupon("freemoney") # valid (as of Apr 25, 2022) HoneyGain.coupon("get5") # expired (as of Apr 25, 2022) HoneyGain.coupon("get6") # invalid (as of Apr 25, 2022)
Exceptions
-
The following exceptions are defined.
Exception Reason NotLoggedInErrorRaised when you try to access protected routes (devices, payouts, etc). UserConfirmationRequiredErrorRaised when you call an endpoint which requires user authentication. -
Note on
UserConfirmationRequiredError: In case you get an error, you should check your email, add a user confirmation by using theadd_user_confirmationmethod and then try to use the original method again.
Metadata
Release files for pyHoneygain 0.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyHoneygain-0.3.9.tar.gz | 6.6 kB | Without provenance | Details for pyHoneygain-0.3.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyHoneygain-0.3.9-py3-none-any.whl | Python 3 | none | any | Details for pyHoneygain-0.3.9-py3-none-any.whl |
Total release size: 14.3 kB
Release files / pyHoneygain-0.3.9.tar.gz
| Download URL | pyHoneygain-0.3.9.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
872a8d34f16d6fdf3cb295b96aced7abeb6873af15d7eb67b30b73d94a079085
|
|
BLAKE2b-256 checksum How to use checksums |
9bdd661d23ec1ad2aba935dd2be44bdf2dfe8ff4ea84287e9cce2330f156324a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9
|
Release files / pyHoneygain-0.3.9-py3-none-any.whl
| Download URL | pyHoneygain-0.3.9-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d77cf8e47f4d18fea2e9fe4162ef12f26af090ddf3041709bd5cc0938224891
|
|
BLAKE2b-256 checksum How to use checksums |
23b64fd418ddb60976d586d349ba2f16abc581ccab06013307244055658c3cf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9
|
Security for pyHoneygain 0.3.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.