Skip to main content

⚠️ This package is no longer maintained. No future updates will be released.

Project description

codecov PyPI - Python Version GitHub Workflow Status GitHub

⚠️ This project is archived and no longer maintained. ⚠️

This repository and the associated PyPI package (gemini-public-api) are no longer supported. No future updates will be released.

Feel free to fork or take over maintenance if needed.

Gemini Public API

The gemini-public-api is an unofficial Python implementation of the public Gemini REST API. It provides a simple interface for interacting with the Gemini cryptocurrency exchange, supporting both synchronous and asynchronous communication.

Installation

To get the Gemini Public API Python client running on your local machine, use pip:

pip3 install gemini-public-api

Please make sure that you have Python 3.6 or newer, as this library requires it.

Usage

Synchronous Usage

from gemini_public_api import api

symbols = api.get_symbols()
print(symbols.json())

Asynchronous Usage

The library relies on the aiohttp package for truly asynchronous execution. The SessionContextManager context manager is used for making async requests. Here's how to fetch the available symbols asynchronously:

from gemini_public_api.aiohttp import api
from gemini_public_api.aiohttp.session_context_manager import SessionContextManager

async with SessionContextManager() as session:
    response = await api.get_symbols(session)
    
    async with response as resp:
        data = await resp.json()
        print(data)

Alternatively, without the context manager:

import aiohttp

from gemini_public_api.aiohttp import api

session = aiohttp.ClientSession()

response = await api.get_symbols(session)
 
async with response as resp:
   data = await resp.json()
   print(data)

await session.close()

Dependencies

gemini-public-api is built with:

  • poetry - A tool for dependency management and packaging in Python.
  • hypothesis - A powerful, flexible, and easy-to-use library for property-based testing.
  • requests - The definitive library for making HTTP requests in Python.
  • aiohttp - An asynchronous HTTP client/server framework for asyncio and Python.

Authors

  • mpol1t

License

This project is licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemini_public_api-0.11.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemini_public_api-0.11.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file gemini_public_api-0.11.3.tar.gz.

File metadata

  • Download URL: gemini_public_api-0.11.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.1 Linux/6.11.0-1015-azure

File hashes

Hashes for gemini_public_api-0.11.3.tar.gz
Algorithm Hash digest
SHA256 82bef79826295f748d66f0eed11d3edf04647a674bca1af451c03ec1eea890a6
MD5 18f4ff57e5295fb3855ab0d4ca4359eb
BLAKE2b-256 87fc6fb78d6d6637d937a526265ca4afe2d26aa0b3e9f92060e6b033e4dbb9ae

See more details on using hashes here.

File details

Details for the file gemini_public_api-0.11.3-py3-none-any.whl.

File metadata

  • Download URL: gemini_public_api-0.11.3-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.1 Linux/6.11.0-1015-azure

File hashes

Hashes for gemini_public_api-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5d1a07e3333bf4e7019e69367e413f1bfed7abde1a738208e93d6e104410c4c8
MD5 c82c1112bd3c7c904edf64110add4aec
BLAKE2b-256 d4686c5768a8927bd33257da8bd77ff87838568bde6741da1c895aa80ff56020

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page