diff --git a/bfxapi/examples/ws/cancel_order.py b/bfxapi/examples/ws/cancel_order.py index b13b3af..18d0703 100644 --- a/bfxapi/examples/ws/cancel_order.py +++ b/bfxapi/examples/ws/cancel_order.py @@ -2,7 +2,7 @@ import os import sys sys.path.append('../') -from bfxapi import Client +from bfxapi import Client, Order API_KEY=os.getenv("BFX_KEY") API_SECRET=os.getenv("BFX_SECRET") @@ -33,6 +33,6 @@ def log_error(msg): @bfx.ws.once('authenticated') async def submit_order(auth_message): # create an inital order a really low price so it stays open - await bfx.ws.submit_order('tBTCUSD', 10, 1, 'EXCHANGE LIMIT') + await bfx.ws.submit_order('tBTCUSD', 10, 1, Order.Type.EXCHANGE_LIMIT) bfx.ws.run() diff --git a/bfxapi/examples/ws/send_order.py b/bfxapi/examples/ws/send_order.py index 2af03c4..50ae345 100644 --- a/bfxapi/examples/ws/send_order.py +++ b/bfxapi/examples/ws/send_order.py @@ -2,7 +2,7 @@ import os import sys sys.path.append('../') -from bfxapi import Client +from bfxapi import Client, Order API_KEY=os.getenv("BFX_KEY") API_SECRET=os.getenv("BFX_SECRET") @@ -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, 'EXCHANGE LIMIT') + await bfx.ws.submit_order('tBTCUSD', 19000, 0.01, Order.Type.EXCHANGE_MARKET) # If you dont want to use a decorator # ws.on('authenticated', submit_order) diff --git a/bfxapi/examples/ws/update_order.py b/bfxapi/examples/ws/update_order.py index 59abee5..f925b06 100644 --- a/bfxapi/examples/ws/update_order.py +++ b/bfxapi/examples/ws/update_order.py @@ -2,7 +2,7 @@ import os import sys sys.path.append('../') -from bfxapi import Client +from bfxapi import Client, Order API_KEY=os.getenv("BFX_KEY") API_SECRET=os.getenv("BFX_SECRET") @@ -36,6 +36,6 @@ def log_error(msg): @bfx.ws.once('authenticated') async def submit_order(auth_message): # create an inital order a really low price so it stays open - await bfx.ws.submit_order('tBTCUSD', 10, 1, 'EXCHANGE LIMIT') + await bfx.ws.submit_order('tBTCUSD', 10, 1, Order.Type.EXCHANGE_LIMIT) bfx.ws.run()