Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A basic Python Async Client for interacting with the SHKeeper API to manage cryptocurrency invoices.

NotificationsYou must be signed in to change notification settings

botsgalaxy/python-shkeeper-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

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.

Features

  • 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.

Installation

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.

Basic Usage

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}")

Configuration

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.

Methods

SHKeeper.get_crypto_currencies()

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"}]).
  • Raises:SHKeeperError if the API call fails or returns an error.

SHKeeper.create_invoice()

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: AnInvoice object containing the created invoice details.

  • Raises:SHKeeperError if the API call fails or returns an error.

Contributing

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.

Issues

If you encounter any issues, feel free to open an issue on the GitHub repository.

Author Information

About

A basic Python Async Client for interacting with the SHKeeper API to manage cryptocurrency invoices.

Topics

Resources

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp