{"action":"created","issue":{"url":"https://api.github.com/repos/vnpy/vnpy/issues/1255","repository_url":"https://api.github.com/repos/vnpy/vnpy","labels_url":"https://api.github.com/repos/vnpy/vnpy/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/vnpy/vnpy/issues/1255/comments","events_url":"https://api.github.com/repos/vnpy/vnpy/issues/1255/events","html_url":"https://github.com/vnpy/vnpy/issues/1255","id":382634336,"node_id":"MDU6SXNzdWUzODI2MzQzMzY=","number":1255,"title":"bitmex的balance计算有误","user":{"login":"eachout","id":9478695,"node_id":"MDQ6VXNlcjk0Nzg2OTU=","avatar_url":"https://avatars2.githubusercontent.com/u/9478695?v=4","gravatar_id":"","url":"https://api.github.com/users/eachout","html_url":"https://github.com/eachout","followers_url":"https://api.github.com/users/eachout/followers","following_url":"https://api.github.com/users/eachout/following{/other_user}","gists_url":"https://api.github.com/users/eachout/gists{/gist_id}","starred_url":"https://api.github.com/users/eachout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eachout/subscriptions","organizations_url":"https://api.github.com/users/eachout/orgs","repos_url":"https://api.github.com/users/eachout/repos","events_url":"https://api.github.com/users/eachout/events{/privacy}","received_events_url":"https://api.github.com/users/eachout/received_events","type":"User","site_admin":false},"labels":[{"id":182220023,"node_id":"MDU6TGFiZWwxODIyMjAwMjM=","url":"https://api.github.com/repos/vnpy/vnpy/labels/invalid","name":"invalid","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-20T12:08:21Z","updated_at":"2018-12-02T05:39:58Z","closed_at":"2018-12-02T05:39:58Z","author_association":"NONE","body":"## 环境\r\n\r\n* 操作系统: 如Windows 7或者Ubuntu 16.04\r\n* Anaconda版本: 如Anaconda 4.0.0 Python 2.7 32位\r\n* vn.py版本: 如v1.7发行版或者dev branch 20170920（下载日期）\r\n\r\n## Issue类型\r\nBug\r\nbitmex返回的availableMargin以及marginBalance不对\r\n参考CCXT代码如下：\r\n\r\n            account = {\r\n                'free': balance['availableMargin'],\r\n                'used': 0.0,\r\n                'total': balance['marginBalance'],\r\n            }\r\n            if currency == 'BTC':\r\n                account['free'] = account['free'] * 0.00000001\r\n                account['total'] = account['total'] * 0.00000001\r\n            account['used'] = account['total'] - account['free']\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vnpy/vnpy/issues/comments/443483354","html_url":"https://github.com/vnpy/vnpy/issues/1255#issuecomment-443483354","issue_url":"https://api.github.com/repos/vnpy/vnpy/issues/1255","id":443483354,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQ4MzM1NA==","user":{"login":"vnpy","id":11263900,"node_id":"MDQ6VXNlcjExMjYzOTAw","avatar_url":"https://avatars0.githubusercontent.com/u/11263900?v=4","gravatar_id":"","url":"https://api.github.com/users/vnpy","html_url":"https://github.com/vnpy","followers_url":"https://api.github.com/users/vnpy/followers","following_url":"https://api.github.com/users/vnpy/following{/other_user}","gists_url":"https://api.github.com/users/vnpy/gists{/gist_id}","starred_url":"https://api.github.com/users/vnpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vnpy/subscriptions","organizations_url":"https://api.github.com/users/vnpy/orgs","repos_url":"https://api.github.com/users/vnpy/repos","events_url":"https://api.github.com/users/vnpy/events{/privacy}","received_events_url":"https://api.github.com/users/vnpy/received_events","type":"User","site_admin":false},"created_at":"2018-12-02T05:39:58Z","updated_at":"2018-12-02T05:39:58Z","author_association":"OWNER","body":"CCXT接口使用的货币代码是BTC，因此需要对BitMEX返回的原始XBT数据做除法处理。\r\n\r\nvn.py这边是直接使用的XBT，因此无需做转换。"}}
{"actor":{"display_login":"vnpy"}}