-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (23 loc) · 816 Bytes
/
main.py
File metadata and controls
35 lines (23 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import logging
import os
import tkinter as tk
from dotenv import load_dotenv
from connectors.binance_futures import BinanceFuturesClient
load_dotenv("binance-keys.env")
public_key = os.getenv("PUBLIC_KEY")
secret_key = os.getenv("SECRET_KEY")
logger = logging.getLogger()
logger.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s %(levelname)s :: %(message)s')
streamHandler = logging.StreamHandler()
streamHandler.setFormatter(formatter)
streamHandler.setLevel(logging.INFO)
fileHandler = logging.FileHandler('info.log')
fileHandler.setFormatter(formatter)
fileHandler.setLevel(logging.DEBUG)
logger.addHandler(streamHandler)
logger.addHandler(fileHandler)
if __name__ == '__main__':
binance = BinanceFuturesClient(public_key, secret_key, True)
root = tk.Tk()
root.mainloop()