create account

RE: Developers Guide to Steem's Blockchain by smooth

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @furion/developers-guide-to-steem-s-blockchain

· @smooth ·
$0.20
> limit_order_create, limit_order_cancel

How does one see executions?
πŸ‘  , ,
properties (23)
authorsmooth
permlinkre-furion-developers-guide-to-steem-s-blockchain-20160801t134419900z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 13:44:21
last_update2016-08-01 13:44:21
depth1
children11
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.159 HBD
curator_payout_value0.044 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation253,602,537,834,068
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id534,620
net_rshares273,664,845,806
author_curate_reward""
vote details (3)
@furion ·
This is a very good question. I think it may be under `transfers`. I am looking into it now.

I've just re-run the script, and it looks like I missed 1 operation type :
```
=====> set_withdraw_vesting_route
{'auto_vest': False,
 'from_account': 'steemroller',
 'percent': 100,
 'to_account': 'itsascam'}
```
πŸ‘  
properties (23)
authorfurion
permlinkre-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t135214526z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 13:52:15
last_update2016-08-01 13:52:15
depth2
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length307
author_reputation116,503,940,714,958
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id534,765
net_rshares15,023,634,964
author_curate_reward""
vote details (1)
@furion · (edited)
$0.05
Ok, I tried exchanging $0.26 SBD into steem and back, and this is the only thing I got from the blockchain:

Buying Steem:
```
=====> limit_order_create
{'amount_to_sell': '0.286 SBD',
 'expiration': '1969-12-31T23:59:59',
 'fill_or_kill': False,
 'min_to_receive': '0.100 STEEM',
 'orderid': 1470060094,
 'owner': 'furion'}
```

Selling Steem:
```
=====> limit_order_create
{'amount_to_sell': '0.100 STEEM',
 'expiration': '1969-12-31T23:59:59',
 'fill_or_kill': False,
 'min_to_receive': '0.274 SBD',
 'orderid': 1470060340,
 'owner': 'furion'}
```

So I dug deeper, and I found out, that `steemd` does not handle exchange data.

To get the exchange data, one needs to to interact with `cli_wallet`'s RPC, not the `steemd`. 
If you use [python-steemlib](https://github.com/xeroc/python-steemlib), the trade history can be obtained like so:
```
class Config():
                wallet_host           = "localhost"
                wallet_port           = 8091
                witness_url           = "wss://steemit.com/wstmp2"
                account = "smooth"

wallet_rpc = SteemExchange(Config)
wallet_rpc.returnTradeHistory()
```
πŸ‘  ,
properties (23)
authorfurion
permlinkre-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t141630034z
categorysteem
json_metadata{"tags":["steem"],"links":["https://github.com/xeroc/python-steemlib"]}
created2016-08-01 14:16:30
last_update2016-08-01 14:16:45
depth2
children3
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.038 HBD
curator_payout_value0.009 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,132
author_reputation116,503,940,714,958
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id535,315
net_rshares70,203,681,963
author_curate_reward""
vote details (2)
@meteor78 ·
πŸ‘nice article @furion
πŸ‘  
properties (23)
authormeteor78
permlinkre-furion-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t183153738z
categorysteem
json_metadata{"tags":["steem"],"users":["furion"]}
created2016-08-01 18:31:57
last_update2016-08-01 18:31:57
depth3
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length21
author_reputation184,361,553,890
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id541,270
net_rshares0
author_curate_reward""
vote details (1)
@theoretical ·
Check the get_account_history for your account instead of using get_block and you will see virtual ops for filled orders.
properties (22)
authortheoretical
permlinkre-furion-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t185430888z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 18:54:30
last_update2016-08-01 18:54:30
depth3
children1
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length121
author_reputation30,164,760,525,645
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id541,733
net_rshares0
@smooth · (edited)
How do you get _market_ execution history (not for a specific account)?

It is impossible to do any meaningful analysis of trading activity without that.
properties (22)
authorsmooth
permlinkre-theoretical-re-furion-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t212300700z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 21:23:00
last_update2016-08-01 21:27:03
depth4
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length153
author_reputation253,602,537,834,068
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id545,377
net_rshares0
@jl777 ·
there is a fill_order event in the array returned by get_history:     
 sprintf(url,"http://127.0.0.1:8090");
    sprintf(params,"{\"id\":%llu,\"method\":\"get_account_history\",\"params\":[\"%s\", %d, %d]}",

     fill_order ({"current_owner":"enki","current_orderid":3402053187,"current_pays":"19.613 SBD","open_owner":"taker","open_orderid":1469136521,"open_pays":"5.792 STEEM"})
it shows both orderids and how much was filled
properties (22)
authorjl777
permlinkre-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t152412886z
categorysteem
json_metadata{"tags":["steem"],"links":["http://127.0.0.1:8090"]}
created2016-08-01 15:24:12
last_update2016-08-01 15:24:12
depth2
children2
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length429
author_reputation14,988,697,980,664
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id536,698
net_rshares0
@furion ·
I really need to fix my steemd/cli_wallet install, I'm missing out on all the good stuff.
properties (22)
authorfurion
permlinkre-jl777-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t153224300z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 15:32:24
last_update2016-08-01 15:32:24
depth3
children1
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length89
author_reputation116,503,940,714,958
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id536,840
net_rshares0
@furion ·
Finally, `cli_wallet` works. Had to do `sudo ufw disable && sudo reboot`.
properties (22)
authorfurion
permlinkre-furion-re-jl777-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t153931188z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 15:39:30
last_update2016-08-01 15:39:30
depth4
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation116,503,940,714,958
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id536,979
net_rshares0
@theoretical ·
$0.20
Account history for an account has virtual operations for orders filled by that account. Currently the only way to see virtual ops is in account history, but I'm thinking of adding an event interface for them one of these days and writing a plugin to expose them over an API.
πŸ‘  ,
properties (23)
authortheoretical
permlinkre-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t185018296z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-01 18:50:18
last_update2016-08-01 18:50:18
depth2
children2
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.203 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length275
author_reputation30,164,760,525,645
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id541,652
net_rshares271,666,523,804
author_curate_reward""
vote details (2)
@furion · (edited)
I've looked into `steem_cli` RPC call `get_account_history`, and this is what I get from executing an order:

1.) Placing an order
```
======> limit_order_create
{'amount_to_sell': '8.700 SBD',
 'expiration': '1969-12-31T23:59:59',
 'fill_or_kill': False,
 'min_to_receive': '3.000 STEEM',
 'orderid': 1469778670,
 'owner': 'furion'}
```
.
2.) Order being filled (it was not filled at once, hence the two separate fills):
```
======> fill_order
{'current_orderid': 162741016,
 'current_owner': 'enki',
 'current_pays': '2.141 STEEM',
 'open_orderid': 1469778670,
 'open_owner': 'furion',
 'open_pays': '6.208 SBD'}

======> fill_order
{'current_orderid': 951953610,
 'current_owner': 'enki',
 'current_pays': '0.859 STEEM',
 'open_orderid': 1469778670,
 'open_owner': 'furion',
 'open_pays': '2.492 SBD'}
```

Thank you @theoretical for pointing this out. I've learned so much today :)
properties (22)
authorfurion
permlinkre-theoretical-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160801t201535751z
categorysteem
json_metadata{"tags":["steem"],"users":["theoretical"]}
created2016-08-01 20:15:36
last_update2016-08-01 20:16:06
depth3
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length885
author_reputation116,503,940,714,958
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id543,851
net_rshares0
@smooth ·
That would be spendid
properties (22)
authorsmooth
permlinkre-theoretical-re-smooth-re-furion-developers-guide-to-steem-s-blockchain-20160803t213712800z
categorysteem
json_metadata{"tags":["steem"]}
created2016-08-03 21:37:12
last_update2016-08-03 21:37:12
depth3
children0
last_payout2016-09-01 04:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length21
author_reputation253,602,537,834,068
root_title"Developers Guide to Steem's Blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id589,710
net_rshares0