Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.
/ marblex.py Public archive

An Asynchronous and Synchronous Marblex API Wrapper for Python

License

Notifications You must be signed in to change notification settings

staciax/marblex.py

Repository files navigation

marblex.py

An Asynchronous Marblex API Wrapper for Python

Installation

Windows:

$ pip install -U marblex.py

Linux/MacOS:

$ python3 -m pip install -U marblex.py

Asynchronous Example:

import asyncio
from marblex import Marblex

mbx = Marblex()

async def main():

    async with mbx:
        nkt = await mbx.get_territe_token()
        nka = await mbx.get_asterite_token()

        print(f"NKT : {nkt.USD}$, Percent: {nkt.percent}")
        print(f"NKA : {nka.USD}$, Percent: {nka.percent}")

asyncio.run(main())

Synchronous Example:

from marblex import MarblexSync

mbx = MarblexSync()

nkt = mbx.get_territe_token()
nka = mbx.get_asterite_token()
itu = mbx.get_inetrium_token()

print(f"NKT : {nkt.USD}$, Percent: {nkt.percent}")
print(f"NKA : {nka.USD}$, Percent: {nka.percent}")
print(f"ITU : {itu.USD}$, Percent: {itu.percent}")

>>> NKT : 1.47$, Percent: -4.22 %
>>> NKA : 3.56$, Percent: +1.61 %
>>> ITU : 0.13$, Percent: -0.59 %

License

MIT

inspired by

About

An Asynchronous and Synchronous Marblex API Wrapper for Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages