create account

RE: Attention Bitshares Developers: I need help with JSON Trade Data. by kenny-crane

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

Viewing a response to: @pairmike/re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t002249082z

· @kenny-crane ·
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?
properties (22)
authorkenny-crane
permlinkre-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t005139223z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2018-04-18 00:51:39
last_update2018-04-18 00:51:39
depth3
children3
last_payout2018-04-25 00:51:39
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_length598
author_reputation234,710,279,205,763
root_title"Attention Bitshares Developers: I need help with JSON Trade Data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id50,662,691
net_rshares0
@pairmike ·
This data is from the bitshares api.  See this link for the explorer to download - http://open-explorer.io/bitshares-account-exporter/index.php
properties (22)
authorpairmike
permlinkre-kenny-crane-re-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t011209614z
categorybitshares
json_metadata{"tags":["bitshares"],"links":["http://open-explorer.io/bitshares-account-exporter/index.php"],"app":"steemit/0.1"}
created2018-04-18 01:12:09
last_update2018-04-18 01:12:09
depth4
children2
last_payout2018-04-25 01:12:09
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_length143
author_reputation43,927,661,974,027
root_title"Attention Bitshares Developers: I need help with JSON Trade Data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id50,665,041
net_rshares0
@kenny-crane ·
So when you use that form, you get a CSV file, and it looks like what you posted was the value for the "Operation History - Raw Operation" field.

Mapping from that, to what cointracking needs:

The Type will probably always be "Trade".

Buy Currency is probably the "receives" json data.

Sell Currency is probably "pays".

Fee Currency is probably "fee".

Exchange Group is Open Ledger.

Comment Date is probably the value in the CSV file under the "Block Data - Block Time" heading, for example 2018-04-11T11:27:57

So are you looking for a program to take the CSV file data and output data that cointracking can handle?  Or are you just trying to figure out what data in the CSV file corresponds to what cointracking needs?  I think what I stated above is the correct map of the CSV data and the data cointracking needs.

If you need some custom coding for something like this, we can talk more by email.  I'm at kenny [at] YouTubeStars.com

Best wishes!
properties (22)
authorkenny-crane
permlinkre-pairmike-re-kenny-crane-re-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t025720829z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2018-04-18 02:57:21
last_update2018-04-18 02:57:21
depth5
children0
last_payout2018-04-25 02:57:21
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_length958
author_reputation234,710,279,205,763
root_title"Attention Bitshares Developers: I need help with JSON Trade Data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id50,677,541
net_rshares0
@pairmike ·
Cointracking.info has not created an import for any of the Bitshares decentralized exchanges.
properties (22)
authorpairmike
permlinkre-pairmike-re-kenny-crane-re-pairmike-re-kenny-crane-re-pairmike-attention-developers-i-need-help-with-openledger-json-trade-data-20180418t011602574z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2018-04-18 01:16:03
last_update2018-04-18 01:16:03
depth5
children0
last_payout2018-04-25 01:16:03
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_length93
author_reputation43,927,661,974,027
root_title"Attention Bitshares Developers: I need help with JSON Trade Data."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id50,665,452
net_rshares0