Use our `@acm` alias in paper eng
parent
29ad20bc63
commit
60123066e1
|
@ -19,7 +19,7 @@ Fake trading for forward testing.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager as acm
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
import itertools
|
import itertools
|
||||||
|
@ -530,9 +530,7 @@ async def trades_dialogue(
|
||||||
[fqme],
|
[fqme],
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
) as feed,
|
) as feed,
|
||||||
|
|
||||||
):
|
):
|
||||||
|
|
||||||
with open_pps(broker, 'paper') as table:
|
with open_pps(broker, 'paper') as table:
|
||||||
# save pps in local state
|
# save pps in local state
|
||||||
_positions.update(table.pps)
|
_positions.update(table.pps)
|
||||||
|
@ -586,7 +584,7 @@ async def trades_dialogue(
|
||||||
await simulate_fills(feed.streams[broker], client)
|
await simulate_fills(feed.streams[broker], client)
|
||||||
|
|
||||||
|
|
||||||
@asynccontextmanager
|
@acm
|
||||||
async def open_paperboi(
|
async def open_paperboi(
|
||||||
fqme: str,
|
fqme: str,
|
||||||
loglevel: str,
|
loglevel: str,
|
||||||
|
|
Loading…
Reference in New Issue