{"id":32293800,"url":"https://github.com/pimpmypizza/bybit-dart","last_synced_at":"2026-02-20T23:01:13.642Z","repository":{"id":40547783,"uuid":"325596678","full_name":"PimpMyPizza/bybit-dart","owner":"PimpMyPizza","description":"(Unofficial) Dart library to communicate with the bybit API","archived":false,"fork":false,"pushed_at":"2022-05-03T08:57:55.000Z","size":163,"stargazers_count":8,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T03:42:53.360Z","etag":null,"topics":["bybit","dart"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/bybit","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PimpMyPizza.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-30T16:25:28.000Z","updated_at":"2025-09-24T07:54:38.000Z","dependencies_parsed_at":"2022-08-09T22:50:42.241Z","dependency_job_id":null,"html_url":"https://github.com/PimpMyPizza/bybit-dart","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/PimpMyPizza/bybit-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PimpMyPizza%2Fbybit-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PimpMyPizza%2Fbybit-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PimpMyPizza%2Fbybit-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PimpMyPizza%2Fbybit-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PimpMyPizza","download_url":"https://codeload.github.com/PimpMyPizza/bybit-dart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PimpMyPizza%2Fbybit-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"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":["bybit","dart"],"created_at":"2025-10-23T03:36:26.233Z","updated_at":"2026-02-20T23:01:13.633Z","avatar_url":"https://github.com/PimpMyPizza.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pub package][pub]][pub-link]\n[![BSD License][license-badge]][license-link]\n[![PRs Welcome][prs-badge]][prs-link]\n[![Last changes][github-changes-badge]][github-changes-link]\n[![CI][CI-badge]][CI-link]\n\n\n[pub]: https://img.shields.io/pub/v/bybit.svg?style=for-the-badge\u0026logo=dart\n[pub-link]: https://pub.dev/packages/bybit\n[license-badge]: https://img.shields.io/github/license/PimpMyPizza/bybit-dart.svg?style=for-the-badge\n[license-link]: https://github.com/PimpMyPizza/bybit-dart/blob/main/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge\n[prs-link]: https://github.com/PimpMyPizza/bybit-dart/issues\n[github-changes-badge]: https://img.shields.io/github/last-commit/PimpMyPizza/bybit-dart?style=for-the-badge\u0026logo=git\u0026logoColor=white\n[github-changes-link]: https://github.com/PimpMyPizza/bybit-dart/commits/master\n[CI-badge]: https://img.shields.io/github/workflow/status/PimpMyPizza/bybit-dart/Dart?logo=github-actions\u0026style=for-the-badge\n[CI-link]: https://github.com/PimpMyPizza/bybit-dart/actions\n\n\n# ByBit\n\nByBit is a [Dart](https://dart.dev/) library for an easy communication with the [bybit](https://www.bybit.com/) exchange platform [API](https://bybit-exchange.github.io/docs/inverse/#t-introduction). This package allows to make simple REST API calls or to subscribe to several WebSockets channels topics.\n\n## How to use it\n\n### Create a ByBit instance\n\nNote that all the parameters are optional, but you need a valid key and password to access private topics from bybit. You can create your own api-key [on the bybit website](https://www.bybit.com/app/user/api-management).\n\n``` Dart\nvar bybit = ByBit(\n    key: 'yOuRsUpErKey',\n    password: 'yOuRsUpErPaSsWoRd',\n    logLevel: 'INFO',\n    restUrl: 'https://api.bybit.com',\n    websocketUrl: 'wss://stream.bytick.com/realtime',\n    timeout: 60);\n```\n\nNote also that the timeout is given in seconds. If no timeout is given as parameter, no exception will be thrown on timeout.\n\n### Connect to the servers\n\n``` Dart\nbybit.connect();\n```\n\n### Add periodic REST API call if you want to\n\nSometimes, you want to get information from the API every x period of time. That's why this library allows one to set which REST API call has to be done periodically, and all the responses from the server are merged into one single stream. Please note [the limit of API calls](https://bybit-exchange.github.io/docs/inverse/#t-ratelimits).\n\n```Dart\nbybit.getServerTimePeriodic(period: Duration(seconds: 5));\nbybit.getAnnouncementPeriodic(period: Duration(seconds: 5));\nbybit.getOpenInterestPeriodic(\n    symbol: 'ETHUSD',\n    interval: '15min',\n    period: Duration(seconds: 2),\n    limit: 3);\n```\n\n\n### Subscribe to WebSocket topics\n\n``` Dart\n// ...\nbybit.subscribeToKlines(symbol: 'ETHUSD', interval: '1');\nbybit.subscribeToKlines(symbol: 'BTCUSD', interval: 'D');\nbybit.subscribeToOrderBook(depth: 25);\n```\n\n### Read the ByBit stream and handle the server response\n\nNote that the `bybit.stream` streams all the data from the WebSockets and periodic REST API calls.\n\n```Dart\nStreamBuilder(\n    stream: bybit.stream,\n    builder: (context, bybitResponse) {\n        print('From WebSocket: ' + bybitResponse.data.toString());\n        //...\n    }\n),\n//...\n```\n\n### You can also make single REST API calls\n\n``` Dart\n// ...\nFutureBuilder(\n    future: bybit.getKLine(symbol: 'BTCUSD', from: 1581231260, interval: 'D'),\n    builder: (context, bybitResponse) {\n        // Handle the bybit response here\n        if (bybitResponse.hasData \u0026\u0026 bybitResponse.data != null) {\n          print('From REST: ' + bybitResponse.data.toString());\n          //...\n```\n\n## Example\n\nSee [the file main.dart](https://github.com/PimpMyPizza/bybit-dart/blob/main/example/lib/main.dart) in the `example/lib/` directory for a simple Dart example. Also, the files [main_flutter_stream.dart](https://github.com/PimpMyPizza/bybit-dart/blob/main/example/lib/main_flutter_stream.dart) and [main_flutter_future.dart](https://github.com/PimpMyPizza/bybit-dart/blob/main/example/lib/main_flutter_future.dart) show examples using `FutureBuilder` and `StreamBuilder`.\n\n## List of functions\n\nSee [the documentation](https://pub.dev/documentation/bybit/latest/bybit/ByBit-class.html) for the latest avaiable functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimpmypizza%2Fbybit-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpimpmypizza%2Fbybit-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpimpmypizza%2Fbybit-dart/lists"}