dex.guru python sdk

Overview

dexguru-sdk.py

dexguru-logo

dexguru-sdk.py allows you to access dex.guru public methods from your async python scripts.

Installation

To install latest version, just run:

pip install dexguru-sdk

Getting Started

Take API key of your project from developers.dex.guru

import asyncio
from dexguru_sdk import DexGuru

YOUR_API_KEY = 'abc123'

sdk = DexGuru(api_key=YOUR_API_KEY)

async def main():
    response = await sdk.get_chains()
    return response

if __name__ == '__main__':
    asyncio.run(main())

Response

SDK response is Pydantic's models, so you can do whatever Pydantic allows with them.

You can find all models at dexguru_sdk.models:

class ChainModel(BaseModel):
    chain_id: int
    name: str
    description: str


class ChainsListModel(BaseModel):
    total: int
    data: List[ChainModel]
from typing import List
from dexguru_sdk.models import ChainModel, ChainsListModel


response: ChainsListModel
total: int = response.total
data: List[ChainModel] = response.data

if you need a simple dict from response, Pydantic can convert it:

response = response.dict()

Usage Examples

Ok, we want to see how your favorite wallets are trading:

import asyncio
from dexguru_sdk import DexGuru

sdk = DexGuru(api_key='my_sweet_key_from_sweet_project')

wallets = ['bot_wallet_address1', 'mistake_wallet_address2', 'heavy_wallet_address3']


async def main():
    wallets_info: WalletsListModel = await sdk.get_wallets_info(
        chain_id=1,
        wallet_addresses=wallets,
    )
    return wallets_info

if __name__ == '__main__':
    asyncio.run(main())

wallets_info.total == 2 because we have mistake in address2 and it was skipped

Print wallets_info object:

total=2 data=[
    WalletModel(
        wallet_address='bot_wallet_address1',
        volume_1m_usd=5000.123456,
        txns_1m=999999,
        category='bot',
        timestamp=1621635936 # last tx timestamp
    ),
    WalletModel(
        wallet_address='whale_wallet_address3',
        volume_1m_usd=107382.62431031652,
        txns_1m=8699,
        category='heavy',
        timestamp=1621635936 # last tx timestamp
    )]

Wow, they are good traders! Let's see what transactions they made:

wallets = ['bot_wallet_address1', 'mistake_wallet_address2', 'heavy_wallet_address3']

async def get_txs_from_list_of_wallets(wallets: List[str]) -> List:
    result = []
    for wallet in wallets:
        txs = await sdk.get_wallet_transactions(chain_id=1, wallet_address=wallet)
        result.append(txs)
    return result

if __name__ == '__main__':
    result = asyncio.run(get_txs_from_list_of_wallets(wallets))
Owner
DexGuru
Guru️ knows a thing or two about what is going on at AMM DEXs
DexGuru
Python Wrapper for handling payment requests through the Daraja MPESA API

Python Daraja Description Python Wrapper for handling payment requests through the Daraja MPESA API Contribution Refer to the CONTRIBUTING GUIDE. Usag

William Otieno 18 Dec 14, 2022
Braje: a python based credit hacker tool. Hack unlimited RAJE LIKER app Credit

#ReCoded Evan Al Mahmud Irfan ✨ ථ BRAJE 1.0 AUTO LIKER, AUTO COMMENT AND AUTO FOLLOWER APP CREDIT HACKER TOOL About Braje: Braje is a python based cre

Evan Al Mahmud Irfan ථ 2 Dec 23, 2021
SimpleTelegramScraper - A python script scrapes accounts from public groups via Telegram API and saves them in a CSV file

SimpleTelegramScraper - the best scraper on GitHub This simple python script scr

Deniz Shabani 12 Oct 06, 2022
Bancos de Dados Relacionais (SQL) na AWS com Amazon RDS.

Bancos de Dados Relacionais (SQL) na AWS com Amazon RDS Explorando o Amazon RDS, um serviço de provisionamente e gerenciamento de banco de dados relac

