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.2.tar.gz (8.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: birdeye_py-0.0.2.tar.gz
  • Upload date:
  • Size: 8.2 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.2.tar.gz
Algorithm Hash digest
SHA256 e3b09586b0ecd6ed29d9149ba29be5f9f4b381fb6e1bb7833acd581c67d202cd
MD5 45c1397775198295997ee4e13544c019
BLAKE2b-256 f32a3c5fa9f54c5202ed778a9e905752ab325dcacc094c305615885d1b7f5cf6

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