bug fixes
This commit is contained in:
@@ -139,9 +139,30 @@ async def create_fr_aster_user_account_pos(
|
||||
else:
|
||||
raise ValueError('Only MySQL engine is implemented')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Mkt Trades Table ####
|
||||
async def create_fr_aster_mkt_trades(
|
||||
CON: AsyncContextManager,
|
||||
engine: str = 'mysql', # mysql | duckdb
|
||||
) -> None:
|
||||
if CON is None:
|
||||
logging.info("NO DB CONNECTION, SKIPPING Create Statements")
|
||||
else:
|
||||
if engine == 'mysql':
|
||||
logging.info('Creating Table if Does Not Exist: fr_aster_mkt_trades')
|
||||
await CON.execute(text("""
|
||||
CREATE TABLE IF NOT EXISTS fr_aster_mkt_trades (
|
||||
timestamp_arrival BIGINT,
|
||||
timestamp_msg BIGINT,
|
||||
timestamp_trade BIGINT,
|
||||
symbol VARCHAR(20),
|
||||
aggregate_trade_id VARCHAR(100),
|
||||
price DOUBLE,
|
||||
qty DOUBLE,
|
||||
first_trade_id VARCHAR(100),
|
||||
last_trade_id VARCHAR(100),
|
||||
is_buyer_mkt_maker BOOL
|
||||
);
|
||||
"""))
|
||||
await CON.commit()
|
||||
else:
|
||||
raise ValueError('Only MySQL engine is implemented')
|
||||
|
||||
Reference in New Issue
Block a user