A simple request wrapper for the Pancake-Swap API

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

 

 

 

To finish reading, please visit source site