Basic Python3 request wrapper for the PancakeSwap API

Overview

🐍 Python Pancakes 🥞

A simple request wrapper for the Pancake-Swap API.

Installation

Install package

# Using pip
$ pip install pythonpancakes

# Or from source
$ git clone https://github.com/scottburlovich/pythonpancakes.git pythonpancakes
$ cd pythonpancakes
$ python3 setup.py install

Import module into your project and initialize API class

from pythonpancakes import PancakeSwapAPI
ps = PancakeSwapAPI()

Usage

Please note, the API functionality currently exposed by PancakeSwap is quite basic. This package will be updated as they add new functionality.

summary()

Returns a dictionary containing data for the top ~1000 PancakeSwap pairs, sorted by reserves.

Example invocation:

summary = ps.summary()

Example output:

# output:
{
  "updated_at": 1234567,              // UNIX timestamp
  "data": {
    "0x..._0x...": {                  // BEP20 token addresses, joined by an underscore
      "price": "...",                 // price denominated in token1/token0
      "base_volume": "...",           // last 24h volume denominated in token0
      "quote_volume": "...",          // last 24h volume denominated in token1
      "liquidity": "...",             // liquidity denominated in USD
      "liquidity_BNB": "..."          // liquidity denominated in BNB
    },
    // ...
  }
}

tokens(address)

If address parameter is specified, returns the token information, based on address. Otherwise, returns the tokens in the top ~1000 pairs on PancakeSwap, sorted by reserves.

Example invocation without address:

tokens = ps.tokens()

Example output without address:

{
  "updated_at": 1234567,              // UNIX timestamp
  "data": {
    "0x...": {                        // the address of the BEP20 token
      "name": "...",                  // not necessarily included for BEP20 tokens
      "symbol": "...",                // not necessarily included for BEP20 tokens
      "price": "...",                 // price denominated in USD
      "price_BNB": "...",             // price denominated in BNB
    },
    // ...
  }
}

Example invocation with address:

token = ps.tokens('0x00000000000...')

Example output with address:

# output
{
  "updated_at": 1234567,              // UNIX timestamp
  "data": {
    "name": "...",                    // not necessarily included for BEP20 tokens
    "symbol": "...",                  // not necessarily included for BEP20 tokens
    "price": "...",                   // price denominated in USD
    "price_BNB": "...",               // price denominated in BNB
  }
}

pairs()

Returns data for the top ~1000 PancakeSwap pairs, sorted by reserves.

Example invocation:

pairs = ps.pairs()

Example output

