-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreleaseContact.py
More file actions
20 lines (18 loc) · 803 Bytes
/
releaseContact.py
File metadata and controls
20 lines (18 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from localbits.main import key, secret
from localbits.localbitcoins import LocalBitcoin
import time, datetime
lclbit = LocalBitcoin(key, secret)
if __name__ == '__main__':
keyName = 'min_amount'
lclbit.changeAdField('1257933', keyName = '18000')
while True:
try:
contactsToRelease = set(input("Input contacts to release:\n").split())
for contact in contactsToRelease:
st_code = lclbit.contactRelease(contact)[0]
if st_code == 200:
print("Contact {0} released at".format(contact), datetime.datetime.now().strftime('%H:%M:%S %d.%m'))
time.sleep(1)
except Exception as exc:
print(exc)
print("Restarting release function, check if contacts IDs are valid!")