Skip to content

Commit 6047529

Browse files
authored
Fix writing DYDXOraclePrice to catalog (#2158)
1 parent f8acc22 commit 6047529

File tree

1 file changed

+5
-6
lines changed
  • nautilus_trader/adapters/dydx/common

1 file changed

+5
-6
lines changed

nautilus_trader/adapters/dydx/common/types.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ class DYDXOraclePrice(Data):
6262
metadata={"type": "DYDXOraclePrice"},
6363
)
6464

65-
@staticmethod
66-
def to_dict(obj: DYDXOraclePrice) -> dict[str, Any]:
65+
def to_dict(self, to_arrow=False) -> dict[str, Any]:
6766
"""
6867
Return a dictionary representation of this object.
6968
@@ -73,10 +72,10 @@ def to_dict(obj: DYDXOraclePrice) -> dict[str, Any]:
7372
7473
"""
7574
return {
76-
"instrument_id": obj.instrument_id.value,
77-
"price": str(obj.price),
78-
"ts_event": obj.ts_event,
79-
"ts_init": obj.ts_init,
75+
"instrument_id": self.instrument_id.value,
76+
"price": str(self.price),
77+
"ts_event": self.ts_event,
78+
"ts_init": self.ts_init,
8079
}
8180

8281
@staticmethod

0 commit comments

Comments
 (0)