Package: bitforex-aio
bitforex-aio 1.0.1Announcement:bitforex-aiohas been replaced by a new librarycryptoxlib-aio.cryptoxlib-aiooffers the very same functionality asbitforex-aiobut on top it provides access to multiple cryptoexchanges and other (mostly technical) new features. You can keep usingbitforex-aiobut please note no new features/bugfixes will be implemented. We recommend to migrate tocryptoxlib-aio.bitforex-aiois a Python library providing access toBitforex crypto exchange. Library implements Bitforex's REST API as well as websockets.bitforex-aiois designed as an asynchronous library utilizing modern features of Python and of supporting asynchronous libraries (mainlyasync websocketsandaiohttp).For changes seeCHANGELOG.Featuresaccess to full Bitforex's REST API (account details, market data, order management, ...) and websocketschannels bundled in one or multiple websockets processed in paralleltransparent connection management (automated heartbeats, ...)lean architecture setting ground for the future extensions and customizationsfully asynchronous design aiming for the best performanceInstallationpipinstallbitforex-aioPrerequisitesDue to dependencies and Python features used by the library please make sure you use Python3.6or3.7.Before starting usingbitforex-aio, it is necessary to take care of downloading your Bitforex API and SECRET key from your Bitforex account.ExamplesREST APIclient=BitforexClient(api_key,sec_key)# REST api callsprint("REST API")print("\nExchange info:")awaitclient.get_exchange_info()print("\nOrder book:")awaitclient.get_order_book(pair=Pair('ETH','BTC'),depth="1")print("\nTicker:")awaitclient.get_ticker(pair=Pair('ETH','BTC'))print("\nSingle fund:")awaitclient.get_single_fund(currency="NOBS")print("\nFunds:")awaitclient.get_funds()print("\nTrades:")awaitclient.get_trades(pair=Pair('ETH','BTC'),size="1")print("\nCandelsticks:")awaitclient.get_candlesticks(pair=Pair('ETH','BTC'),interval=enums.CandelstickInterval.I_1W,size="5")print("\nCreate order:")awaitclient.create_order(Pair("ETH","BTC"),side=enums.OrderSide.SELL,quantity="1",price="1")print("\nCreate multiple orders:")awaitclient.create_multi_order(Pair("ETH","BTC"),orders=[("1","1",enums.OrderSide.SELL),("2","1",enums.OrderSide.SELL)])print("\nCancel order:")awaitclient.cancel_order(pair=Pair('ETH','BTC'),order_id="10")print("\nCancel multiple orders:")awaitclient.cancel_multi_order(pair=Pair('ETH','BTC'),order_ids=["10","20"])print("\nCancel all orders:")awaitclient.cancel_all_orders(pair=Pair('ETH','BTC'))print("\nGet order:")awaitclient.get_order(pair=Pair('ETH','BTC'),order_id="1")print("\nGet orders:")awaitclient.get_orders(pair=Pair('ETH','BTC'),order_ids=["1","2"])print("\nFind orders:")awaitclient.find_order(pair=Pair('ETH','BTC'),state=enums.OrderState.PENDING)WEBSOCKETSclient=BitforexClient(api_key,sec_key)client.compose_subscriptions([OrderBookSubscription(pair=Pair('ETH','BTC'),depth="0",callbacks=[order_book_update]),TradeSubscription(pair=Pair('ETH','BTC'),size="20",callbacks=[trade_update]),])# Execute all websockets asynchronouslyawaitclient.start_subscriptions()awaitclient.close()All examples can be found inclient-example/client.pyin the GitHub repository.SupportIf you like the library and you feel like you want to support its further development, enhancements and bugfixing, then it will be of great help and most appreciated if you:file bugs, proposals, pull requests, ...spread the worddonate an arbitrary tipBTC: 15JUgVq3YFoPedEj5wgQgvkZRx5HQoKJC4ETH: 0xf29304b6af5831030ba99aceb290a3a2129b993dADA: DdzFFzCqrhshyLV3wktXFvConETEr9mCfrMo9V3dYz4pz6yNq9PjJusfnn4kzWKQR91pWecEbKoHodPaJzgBHdV2AKeDSfR4sckrEk79XRP: rhVWrjB9EGDeK4zuJ1x2KXSjjSpsDQSaU6+ tag599790141ContactIf you feel you want to get in touch, then pleasepreferably use Github Issues, orsend an e-mail toAffiliationIn case you are interested in an automated trading bot, check out our other projectcreten.