| | |
| | | """ |
| | | import ctypes |
| | | import decimal |
| | | import math |
| | | import random |
| | | import threading |
| | | import time |
| | |
| | | return datetime.datetime.fromtimestamp(timestamp_second).strftime(format_) |
| | | |
| | | |
| | | # 获取买入价格笼子的最低价 |
| | | def get_buy_min_price(price): |
| | | price1 = price * (1 - 0.02) |
| | | price1 = math.ceil(price1 * 100) / 100 |
| | | price2 = price - 0.1 |
| | | return max(price1, price2) |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | print(int(to_time_str(1684132912).replace(":", ""))) |
| | | print(get_buy_min_price(20)) |
| | | # print(trade_time_sub("11:29:59", 5)) |
| | | # print(trade_time_sub("10:29:59", 10)) |
| | | # print(trade_time_add_second("13:29:59", 60)) |
| | |
| | | return thread_id |
| | | except: |
| | | pass |
| | | return None |
| | | return None |