Crypto-toolbox / btfxwss

Bitfinex Websocket API Client written in Python3
MIT License
284 stars 125 forks source link

Cant create SELL order. Only BUY order. #134

Closed kirillkuzin closed 6 years ago

kirillkuzin commented 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.

kirillkuzin commented 6 years ago

This is solved by putting the '-' before 'amount' value.