ccxt: Bitfinex createMarketBuyOrder ..... error "bitfinex2 createOrder not implemented yet"

Environment

  • OS: Mac
  • Programming Language version: python 3.6.3
  • CCXT version:
  • Exchange: Bitfinex
  • Method: CreateOrder and CreateMarketBuyOrder

Error Description Calling CreateOrder or CreateMarketBuyOrder results in an error: error "bitfinex2 createOrder not implemented yet"

Note The bitfinex exchange object contents: ..... 'has': { ..... 'createOrder': True, ..... } .....

It would be good to have CreateMarketBuyOrder as part of the has dictionary as well.

Simplified code

import ccxt
import time
bfx = ccxt.bitfinex2()
bfx.apiKey = 'XXX'
bfx.secret = 'XXX'
print('BFX hasFetchOrder',bfx.hasFetchOrder)
print('BFX has fetch balance: ',bfx.has['fetchBalance'])
bfx.load_markets()

symbol1 = "QTUM/USD"
trade_amount = 10
bfx.createMarketBuyOrder(symbol1, trade_amount)
bfx.createOrder(symbol1,'Market','Buy',100)

Error Message for createMarketBuyOrder


NotSupported Traceback (most recent call last) <ipython-input-69-984cd7ad8f0a> in <module>() 1 symbol1 = “QTUM/USD” 2 trade_amount = 10 ----> 3 bfx.createMarketBuyOrder(symbol1, trade_amount)

/usr/local/lib/python3.6/site-packages/ccxt/base/exchange.py in create_market_buy_order(self, symbol, amount, params) 1013 1014 def create_market_buy_order(self, symbol, amount, params={}): -> 1015 return self.create_order(symbol, ‘market’, ‘buy’, amount, None, params) 1016 1017 def create_market_sell_order(self, symbol, amount, params={}):

/usr/local/lib/python3.6/site-packages/ccxt/bitfinex2.py in create_order(self, symbol, type, side, amount, price, params) 355 356 def create_order(self, symbol, type, side, amount, price=None, params={}): –> 357 raise NotSupported(self.id + ’ createOrder not implemented yet’) 358 359 def cancel_order(self, id, symbol=None, params={}):

NotSupported: bitfinex2 createOrder not implemented yet

Error Message for createOrder


NotSupported Traceback (most recent call last) <ipython-input-70-92f85d8cfd08> in <module>() ----> 1 bfx.createOrder(symbol1,‘Market’,‘Buy’,100) 2 # createOrder (market, type, side, amount,

/usr/local/lib/python3.6/site-packages/ccxt/bitfinex2.py in create_order(self, symbol, type, side, amount, price, params) 355 356 def create_order(self, symbol, type, side, amount, price=None, params={}): –> 357 raise NotSupported(self.id + ’ createOrder not implemented yet’) 358 359 def cancel_order(self, id, symbol=None, params={}):

NotSupported: bitfinex2 createOrder not implemented yet

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

hi, for now i have all calls using bitfinex2 is that possible to kick back into v1 when making call for createOrder ? @kroitor

I wanted to thank you Igor, but I couldn’t, because the extension I found for chrome to do the cors has made me unable to answer here, or watch youtube, or use facebook 😃

I finally found how to disable it. Now I got through this, I’ve found this one:

Failed to load https://api.bitfinex.com/v1/order/new: Response for preflight has invalid HTTP status code 404

Will work on it. Thanks a lot for your support.

OK thanks that’s clear!

Would be good to change the 'createOrder': True, flag on the Bitfinex v2 exchange object to False

Again thanks for your help …