Import client for now until we make a proper shim
parent
f4fd35fa21
commit
9f3efd2a6a
|
@ -6,13 +6,17 @@ import json
|
|||
from os import path
|
||||
import trio
|
||||
from async_generator import asynccontextmanager
|
||||
from ..brokers import questrade
|
||||
from ..calc import percent_change
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def get_client() -> None:
|
||||
"""Shim client factory.
|
||||
"""
|
||||
yield None
|
||||
get_client = questrade.get_client
|
||||
|
||||
# @asynccontextmanager
|
||||
# async def get_client() -> None:
|
||||
# """Shim client factory.
|
||||
# """
|
||||
# yield None
|
||||
|
||||
|
||||
async def poll_tickers(
|
||||
|
@ -23,7 +27,6 @@ async def poll_tickers(
|
|||
content = quotes_file.read()
|
||||
|
||||
pkts = content.split('--') # simulate 2 separate quote packets
|
||||
# import pdb; pdb.set_trace()
|
||||
payloads = [json.loads(pkt)['quotes'] for pkt in pkts]
|
||||
|
||||
for payload in cycle(payloads):
|
||||
|
|
Loading…
Reference in New Issue