Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #14

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ async def main():
max_buy_num = alarm_info.base_asset_scale
else:
max_buy_num = alarm_info.quote_asset_scale

max_buy_num = min(max_buy_num, alarm.remain_scale)
except Exception as e:
logger.error(f"Error in estimate wind {e}")
continue
Expand Down
5 changes: 1 addition & 4 deletions mariadb_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ async def update_alarm_to_db(alarms: list[Alarm]):
VALUES (%s, %s, %s, %s, %s, %s)
ON DUPLICATE KEY UPDATE
state = VALUES(state),
price = VALUES(price),
is_mine = VALUES(is_mine),
remain_scale = VALUES(remain_scale),
created_at = VALUES(created_at)
remain_scale = VALUES(remain_scale)
"""
insert_list = []
for alarm in alarms:
Expand Down