{ "info": { "author": "Lars Klitzke", "author_email": "Lars.Klitzke@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# tradingconv\n\nAre you trading with Cryptocurrencies on [Binance](https://www.binance.com/)? Do you need a tool to manage the different file formats platforms \nlike Binance uses for exporting the trading history, e.g. to import into tax return software or for tracking your \nportfolie in [delta](https://www.producthunt.com/posts/delta)? \n\nThis package provide the appropriate tools for handling different formats of trading history files. Furthermore, the \nBinance API limitation that allows to only export trading history in an three month interval is lifted so that you can\nexport your **full** trading history. No need to generate an API key and expose it to third-party applications. Just \nuse you local login session.\n\n## Installation\n\nThis package is hosted on [PyPI](https://pypi.org/project/tradingconv/) so just install `tradingconv` with\n\n```\npip install tradingconv\n```\n\n## Commands\n\nThis package comes equipped with multiple tools. Here is a list of currently available tools.\n\n| Command | Description |\n| -----------------| -------------------------------------------------------------|\n| binancecrawler | Query Binance to export the **full** trade history |\n| tradingconv | Convert supported (csv,xlsx) files into other supported formats |\n\n\n\n## Query Binance\n\nDespite using the official API of Binance which limits the trade history to the last three month, \n`binancecrawler` is able to retrieve and export the **full** trade history.\n\nTherefore, `binancecrawler` requires the session cookies of an active Binance connection on the current machine. \nThe parameter `--cookies` should therefore point to a file containing a string with the cookies. \n)\n### Save Binance session\nIn order to retrieve the Cookies of an active Binance session, log in into Binance and export the Cookies.\nI've setup a list of links with a description on how to do this for different browser.\n\n* [Chrome](https://developers.google.com/web/tools/chrome-devtools/manage-data/cookies)\n* [Firefox](https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector#storage-tree)\n\n\n![Warning](https://raw.githubusercontent.com/larsklitzke/binance2delta/master/doc/warning.png)\n\nTo the best of my knowledge, the following cookies are currently required in order to gain access to the active\nsession:\n\n* JSESSIONID\n* \\_\\_BINANCE_USER_DEVICE_ID\\_\\_\n\nSave all of theses variables into a file with only one line in the following format:\n\n```\nline:=+ \nvar:==;\n = \"JSESSIONID\" | \"__BINANCE_USER_DEVICE_ID__ \"\n```\n\nWith ```` as the value of the variable. A line thus looks like:\n\n```\nJSESSIONID=;__BINANCE_USER_DEVICE_ID__\n```\n\nFinally, we need an additional csrftoken Binance uses for internal queries. You can read this token out by switching to \nyour account page, open the development console of you browser (the one where you've copied the cookies from) and search\nfor an entry `getUserLoginLog.html`. You'll find the csrftoken in the header of the message.\n\n![Image for retrieving the csrftoken](https://raw.githubusercontent.com/larsklitzke/binance2delta/master/doc/csrftoken_readout.jpg)\n\n### Retrieve trade history\n\nNow you can query Binance to retrieve your trade history within a specific inverval with\n\n```\nbinancecrawler --cookies --token --start \"2018-01-01 00:00:00\" --end \"2018-01-02 00:00:00\" --output trade_file.csv\n```\n\nor simply the full history by passing a start some time ago your account creation. \n\n```\nbinancecrawler --cookies --token --start \"2000-01-01 00:00:00\" --output full_trade_file.csv\n```\n\n## Convert to other formats\n\nTo finally convert csv or xlxs files to the other csv or xlsx format, `tradingconv` does the trick.\n\nThe following source formats are supported:\n\n* bitpanda: From the export function of the Bitpanda website\n* binance: From the export function on the Binance website\n* binancecrawler: The csv file created by `binancecrawler`\n\nThe following output formats are supported:\n\n* binance: The xlsx format used by Binance.\n* delta: The csv file format used by Delta.\n\nMore formats may supported in the future.\n\nSo, to convert the full trade history exported by `binancecrawler` to the delta format, simply call:\n\n```\ntradingconv --format delta --file full_trade_file.csv --output delta_trades.csv\n```\n\n\n## Thanks\nIf you like this tool, donate some bugs \ud83d\udcb8 for a drink or two at the ETH-Wallet *0xbbf40ba9f8de33061ebd9eecafc0c4b2081ad14f*\nor via [PayPal](https://www.paypal.me/LarsKlitzke). Cheers \ud83c\udf7b!\n\n## License\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see .\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tradingconv", "package_url": "https://pypi.org/project/tradingconv/", "platform": "", "project_url": "https://pypi.org/project/tradingconv/", "project_urls": null, "release_url": "https://pypi.org/project/tradingconv/1.3.0/", "requires_dist": [ "requests", "xlrd", "xlwt" ], "requires_python": "", "summary": "Package with tools to generate/convert csv|xlsx files for importing transactions into Delta or tax return software.", "version": "1.3.0" }, "last_serial": 5267377, "releases": { "1.3.0": [ { "comment_text": "", "digests": { "md5": "b893335cf497db5f56c79464871309e1", "sha256": "b1688b787bacfa4b51709cfefacf107c5141e3600b2ca4e8d708c5d5db3db63c" }, "downloads": -1, "filename": "tradingconv-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b893335cf497db5f56c79464871309e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36959, "upload_time": "2019-05-14T13:23:02", "url": "https://files.pythonhosted.org/packages/a7/cf/c70686ca903e700e7c1c57678f81d54a62e191da1c5f4e51ea6a818b785f/tradingconv-1.3.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b893335cf497db5f56c79464871309e1", "sha256": "b1688b787bacfa4b51709cfefacf107c5141e3600b2ca4e8d708c5d5db3db63c" }, "downloads": -1, "filename": "tradingconv-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b893335cf497db5f56c79464871309e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36959, "upload_time": "2019-05-14T13:23:02", "url": "https://files.pythonhosted.org/packages/a7/cf/c70686ca903e700e7c1c57678f81d54a62e191da1c5f4e51ea6a818b785f/tradingconv-1.3.0-py3-none-any.whl" } ] }