{
  "updated_at": 1234567,              // UNIX timestamp
  "data": {
    "0x..._0x...": {                  // the asset ids of BNB and BEP20 tokens, joined by an underscore
      "pair_address": "0x...",        // pair address
      "base_name": "...",             // token0 name
      "base_symbol": "...",           // token0 symbol
      "base_address": "0x...",        // token0 address
      "quote_name": "...",            // token1 name
      "quote_symbol": "...",          // token1 symbol
      "quote_address": "0x...",       // token1 address
      "price": "...",                 // price denominated in token1/token0
      "base_volume": "...",           // volume denominated in token0
      "quote_volume": "...",          // volume denominated in token1
      "liquidity": "...",             // liquidity denominated in USD
      "liquidity_BNB": "..."          // liquidity denominated in BNB
    },
    // ...
  }
}
Comments
  • response.raise_for_status()

    response.raise_for_status()

    Hi, thanks for making the wrapper for the API.

    I'd like to discuss this code block:

            try:
                response.raise_for_status()
                return json.loads(response.content.decode('utf-8'))
            except Exception as err:
                try:
                    content = json.loads(response.content.decode('utf-8'))
                    raise ValueError(content)
                except json.decoder.JSONDecodeError:
                    pass
                raise
    

    When response.raise_for_status() raises HTTPError, the error gets caught by the except block, then you try to parse the content and raise a ValueError. Why is this better than simply let raise_for_status() raise the exception it wants to raise?

    IMHO, HTTPError is the correct type of error to raise here. It makes more sense for your API users to catch HTTPError than ValueError. I assume you want to show the response from the server, but response.content has already been passed to HTTPError which can then be decoded by the API user as needed.

    In addition, I think

                    content = json.loads(response.content.decode('utf-8'))
                    raise ValueError(content)
    

    can be simplified to

                    raise ValueError(response.content.decode('utf-8'))
    

    , because it converts dict back to str to print content anyways.

    opened by tmxkn1 6
  • Not all commands work

    Not all commands work

    Hi! It seems that not all comands work!! summary() and pairs() do not work and give me:

    Traceback (most recent call last): File "C:/Users/snowb/PycharmProjects/pythonProjectJinSuperSonic/DEXES/PANCAKESWAP/PythonPancakes.py", line 8, in pairs = ps.pairs() File "C:\Users\snowb\PycharmProjects\pythonProjectJinSuperSonic\venv\lib\site-packages\pythonpancakes\api.py", line 60, in pairs return self.__get(url) File "C:\Users\snowb\PycharmProjects\pythonProjectJinSuperSonic\venv\lib\site-packages\pythonpancakes\api.py", line 26, in __get response.raise_for_status() File "C:\Users\snowb\PycharmProjects\pythonProjectJinSuperSonic\venv\lib\site-packages\requests\models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.pancakeswap.info/api/v2/pairs

    tokens() works and gives me : {'updated_at': 1631126284437, 'data': {'0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82': {'name': 'PancakeSwap Token', 'symbol': 'Cake', 'price': '20.48218885297953725304320116495', 'price_BNB': '0.04895855301693529282822225436945'}, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c': {'name': 'Wrapped BNB', 'symbol': 'WBNB', 'price': '418.3577248676962874180518600585', 'price_BNB': '1'}, '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56': {'name': 'BUSD Token', 'symbol': 'BUSD', 'price': '0.999466152067131399169946391483', 'price_BNB': '0.002388950860781415266230329338245'}, '0x55d398326f99059fF775485246999027B3197955': {'name': 'Tether USD', 'symbol': 'USDT', 'price': '1.00103817523275206917003756561', 'price_BNB': '0.00239278042624724045183093924102'}, '0x2170Ed0880ac9A755fd29B2688956BD959F933F8': {'name': 'Ethereum Token', 'symbol': 'ETH', 'price': '3512.16437633201973492735009932', 'price_BNB': '8.39498479696688758132042475103'}, '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d': {'name': 'USD Coin', 'symbol': 'USDC', 'price': '0.999158959103589272444802382055', 'price_BNB': '0.00238824934503434135568101350796'}, '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c': {'name': 'BTCB Token', 'symbol': 'BTCB', 'price': '46438.2637932403943016630917734', 'price_BNB': '111.0387270650849737632068811111'}, '0x14016E85a25aeb13065688cAFB43044C2ef86784': {'name': 'TrueUSD', 'symbol': 'TUSD', 'price': '0.996199681079281963056591898057', 'price_BNB': '0.00238292619782255574926622525087'}, '0x3203c9E46cA618C8C1cE5dC67e7e9D75f5da2377': {'name': 'Mobox', 'symbol': 'MBOX', 'price': '5.43019222925192268428954508676', 'price_BNB': '0.01297938797829246839360179871931'}, '0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402': {'name': 'Polkadot Token', 'symbol': 'DOT', 'price': '28.50522642159573685745447173848', 'price_BNB': '0.0681421144314294215676038419046'}, '0xD40bEDb44C081D2935eebA6eF5a3c8A31A1bBE13': {'name': 'Metahero', 'symbol': 'HERO', 'price': '0.0851806257014821195241290897163', 'price_BNB': '0.0002036254794623189530045645078894'}, '0x8076C74C5e3F5852037F31Ff0093Eeb8c8ADd8D3': {'name': 'SafeMoon', 'symbol': 'SAFEMOON', 'price': '0.000001847108413269227923747280800282', 'price_BNB': '0.00000000441500682021230951285368364436'}, '0xE0e514c71282b6f4e823703a39374Cf58dc3eA4f': {'name': 'BELT Token', 'symbol': 'BELT', 'price': '11.09639043268685244348734932879', 'price_BNB': '0.02654646628197463640817738754977'}, '0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD': {'name': 'ChainLink Token', 'symbol': 'LINK', 'price': '27.6615511123465317142233511888', 'price_BNB': '0.0661662198322829411445538293374'}, '0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47': {'name': 'Cardano Token', 'symbol': 'ADA', 'price': '2.443843111839082841505252330675', 'price_BNB': '0.00584133949265604760422086251372'}, '0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE': {'name': 'XRP Token', 'symbol': 'XRP', 'price': '1.112149903901506367998913676536', 'price_BNB': '0.002658595447477536456254393638807'}, '0x8595F9dA7b868b1822194fAEd312235E43007b49': {'name': 'BitTorrent', 'symbol': 'BTT', 'price': '0.00412931169796364525245114020382', 'price_BNB': '0.00000987867969063548148901824680539'}, '0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B': {'name': 'TRON', 'symbol': 'TRX', 'price': '0.0937166479323497488579213047589', 'price_BNB': '0.0002240260318676146458928673688966'}, '0xcF6BB5389c92Bdda8a3747Ddb454cB7a64626C63': {'name': 'Venus', 'symbol': 'XVS', 'price': '32.7175072559849722576157794171', 'price_BNB': '0.0782736289214582255315069888477'}, '0xaEC945e04baF28b135Fa7c640f624f8D90F1C3a6': {'name': 'Coin98', 'symbol': 'C98', 'price': '4.070151580434161068093949897673', 'price_BNB': '0.00972953942197371378816954582133'}, '0x8F0528cE5eF7B51152A59745bEfDD91D97091d2F': {'name': 'AlpacaToken', 'symbol': 'ALPACA', 'price': '0.985901225405190290044019628287', 'price_BNB': '0.002358622445520688745293695432798'}, '0x17B7163cf1Dbd286E262ddc68b553D899B93f526': {'name': 'Qubit Token', 'symbol': 'QBT', 'price': '0.333131629792514770391698831587', 'price_BNB': '0.0007968702825471900943703823505276'}, '0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0': {'name': 'Axie Infinity Shard', 'symbol': 'AXS', 'price': '70.1412116224765856422140648893', 'price_BNB': '0.167700171773705633754846607767'}, '0xBf5140A22578168FD562DCcF235E5D43A02ce9B1': {'name': 'Uniswap', 'symbol': 'UNI', 'price': '23.78577265494391180728712604235', 'price_BNB': '0.0568950155822804570213423055472'}, '0xc748673057861a797275CD8A068AbB95A902e8de': {'name': 'Baby Doge Coin', 'symbol': 'BabyDoge', 'price': '0.000000000495288991014093685081951240122', 'price_BNB': '0.000000000001183994773559853249478032990322'}, '0xbA2aE424d960c26247Dd6c32edC70B295c744C43': {'name': 'Dogecoin', 'symbol': 'DOGE', 'price': '0.257480672532722833276625365157', 'price_BNB': '0.000615507774222504849974052736069'}, '0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7': {'name': 'VAI Stablecoin', 'symbol': 'VAI', 'price': '0.798382136330814766648183741577', 'price_BNB': '0.00190940536011082295098242564949'}, '0x31471E0791fCdbE82fbF4C44943255e923F1b794': {'name': 'Plant vs Undead Token', 'symbol': 'PVU', 'price': '12.28650943381343946803209911719', 'price_BNB': '0.02936842970378757019616443834693'}, '0xD41FDb03Ba84762dD66a0af1a6C8540FF1ba5dfb': {'name': 'SafePal Token', 'symbol': 'SFP', 'price': '1.166521552622522181826409213888', 'price_BNB': '0.002790377808492306714880443514748'}, '0xa1faa113cbE53436Df28FF0aEe54275c13B40975': {'name': 'AlphaToken', 'symbol': 'ALPHA', 'price': '1.147240766650738000261795656215', 'price_BNB': '0.002744289063730883961898429286682'}, '0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3': {'name': 'Dai Token', 'symbol': 'DAI', 'price': '0.994797490557549553906893994036', 'price_BNB': '0.00237779106975683355908099278933'}, '0x23396cF899Ca06c4472205fC903bDB4de249D6fC': {'name': 'Wrapped UST Token', 'symbol': 'UST', 'price': '1.0031891922352284677298695598', 'price_BNB': '0.0023978491353416843952710668227'}, '0x947950BcC74888a40Ffa2593C5798F11Fc9124C4': {'name': 'SushiToken', 'symbol': 'SUSHI', 'price': '11.48839665463158785930606201835', 'price_BNB': '0.02748351540194658097851830947872'}, '0xc212D39E35F22F259457bE79Fc2D822FA7122e6e': {'name': 'CBET', 'symbol': 'CBET', 'price': '0.0000002793260929779663194706381541446', 'price_BNB': '0.000000000673689300040368402892298392778'}, '0xaeF0d72a118ce24feE3cD1d43d383897D05B4e99': {'name': 'WINk', 'symbol': 'WIN', 'price': '0.000546003471213155518080409618005', 'price_BNB': '0.000001305354916732929638590800977443'}, '0x9f589e3eabe42ebC94A44727b3f3531C0c877809': {'name': 'Tokocrypto Token', 'symbol': 'TKO', 'price': '2.123387919429302858090649889344', 'price_BNB': '0.005083146445995435752286377770884'}, '0x07663837218A003e66310a01596af4bf4e44623D': {'name': 'rUSD', 'symbol': 'rUSD', 'price': '0.9796085720247298211026872290996', 'price_BNB': '0.002343575931866344263100257961372'}, '0xA2a26349448ddAfAe34949a6Cc2cEcF78c0497aC': {'name': 'TrusterCoin', 'symbol': 'TSC', 'price': '0.04864289693173216410155116111004', 'price_BNB': '0.0001163698940043627569562673064078'}, '0x2222227E22102Fe3322098e4CBfE18cFebD57c95': {'name': 'Alien Worlds Trilium', 'symbol': 'TLM', 'price': '0.2296524971150863419547515090347', 'price_BNB': '0.000549404749530850364171174500957'}, '0xAC51066d7bEC65Dc4589368da368b212745d63E8': {'name': 'ALICE', 'symbol': 'ALICE', 'price': '14.04546203867818461408989105917', 'price_BNB': '0.0335758596450513158746802113269'}, '0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2': {'name': 'DODO bird', 'symbol': 'DODO', 'price': '1.525174812266171272682147599876', 'price_BNB': '0.003648010957126384496467414020258'}, '0xa2B726B1145A4773F68593CF171187d8EBe4d495': {'name': 'Injective Protocol', 'symbol': 'INJ', 'price': '12.40021650997712564642569317614', 'price_BNB': '0.02967205908988270109606961340091'}, '0x8b303d5BbfBbf46F1a4d9741E491e06986894e18': {'name': 'Woonkly Power', 'symbol': 'WOOP', 'price': '0.1995317267394627450606426260827', 'price_BNB': '0.0004773086522493903197824280559795'}, '0x02fF5065692783374947393723dbA9599e59F591': {'name': 'YOOSHI', 'symbol': 'YOOSHI', 'price': '0.0000002408681272512112242343078246105', 'price_BNB': '0.0000000005758526504422234231943507837704'}, '0x565b72163f17849832A692A3c5928cc502f46D69': {'name': 'Hunny Token', 'symbol': 'HUNNY', 'price': '0.5530262282358723916757452656194', 'price_BNB': '0.0013230173141202981208665691501'}, '0x4338665CBB7B2485A8855A139b75D5e34AB0DB94': {'name': 'Litecoin Token', 'symbol': 'LTC', 'price': '182.5564370862632199960879856112', 'price_BNB': '0.436745018225038310594612834723'}, '0x587C16b84c64751760f6e3e7e32F896634704352': {'name': 'WhaleFall', 'symbol': 'WHALE', 'price': '0.00000003158428675107147552578739897444', 'price_BNB': '0.0000000000755780930762366741997562372487'}, '0xCF9f991b14620f5ad144Eec11f9bc7Bf08987622': {'name': 'PORNROCKET', 'symbol': 'PORNROCKET', 'price': '0.0000001246831441137091400066021961335', 'price_BNB': '0.0000000002982869907546021701058656060507'}, '0x8443f091997f06a61670B735ED92734F5628692F': {'name': 'Bella Protocol', 'symbol': 'BEL', 'price': '1.948808404067337559595992525802', 'price_BNB': '0.00466211442876100488591061750258'}, '0x1162E2EfCE13f99Ed259fFc24d99108aAA0ce935': {'name': 'CluCoin', 'symbol': 'CLU', 'price': '0.0000000388623476844921636097761663117', 'price_BNB': '0.0000000000937962342637273198991781327497'}, '0xe5D46cC0Fd592804B36F9dc6D2ed7D4D149EBd6F': {'name': 'Sportemon-Go', 'symbol': 'SGO', 'price': '0.0000000338030679732565099819806119058', 'price_BNB': '0.0000000000808446772806727681040008171464'}, '0xC9849E6fdB743d08fAeE3E34dd2D1bc69EA11a51': {'name': 'Bunny Token', 'symbol': 'BUNNY', 'price': '5.94618436626629919834580021089', 'price_BNB': '0.0142243120249112285070990554172'}, '0x5546600f77EdA1DCF2e8817eF4D617382E7f71F5': {'name': 'PING', 'symbol': 'PING', 'price': '0.01862826697305152526767524747077', 'price_BNB': '0.00004453522416055216982047558392187'}, '0x82C19905B036bf4E329740989DCF6aE441AE26c1': {'name': 'CP', 'symbol': 'CP', 'price': '2.087869080086334969737376097066', 'price_BNB': '0.00499161248274948553291137282292'}, '0xECa41281c24451168a37211F0bc2b8645AF45092': {'name': 'TokenPocket Token', 'symbol': 'TPT', 'price': '0.0397786255928895757989174091558', 'price_BNB': '0.0000951500578809324160616960214588'}, '0xC7D43F2B51F44f09fBB8a691a0451E8FFCF36c0a': {'name': 'EverRise', 'symbol': 'RISE', 'price': '0.000000037268925935557813143937213391', 'price_BNB': '0.0000000000890811648703808528414879045306'}, '0x8519EA49c997f50cefFa444d240fB655e89248Aa': {'name': 'RAMP DEFI', 'symbol': 'RAMP', 'price': '0.3804805209510274208847979212473', 'price_BNB': '0.00090943473837538954393895899314'}, '0x4B0F1812e5Df2A09796481Ff14017e6005508003': {'name': 'Trust Wallet', 'symbol': 'TWT', 'price': '1.354168983414206865875860565516', 'price_BNB': '0.00323686860053189312774412104382'}, '0x47BEAd2563dCBf3bF2c9407fEa4dC236fAbA485A': {'name': 'Swipe', 'symbol': 'SXP', 'price': '2.837760342045325201536893186075', 'price_BNB': '0.006788061962048302767489877839515'}, '0xF21768cCBC73Ea5B6fd3C687208a7c2def2d966e': {'name': 'Reef.finance', 'symbol': 'REEF', 'price': '0.02240482124273989221769902475004', 'price_BNB': '0.00005360061367866662676569142556856'}, '0x2eD9a5C8C13b93955103B9a7C167B67Ef4d568a3': {'name': 'Mask Network', 'symbol': 'MASK', 'price': '9.16456491095002735506124483308', 'price_BNB': '0.0219176626264335835817415890529'}, '0xACB8f52DC63BB752a51186D1c55868ADbFfEe9C1': {'name': 'BunnyPark', 'symbol': 'BP', 'price': '0.95266944825927958327042291819', 'price_BNB': '0.002277164712473175746644163290314'}, '0x12BB890508c125661E03b09EC06E404bc9289040': {'name': 'Radio Caca V2', 'symbol': 'RACA', 'price': '0.000501056176765427309723644412662', 'price_BNB': '0.000001197759584796736716141463837121'}, '0x477bC8d23c634C154061869478bce96BE6045D12': {'name': 'SeedifyFund', 'symbol': 'SFUND', 'price': '3.214417327577712310770865186327', 'price_BNB': '0.00768952648615369966633874070495'}, '0xf9CeC8d50f6c8ad3Fb6dcCEC577e05aA32B224FE': {'name': 'Chroma', 'symbol': 'CHR', 'price': '0.3301687958448600683250828519626', 'price_BNB': '0.000789348122029738877365263774896'}, '0x67d66e8Ec1Fd25d98B3Ccd3B19B7dc4b4b7fC493': {'name': 'Feeder.finance', 'symbol': 'FEED', 'price': '0.380799343164857361096092114575', 'price_BNB': '0.000910893476512575167354833661232'}, '0x4206931337dc273a630d328dA6441786BfaD668f': {'name': 'Dogecoin', 'symbol': 'DOGE', 'price': '0.256050736588313573869329540633', 'price_BNB': '0.000618517064437036366331049414199'}, '0xAD6cAEb32CD2c308980a548bD0Bc5AA4306c6c18': {'name': 'Band Protocol Token', 'symbol': 'BAND', 'price': '8.47825020172126012179808735128', 'price_BNB': '0.0202760906455227573501390017212'}, '0x9678E42ceBEb63F23197D726B29b1CB20d0064E5': {'name': 'IoTeX Network', 'symbol': 'IOTX', 'price': '0.066378167726935314954486051434', 'price_BNB': '0.0001587031419569538297422140346438'}, '0xA7f552078dcC247C2684336020c03648500C6d9F': {'name': 'Ellipsis', 'symbol': 'EPS', 'price': '0.68153925947809234748811745373', 'price_BNB': '0.001629482569551243303970895717826'}, '0x43C37e8240d0fCCEF747d12e201Bf295e4226388': {'name': 'Liquidity Staked BNB', 'symbol': 'LBNB', 'price': '435.164801355367134357022532679', 'price_BNB': '1.087724338070476397784665929465'}, '0x20de22029ab63cf9A7Cf5fEB2b737Ca1eE4c82A6': {'name': 'Chess', 'symbol': 'CHESS', 'price': '3.758803326348947911581477886045', 'price_BNB': '0.00898510309030196823848780994415'}, '0x56231D55391bd6382bc2a0761a644ea188B007cc': {'name': 'Sagittarius', 'symbol': 'SGRv2', 'price': '0.1100673027212831685128204018135', 'price_BNB': '0.00026433240425397954482582108575'}, '0xE90444C38a8Cd2DCEEe9D954042ac817a794E9A9': {'name': 'Synthetic BNB', 'symbol': 'SBNB', 'price': '414.7067821412353645585651782687', 'price_BNB': '1.000000378000599543497931201112'}, '0xAB15B79880f11cFfb58dB25eC2bc39d28c4d80d2': {'name': 'StarMon', 'symbol': 'SMON', 'price': '0.00000000000000000377293871945848462984519646135', 'price_BNB': '0.00000000000000000000901921374805278807812670910876'}, '0x08ba0619b1e7A582E0BCe5BBE9843322C954C340': {'name': 'Binamon', 'symbol': 'BMON', 'price': '0.2190613404199450981705752894694', 'price_BNB': '0.000523613483133506116406718169619'}, '0xb86AbCb37C3A4B64f74f59301AFF131a1BEcC787': {'name': 'Zilliqa', 'symbol': 'ZIL', 'price': '0.1038697660880334427806814470177', 'price_BNB': '0.0002485524319532959296100753540245'}, '0x5CA42204cDaa70d5c773946e69dE942b85CA6706': {'name': 'Position Token', 'symbol': 'POSI', 'price': '6.36543937852851177226801115407', 'price_BNB': '0.01521530259908921914656955291678'}, '0x03fF0ff224f904be3118461335064bB48Df47938': {'name': 'Harmony ONE', 'symbol': 'ONE', 'price': '0.142318056332025775510720720538', 'price_BNB': '0.000340245616794192399325630323371'}, '0x0112e557d400474717056C4e6D40eDD846F38351': {'name': 'Phala Network', 'symbol': 'PHA', 'price': '0.8736171423569625658680717749515', 'price_BNB': '0.002089255975367241859958104936946'}, '0xBa07EED3d09055d60CAEf2bDfCa1c05792f2dFad': {'name': 'MiniDOGE', 'symbol': 'MiniDOGE', 'price': '0.00000001424401118240879732667722098622', 'price_BNB': '0.0000000000340689531563107642100967501653'}, '0x4FA7163E153419E0E1064e418dd7A99314Ed27b6': {'name': 'Hot Cross Token', 'symbol': 'HOTCROSS', 'price': '0.2247502102550929614597893160273', 'price_BNB': '0.0005373203788272483306794257704456'}, '0xC0366a104b429f0806BfA98d0008DAA9555b2BEd': {'name': 'SafeMars', 'symbol': 'SMARS', 'price': '0.00000002875511348259428760215803209285', 'price_BNB': '0.0000000000693437818337101310607313728158'}, '0x5A3010d4d8D3B5fB49f8B6E57FB9E48063f16700': {'name': 'BSCPAD.com', 'symbol': 'BSCPAD', 'price': '1.769759710188468900637054188205', 'price_BNB': '0.004230612972127517462472601354495'}, '0xE283D0e3B8c102BAdF5E8166B73E02D96d92F688': {'name': 'Elephant Money', 'symbol': 'ELEPHANT', 'price': '0.0000000091152834178980795282343707569', 'price_BNB': '0.00000000002188804274043547436974653687038'}, '0xF218184Af829Cf2b0019F8E6F0b2423498a36983': {'name': 'MATH Token', 'symbol': 'MATH', 'price': '1.595209486352128847663052992828', 'price_BNB': '0.003837411515355972969723905594456'}, '0x545f90dC35CA1e6129f1fEd354b3e2DF12034261': {'name': 'NEWB', 'symbol': 'NEWB', 'price': '221.8231018244844035289878573884', 'price_BNB': '0.530610722544892961996063005827'}, '0x3FdA9383A84C05eC8f7630Fe10AdF1fAC13241CC': {'name': 'dego.finance', 'symbol': 'DEGO', 'price': '8.91739506414660387628315262308', 'price_BNB': '0.02133282715248983845046180641036'}, '0x762539b45A1dCcE3D36d080F74d1AED37844b878': {'name': 'Linear Token', 'symbol': 'LINA', 'price': '0.0465359474888927364830447946017', 'price_BNB': '0.0001112862902389739693836766968053'}, '0x4691937a7508860F876c9c0a2a617E7d9E945D4B': {'name': 'Wootrade Network', 'symbol': 'WOO', 'price': '0.546602171159034078392325263806', 'price_BNB': '0.001314482859734722597405811640642'}, '0xA67a13c9283Da5AABB199Da54a9Cb4cD8B9b16bA': {'name': 'Nobility', 'symbol': 'NBL', 'price': '0.00093746331303321379194587458843', 'price_BNB': '0.000002242700523678807626617434484132'}, '0xE8176d414560cFE1Bf82Fd73B986823B89E4F545': {'name': 'StepHero', 'symbol': 'HERO', 'price': '1.78765691598698213400173683519', 'price_BNB': '0.00427641586791728076085178990453'}, '0xDB021b1B247fe2F1fa57e0A87C748Cc1E321F07F': {'name': 'AMPL secured by Meter Passport', 'symbol': 'AMPL', 'price': '0.918988399425715479983011740973', 'price_BNB': '0.002218696923230017328850516828963'}}}

    opened by NeoSephiroth 2
  • Price difference

    Price difference

    Hello First of all, thank you very much for your API to consume data in Python.

    Today I was testing it but there is a difference between the return price and the real price in PancakeSwap

    I attach screenshots

    {'updated_at': 1622034328103, 'data': {'name': 'PancakeSwap Token', 'symbol': 'Cake', 'price': '16.71025903658802895071381884442674', 'price_BNB': '0.05104375696015457193635101802057258'}}

    cake

    So you can review it

    opened by cpfxcl 2
  • The v2 version of the api interface cannot be used

    The v2 version of the api interface cannot be used

    image

    Requesting this interface to report an error, please help us to see how to solve this error.

    request url:https://api.pancakeswap.info/api/v2/tokens/0xc864019047b864b6ab609a968ae2725dfaee808a error:{'error': {'code': 500, 'message': 'GraphQL error: panic processing query: only derived fields can lead to multiple children here'}}

    Please!

    opened by tokentailormm 1
  • simplified exception handling

    simplified exception handling

    Changes:

    ~~- Added __enter__ () to complete the code needed for with statement.~~

    • @line 25 Removed the try block for session.get as it simply raises error straight after.
    • @line 30 Removed the try block. See #3 .
    • @line 57 Removed the try block. Also see comment.
    opened by tmxkn1 1
Releases(v1.0.1)
Owner
Scott Burlovich
Software Engineer @ Halex
Scott Burlovich
An script where it logs in your instagram account and follows people and likes their posts

InstaFollower An script where it logs in your instagram account and follows people and likes their posts (uses the tags to fetch people) Requirements:

Bless 3 Nov 29, 2022
Twitch Linux Typer

Twitch Linux Typer The most cursed Twitch chat bot Listens to twitch chat, and then types it handles hotkeys and button presses via the ^ char, eg ctr

Robin Universe 4 Jun 27, 2022
A Telegram bot to transcribe audio, video and image into text.

Transcriber Bot A Telegram bot to transcribe audio, video and image into text. Deploy to Heroku Local Deploying Install the FFmpeg. Make sure you have

10 Dec 19, 2022
EC2 that automatically move files received through FTP to S3

ftp-ec2-s3-cf EC2 that automatically move files received through FTP to S3 Installation CloudFormation template Deploy now! Usage IP / domain name: ta

Javier Santana 1 Jun 19, 2021
A user reconnaisance tool that extracts a target's information from Instagram, DockerHub & Github.

A user reconnaisance tool that extracts a target's information from Instagram, DockerHub & Github. Also searches for matching usernames on Github.

Richard Mwewa 127 Dec 22, 2022
WILSON Cloud Respwnder is a Web Interaction Logger Sending Out Notifications with the ability to serve custom content in order to appropriately respond to client-issued requests.

WILSON Cloud Respwnder What is this? WILSON Cloud Respwnder is a Web Interaction Logger Sending Out Notifications (WILSON) with the ability to serve c

48 Oct 31, 2022
A Python library for rendering ASS subtitle file format using libass.

ass_renderer A Python library for rendering ASS subtitle file format using libass. Installation pip install --user ass-renderer Contributing # Clone

1 Nov 02, 2022
Simple yet efficient tool used to check and sort tokens in terms of there validation.

Discord Token Checker Simple yet efficient tool used to check and sort tokens in terms of there validation.When the program is done,go to the "output"

Robotnik 15 Dec 27, 2022
This is a Discord script that will provide a QR Code to your scholars for Axie Infinity.

DiscordQRCodeBot This is a Discord script that will provide a QR Code to your Axie Infinity scholars. Setup Run Ubuntu on AWS ec2 instance Dowloads al

ZracheSs | xyZ 24 Oct 05, 2022
WhatsApp API Python ChatBot

WhatsApp Api Python - Esta documentação tem como objetivo exemplificar o uso do Moorse Whatsapp API na linguagem Python.

Douglas Alves 2 Jan 06, 2022
A complete Python application to automatize the process of uploading files to Amazon S3

Upload files or folders (even with subfolders) to Amazon S3 in a totally automatized way taking advantage of: Amazon S3 Multipart Upload: The uploaded

Pol Alzina 1 Nov 20, 2021
Coinbase Pro API interface framework and tooling

neutrino This project has just begun. Rudimentary API documentation Installation Prerequisites: Python 3.8+ and Git 2.33+ Navigate into a directory of

Joshua Chen 1 Dec 26, 2021
Davide Gallitelli 3 Dec 21, 2021
Open Source Discord Account Creator

Alter Token Generator Open Source Discord Account Creator This program abuses the discord api and uses the 2Captcha captcha solving service to make di

24 Dec 13, 2022
An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

Simon Weber 2.5k Dec 15, 2022
Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.

aws-allowlister Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance fr

Salesforce 189 Dec 08, 2022
An opensource chat service that cares about your privacy.

An opensource chat service that cares about your privacy. Instructions to set up a local testing environment: 1) Clone this repository and navigate to

Aiman Al Masoud 2 Dec 03, 2022
Flask-SQLAlchemy API for daisuki-web

💟 Anime Daisuki! API API de animes com cadastro de usuários. O usuário autenticado pode avaliar e favoritar animes, comentar episódios e verificar o

Paulo Thor 1 Nov 04, 2021
Zen-Userbot - Userbot gabut With Python

Zen-Userbot Disclaimer ⚠️ PERINGATAN UNTUK ANDA ⚠️ ️ Zen-Userbot

Wahyusaputra 6 Feb 12, 2022
A working bypass for discord gc spamming

IllusionGcSpammer A working bypass for discord gc spamming Installation Run pip install pip install DiscordGcSpammer then your good to go. Usage You c

6 Sep 30, 2022