Skip to content

About

Python Poloniex sync/async API

Resources

Stars

92 stars

Watchers

11 watching

Forks

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async Example

from poloniex.app import AsyncApp

API_KEY = "YOUR_API_KEY"
API_SECRET = "YOUR_API_SECRET"

class App(AsyncApp):
    def ticker(self, **kwargs):
        self.logger.info(kwargs)

    def trades(self, **kwargs):
        self.logger.info(kwargs)

    async def main(self):
        self.push.subscribe(topic="BTC_ETH", handler=self.trades)
        self.push.subscribe(topic="ticker", handler=self.ticker)
        volume = await self.public.return24hVolume()

        self.logger.info(volume)


app = App(api_key=API_KEY, api_sec=API_SECRET)
app.run()

Sync Example

from poloniex.app import SyncApp

API_KEY = "YOUR_API_KEY"
API_SECRET = "YOUR_API_SECRET"

app = SyncApp(api_key=API_KEY, api_sec=API_SECRET)
app.logger.debug(app.public.return24hVolume())

About

Python Poloniex sync/async API

Resources

Stars

92 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages