Closed kirillkuzin closed 6 years ago
Hi guys.
I try place sell order, but i can create only buy order. My code:
def createOrder(_symbol, _side, _rate): order = { 'cid': 12345, 'type': 'EXCHANGE LIMIT', 'symbol': 'tBTCUSD', 'side': _side, 'amount': '0.002', 'price': _rate } bitfinexBot.new_order(**order)
...then _side = 'sell'. I get message in bitfinex web page: Invalid order: not enough exchange balance for 0.002 BTC/USD at 11000.0. That is, a request is sent to create a buy order.
This is solved by putting the '-' before 'amount' value.
Hi guys.
I try place sell order, but i can create only buy order. My code:
def createOrder(_symbol, _side, _rate): order = { 'cid': 12345, 'type': 'EXCHANGE LIMIT', 'symbol': 'tBTCUSD', 'side': _side, 'amount': '0.002', 'price': _rate } bitfinexBot.new_order(**order)
...then _side = 'sell'. I get message in bitfinex web page: Invalid order: not enough exchange balance for 0.002 BTC/USD at 11000.0. That is, a request is sent to create a buy order.