Skip to content

Commit

Permalink
修改了一次类型运算错误。
Browse files Browse the repository at this point in the history
  • Loading branch information
lcux committed Jun 7, 2017
1 parent 03322a2 commit efb0bc7
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions ImportDB/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def ans_holding_100_500_1000_5000_10000_100000():
for s in cur_ad:
for x in s['balance'].keys():
if x == asset and D(s['balance'][x]['value']) != D('0'):
zongde.append([s['_id'], s['balance'][x]['value'], s['lasttime']])
zongde.append([s['_id'], D(s['balance'][x]['value']), s['lasttime']])
else:
continue
zongde.sort(key=operator.itemgetter(1), reverse=True)
Expand Down Expand Up @@ -313,7 +313,7 @@ def ans_quota_and_worth():
e9800_price, e9800_vol = D('0'), D('0')
jubi_price, jubi_vol = D('0'), D('0')
szzc51_price, szzc51_vol = D('0'), D('0')
rate, btc_price = D('0')
rate, btc_price = D('0'),D('0')

for n in cur:
if n['_id'] == 'yunbi':
Expand Down Expand Up @@ -356,8 +356,8 @@ def ans_quota_and_worth():
bittrex_vol / all_vol * bittrex_price * btc_price * D(rate)) + (e9800_vol / all_vol * e9800_price) + (
jubi_vol / all_vol * jubi_price) + (szzc51_vol / all_vol * szzc51_price)
ans_worth = ans_quota * 100000000
ans_quota = ans_quota.quantize(D('0.00000000'))
ans_worth = ans_worth.quantize(D('0.00000000'))
ans_quota = ans_quota.quantize(D('0.0000'))
ans_worth = ans_worth.quantize(D('0.0000'))

return str(ans_quota), str(ans_worth)

Expand Down Expand Up @@ -430,7 +430,7 @@ def get_cny_usd():
host = 'https://ali-waihui.showapi.com'
path = '/waihui-list'
method = 'GET'
appcode = 'XXXXXXXXXXXXXXX'
appcode = 'XX'
querys = 'code=USD'
bodys = {}
url = host + path + '?' + querys
Expand All @@ -453,10 +453,14 @@ def get_yunbi_ans_time(timestamp=0):
response=urlopen(request)
content=response.read()
data=json.loads(content.decode('utf-8'))
if data:
# print(data,data[0][4])
# print(type(data[0][4]))
return str(data[0][4])
try:
if data:
# print(data,data[0][4])
# print(type(data[0][4]))
return str(data[0][4])
except Exception as e:
print(e,"get yunbi ans error")
exit(0)


def get_coinmarketcap_ans():
Expand All @@ -471,7 +475,7 @@ def get_coinmarketcap_ans():

def balace_change_send_message(address,timestamp,asset,num,phone,code):
req = api.AlibabaAliqinFcSmsNumSendRequest()
req.set_app_info(appinfo('XXXXX', 'XXXXXXXXXXXXXXXXXXXXXX'))
req.set_app_info(appinfo('XX', 'XX'))

req.extend = ""
req.sms_type = "normal"
Expand Down

12 comments on commit efb0bc7

@arimikal
Copy link

@arimikal arimikal commented on efb0bc7 Jun 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, i sent 68 antshares with a mistake from (Bittrex) Ac2toWWgWPuDqQ1tGaTKAszFgYKNg9ZQWa to ARRcXRVwSFVSPJbyc3YhdkSbtxSPjFSWqr ( this is antcahin.xyz wallet)

transaction id : 06a1e0945f6573d63acf02a900cdd9e166b0625e549f75b189a0ee25e9de6adb
https://www.antchain.xyz/address/AVye3SVakdGZ2CBzWdFD4UZUbXtFUu4cxq

I was really was sending it to (My wallet) :AVye3SVakdGZ2CBzWdFD4UZUbXtFUu4cxq

Can you please refund me my antshares, you can send me back 60, and you can take the 8 :)

Hope to hear from you, and save my day!!

Can contact me on arimikal@gmail.com

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jun 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK!

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jun 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUT WE MUST SEND 68 ANS TO Ac2toWWgWPuDqQ1tGaTKAszFgYKNg9ZQWa. OK?

@arimikal
Copy link

@arimikal arimikal commented on efb0bc7 Jun 29, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arimikal
Copy link

@arimikal arimikal commented on efb0bc7 Jun 29, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not worry, If it's true, I'll certainly give it back to you.
but ,Can you provide screenshot proof for the tx in the Bittrex?

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use QQ(An instant messaging software that is very popular in China)? You can add me as a good friend(we number is 577981577)

@arimikal
Copy link

@arimikal arimikal commented on efb0bc7 Jun 30, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arimikal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bittrexcap

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jul 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, send 68 ans to AVye3SVakdGZ2CBzWdFD4UZUbXtFUu4cxq, ok?

@lcux
Copy link
Owner Author

@lcux lcux commented on efb0bc7 Jul 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have sent 68 ans to AVye3SVakdGZ2CBzWdFD4UZUbXtFUu4cxq.

@arimikal
Copy link

@arimikal arimikal commented on efb0bc7 Jul 1, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.