nixonjoshua98 / dexscreener

Python API wrapper for dexscreener.com
https://docs.dexscreener.com/api/reference
MIT License
104 stars 22 forks source link

Add support for fetching multiple pair addresses in a single request (up to 30) #9

Closed paramkr2 closed 4 months ago

paramkr2 commented 4 months ago

Dexscreen API allows fetching up to 30 pair addresses in a single request.

API Documentation Reference

multiple_pairs = await client.get_token_pair_async("ethereum", [
        "0xC2aDdA861F89bBB333c90c492cB837741916A225",
        "0x7BeA39867e4169DBe237d55C8242a8f2fcDcc387"
    ])
nixonjoshua98 commented 4 months ago

A separate method would be preferred get_token_pairs_async and you have a print statement left in. Type hinting it as a generic iterable like tuple, list, etc would be more accurate as well as these would all work

paramkr2 commented 4 months ago

I've made the following updates based on the feedback