fisk/core/lib/serde/drakdoo.py

22 lines
420 B
Python
Raw Normal View History

2022-10-15 22:24:03 +00:00
from serde import Model, fields
2022-10-15 22:24:03 +00:00
class Market(Model):
exchange = fields.Str()
item = fields.Str()
currency = fields.Str()
contract = fields.Str()
2022-10-15 22:24:03 +00:00
class Timestamp(Model):
2022-10-16 13:37:49 +00:00
sent = fields.Int()
trade = fields.Int()
2022-10-15 22:24:03 +00:00
2022-10-15 22:24:03 +00:00
class BaseDrakdoo(Model):
title = fields.Str()
message = fields.Str()
period = fields.Str()
market = fields.Nested(Market)
timestamp = fields.Nested(Timestamp)