forked from iamvazu/BitBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
42 lines (31 loc) · 949 Bytes
/
main.py
File metadata and controls
42 lines (31 loc) · 949 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
35
36
37
38
39
40
41
42
import time
import datetime
import random
from bs4 import BeautifulSoup
import pandas as pd
import HandlerThread, PoloniexThread
import ConfigParser
import thread
config = ConfigParser.ConfigParser()
config.read("config.ini")
firstRun = True
lastpair = ""
currpair = ""
cryptoping = Cryptoping.Cryptoping()
while True:
currency, exchange = cryptoping.refreshAndGetData()
if firstRun:
lastpair=currency+exchange
firstRun = False
currpair=currency+exchange
if(lastpair!=currpair):
legitExchange = False
# Pruefen ob Poloniex oder Bittrex Wenn ja Transaktion freigeben
if (exchange == "Poloniex"):
legitExchange = True
# Transaktion freigegeben
if legitExchange:
if (exchange == "Poloniex"):
thread.start_new(PoloniexThread.PoloniexThread, (currency,))
lastpair = currpair
time.sleep(random.randint(1,3))