Don't forward errors without an order id
parent
af82f36bd8
commit
1142a538ea
|
@ -23,13 +23,14 @@ built on it) and thus actor aware API calls must be spawned with
|
||||||
"""
|
"""
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from dataclasses import asdict
|
from dataclasses import asdict
|
||||||
from functools import partial
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from functools import partial
|
||||||
from typing import List, Dict, Any, Tuple, Optional, AsyncIterator, Callable
|
from typing import List, Dict, Any, Tuple, Optional, AsyncIterator, Callable
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
from pprint import pformat
|
||||||
import inspect
|
import inspect
|
||||||
import itertools
|
import itertools
|
||||||
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import trio
|
import trio
|
||||||
|
@ -1216,4 +1217,10 @@ async def stream_trades(
|
||||||
if isinstance(con, Contract):
|
if isinstance(con, Contract):
|
||||||
msg['contract'] = asdict(con)
|
msg['contract'] = asdict(con)
|
||||||
|
|
||||||
|
if msg['reqid'] == -1:
|
||||||
|
log.error(pformat(msg))
|
||||||
|
|
||||||
|
# don't forward, it's pointless..
|
||||||
|
continue
|
||||||
|
|
||||||
yield {'local_trades': (event_name, msg)}
|
yield {'local_trades': (event_name, msg)}
|
||||||
|
|
Loading…
Reference in New Issue