mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
change default v2 api endpoint to pub-api
This commit is contained in:
committed by
Jacob Plaster
parent
4cbbbccd51
commit
5cf5277774
@@ -10,8 +10,8 @@ import asyncio
|
||||
from .websockets.BfxWebsocket import BfxWebsocket
|
||||
from .rest.BfxRest import BfxRest
|
||||
|
||||
REST_HOST = 'https://api.bitfinex.com/v2'
|
||||
WS_HOST = 'wss://api.bitfinex.com/ws/2'
|
||||
REST_HOST = 'https://api-pub.bitfinex.com/v2'
|
||||
WS_HOST = 'wss://api-pub.bitfinex.com/ws/2'
|
||||
|
||||
class Client:
|
||||
"""
|
||||
|
||||
@@ -10,8 +10,8 @@ import asyncio
|
||||
from .websockets.BfxWebsocket import BfxWebsocket
|
||||
from .rest.BfxRest import BfxRest
|
||||
|
||||
REST_HOST = 'https://api.bitfinex.com/v2'
|
||||
WS_HOST = 'wss://api.bitfinex.com/ws/2'
|
||||
REST_HOST = 'https://api-pub.bitfinex.com/v2'
|
||||
WS_HOST = 'wss://api-pub.bitfinex.com/ws/2'
|
||||
|
||||
class Client:
|
||||
"""
|
||||
|
||||
@@ -21,7 +21,7 @@ class BfxRest:
|
||||
api key.
|
||||
"""
|
||||
|
||||
def __init__(self, API_KEY, API_SECRET, host='https://api.bitfinex.com/v2', loop=None,
|
||||
def __init__(self, API_KEY, API_SECRET, host='https://api-pub.bitfinex.com/v2', loop=None,
|
||||
logLevel='INFO', parse_float=float, *args, **kwargs):
|
||||
self.loop = loop or asyncio.get_event_loop()
|
||||
self.API_KEY = API_KEY
|
||||
|
||||
@@ -97,7 +97,7 @@ class BfxWebsocket(GenericWebsocket):
|
||||
20061: 'Websocket server resync complete'
|
||||
}
|
||||
|
||||
def __init__(self, API_KEY=None, API_SECRET=None, host='wss://api.bitfinex.com/ws/2',
|
||||
def __init__(self, API_KEY=None, API_SECRET=None, host='wss://api-pub.bitfinex.com/ws/2',
|
||||
manageOrderBooks=False, dead_man_switch=False, logLevel='INFO', parse_float=float,
|
||||
*args, **kwargs):
|
||||
self.API_KEY = API_KEY
|
||||
|
||||
Reference in New Issue
Block a user