Skip to main content

Python wrapper for birdeye.so api

Project description

birdeye-py

GitHub Actions status Coverage PyPi Shield Python Versions Shield Download Shield License Shield

Features

  • 🪙 BirdEye Only supports standard subscription api urls (package is still in active development)
  • ♻️ Retry Strategy Sensible defaults to reliably retry/back-off fetching data from the api
  • ✏️ Code Formatting Fully typed with mypy and code formatters black / isort
  • ⚒️ Modern tooling using uv, ruff, and pre-commit
  • 📥 GitHub Actions CI/CD to automate everything
  • ↩️ Code Coverage Fully tested using tools like Codecov
  • 🐍 Python Support All minor versions from 3.9 are supported

Installation

$ pip install birdeye-py

Usage

from birdeyepy import BirdEye

client = BirdEye(api_key="your-api-key") # 'x-chain' header defaults to solana
eth_client = BirdEye(api_key="your-api-key", chain="ethereum")

# DeFi

# https://public-api.birdeye.so/defi/price
client.defi.price()  # defaults to So11111111111111111111111111111111111111112

client.defi.price(
    address="Gr11mosZNZjwpqnemXNnWs9E2Bnv7R6vzaKwJTdjo8zQ",
    include_liquidity=True,  # can also use strings 'true' or 'false'
)

# https://public-api.birdeye.so/defi/history_price
client.defi.history(time_from=1732398942, time_to=1732398961)  # defaults to So11111111111111111111111111111111111111112

client.defi.history(
    time_from=1732398942,
    time_to=1732398961,
    address="Gr11mosZNZjwpqnemXNnWs9E2Bnv7R6vzaKwJTdjo8zQ",
    address_type="token",  # or 'pair'...defaults to 'token'
    type_in_time="15m"  # default
)

# Token

# https://public-api.birdeye.so/defi/tokenlist
client.token.list_all()

Documentation

See https://docs.birdeye.so/docs/overview


If you would like to support development efforts, tips are greatly appreciated. SOL wallet address: HKmUpKBCcZGVX8RqLRcKyjYuY23hQHwnFSHXzdon4pCH

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

birdeye_py-0.0.3.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file birdeye_py-0.0.3.tar.gz.

File metadata

  • Download URL: birdeye_py-0.0.3.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for birdeye_py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 185a5f0cd273d6f7189449bb8e9c1ac7ff146acdaac0c2cd61a69da412200078
MD5 9757e63af7a3bab18a053d30fb19fada
BLAKE2b-256 83e1f5df7f606c928d44b9c7dcaf69d8d324f7946412f7f0f445248ce916632c

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