diff --git a/CHANGELOG b/CHANGELOG index 9e962e8..708b445 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.2.4 +-) Added example of MARKET order with price=None + 1.2.3 -) Tests adjusted diff --git a/bfxapi/examples/rest/create_order.py b/bfxapi/examples/rest/create_order.py index b987cff..9c69a0c 100644 --- a/bfxapi/examples/rest/create_order.py +++ b/bfxapi/examples/rest/create_order.py @@ -4,6 +4,7 @@ import asyncio import time sys.path.append('../../../') from bfxapi import Client +from bfxapi.models import OrderType API_KEY=os.getenv("BFX_KEY") API_SECRET=os.getenv("BFX_SECRET") @@ -15,7 +16,7 @@ bfx = Client( ) async def create_order(): - response = await bfx.rest.submit_order("tBTCUSD", 10, 0.1) + response = await bfx.rest.submit_order(symbol="tBTCUSD", amount=10, price=None, market_type=OrderType.MARKET) # response is in the form of a Notification object for o in response.notify_info: # each item is in the form of an Order object diff --git a/bfxapi/examples/ws/send_order.py b/bfxapi/examples/ws/send_order.py index 43a8b2d..6c30fd7 100644 --- a/bfxapi/examples/ws/send_order.py +++ b/bfxapi/examples/ws/send_order.py @@ -34,7 +34,7 @@ def log_error(msg): @bfx.ws.on('authenticated') async def submit_order(auth_message): - await bfx.ws.submit_order('tBTCUSD', 19000, 0.01, Order.Type.EXCHANGE_MARKET) + await bfx.ws.submit_order(symbol='tBTCUSD', price=None, amount=0.01, market_type=Order.Type.EXCHANGE_MARKET) # If you dont want to use a decorator # ws.on('authenticated', submit_order) diff --git a/bfxapi/version.py b/bfxapi/version.py index fb61ac5..747cce9 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.2.3' +__version__ = '1.2.4' diff --git a/setup.py b/setup.py index a20e97b..c41ebd9 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.2.3', + version='1.2.4', description='Official Bitfinex Python API', long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction', long_description_content_type='text/markdown',