This is a simple python script that retrieves current Steem Dollar price from Poloniex and tells you whether to buy, sell or hold! ``` from urllib.request import urlopen import json url = urlopen('https://poloniex.com/public?command=returnTicker').read() result = json.loads(url) SBD = result['BTC_SBD']['last'] BTC = result['USDT_BTC']['last'] SBD_USD = float(SBD) * float(BTC) print "SBD $",'{0:.2f}'.format(SBD_USD) SBD = '{0:.2f}'.format(SBD_USD) SBD = float(SBD) if SBD > 1: print 'sell, sell.. we are riaaach $$$!!' elif SBD < 0.90: print 'buy!!' else: print 'hoooodl !!!' ``` You can run it online [here]( https://trinket.io/python/783312bb2d) Or, If you have a raspberry pi and a sense hat you could even tweak it so it shows on your screen, [like this](https://trinket.io/python/b601da5709): [![](https://s3.postimg.org/y38ujtb83/raspi.png)](https://trinket.io/python/b601da5709) *Note: the advice given represents my personal strategy, the idea is to take advantage of the price swings of SBD, please do not take it too seriously.* #steemdollars #raspberrypi
post_id | 646,373 |
---|---|
author | chitty |
permlink | trading-advice-from-a-python-script |
category | python |
json_metadata | "{"links": ["https://trinket.io/python/783312bb2d"], "tags": ["python", "steemdollars", "raspberrypi"]}" |
created | 2016-08-17 20:33:51 |
last_update | 2016-08-17 21:28:57 |
depth | 0 |
children | 7 |
net_rshares | 10,730,095,298,208 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 20.028 SBD |
curator_payout_value | 2.108 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,084 |
author_reputation | 84,463,031,858,396 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
barrie | 0 | 612,389,096,070 | 100% | ||
sandra | 0 | 105,855,958,111 | 100% | ||
fury | 0 | 17,216,017,124 | 100% | ||
ihashfury | 0 | 891,119,037,194 | 100% | ||
wang | 0 | 3,075,781,146,514 | 100% | ||
boy | 0 | 2,470,235,917 | 100% | ||
bue-witness | 0 | 2,998,122,059 | 100% | ||
bunny | 0 | 567,603,623 | 100% | ||
ajvest | 0 | 481,165,796,847 | 100% | ||
bue | 0 | 41,948,158,047 | 100% | ||
mini | 0 | 1,324,163,541 | 100% | ||
moon | 0 | 170,709,221 | 100% | ||
aizensou | 0 | 32,147,811,478 | 100% | ||
perky | 0 | 11,292,145,282 | 100% | ||
recursive2 | 0 | 443,565,577,013 | 100% | ||
recursive3 | 0 | 411,902,994,941 | 100% | ||
mineralwasser | 0 | 101,837,668 | 100% | ||
boombastic | 0 | 804,079,221,950 | 100% | ||
mrs.agsexplorer | 0 | 118,914,125,929 | 100% | ||
bingo-0 | 0 | 8,857,348,576 | 100% | ||
proctologic | 0 | 8,805,886,509 | 100% | ||
healthcare | 0 | 496,873,319 | 100% | ||
tuck-fheman | 0 | 985,595,080,732 | 100% | ||
daniel.pan | 0 | 725,575,461 | 100% | ||
hcf27 | 0 | 21,959,489,090 | 100% | ||
jchch | 0 | 25,520,288,644 | 100% | ||
chitty | 0 | 291,642,855,672 | 100% | ||
linouxis9 | 0 | 118,504,602,396 | 100% | ||
helen.tan | 0 | 230,145,753 | 100% | ||
nenad-ristic | 0 | 77,156,401,924 | 100% | ||
craig-grant | 0 | 116,562,949,889 | 100% | ||
fran2k | 0 | 7,212,452,030 | 100% | ||
fkn | 0 | 2,547,042,910 | 10% | ||
james-show | 0 | 25,168,581,907 | 100% | ||
elishagh1 | 0 | 3,344,304,303 | 10% | ||
kodi | 0 | 601,847,504 | 100% | ||
cyber | 0 | 494,943,576,064 | 100% | ||
kingofchaos | 0 | 6,059,456,477 | 100% | ||
mark-waser | 0 | 5,916,246,790 | 100% | ||
geoffrey | 0 | 46,146,908,097 | 100% | ||
kimziv | 0 | 244,935,614,397 | 100% | ||
fuck.off | 0 | 2,968,232,712 | 100% | ||
superfreek | 0 | 2,553,099,182 | 100% | ||
iloveporn | 0 | 4,043,794,097 | 100% | ||
the.bot | 0 | 1,445,102,400 | 100% | ||
johnbradshaw | 0 | 4,917,813,912 | 100% | ||
the.whale | 0 | 3,429,660,802 | 100% | ||
michaellamden68 | 0 | 2,474,002,341 | 100% | ||
unicornfarts | 0 | 3,249,645,079 | 100% | ||
rubybian | 0 | 72,401,737,611 | 100% | ||
soupernerd | 0 | 785,873,372 | 100% | ||
vote | 0 | 3,429,967,037 | 100% | ||
kissmybutt | 0 | 3,611,242,975 | 100% | ||
sergei | 0 | 970,041,104 | 100% | ||
domino | 0 | 220,684,511,985 | 100% | ||
furion | 0 | 5,414,880,120 | 10% | ||
owdy | 0 | 1,484,069,854 | 100% | ||
barbara2 | 0 | 60,615,428 | 10% | ||
ch0c0latechip | 0 | 67,143,505 | 10% | ||
doge4lyf | 0 | 62,137,052 | 10% | ||
spiz0r | 0 | 7,405,447,604 | 100% | ||
chriscrypto | 0 | 14,187,732,804 | 100% | ||
marcgodard | 0 | 1,311,189,403 | 100% | ||
paco | 0 | 73,050,902,138 | 100% | ||
aaseb | 0 | 12,696,167,520 | 100% | ||
karen13 | 0 | 3,060,724,187 | 100% | ||
igster | 0 | 22,885,118,359 | 100% | ||
jrd8526 | 0 | 900,380,535 | 100% | ||
jaycobbell | 0 | 13,664,381,430 | 100% | ||
allmonitors | 0 | 1,429,922,174 | 100% | ||
screasey | 0 | 2,191,433,429 | 100% | ||
luisucv34 | 0 | 530,346,384 | 100% | ||
warrensteem | 0 | 6,459,938,148 | 100% | ||
tarindel | 0 | 5,382,529,492 | 100% | ||
jl777 | 0 | 148,309,601,479 | 100% | ||
positive | 0 | 2,051,328,191 | 10% | ||
sacode | 0 | 5,044,591,457 | 100% | ||
proto | 0 | 13,081,537,404 | 100% | ||
alex.chien | 0 | 221,406,946 | 100% | ||
royalmacro | 0 | 1,986,081,152 | 100% | ||
fnait | 0 | 63,919,325 | 10% | ||
keepcalmand | 0 | 62,705,479 | 10% | ||
elliottgodard | 0 | 84,206,519 | 100% | ||
taz | 0 | 179,878,418 | 100% | ||
coliraver | 0 | 798,629,376 | 100% | ||
steemster1 | 0 | 108,644,242 | 100% | ||
mikeinfla | 0 | 2,782,649,353 | 100% | ||
weenis | 0 | 716,456,435 | 100% | ||
jed78 | 0 | 3,358,371,898 | 100% | ||
taker | 0 | 6,405,951,361 | 100% | ||
pr3ttyp3rf3ct | 0 | 681,058,762 | 100% | ||
sharon | 0 | 51,143,991 | 100% | ||
johnblow | 0 | 51,522,514 | 100% | ||
felixxx | 0 | 2,024,242,961 | 100% | ||
lillianjones | 0 | 50,731,326 | 100% | ||
rawnetics | 0 | 6,935,928,652 | 100% | ||
glitterfart | 0 | 455,141,601,717 | 100% | ||
shanejonas | 0 | 62,031,432 | 100% | ||
kainmarx | 0 | 2,038,646,177 | 100% | ||
msjennifer | 0 | 51,120,963 | 100% | ||
ciao | 0 | 50,828,873 | 100% | ||
thebotkiller | 0 | 6,709,211,822 | 100% | ||
cryptos | 0 | 19,466,447,372 | 100% | ||
steemo | 0 | 50,521,096 | 100% | ||
steema | 0 | 50,390,768 | 100% | ||
confucius | 0 | 51,802,213 | 100% | ||
party1998 | 0 | 50,545,877 | 100% | ||
jarvis | 0 | 51,153,233 | 100% | ||
ip0000h | 0 | 60,446,031 | 100% | ||
fortuner | 0 | 50,692,212 | 100% | ||
pda11111 | 0 | 61,146,491 | 100% | ||
jimmytwoshoes | 0 | 168,112,420 | 100% | ||
stevenh512 | 0 | 91,850,506 | 100% | ||
thomasaustin | 0 | 50,682,252 | 100% | ||
thermor | 0 | 50,680,459 | 100% | ||
ficholl | 0 | 50,677,748 | 100% | ||
widell | 0 | 50,673,817 | 100% | ||
artsteemit | 0 | 66,323,308 | 100% | ||
joelbow | 0 | 70,147,043 | 100% | ||
curpose | 0 | 50,416,427 | 100% | ||
eileenbeach | 0 | 854,187,323 | 100% | ||
mrainp | 0 | 120,452,952 | 100% | ||
runridefly | 0 | 111,116,739 | 100% | ||
richardcrill | 0 | 263,061,343 | 100% | ||
crion | 0 | 50,593,879 | 100% | ||
hitherise | 0 | 50,271,139 | 100% | ||
wiss | 0 | 50,262,756 | 100% | ||
stroully | 0 | 51,033,798 | 100% | ||
thadm | 0 | 50,712,038 | 100% | ||
yorsens | 0 | 50,356,354 | 100% | ||
bane | 0 | 50,065,875 | 100% | ||
vive | 0 | 50,059,754 | 100% | ||
coad | 0 | 50,054,445 | 100% | ||
wwwmmm | 0 | 67,000,175 | 100% | ||
renzoarg | 0 | 1,375,435,405 | 100% | ||
sofa | 0 | 50,825,587 | 100% |
I don't really understand it but I'm guessing it's not just telling you to buy under 90 cents and sell above a dollar. Could you explain a bit how float works?
post_id | 646,501 |
---|---|
author | aaseb |
permlink | re-chitty-trading-advice-from-a-python-script-20160817t204238466z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 20:42:42 |
last_update | 2016-08-17 20:42:42 |
depth | 1 |
children | 2 |
net_rshares | 0 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 159 |
author_reputation | 470,134,608,167 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
hehe that is exactly what it is telling you... its very simple, mostly for fun and learning how to program on python.
post_id | 646,638 |
---|---|
author | chitty |
permlink | re-aaseb-re-chitty-trading-advice-from-a-python-script-20160817t205032891z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 20:50:33 |
last_update | 2016-08-17 20:50:33 |
depth | 2 |
children | 1 |
net_rshares | 103,891,042,008 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.026 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 117 |
author_reputation | 84,463,031,858,396 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
sandra | 0 | 103,891,042,008 | 100% |
oh ok then I thought there was something more complex going on.
post_id | 647,397 |
---|---|
author | aaseb |
permlink | re-chitty-re-aaseb-re-chitty-trading-advice-from-a-python-script-20160817t214212130z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 21:42:15 |
last_update | 2016-08-17 21:42:15 |
depth | 3 |
children | 0 |
net_rshares | 0 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 63 |
author_reputation | 470,134,608,167 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
It is really simple, but funny! :)
post_id | 646,584 |
---|---|
author | spiz0r |
permlink | re-chitty-trading-advice-from-a-python-script-20160817t204752327z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 20:47:51 |
last_update | 2016-08-17 20:47:51 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 34 |
author_reputation | 2,279,175,552,324 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Artuido motheboard ?
post_id | 647,146 |
---|---|
author | wwwmmm |
permlink | re-chitty-trading-advice-from-a-python-script-20160817t212449735z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 21:24:57 |
last_update | 2016-08-17 21:24:57 |
depth | 1 |
children | 1 |
net_rshares | 0 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 20 |
author_reputation | -344,085,733,826 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Yeah It should work on an arduino too
post_id | 647,168 |
---|---|
author | chitty |
permlink | re-wwwmmm-re-chitty-trading-advice-from-a-python-script-20160817t212632299z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-17 21:26:33 |
last_update | 2016-08-17 21:26:33 |
depth | 2 |
children | 0 |
net_rshares | 106,307,275,558 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.027 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 37 |
author_reputation | 84,463,031,858,396 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
sandra | 0 | 106,307,275,558 | 100% |
would you please, provide me a php script ?
post_id | 651,800 |
---|---|
author | royalmacro |
permlink | re-chitty-trading-advice-from-a-python-script-20160818t051731371z |
category | python |
json_metadata | "{"tags": ["python"]}" |
created | 2016-08-18 05:17:27 |
last_update | 2016-08-18 05:17:27 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2016-09-18 00:16:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 43 |
author_reputation | 181,970,085,860,999 |
root_title | "Trading advice from a python script" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |