Viewing a response to: @pairmike/attention-developers-i-need-help-with-openledger-json-trade-data
Hiya! Not sure if this is what you are looking for, but first, that is valid JSON. And you can play with it in the console of your browser by hitting F12 and going to the console tab. If you paste in `var arr = [4, { "fee":{"amount":2000,"asset_id":"OPEN.EOS"}, "order_id":"1.7.62838114", "account_id":"1.2.2503", "pays":{"amount":4700001,"asset_id":"BTS"}, "receives":{"amount":1000000,"asset_id":"OPEN.EOS"}, "fill_price":{"base":{"amount":157093302,"asset_id":"OPEN.EOS"}, "quote":{"amount":738338519,"asset_id":"BTS"}}, "is_maker":false}]; arr[1].fee.amount` it will return 2000. I think if you put that json in a validator you will see its structure more clearly: https://jsonlint.com/ If you have any question on how to get to any other value in this json, let me know and I'll get it for you. But basically, assign that to a js variable, like arr, and then get what you need by starting with `arr[1].firstLevel.secondLevel.thirdLevel` replacing firstLevel, etc with the name of the variable.
author | kenny-crane |
---|---|
permlink | re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t000352804z |
category | bitshares |
json_metadata | {"tags":["bitshares"],"links":["https://jsonlint.com/"],"app":"steemit/0.1"} |
created | 2018-04-18 00:03:51 |
last_update | 2018-04-18 00:20:51 |
depth | 1 |
children | 5 |
last_payout | 2018-04-25 00:03:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.518 HBD |
curator_payout_value | 0.838 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,010 |
author_reputation | 234,048,206,507,035 |
root_title | "Attention Bitshares Developers: I need help with JSON Trade Data." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 50,657,175 |
net_rshares | 665,607,830,800 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pfunk | 0 | 665,607,830,800 | 15% |
Hey Kenny, I know it not valid Json. What I'm really looking for is to understand how to convert this info into something like this: Type Buy Cur. Sell Cur. Fee Cur. Exchange Group Comment Date Trade 4.46672378 LTC 978.90708337 USD 2.92793744 USD GDAX 2018-02-15 09:00:44
author | pairmike |
---|---|
permlink | re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t002249082z |
category | bitshares |
json_metadata | {"tags":["bitshares"],"app":"steemit/0.1"} |
created | 2018-04-18 00:22:48 |
last_update | 2018-04-18 00:22:48 |
depth | 2 |
children | 4 |
last_payout | 2018-04-25 00:22:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.230 HBD |
curator_payout_value | 0.076 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 278 |
author_reputation | 43,927,661,974,027 |
root_title | "Attention Bitshares Developers: I need help with JSON Trade Data." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 50,659,427 |
net_rshares | 61,598,608,096 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
kenny-crane | 0 | 61,598,608,096 | 16% |
Are you getting this data from a javascript program or are you using something else? In js, the Buy Currency would be `arr[1].receives.amount + ' ' + arr[1].receives.asset_id` I would think. cointracking.info says they have "Automatic import via APIs" so I would think there would already be some automatic way to do this, but I'm not familiar with BitShares/OpenLedger APIs. I imagine they have APIs and they probably look like Steemit APIs, but I'd have to look into it. I assume what you show here is the result of a BitShares API call, but maybe cointracking does not support this API?
author | kenny-crane |
---|---|
permlink | re-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t005139223z |
category | bitshares |
json_metadata | {"tags":["bitshares"],"app":"steemit/0.1"} |
created | 2018-04-18 00:51:39 |
last_update | 2018-04-18 00:51:39 |
depth | 3 |
children | 3 |
last_payout | 2018-04-25 00:51:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 598 |
author_reputation | 234,048,206,507,035 |
root_title | "Attention Bitshares Developers: I need help with JSON Trade Data." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 50,662,691 |
net_rshares | 0 |
This data is from the bitshares api. See this link for the explorer to download - http://open-explorer.io/bitshares-account-exporter/index.php
author | pairmike |
---|---|
permlink | re-kenny-crane-re-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t011209614z |
category | bitshares |
json_metadata | {"tags":["bitshares"],"links":["http://open-explorer.io/bitshares-account-exporter/index.php"],"app":"steemit/0.1"} |
created | 2018-04-18 01:12:09 |
last_update | 2018-04-18 01:12:09 |
depth | 4 |
children | 2 |
last_payout | 2018-04-25 01:12:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 143 |
author_reputation | 43,927,661,974,027 |
root_title | "Attention Bitshares Developers: I need help with JSON Trade Data." |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 50,665,041 |
net_rshares | 0 |