Crypto-toolbox / bitex

Crypto-currency Exchange API Framework
MIT License
484 stars 136 forks source link

Exchange Market order on Bitfinex with REST API #191

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

Here's an example.

from bitex import Bitfinex
b = Bitfinex(key='api_key', secret='secret')
pair = 'btcusd'
price = '10000'
size = '1'
order_type = 'exchange market' # or 'exchange limit' for limit orders
b.ask(pair, price, size, type=order_type)  # b.bid to place a buy order

kwargs can be any parameter supported by the bitfinex API.

In order to keep things organized, please do NOT post comments asking for help in other issues - I'm aware of all of them, and will reply as soon as I find the time. Thanks!

torquemada163 commented 6 years ago

Thank you very much!