mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Add funding related rest endpoints, refactor pre-existent rest endpoints to use get_ prefix. Add function to calculate flags easily. Add example test to create a funding offer.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from .rest import BfxRestInterface
|
||||
from .websocket import BfxWebsocketClient
|
||||
|
||||
from typing import Optional
|
||||
@@ -12,7 +13,20 @@ class Constants(str, Enum):
|
||||
PUB_WSS_HOST = "wss://api-pub.bitfinex.com/ws/2"
|
||||
|
||||
class Client(object):
|
||||
def __init__(self, WSS_HOST: str = Constants.WSS_HOST, API_KEY: Optional[str] = None, API_SECRET: Optional[str] = None, log_level: str = "WARNING"):
|
||||
def __init__(
|
||||
self,
|
||||
REST_HOST: str = Constants.REST_HOST,
|
||||
WSS_HOST: str = Constants.WSS_HOST,
|
||||
API_KEY: Optional[str] = None,
|
||||
API_SECRET: Optional[str] = None,
|
||||
log_level: str = "WARNING"
|
||||
):
|
||||
self.rest = BfxRestInterface(
|
||||
host=REST_HOST,
|
||||
API_KEY=API_KEY,
|
||||
API_SECRET=API_SECRET
|
||||
)
|
||||
|
||||
self.wss = BfxWebsocketClient(
|
||||
host=WSS_HOST,
|
||||
API_KEY=API_KEY,
|
||||
|
||||
Reference in New Issue
Block a user