You are viewing a single comment's thread from:

RE: Attention Bitshares Developers: I need help with JSON Trade Data.

in #bitshares6 years ago

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

Sort:  

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?

This data is from the bitshares api. See this link for the explorer to download - http://open-explorer.io/bitshares-account-exporter/index.php

Cointracking.info has not created an import for any of the Bitshares decentralized exchanges.

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!

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64359.90
ETH 3105.50
USDT 1.00
SBD 3.87