Added example of MARKET order with price=None

This commit is contained in:
itsdeka
2021-11-11 12:38:47 +01:00
parent a7eade4cda
commit 83b0a5ecb6
5 changed files with 8 additions and 4 deletions

View File

@@ -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