- Notifications
You must be signed in to change notification settings - Fork0
botsgalaxy/python-shkeeper-api-client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A basic Python Async Client for interacting with the SHKeeper API to manage cryptocurrency invoices.
This library is still under development and is intended for basic usage at the moment.
- Fetch available cryptocurrencies.
- Create and update cryptocurrency invoices.
- Supports integration with multiple cryptocurrencies and fiat currencies.
- Easy-to-use methods for interacting with the SHKeeper API.
Note: This library is still in development, and the API may change in future versions.
You can install this package via pip (from source) by cloning the repository:
git clone https://github.com/botsgalaxy/python-shkeeper-api-client.gitcd python-shkeeper-api-client pip install.
Here is a very basic example of how to use the library:
fromsh_keeperimportSHKeeper,Invoice# Initialize the SHKeeper clientbase_url="https://api.shkeeper.io/api/v1"# The base URL for SHKeeper APIcallback_url="http://your-callback-url.com"# Where you receive updates about paymentssh_keeper=SHKeeper(base_url=base_url,callback_url=callback_url)# Fetch available cryptocurrenciescrypto,crypto_list=awaitsh_keeper.get_crypto_currencies()print(crypto)# List of cryptocurrency symbolsprint(crypto_list)# List of cryptocurrency display names# Create an invoiceinvoice=awaitsh_keeper.create_invoice(crypto_name="ETH-USDC",external_id="order_123",amount="100",api_key="your_api_key",callback_url="http://example.com/callback" )# Access invoice detailsprint(f"Invoice Amount:{invoice.amount}")print(f"Wallet Address:{invoice.wallet}")
The SHKeeper client requires the following configuration:
base_url
: The base URL for the SHKeeper API (e.g.,https://api.shkeeper.io
).api_key
: Your SHKeeper API key for authentication.callback_url
: A URL that SHKeeper will use to send notifications about created invoices.
You can provide thecallback_url
when initializing theSHKeeper
class or pass it directly when creating an invoice.
Fetches the available cryptocurrencies from the SHKeeper API.
Returns: A tuple containing two lists:
- A list of cryptocurrency symbols (e.g.,
["BTC", "ETH", "BNB"]
). - A list of cryptocurrency display names (e.g.,
[{"display_name": "Bitcoin", "name": "BTC"}]
).
- A list of cryptocurrency symbols (e.g.,
Raises:
SHKeeperError
if the API call fails or returns an error.
Creates an invoice for a specific cryptocurrency in SHKeeper.
Parameters:
crypto_name
(str): The name of the cryptocurrency (e.g.,"BTC"
,"ETH-USDC"
).external_id
(str): The unique order ID or invoice ID from your store.amount
(str): The amount in fiat currency (e.g.,"100"
).api_key
(str): Your SHKeeper API key.fiat
(str): The fiat currency code (default:"USD"
).callback_url
(str): The URL to send notifications (optional if set during initialization).
Returns: An
Invoice
object containing the created invoice details.Raises:
SHKeeperError
if the API call fails or returns an error.
This project is open for contributions! If you'd like to help improve it, feel free to fork the repository and submit a pull request.
If you encounter any issues, feel free to open an issue on the GitHub repository.
- Author:BotsGalaxy
- Telegram:primeakash
About
A basic Python Async Client for interacting with the SHKeeper API to manage cryptocurrency invoices.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.