{"action":"created","issue":{"url":"https://api.github.com/repos/bitsquare/bitsquare/issues/546","repository_url":"https://api.github.com/repos/bitsquare/bitsquare","labels_url":"https://api.github.com/repos/bitsquare/bitsquare/issues/546/labels{/name}","comments_url":"https://api.github.com/repos/bitsquare/bitsquare/issues/546/comments","events_url":"https://api.github.com/repos/bitsquare/bitsquare/issues/546/events","html_url":"https://github.com/bitsquare/bitsquare/issues/546","id":167621416,"number":546,"title":"Web page for displaying trade statistics","user":{"login":"ManfredKarrer","id":1449498,"avatar_url":"https://avatars.githubusercontent.com/u/1449498?v=3","gravatar_id":"","url":"https://api.github.com/users/ManfredKarrer","html_url":"https://github.com/ManfredKarrer","followers_url":"https://api.github.com/users/ManfredKarrer/followers","following_url":"https://api.github.com/users/ManfredKarrer/following{/other_user}","gists_url":"https://api.github.com/users/ManfredKarrer/gists{/gist_id}","starred_url":"https://api.github.com/users/ManfredKarrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManfredKarrer/subscriptions","organizations_url":"https://api.github.com/users/ManfredKarrer/orgs","repos_url":"https://api.github.com/users/ManfredKarrer/repos","events_url":"https://api.github.com/users/ManfredKarrer/events{/privacy}","received_events_url":"https://api.github.com/users/ManfredKarrer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitsquare/bitsquare/labels/a:%20feature","name":"a: feature","color":"009800"},{"url":"https://api.github.com/repos/bitsquare/bitsquare/labels/Bounty%20task","name":"Bounty task","color":"fbca04"},{"url":"https://api.github.com/repos/bitsquare/bitsquare/labels/Feature%20request","name":"Feature request","color":"f9d0c4"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-26T14:28:20Z","updated_at":"2016-07-27T17:23:52Z","closed_at":null,"body":"In the upcoming release there will be trade statistics included.\r\n\r\nThe basic concept is that the traders publish a trade statistics object to the P2P network and every node gets that data and build up a global statistics view and stores that locally.\r\n\r\nAs there is no central point in Bitsquare, logging trade data is not that trivial.\r\nThe alternative approach would require a lookup of the Bitcoin network for transactions to the arbitrator (trade fee receiver) and match that with the data from the offer book. Additionally get the market price to estimate the price if a market based price was used.\r\n@metabit has started to work on that, but I think the new approach I implemented now is much easier.\r\nSorry @metabit that I did not come up earlier with that solution, but it was not rellay planned but due the high demand with ETC I was forced to work on that.\r\n\r\nThere are no privacy leaks with that statistic gathering as it contains only the data from the offer (public in the offerbook) plus the trade price and amount. Data which could be derived from the blockchain as well but would be much more complex and would be time delayed (need to be confirmed int he blcokchain to be sure to get the data).\r\n\r\nThe current solution to display the statistics (price cahrt, volume chart, trades table) looks like that inside the app:\r\n![bildschirmfoto 2016-07-26 um 00 56 37](https://cloud.githubusercontent.com/assets/1449498/17140865/68ca23a6-534a-11e6-8f30-80f218fa28bc.png)\r\n\r\nIt is just a very limited chart, but I don't have time yet to build a fully fledged price chart and there are no good (free and OS) \"out of the box\" price chart components available in JavaFX.\r\n\r\nIt would be good to display that data also on a webpage (market.bitsquare.io).\r\nI added a prog arg for dumping the data to a json file:\r\n--dumpStatistics\r\nIf that is set to true your app (there is also a headless version) will dump the json into the data directory.\r\n\r\nHere is an example JSON:\r\n[\r\n {\r\n    \"currency\": \"ETHC\",\r\n    \"direction\": \"SELL\",\r\n    \"tradePrice\": 35000000,\r\n    \"tradeAmount\": 10000000,\r\n    \"tradeDate\": 1469334726728,\r\n    \"paymentMethod\": \"BLOCK_CHAINS\",\r\n    \"offerDate\": 1469280483663,\r\n    \"useMarketBasedPrice\": false,\r\n    \"marketPriceMargin\": 0.0,\r\n    \"offerAmount\": 10000000,\r\n    \"offerMinAmount\": 10000000,\r\n    \"offerId\": \"a659e034-9c31-4ca9-9a5c-0ca5713ca384\",\r\n    \"depositTxId\": \"c1e8209d1ee4bbc4aaf9d3cbcc5006ab1bb7108a4a4b1358559f777773eff9a5\"\r\n  },\r\n  {\r\n    \"currency\": \"CRC\",\r\n    \"direction\": \"BUY\",\r\n    \"tradePrice\": 3488805600,\r\n    \"tradeAmount\": 10000,\r\n    \"tradeDate\": 1469485518002,\r\n    \"paymentMethod\": \"SAME_BANK\",\r\n    \"offerDate\": 1469485041093,\r\n    \"useMarketBasedPrice\": true,\r\n    \"marketPriceMargin\": 0.03,\r\n    \"offerAmount\": 10000,\r\n    \"offerMinAmount\": 10000,\r\n    \"offerId\": \"926ba832-ccc5-4982-8208-6bcf71548fa3\",\r\n    \"depositTxId\": \"a133f813b28363fbcdea467a1f7ab2e984a0f1d9c459c0d12fe543766d423cee\"\r\n  },....\r\n\r\nBTC amounts are displayed as satoshi, fiat/altcoin price is multiplied by 10000, so 600 EUR/BTC -> 6 000 000. Altcoin prices use the same style like fiat (ETH/BTC).\r\nIt is planned for later to invert the altcoin price (BTC/ALT) but that will require a non-backward compatible update and is not planned soon.\r\n\r\nIf anyone is interested to work on that please get in touch with me.\r\nThe webpage should follow the same style as the Bitsquare main webpage. Hosting will be provided by myself.\r\n\r\nAdditionally to the webpage we need an API for providing the trade data as well.\r\nI leave actual specifications to the candidate working on it, but it should satisfy typical Bitcoin market price aggregators, so Bitsquare volume and prices can be included."},"comment":{"url":"https://api.github.com/repos/bitsquare/bitsquare/issues/comments/235657322","html_url":"https://github.com/bitsquare/bitsquare/issues/546#issuecomment-235657322","issue_url":"https://api.github.com/repos/bitsquare/bitsquare/issues/546","id":235657322,"user":{"login":"Klakurka","id":4713204,"avatar_url":"https://avatars.githubusercontent.com/u/4713204?v=3","gravatar_id":"","url":"https://api.github.com/users/Klakurka","html_url":"https://github.com/Klakurka","followers_url":"https://api.github.com/users/Klakurka/followers","following_url":"https://api.github.com/users/Klakurka/following{/other_user}","gists_url":"https://api.github.com/users/Klakurka/gists{/gist_id}","starred_url":"https://api.github.com/users/Klakurka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Klakurka/subscriptions","organizations_url":"https://api.github.com/users/Klakurka/orgs","repos_url":"https://api.github.com/users/Klakurka/repos","events_url":"https://api.github.com/users/Klakurka/events{/privacy}","received_events_url":"https://api.github.com/users/Klakurka/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T17:23:52Z","updated_at":"2016-07-27T17:23:52Z","body":"The Coin Dance team can take this one. \r\n\r\nWe'll need to put together a list of basic requirements, then we can build from that. "}}
{"actor":{"display_login":"Klakurka"}}