mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2026-01-27 17:34:33 +01:00
Apply refactoring to root package bfxapi.
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
from bfxapi.enums import FundingOfferType, Flag
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# python -c "import examples.rest.create_order"
|
||||
|
||||
import os
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
from bfxapi.enums import OrderType, Flag
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# python -c "import examples.rest.extra_calcs"
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST
|
||||
REST_HOST=REST_HOST
|
||||
)
|
||||
|
||||
t_symbol_response = bfx.rest.public.get_trading_market_average_price(
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# python -c "import examples.rest.get_candles_hist"
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST
|
||||
REST_HOST=REST_HOST
|
||||
)
|
||||
|
||||
print(f"Candles: {bfx.rest.public.get_candles_hist(symbol='tBTCUSD')}")
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import time
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST
|
||||
REST_HOST=REST_HOST
|
||||
)
|
||||
|
||||
now = int(round(time.time() * 1000))
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import time
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST
|
||||
REST_HOST=REST_HOST
|
||||
)
|
||||
|
||||
now = int(round(time.time() * 1000))
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import time
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST
|
||||
REST_HOST=REST_HOST
|
||||
)
|
||||
|
||||
now = int(round(time.time() * 1000))
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from bfxapi.client import Client, Constants
|
||||
from bfxapi.client import Client, REST_HOST
|
||||
|
||||
bfx = Client(
|
||||
REST_HOST=Constants.REST_HOST,
|
||||
REST_HOST=REST_HOST,
|
||||
API_KEY=os.getenv("BFX_API_KEY"),
|
||||
API_SECRET=os.getenv("BFX_API_SECRET")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user