{"id":41444660,"url":"https://github.com/khaliullov/coinbasevwap","last_synced_at":"2026-01-23T15:02:14.579Z","repository":{"id":57648636,"uuid":"442230734","full_name":"khaliullov/coinbasevwap","owner":"khaliullov","description":"Calculate VWAP for 200 last transactions of trading pairs","archived":false,"fork":false,"pushed_at":"2022-01-18T14:27:18.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T03:32:01.276Z","etag":null,"topics":["btc","clean-architecture","coinbase","golang","vwap","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khaliullov.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":"2021-12-27T17:42:42.000Z","updated_at":"2022-05-11T10:26:27.000Z","dependencies_parsed_at":"2022-09-15T13:20:12.920Z","dependency_job_id":null,"html_url":"https://github.com/khaliullov/coinbasevwap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khaliullov/coinbasevwap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaliullov%2Fcoinbasevwap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaliullov%2Fcoinbasevwap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaliullov%2Fcoinbasevwap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaliullov%2Fcoinbasevwap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khaliullov","download_url":"https://codeload.github.com/khaliullov/coinbasevwap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaliullov%2Fcoinbasevwap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","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":["btc","clean-architecture","coinbase","golang","vwap","websocket"],"created_at":"2026-01-23T15:02:13.580Z","updated_at":"2026-01-23T15:02:14.487Z","avatar_url":"https://github.com/khaliullov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coinbase rate VWAP\n\n[![Build Status](https://github.com/khaliullov/coinbasevwap/actions/workflows/test.yml/badge.svg)](https://github.com/khaliullov/coinbasevwap/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/khaliullov/coinbasevwap/badge.svg?branch=master)](https://coveralls.io/github/khaliullov/coinbasevwap?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/khaliullov/coinbasevwap)](https://goreportcard.com/report/github.com/khaliullov/coinbasevwap)\n\nApplication that calculates VWAP in a real-time using Coinbase websocket\nsteaming protocol of cryptocurrency transactions updates.\nCalculated values of VWAP are streamed to os.Stdout for each trading pair.\nBy default, application subscribes for BTC-USD, ETH-USD and ETH-BTC\ntrading pairs.\n\n## Synopsis\n\n    $ go run main.go -help\n    INFO[0000] Coinbase rate VWAP.\n      -capacity int\n            Capacity for storing data for VWAP calculation (default 200)\n      -channel string\n            Channel to subscribe to (default \"matches\")\n      -feed-url string\n            Coinbase feed URL (default \"wss://ws-feed.exchange.coinbase.com\")\n      -help\n            Show help\n      -log-level string\n            Logging level (default \"error\")\n      -products string\n            Products to subscribe to (default \"BTC-USD,ETH-USD,ETH-BTC\")\n\n## VWAP\n\nIn finance, **volume-weighted average price (VWAP)** is the ratio of the\nvalue of a security or financial asset traded to the total volume of\ntransactions during a trading session.\n\n![formula](docs/VWAP.png)\n\nIn this application the VWAP is calculated per trading pair using\na sliding window of last 200 data points (Could be configured).\n\n## Architecture\n\nApplication uses clean architecture. Some of open-source projects was used\nto build application. Websocket client is a state machine which subscribes\nand unsubscribes from feeds with trading pair transaction updates.\nConsumer is subscribed for such updates from Websocket client and supplies\ndata to use-case which calculates the VWAP of offered trading pair and\nstores it in a repository. Storage is like a cyclic buffer and stores last\n200 data points.\n\n## Developer instructions\n\n### Building\n\nTo build application run:\n\n    make\n\nor\n\n    make BINARY_NAME=vwap build\n\n### Testing\n\nTo start unit-tests:\n\n    make test\n\n### Run\n\nTo start application with default arguments:\n\n    make run\n\n### Run with verbose logging\n\nTo start application with error level set to Debug:\n\n    make debug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaliullov%2Fcoinbasevwap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhaliullov%2Fcoinbasevwap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaliullov%2Fcoinbasevwap/lists"}