Remove bfxapi/utils/flags.py file from bfxapi.utils sub-package.

This commit is contained in:
Davide Casale
2023-02-07 19:00:50 +01:00
parent 2d01261182
commit 851521c63f
3 changed files with 4 additions and 36 deletions

View File

@@ -3,8 +3,7 @@
import os
from bfxapi.client import Client, Constants
from bfxapi.enums import FundingOfferType
from bfxapi.utils.flags import calculate_offer_flags
from bfxapi.enums import FundingOfferType, Flag
bfx = Client(
REST_HOST=Constants.REST_HOST,
@@ -18,7 +17,7 @@ notification = bfx.rest.auth.submit_funding_offer(
amount="123.45",
rate="0.001",
period=2,
flags=calculate_offer_flags(hidden=True)
flags=Flag.HIDDEN
)
print("Offer notification:", notification)

View File

@@ -1,10 +1,8 @@
# python -c "import examples.rest.create_order"
import os
from bfxapi.client import Client, Constants
from bfxapi.enums import OrderType
from bfxapi.utils.flags import calculate_order_flags
from bfxapi.enums import OrderType, Flag
bfx = Client(
REST_HOST=Constants.REST_HOST,
@@ -18,7 +16,7 @@ submitted_order = bfx.rest.auth.submit_order(
symbol="tBTCUST",
amount="0.015",
price="10000",
flags=calculate_order_flags(hidden=False)
flags=Flag.HIDDEN + Flag.OCO + Flag.CLOSE
)
print("Submit Order Notification:", submitted_order)