{"id":13743426,"url":"https://github.com/coinrust/crex","last_synced_at":"2026-01-12T00:29:37.214Z","repository":{"id":37630103,"uuid":"240638704","full_name":"coinrust/crex","owner":"coinrust","description":"A Golang cryptocurrency trading API \u0026 Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.","archived":false,"fork":false,"pushed_at":"2022-10-06T01:34:02.000Z","size":1913,"stargazers_count":539,"open_issues_count":0,"forks_count":156,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-08-15T08:02:04.106Z","etag":null,"topics":["backtest","binance","bitmex","bybit","crex","deribit","golang","hbdm","huobi","okex","quant","trading","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","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/coinrust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-02-15T03:28:24.000Z","updated_at":"2025-08-08T22:33:07.000Z","dependencies_parsed_at":"2022-08-08T21:01:38.033Z","dependency_job_id":null,"html_url":"https://github.com/coinrust/crex","commit_stats":null,"previous_names":["coinrust/gotrader"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/coinrust/crex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Fcrex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Fcrex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Fcrex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Fcrex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinrust","download_url":"https://codeload.github.com/coinrust/crex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Fcrex/sbom","scorecard":{"id":299001,"data":{"date":"2025-08-11","repo":{"name":"github.com/coinrust/crex","commit":"86b18a470806b6fc9ab06b4e5cb53e1634654518"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"checks":[{"name":"Code-Review","score":5,"reason":"Found 3/6 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/coinrust/crex/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/coinrust/crex/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/coinrust/crex/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/coinrust/crex/codeql-analysis.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T20:12:59.943Z","repository_id":37630103,"created_at":"2025-08-17T20:12:59.943Z","updated_at":"2025-08-17T20:12:59.943Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28329785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:13:06.322Z","status":"ssl_error","status_checked_at":"2026-01-12T00:04:50.725Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["backtest","binance","bitmex","bybit","crex","deribit","golang","hbdm","huobi","okex","quant","trading","websocket"],"created_at":"2024-08-03T05:00:46.614Z","updated_at":"2026-01-12T00:29:37.176Z","avatar_url":"https://github.com/coinrust.png","language":"Go","funding_links":[],"categories":["Golang"],"sub_categories":["Trading \u0026 Backtesting"],"readme":"\u003cdiv align=center\u003e\u003cimg src=\"https://raw.githubusercontent.com/coinrust/crex/master/images/logo.png\" /\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/golang/go\"\u003e\n    \u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/coinrust/crex\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/coinrust/crex/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/mashape/apistatus.svg\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.travis-ci.com/coinrust/crex\"\u003e\n    \u003cimg src=\"https://www.travis-ci.com/coinrust/crex.svg?branch=master\" alt=\"build status\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# CREX\n\n[中文](README.md) | [English](README_en.md)\n\n**CREX** 是一个用Golang语言开发的量化交易库。支持`tick`级别数字币期货平台的回测和实盘。实盘与回测无缝切换，无需更改代码。\n\n## 回测\n示例 [@backtest](https://github.com/coinrust/crex/blob/master/examples/backtest/main.go)\n\n### 交易结果\n\u003cdiv align=center\u003e\u003cimg src=\"https://raw.githubusercontent.com/coinrust/crex/master/images/trade_result.png\" /\u003e\u003c/div\u003e\n\u003cdiv align=center\u003e\u003cimg src=\"https://raw.githubusercontent.com/coinrust/crex/master/images/trade_history_report.png\" /\u003e\u003c/div\u003e\n\n## 开源策略\n[https://github.com/coinrust/trading-strategies](https://github.com/coinrust/trading-strategies)\n\n## 主要特性\n* 使用简单\n* Tick级别回测\n* 实盘、回测公用策略代码\n* 支持 WebSocket 共有和私有订阅\n* 支持期货、现货回测\n* 支持期货双向合约，正反向合约\n\n## 支持交易所\nCREX库当前支持以下8个加密货币交易市场和交易API\n\n| logo                                                                                                                                             | id             | name                                                                      | ver | ws  | doc                                                               |\n| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ------------------------------------------------------------------------- | --- | --- | ----------------------------------------------------------------- |\n| [![binance](https://raw.githubusercontent.com/coinrust/crex/master/images/binance.jpg)](https://www.binance.com/cn/register?ref=10916733)        | binancefutures | [Binance Futures](https://www.binance.com/cn/register?ref=10916733)       | 1   | N   | [API](https://binance-docs.github.io/apidocs/futures/cn/)         |\n| [![bitmex](https://raw.githubusercontent.com/coinrust/crex/master/images/bitmex.jpg)](https://www.bitmex.com/register/o0Duru)                    | bitmex         | [BitMEX](https://www.bitmex.com/register/o0Duru)                          | 1   | Y   | [API](https://www.bitmex.com/app/apiOverview)                     |\n| [![deribit](https://raw.githubusercontent.com/coinrust/crex/master/images/deribit.jpg)](https://www.deribit.com/reg-7357.93)                     | deribit        | [Deribit](https://www.deribit.com/reg-7357.93)                            | 2   | Y   | [API](https://docs.deribit.com/)                                  |\n| [![bybit](https://raw.githubusercontent.com/coinrust/crex/master/images/bybit.jpg)](https://www.bybit.com/app/register?ref=qQggy)                | bybit          | [Bybit](https://www.bybit.com/app/register?ref=qQggy)                     | 2   | Y   | [API](https://bybit-exchange.github.io/docs/inverse/)             |\n| [![huobi](https://raw.githubusercontent.com/coinrust/crex/master/images/huobi.jpg)](https://www.huobi.io/zh-cn/topic/invited/?invite_code=7hzc5) | hbdm           | [Huobi DM](https://www.huobi.io/zh-cn/topic/invited/?invite_code=7hzc5)   | 1   | Y   | [API](https://docs.huobigroup.com/docs/dm/v1/cn/)                 |\n| [![huobi](https://raw.githubusercontent.com/coinrust/crex/master/images/huobi.jpg)](https://www.huobi.io/zh-cn/topic/invited/?invite_code=7hzc5) | hbdmswap       | [Huobi Swap](https://www.huobi.io/zh-cn/topic/invited/?invite_code=7hzc5) | 1   | Y   | [API](https://docs.huobigroup.com/docs/coin_margined_swap/v1/cn/) |\n| [![okex](https://raw.githubusercontent.com/coinrust/crex/master/images/okex.jpg)](https://www.okex.com/join/1890951)                             | okexfutures    | [OKEX Futures](https://www.okex.com/join/1890951)                         | 3   | Y   | [API](https://www.okex.me/docs/zh/#futures-README)                |\n| [![okex](https://raw.githubusercontent.com/coinrust/crex/master/images/okex.jpg)](https://www.okex.com/join/1890951)                             | okexswap       | [OKEX Swap](https://www.okex.com/join/1890951)                            | 3   | Y   | [API](https://www.okex.me/docs/zh/#swap-README)                   |\n\n## 示例\n```golang\npackage main\n\nimport (\n\t. \"github.com/coinrust/crex\"\n\t\"github.com/coinrust/crex/exchanges\"\n\t\"log\"\n\t\"time\"\n)\n\ntype BasicStrategy struct {\n\tStrategyBase\n}\n\nfunc (s *BasicStrategy) OnInit() error {\n\treturn nil\n}\n\nfunc (s *BasicStrategy) OnTick() error {\n\tcurrency := \"BTC\"\n\tsymbol := \"BTC-PERPETUAL\"\n\n\tbalance, err := s.Exchange.GetBalance(currency)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"balance: %#v\", balance)\n\n\ts.Exchange.GetOrderBook(symbol, 10)\n\n\ts.Exchange.OpenLong(symbol, OrderTypeLimit, 5000, 10)\n\ts.Exchange.CloseLong(symbol, OrderTypeLimit, 6000, 10)\n\n\t//Trailing Stop Market Order - Binance - sell stop loss order for long position\n\tcallbackRate := 5.0 // from 0.1% until 5% allowed\n\ts.Exchange.PlaceOrder(symbol, Sell, OrderTypeTrailingStopMarket, 0.0, 10,\n\t\tOrderCallbackRateOption(callbackRate), \n\t\tOrderActivationPriceOption(5000.0), // optional - default as the latest price\n\t\tOrderReduceOnlyOption(true),\n\t)\n\n\ts.Exchange.PlaceOrder(symbol,\n\t\tBuy, OrderTypeLimit, 1000.0, 10, OrderPostOnlyOption(true))\n\n\ts.Exchange.GetOpenOrders(symbol)\n\ts.Exchange.GetPositions(symbol)\n\treturn nil\n}\n\nfunc (s *BasicStrategy) Run() error {\n\t// run loop\n\tfor {\n\t\ts.OnTick()\n\t\ttime.Sleep(1 * time.Second)\n\t}\n\treturn nil\n}\n\nfunc (s *BasicStrategy) OnExit() error {\n\treturn nil\n}\n\nfunc main() {\n\texchange := exchanges.NewExchange(exchanges.Deribit,\n\t\tApiProxyURLOption(\"socks5://127.0.0.1:1080\"), // 使用代理\n\t\t//ApiAccessKeyOption(\"[accessKey]\"),\n\t\t//ApiSecretKeyOption(\"[secretKey]\"),\n\t\tApiTestnetOption(true))\n\n\ts := \u0026BasicStrategy{}\n\n\ts.Setup(TradeModeLiveTrading, exchange)\n\n\ts.OnInit()\n\ts.Run()\n\ts.OnExit()\n}\n```\n\n## WebSocket 示例\n```golang\npackage main\n\nimport (\n\t. \"github.com/coinrust/crex\"\n\t\"github.com/coinrust/crex/exchanges\"\n\t\"log\"\n)\n\nfunc main() {\n\tws := exchanges.NewExchange(exchanges.OkexFutures,\n\t\tApiProxyURLOption(\"socks5://127.0.0.1:1080\"), // 使用代理\n\t\t//ApiAccessKeyOption(\"[accessKey]\"),\n\t\t//ApiSecretKeyOption(\"[secretKey]\"),\n\t\t//ApiPassPhraseOption(\"[passphrase]\"),\n\t\tApiWebSocketOption(true)) // 开启 WebSocket\n\n\tmarket := Market{\n\t\tSymbol: \"BTC-USD-200626\",\n\t}\n\t// 订阅订单薄\n\tws.SubscribeLevel2Snapshots(market, func(ob *OrderBook) {\n\t\tlog.Printf(\"%#v\", ob)\n\t})\n\t// 订阅成交记录\n\tws.SubscribeTrades(market, func(trades []*Trade) {\n\t\tlog.Printf(\"%#v\", trades)\n\t})\n\t// 订阅订单成交信息\n\tws.SubscribeOrders(market, func(orders []*Order) {\n\t\tlog.Printf(\"%#v\", orders)\n\t})\n\t// 订阅持仓信息\n\tws.SubscribePositions(market, func(positions []*Position) {\n\t\tlog.Printf(\"%#v\", positions)\n\t})\n\n\tselect {}\n}\n```\n\n## 回测数据\n### 1. 标准 CSV 数据格式\n* 列定界符: , (逗号)\n* 换行标记: \\n (LF)\n* 日期时间格式: Unix 时间戳 (ms)\n\n### 时间格式\n| 列名              | 描述                             |\n| ---------------- |--------------------------------- |\n| t                | Unix 时间戳 (ms)                  |\n| asks[0-X].price  | 卖单价(升序)                      |\n| asks[0-X].amount | 卖单量                            |\n| bids[0-X].price  | 买单价(降序)                      |\n| bids[0-X].amount | 买单量                            |\n\n### 样本数据示例\n```csv\nt,asks[0].price,asks[0].amount,asks[1].price,asks[1].amount,asks[2].price,asks[2].amount,asks[3].price,asks[3].amount,asks[4].price,asks[4].amount,asks[5].price,asks[5].amount,asks[6].price,asks[6].amount,asks[7].price,asks[7].amount,asks[8].price,asks[8].amount,asks[9].price,asks[9].amount,bids[0].price,bids[0].amount,bids[1].price,bids[1].amount,bids[2].price,bids[2].amount,bids[3].price,bids[3].amount,bids[4].price,bids[4].amount,bids[5].price,bids[5].amount,bids[6].price,bids[6].amount,bids[7].price,bids[7].amount,bids[8].price,bids[8].amount,bids[9].price,bids[9].amount\n1569888000143,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,200,8307.5,1650,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,90,8300,71320,8299.5,310\n1569888000285,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,200,8307.5,1650,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000307,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,200,8307.5,11010,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000309,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,200,8307.5,20370,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000406,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,8960,8307.5,11010,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000500,8304.5,7010,8305,60,8305.5,1220,8306,80,8307,200,8307.5,20370,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000522,8304.5,10270,8305,60,8305.5,1220,8306,80,8307,200,8307.5,20370,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185750,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n1569888000527,8304.5,10270,8305,60,8305.5,1220,8306,80,8307,200,8307.5,20370,8308,68260,8308.5,120000,8309,38400,8309.5,8400,8304,185010,8303.5,52200,8303,20600,8302.5,4500,8302,2000,8301.5,18200,8301,18000,8300.5,5090,8300,71320,8299.5,310\n```\n\n### 2. MongoDB (推荐)\n* Database. for example: tick_db\n* Collection. for example: deribit:BTC-PERPETUAL\n* Document:\nt: timestamp (ms)\na: asks Array [[ask_price_0,ask_amount_0],[ask_price_1,ask_amount_1],...]\nb: bids Array [[bid_price_0,ask_amount_0],[bid_price_1,bid_amount_1],...]\n```json\n{\"_id\":{\"$oid\":\"5eb946d88316c7a9c541705c\"},\"t\":{\"$numberLong\":\"1569888000143\"},\"a\":[[8304.5,7010],[8305,60],[8305.5,1220],[8306,80],[8307,200],[8307.5,1650],[8308,68260],[8308.5,120000],[8309,38400],[8309.5,8400]],\"b\":[[8304,185750],[8303.5,52200],[8303,20600],[8302.5,4500],[8302,2000],[8301.5,18200],[8301,18000],[8300.5,90],[8300,71320],[8299.5,310]]}\n```\n\n### 数据处理示例\nExample of importing data into a database:\n```shell script\ncd ./cmd/deribit-data-to-db\ngo build\n./deribit-data-to-db\n```\n\n## TODO\n* Paper trading.\n\n## QQ群\nQQ群: [932289088](https://jq.qq.com/?_wv=1027\u0026k=5rg0FEK)\n\n## 捐赠\n| METHOD  | ADDRESS                                     |\n|-------- |-------------------------------------------- |\n| BTC     | 1Nk4AsGj5HEJ5csRenTUPab1sjUySCZ3Pq          |\n| ETH     | 0xa74eade7ea08a8c48d7de4d582fac145afc86e3d  |\n\n## LICENSE\nMIT [©coinrust](https://github.com/coinrust)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinrust%2Fcrex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinrust%2Fcrex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinrust%2Fcrex/lists"}