refactoring - updated tests

This commit is contained in:
itsdeka
2022-08-27 17:17:13 +02:00
parent 17646f9980
commit 23c00e77a2
21 changed files with 42 additions and 21 deletions

View File

@@ -3,7 +3,8 @@ import sys
import asyncio import asyncio
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -3,7 +3,8 @@ import sys
import asyncio import asyncio
import time import time
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
from bfxapi.models import OrderType from bfxapi.models import OrderType
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")

View File

@@ -4,7 +4,8 @@ import asyncio
import time import time
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -4,7 +4,8 @@ import asyncio
import time import time
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving public data requires public hosts # Retrieving public data requires public hosts
bfx = Client( bfx = Client(

View File

@@ -3,7 +3,8 @@ import sys
import asyncio import asyncio
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving seed trades requires public hosts # Retrieving seed trades requires public hosts
bfx = Client( bfx = Client(

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
import asyncio import asyncio
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -3,7 +3,8 @@ import sys
import asyncio import asyncio
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, Order, WS_HOST, REST_HOST from bfxapi import Client, Order
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
bfx = Client( bfx = Client(
logLevel='DEBUG', logLevel='DEBUG',

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -3,7 +3,8 @@ import time
from collections import OrderedDict from collections import OrderedDict
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving orderbook requires public hosts # Retrieving orderbook requires public hosts
bfx = Client( bfx = Client(

View File

@@ -10,7 +10,8 @@ sys.path.append('../../../')
import asyncio import asyncio
from functools import partial from functools import partial
import websockets as ws import websockets as ws
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
import math import math
import random import random

View File

@@ -1,7 +1,8 @@
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving orderbook requires public hosts # Retrieving orderbook requires public hosts
bfx = Client( bfx = Client(

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, Order, WS_HOST, REST_HOST from bfxapi import Client, Order
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -1,7 +1,8 @@
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
bfx = Client( bfx = Client(
logLevel='DEBUG', logLevel='DEBUG',

View File

@@ -1,7 +1,8 @@
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving derivative status requires public hosts # Retrieving derivative status requires public hosts
bfx = Client( bfx = Client(

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving trades/candles requires public hosts # Retrieving trades/candles requires public hosts
bfx = Client( bfx = Client(

View File

@@ -1,7 +1,8 @@
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving tickers requires public hosts # Retrieving tickers requires public hosts
bfx = Client( bfx = Client(

View File

@@ -1,7 +1,8 @@
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST from bfxapi import Client
from bfxapi.constants import PUB_WS_HOST, PUB_REST_HOST
# Retrieving trades/candles requires public hosts # Retrieving trades/candles requires public hosts
bfx = Client( bfx = Client(

View File

@@ -2,7 +2,8 @@ import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, Order, WS_HOST, REST_HOST from bfxapi import Client, Order
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")

View File

@@ -1,7 +1,8 @@
import os import os
import sys import sys
sys.path.append('../../../') sys.path.append('../../../')
from bfxapi import Client, WS_HOST, REST_HOST from bfxapi import Client
from bfxapi.constants import WS_HOST, REST_HOST
API_KEY=os.getenv("BFX_KEY") API_KEY=os.getenv("BFX_KEY")
API_SECRET=os.getenv("BFX_SECRET") API_SECRET=os.getenv("BFX_SECRET")