fix bug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from dataclasses import asdict, is_dataclass
|
||||
from datetime import date, datetime
|
||||
from enum import Enum
|
||||
import json
|
||||
from typing import Any
|
||||
from strategy.trend.boot import get_collector_snapshot
|
||||
import httpx
|
||||
@@ -43,6 +44,8 @@ def collector_push(account_id: str, assets: Any, positions: Any) -> None:
|
||||
"positions": positions,
|
||||
}
|
||||
)
|
||||
pretty_json = json.dumps(payload, indent=4, ensure_ascii=False)
|
||||
print(pretty_json)
|
||||
httpx.post(COLLECTOR_URL, json=payload, timeout=3.0)
|
||||
except BaseException:
|
||||
# Collection must never interrupt or affect the trading workflow.
|
||||
|
||||
Reference in New Issue
Block a user