-) Use private host for auth-based requests

-) Updated examples
This commit is contained in:
itsdeka
2022-08-22 19:31:16 +02:00
parent 1ca0d871c7
commit 87e7f9820e
26 changed files with 105 additions and 55 deletions

View File

@@ -8,11 +8,9 @@ bfx ws instances to comply with the open subscriptions number constraint (max. 2
import sys
sys.path.append('../../../')
import asyncio
import json
from datetime import datetime
from functools import partial
import websockets as ws
from bfxapi import Client
from bfxapi import Client, PUB_WS_HOST, PUB_REST_HOST
import math
import random
@@ -27,7 +25,7 @@ def get_random_list_of_tickers():
class Instance:
def __init__(self, _id):
self.id = _id
self.bfx = Client(logLevel='INFO')
self.bfx = Client(logLevel='INFO', ws_host=PUB_WS_HOST, rest_host=PUB_REST_HOST)
self.subscriptions = {'trades': {}, 'ticker': {}}
self.is_ready = False