{"id":51039211,"url":"https://github.com/valamidev/orderbook-synchronizer","last_synced_at":"2026-06-22T09:03:49.737Z","repository":{"id":41983592,"uuid":"199597734","full_name":"valamidev/orderbook-synchronizer","owner":"valamidev","description":"[NPM] This package allow you to keep up to date your Orderbook from a given Websocket source. ","archived":false,"fork":false,"pushed_at":"2020-05-18T06:43:33.000Z","size":48,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-20T22:35:27.715Z","etag":null,"topics":["data-store","orberbook-deth","orderbook","orderbook-websocket","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/orderbook-synchronizer","language":"TypeScript","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/valamidev.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":null,"support":null}},"created_at":"2019-07-30T07:21:13.000Z","updated_at":"2022-09-09T16:51:38.000Z","dependencies_parsed_at":"2022-08-25T20:40:45.935Z","dependency_job_id":null,"html_url":"https://github.com/valamidev/orderbook-synchronizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valamidev/orderbook-synchronizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valamidev%2Forderbook-synchronizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valamidev%2Forderbook-synchronizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valamidev%2Forderbook-synchronizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valamidev%2Forderbook-synchronizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valamidev","download_url":"https://codeload.github.com/valamidev/orderbook-synchronizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valamidev%2Forderbook-synchronizer/sbom","scorecard":{"id":914874,"data":{"date":"2025-08-11","repo":{"name":"github.com/valamidev/orderbook-synchronizer","commit":"91bc70ed9585415463deec2a1fe60754f4816e4a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"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/nodejs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/valamidev/orderbook-synchronizer/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/valamidev/orderbook-synchronizer/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand 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":"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":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 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-24T20:36:13.539Z","repository_id":41983592,"created_at":"2025-08-24T20:36:13.539Z","updated_at":"2025-08-24T20:36:13.539Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34641636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-store","orberbook-deth","orderbook","orderbook-websocket","typescript"],"created_at":"2026-06-22T09:03:47.606Z","updated_at":"2026-06-22T09:03:49.733Z","avatar_url":"https://github.com/valamidev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orderbook Synchronizer\n\n[![DeepScan grade](https://deepscan.io/api/teams/6761/projects/8876/branches/113562/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=6761\u0026pid=8876\u0026bid=113562)\n[![npm](https://img.shields.io/npm/v/orderbook-synchronizer)](https://www.npmjs.com/package/orderbook-synchronizer)\n[![npm](https://img.shields.io/npm/dy/orderbook-synchronizer)](https://www.npmjs.com/package/orderbook-synchronizer)\n[![Coverage Status](https://coveralls.io/repos/github/valamidev/orderbook-synchronizer/badge.svg)](https://coveralls.io/github/valamidev/orderbook-synchronizer)\n\nThis package allow you to keep update your Orderbook snapshot from a given Websocket source of Orders.\n\n**Features:**\n\n- Orderbook size limit available to avoid overgrow\n- Lightweight / No dependency\n- Handle Bid/Ask overlaps, best Ask always higher or equal with best Bids\n\n**Orderbook output sample(`.getOrderBook()`):**\n\n```javascript\n{\n      asks: [\n        [8000, 1.9869372781826433],\n        [8001, 0.6590219188159661],\n        [8002, 1.0430790809329253],\n        [8003, 0.1279416255016304],\n        [8004, 1.3397780002928084],\n        [8005, 1.8250517469118535],\n      ],\n      bids: [\n        [6020, 1.5764351751676466],\n        [6019, 1.9678679870588733],\n        [6018, 1.7349295266546774],\n        [6017, 1.0087743314824977],\n        [6016, 0.0942339070977258],\n      ]\n}\n```\n\n**Imports:**\n\n```javascript\nimport {OrderBookStore} from 'orderbook-synchronizer'; // Multiple OrderBooks in a single class\nimport {Orderbook} from 'orderbook-synchronizer'; // Single OrderBook\n```\n\n## Available methods(OrderBookStore):\n\n#### Constructor:\n\n```javascript\nconst OrderBooks = new OrderBookStore(1000); // Set memory limit / maximum length of Ask/Bid array\n```\n\n#### updateOrderBook:\n\n```javascript\nOrderBooks.updateOrderBook('BTC/USD', asks: Order[], bids: Order[]); // Create/Update Orderbook\n```\n\n#### hasOrderBook:\n\n```javascript\nOrderBooks.hasOrderBook('BTC/USD'); // return boolean if Orderbook exist\n```\n\n#### getOrderBook:\n\n```javascript\nOrderBooks.getOrderBook('BTC/USD'); // return Orderbook | undefined depends on Orderbook exist\n```\n\n#### getSymbolList:\n\n```javascript\nOrderBooks.getSymbolList(); // return all Orderbook keys in array ['BTC/USD']\n```\n\n## Available methods(Orderbook):\n\n#### Constructor:\n\n```javascript\nconst SingleOrderBook = new Orderbook(1000); // Set memory limit / maximum length of Ask/Bid array\n```\n\n#### getOrderBook:\n\n```javascript\nSingleOrderBook.getOrderBook(); // return Orderbook\n```\n\n#### updateOrderBook:\n\n```javascript\nSingleOrderBook.updateOrderBook(asks: Order[], bids: Order[]); // Update Orderbook\n```\n\n**Original inspiration source:**\n\n- https://gist.github.com/hitbtc-com/fc738c1b926d9d7aa7e3bd5247f792a1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalamidev%2Forderbook-synchronizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalamidev%2Forderbook-synchronizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalamidev%2Forderbook-synchronizer/lists"}