{"id":38767580,"url":"https://github.com/h9896/bingo","last_synced_at":"2026-01-17T12:01:35.774Z","repository":{"id":39908233,"uuid":"492397976","full_name":"h9896/bingo","owner":"h9896","description":"A Golang API for binance","archived":false,"fork":false,"pushed_at":"2022-05-22T04:32:46.000Z","size":163,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T03:17:26.708Z","etag":null,"topics":["api","binance","cryptocurrency","go","golang"],"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/h9896.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://github.com/h9896/bingo/blob/main/wallet/wallet.png"}},"created_at":"2022-05-15T05:41:40.000Z","updated_at":"2022-09-07T01:55:42.000Z","dependencies_parsed_at":"2022-09-02T02:10:46.658Z","dependency_job_id":null,"html_url":"https://github.com/h9896/bingo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/h9896/bingo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h9896%2Fbingo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h9896%2Fbingo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h9896%2Fbingo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h9896%2Fbingo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h9896","download_url":"https://codeload.github.com/h9896/bingo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h9896%2Fbingo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"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":["api","binance","cryptocurrency","go","golang"],"created_at":"2026-01-17T12:01:35.440Z","updated_at":"2026-01-17T12:01:35.679Z","avatar_url":"https://github.com/h9896.png","language":"Go","funding_links":["https://github.com/h9896/bingo/blob/main/wallet/wallet.png"],"categories":[],"sub_categories":[],"readme":"# bingo\n\n[![GoDoc](https://godoc.org/github.com/h9896/bingo?status.svg)](https://godoc.org/github.com/h9896/bingo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/h9896/bingo)](https://goreportcard.com/report/github.com/h9896/bingo)\n[![codecov](https://codecov.io/gh/h9896/bingo/branch/main/graph/badge.svg)](https://codecov.io/gh/h9896/bingo)\n\n---\n\nA Golang API for [binance](https://www.binance.com) base on [Doc](https://binance-docs.github.io/apidocs/delivery/en/#change-log).\n\n|       Name        |                        Description                         |       Status       |\n| :---------------: | :--------------------------------------------------------: | :----------------: |\n|   General HTTP    |                   A General HTTP Client                    |        Done        |\n| General Websocket |                 A General Websocket Client                 |        Done        |\n|  Coin-M Futures   | Perpetual or Quarterly Contracts settled in Cryptocurrency | Partical Implement |\n|   USD-M Futures   |  Perpetual or Quarterly Contracts settled in USDT or BUSD  |        ToDo        |\n|    Spot/Margin    |                                                            |        ToDo        |\n\nThe related repository [bingo-pkg-protobuf](https://github.com/h9896/bingo-pkg-protobuf)\n\n## Example\n\n### Websocket\n\nCreate a client and implement the WsClient\n\n```go\ntype coin struct {\n}\n\nfunc NewCoinMFutures() ws.WsClient {\n\treturn \u0026coin{}\n}\n\nfunc (c *coin) GetEndpoint(cfg ws.WsConfig) string {\n\tif cfg.UseSSL {\n\t\treturn fmt.Sprintf(\"%s/%s\", fmt.Sprintf(ws.Ws_format, \"wss\", ws.Ws_coin_futures), cfg.Name)\n\t}\n\treturn fmt.Sprintf(\"%s/%s\", fmt.Sprintf(ws.Ws_format, \"ws\", ws.Ws_coin_futures), cfg.Name)\n}\n\nfunc (c *coin) GetServices(cfg ws.WsConfig) []string {\n\tservices := []string{}\n\tfor _, symbol := range cfg.Symbols {\n\t\tservices = append(services, fmt.Sprintf(\"%s@%s\", symbol, cfg.Service))\n\t}\n\treturn services\n}\n\nfunc (c *coin) ErrHandler(err error) {\n\t// Process websocket error what you like\n}\n\nfunc (c *coin) MsgHandler(msg []byte) {\n\t// Handle message from what service you subscribe\n}\n```\n\nUse StartSubscribe function to get message.\n\n```go\n\tcfg := ws.WsConfig{\n\t\tUseSSL:  true,\n\t\tName:    \"CoinM\",\n\t\tSymbols: []string{\"btcusd_perp\"},\n\t\tService: \"aggTrade\",\n\t}\n\n\tclient := NewCoinMFutures()\n\n\tcleanup, err := ws.StartSubscribe(client, cfg)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\tcleanup()\n\t}\n\ttime.Sleep(time.Minute)\n\t// End subscription and clean up related connections\n\tcleanup()\n```\n\n### Http\n\nCreate a http client\n\n```go\nclient := rpc.NewHttpClient(apikey, true, nil)\n```\n\nGeneral Request\n\n```go\nreq := client.GetHttpRequest(\n\trpc.SetEndpoint(\"dapi.binance.com/dapi/v1/depth\"),\n\trpc.SetMethod(\"get\"),\n\trpc.SetParams(\u0026rpc.HttpParameter{Key: \"symbol\", Val: \"BTCUSD_PERP\"},\n\t\t\u0026rpc.HttpParameter{Key: \"limit\", Val: \"5\"}),\n)\n\nresp, err := client1.ExecuteHttpOperation(ctx, req)\n```\n\nPrivate Request\n\n```go\nreq := client.GetHttpRequest(\n\trpc.SetEndpoint(\"dapi.binance.com/dapi/v1/account\"),\n\trpc.SetMethod(\"get\"),\n\trpc.SetPrivate(),\n\trpc.SetTimestamp(),\n\trpc.SetSignature(secret),\n\t)\n\nresp, err := client.ExecuteHttpOperation(ctx, req)\n```\n\nPrivate Request by POST\n\n```go\nbody := []*rpc.HttpParameter{\n\t{Key: \"symbol\", Val: \"BTCUSD_PERP\"},\n\t{Key: \"side\", Val: \"BUY\"},\n\t{Key: \"recvWindow\", Val: \"600000\"},\n\t{Key: \"type\", Val: \"LIMIT\"},\n\t{Key: \"timeInForce\", Val: \"GTC\"},\n\t{Key: \"quantity\", Val: \"0.0035\"},\n\t{Key: \"price\", Val: \"28000.1\"}}\n\nreq := client.GetHttpRequest(rpc.SetEndpoint(\"dapi.binance.com/dapi/v1/order\"),\n\trpc.SetPrivate(),\n\trpc.SetMethod(\"post\"),\n\trpc.SetParams(body...),\n\trpc.SetTimestamp(),\n\trpc.SetSignature(secret))\n\nresp, err := client.ExecuteHttpOperation(ctx, req)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh9896%2Fbingo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh9896%2Fbingo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh9896%2Fbingo/lists"}