2022-10-15 22:24:03 +00:00
|
|
|
from serde import Model, fields
|
|
|
|
|
2022-10-15 22:28:46 +00:00
|
|
|
|
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:28:46 +00:00
|
|
|
|
2022-10-15 22:24:03 +00:00
|
|
|
class Timestamp(Model):
|
|
|
|
sent = fields.DateTime()
|
|
|
|
trade = fields.DateTime()
|
|
|
|
|
2022-10-15 22:28:46 +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)
|
2022-10-15 22:28:46 +00:00
|
|
|
timestamp = fields.Nested(Timestamp)
|