Comments (3)
Same thing happened to me and managed to fix it
The pyee library version 8 was recently released with backward incompatible changes for bitfinex-api-py. Normally, we should use the pyee version specified in https://github.com/bitfinexcom/bitfinex-api-py/blob/master/requirements.txt#L7
But it works when downgrading to version 7:
pip3 install pyee~=7.0.4
from bitfinex-api-py.
I just copy the example, put my keys and run it
`
import os
import sys
import asyncio
import time
sys.path.append('../../../')
from bfxapi import Client
API_KEY=os.getenv("my_key")
API_SECRET=os.getenv("my_secret")
bfx = Client(
API_KEY=API_KEY,
API_SECRET=API_SECRET,
logLevel='DEBUG'
)
now = int(round(time.time() * 1000))
then = now - (1000 * 60 * 60 * 24 * 10) # 10 days ago
async def log_wallets():
wallets = await bfx.rest.get_wallets()
print ("Wallets:")
[ print (w) for w in wallets ]
async def log_active_orders():
orders = await bfx.rest.get_active_orders('tBTCUSD')
print ("Orders:")
[ print (o) for o in orders ]
async def log_orders_history():
orders = await bfx.rest.get_order_history('tBTCUSD', 0, then)
print ("Orders:")
[ print (o) for o in orders ]
async def log_active_positions():
positions = await bfx.rest.get_active_position()
print ("Positions:")
[ print (p) for p in positions ]
async def log_trades():
trades = await bfx.rest.get_trades('fBTC', 0, then)
print ("Trades:")
[ print (t) for t in trades]
async def log_order_trades():
order_id = 1151353463
trades = await bfx.rest.get_order_trades('tBTCUSD', order_id)
print ("Trade orders:")
[ print (t) for t in trades]
async def log_funding_offers():
offers = await bfx.rest.get_funding_offers('fBTC')
print ("Offers:")
[ print (o) for o in offers]
async def log_funding_offer_history():
offers = await bfx.rest.get_funding_offer_history('fBTC', 0, then)
print ("Offers history:")
[ print (o) for o in offers]
async def log_funding_loans():
loans = await bfx.rest.get_funding_loans('fBTC')
print ("Funding loans:")
[ print (l) for l in loans ]
async def log_funding_loans_history():
loans = await bfx.rest.get_funding_loan_history('fBTC', 0, then)
print ("Funding loan history:")
[ print (l) for l in loans ]
async def log_funding_credits():
credits = await bfx.rest.get_funding_credits('fBTC')
print ("Funding credits:")
[ print (c) for c in credits ]
async def log_funding_credits_history():
credit = await bfx.rest.get_funding_credit_history('fBTC', 0, then)
print ("Funding credit history:")
[ print (c) for c in credit ]
async def run():
await log_wallets()
await log_active_orders()
await log_orders_history()
await log_active_positions()
await log_trades()
await log_order_trades()
await log_funding_offers()
await log_funding_offer_history()
await log_funding_credits()
await log_funding_credits_history()
t = asyncio.ensure_future(run())
asyncio.get_event_loop().run_until_complete(t)
`
and I got the following error
`runcell(0, 'C:/...../untitled2.py')
Traceback (most recent call last):
File "C:\Pythonscripts\untitled2.py", line 19, in
bfx = Client(
File "C:\Miniconda3\lib\site-packages\bfxapi\client.py", line 24, in init
self.ws = BfxWebsocket(API_KEY=API_KEY, API_SECRET=API_SECRET, host=ws_host,
File "C:\Miniconda3\lib\site-packages\bfxapi\websockets\bfx_websocket.py", line 168, in init
super(BfxWebsocket, self).init(host, logLevel=logLevel, *args, **kwargs)
File "C:\Miniconda3\lib\site-packages\bfxapi\websockets\generic_websocket.py", line 80, in init
self.events = create_ee()
File "C:\Miniconda3\lib\site-packages\bfxapi\websockets\generic_websocket.py", line 60, in _start_event_worker
return EventEmitter(scheduler=asyncio.ensure_future)
TypeError: init() got an unexpected keyword argument 'scheduler'`
I downgraded pyee to 7.0.4 as mentioned before but still not working. I'm on python 3.8.3
Any clue??
from bitfinex-api-py.
should be fixed in current master branch :)
from bitfinex-api-py.
Related Issues (20)
- ws_capacity not workingx HOT 10
- How to get funding earnings? HOT 6
- Data not matching (BTCUSD) HOT 4
- Error running subscribe_trades_candles.py example. HOT 4
- misleading documentation HOT 1
- 'Fatal error on SSL protocol' when use uvloop
- API is missing candle data HOT 4
- Rest API missing Liquidations implementation HOT 2
- Python 3.10 Support HOT 2
- bitfinex-api-py/bfxapi/rest/ public stats data HOT 2
- Unable to create order on paper account: [ERROR] Notification ERROR: action: disabled HOT 1
- Not working with python3.10 asyncio HOT 2
- Unknown data event: '[0.79816, 0, 1]' [54, [0.79816, 0, 1]] HOT 1
- How to get more data in public orderbook? HOT 1
- New pyee version
- Candle data from wss is delayed behind rest HOT 1
- bfx.rest.auth.cancel_order_multi HOT 1
- Failing "import bfxapi" HOT 2
- How come I can't call this endpoint: get_derivatives_status_history
- Starting from version 3.0.0b3, the meta parameter is no longer present in the submit_order function. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitfinex-api-py.