This commit is contained in:
27942
2026-01-04 18:24:42 +08:00
parent 123dbf4649
commit 0af8dc562b
6 changed files with 323 additions and 76 deletions

21
models/bitmart.py Normal file
View File

@@ -0,0 +1,21 @@
from peewee import *
from models import db
class BitMart30(Model):
id = IntegerField(primary_key=True) # 时间戳(毫秒级)
open = FloatField(null=True)
high = FloatField(null=True)
low = FloatField(null=True)
close = FloatField(null=True)
class Meta:
database = db
table_name = 'bitmart_30'
# 连接到数据库
db.connect()
# 创建表(如果表不存在)
db.create_tables([BitMart30])

Binary file not shown.