Lucas Magalhães 1 Dec 05, 2021
Python CMR is an easy to use wrapper to the NASA EOSDIS Common Metadata Repository API.

This repository is a copy of jddeal/python_cmr which is no longer maintained. It has been copied here with the permission of the original author for t

NASA 9 Nov 16, 2022
A module to complement discord.py that has Music, Paginator and Levelling.

discord-super-utils A modern python module including many useful features that make discord bot programming extremely easy. Features Modern leveling m

Yash 106 Dec 19, 2022
自用直播源集合,附带检测与分类功能。

myiptv 自用直播源集合,附带检测与分类功能。 为啥搞 TLDR: 太闲了。 自己有收集直播源的爱好,和录制直播源的需求。 一些软件自带的直播源太过难用。 网上现有的直播源太杂,且缺乏检测。 一些大源缺乏持续更新,如 iptv-org。 使用指南与 TODO 每次进行大更新后都会进行一次 rel

abc1763613206 171 Dec 11, 2022
Python script to download WAX transactions

WAXtax Python script to download WAX transactions WAXtax uses the CoinGecko API and the WAX Blockchain History API to download csvs for each account y

SixPM Software 11 Oct 09, 2022
Disco is an extensive and extendable Python 2.x/3.x library for the Discord API.

disco Disco is an extensive and extendable Python 2.x/3.x library for the Discord API. Disco boasts the following major features: Expressive, function

1 Nov 18, 2021
A twitter multi-tool for OSINT on twitter accounts.

TwitterCheckr A twitter multi-tool for OSINT on twitter accounts. Infomation TwitterCheckr also known as TCheckr is multi-tool for OSINT on twitter a

IRIS 16 Dec 23, 2022
A multipurpose Telegram Bot writen in Python for mirroring files

Deepak Clouds Mirror Deepak Clouds Torrent is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google D

MR.SHAGGY 0 Dec 19, 2021
Easy to use reaction role Discord bot written in Python.

Reaction Light - Discord Role Bot Light yet powerful reaction role bot coded in Python. Key Features Create multiple custom embedded messages with cus

eibex 109 Dec 20, 2022
API Wrapper for seedr.cc

Seedr Python Client Seedr API built with 💛 by Souvik Pratiher Hit that Star button if you like this kind of SDKs and wants more of similar SDKs for o

Souvik Pratiher 2 Oct 24, 2021
Scuttlecrab.py - Python Version of Scuttle Crab Bot

____ _ _ _ ____ _ / ___| ___ _ _| |_|

Fabrizo 4 Jul 08, 2022
PlaylistAudioBot - Telegram playlist download bot with ytdl

Telegram PlaylistAudioBot PlaylistAudioBot: 🇬🇧 Telegram playlist download bot

Hüzünlü Artemis [HuzunluArtemis] 14 Jul 22, 2022
Checks if Minecraft accounts are available, or taken.

MCNameChecker Checks validity of Minecraft IGN's. Using async to make it even faster. Has rate-limit detections and Proxy support Usage Q. How do I us

Dimitri Demarkus 5 Apr 22, 2022
Send SMS text messages via email with as many accounts as you want :)

SMS-Spammer Send SMS text messages via email with as many accounts as you want :) Example Set Up Guide! To start log into the gmail account you would

Riceblades11 10 Oct 25, 2022
A Python Library to interface with Flickr REST API, OAuth & JSON Responses

Python-Flickr Python-Flickr is A Python library to interface with Flickr REST API & OAuth Features Photo Uploading Retrieve user information Common Fl

Mike Helmick 40 Sep 25, 2021
A simple python oriented telegram bot to give out creative font style's

Font-Bot A simple python oriented telegram bot to give out creative font style's REQUIREMENTS tgcrypto pyrogram==1.2.9 Installation Fork this reposito

BL4CK H47 4 Jan 30, 2022
A Python script to update Spotify Playlist data every 5 minutes.

Spotify Playlist Updater A Python script to update Spotify Playlist data every 5 minutes. Description An automatic playlist updater using Spotify API

6 Nov 24, 2022