Crypto-toolbox / btfxwss

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

Exchange Market order #136

Closed torquemada163 closed 6 years ago

torquemada163 commented 6 years ago

Hello!

Do you can show me how make a Exchange Market order? And Exchange Limit, please!

Thanks!

deepbrook commented 6 years ago

Using btfxwss:

b = BtfxWss(**credentials)
# Placing a bid
order_params = { 'cid': 12345, 'type': 'EXCHANGE LIMIT', 'symbol': 'tBTCUSD', 'amount': '0.002', 'price': _rate } bitfinexBot.new_order(**order)
b.new_order(**order_params)

If you want to place an ask order, prefix the amount with - like so: 'amount':'-0.0002