mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
Added example of MARKET order with price=None
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user