{"id":16346630,"url":"https://github.com/zillionare/trader-client","last_synced_at":"2025-03-20T23:32:50.237Z","repository":{"id":47726457,"uuid":"467012190","full_name":"zillionare/trader-client","owner":"zillionare","description":"zillionare trader client","archived":false,"fork":false,"pushed_at":"2023-11-18T08:45:34.000Z","size":1595,"stargazers_count":4,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"feature/1.0","last_synced_at":"2025-03-01T00:58:24.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zillionare.github.io/trader-client/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zillionare.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-07T08:45:48.000Z","updated_at":"2023-09-17T07:13:32.000Z","dependencies_parsed_at":"2023-11-18T09:28:45.405Z","dependency_job_id":"0c6fde86-0993-472c-ac51-df998c2ec4c9","html_url":"https://github.com/zillionare/trader-client","commit_stats":{"total_commits":53,"total_committers":3,"mean_commits":"17.666666666666668","dds":"0.37735849056603776","last_synced_commit":"f414827818dc4175f6594a92e166e57599d90dd3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillionare%2Ftrader-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillionare%2Ftrader-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillionare%2Ftrader-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillionare%2Ftrader-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zillionare","download_url":"https://codeload.github.com/zillionare/trader-client/tar.gz/refs/heads/feature/1.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244092755,"owners_count":20396866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T00:35:50.372Z","updated_at":"2025-03-20T23:32:49.862Z","avatar_url":"https://github.com/zillionare.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 大富翁交易客户端\n\ntrade-client是大富翁量化框架中用来交易的客户端。它对回测和实盘提供了几乎相同的接口，从而使得经过回测的策略，可以无缝切换到实盘环境中。\n\n## 功能\n\n* 进行实盘和回测交易\n* 获取账号基本信息，比如本金、资产、持仓、盈亏及盈亏比等。\n* 交易函数，比如买入（限价和市价）、卖出（限价和市价）、撤单等\n* 查询委托、成交、持仓（当日和指定日期）\n* 查询一段时间内的账户评估指标，比如sharpe, sortino, calmar, voliality, win rate, max drawdown等。\n* 查询参照标的同期指标。\n\n!!!Warning\n    在回测模式下，注意可能引起账户数据改变的操作，比如`buy`、`sell`等，必须严格按时间顺序执行，比如下面的例子：\n    ```\n    client.buy(..., order_time=datetime.datetime(2022, 3, 1, 9, 31))\n    client.buy(..., order_time=datetime.datetime(2022, 3, 4, 14, 31))\n    client.buy(..., order_time=datetime.datetime(2022, 3, 4, 14, 32))\n    client.sell(..., order_time=datetime.datetime(2022, 3, 7, 9, 31))\n    ```\n    是正确的执行顺序，但下面的执行顺序必然产生错误的结果(实际上服务器也会进行检测并报错误)\n    ```\n    client.buy(..., order_time=datetime.datetime(2022, 3, 1, 14, 31))\n    client.buy(..., order_time=datetime.datetime(2022, 3, 1, 9, 31))\n    client.sell(..., order_time=datetime.datetime(2022, 3, 7, 9, 31))\n    ```\n    策略需要自行决定是否允许这样的情况发生，以及如果发生失，会产生什么样的后果。\n\n## Credits\n\nThis package was created with [zillionare/python project wizard](https://zillionare.github.io/python-project-wizard) project template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzillionare%2Ftrader-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzillionare%2Ftrader-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzillionare%2Ftrader-client/lists"}