{"id":22134217,"url":"https://github.com/ivoputzer/coinbase-pro-feed","last_synced_at":"2025-08-12T13:39:23.031Z","repository":{"id":57202941,"uuid":"161179555","full_name":"ivoputzer/coinbase-pro-feed","owner":"ivoputzer","description":" Lightweight Coinbase Pro Websocket Feed implementation wirtten in es6+","archived":false,"fork":false,"pushed_at":"2020-03-12T18:00:41.000Z","size":14,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T16:39:45.304Z","etag":null,"topics":["coinbase","coinbase-pro","coinbase-pro-feed","websocket","ws"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/coinbase-pro-feed","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivoputzer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-10T13:30:19.000Z","updated_at":"2019-07-15T17:17:54.000Z","dependencies_parsed_at":"2022-09-17T04:10:31.550Z","dependency_job_id":null,"html_url":"https://github.com/ivoputzer/coinbase-pro-feed","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ivoputzer/coinbase-pro-feed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcoinbase-pro-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcoinbase-pro-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcoinbase-pro-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcoinbase-pro-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivoputzer","download_url":"https://codeload.github.com/ivoputzer/coinbase-pro-feed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcoinbase-pro-feed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270070396,"owners_count":24522055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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":["coinbase","coinbase-pro","coinbase-pro-feed","websocket","ws"],"created_at":"2024-12-01T19:10:07.077Z","updated_at":"2025-08-12T13:39:22.980Z","avatar_url":"https://github.com/ivoputzer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"coinbase-pro-feed\n===\nLightweight [Coinbase Pro Websocket Feed](https://docs.pro.coinbase.com/#websocket-feed) implementation.\n\n[![travis](https://img.shields.io/travis/ivoputzer/coinbase-pro-feed.svg?style=for-the-badge)](https://travis-ci.org/ivoputzer/coinbase-pro-feed)\n[![dependencies](https://img.shields.io/badge/dependencies-2-blue.svg?style=for-the-badge\u0026colorB=44CC11)](https://www.npmjs.com/package/coinbase-pro-feed?activeTab=dependencies)\n[![coverage status](https://img.shields.io/coveralls/ivoputzer/coinbase-pro-feed.svg?style=for-the-badge)](https://coveralls.io/github/ivoputzer/coinbase-pro-feed?branch=master)\n[![linter](https://img.shields.io/badge/coding%20style-standard-brightgreen.svg?style=for-the-badge)](http://standardjs.com/)\n\n[![node](https://img.shields.io/badge/node-6%2B-blue.svg?style=for-the-badge)](https://nodejs.org/docs/v6.0.0/api)\n[![version](https://img.shields.io/npm/v/coinbase-pro-feed.svg?style=for-the-badge\u0026colorB=007EC6)](https://www.npmjs.com/package/coinbase-pro-feed)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge\u0026colorB=007EC6)](https://spdx.org/licenses/MIT)\n[![minzip](https://img.shields.io/bundlephobia/minzip/coinbase-pro-feed.svg?style=for-the-badge)](https://bundlephobia.com/scan-results?packages=coinbase-pro-feed)\n[![downloads](https://img.shields.io/npm/dt/coinbase-pro-feed.svg?style=for-the-badge\u0026colorB=007EC6)](https://www.npmjs.com/package/coinbase-pro-feed)\n\n## Install\n```js\nnpm install -s coinbase-pro-feed\n```\n\n## .feedFor(product_ids[, options[, env]])\nThe feed wraps websocket client using `stream.Readable`:\n\n```js\nconst { feedFor } = require('coinbase-pro-feed')\n\nfeedFor(['btc-eur'], { objectMode: false }) // when false\n  .pipe(process.stdout)                     // data event invokes raw buffer\n\nfeedFor(['btc-eur'], { objectMode: true }) // when true\n  .on('data', console.log)                 // data event invokes parsed object\n```\n\n- **product_ids** (default: `[]`)\n- **options** (default: `{ objectMode = true, channels: ['full'] }`)\n- **env** (default: `process.env`)\n\n### .socketFor(product_ids[, options[, env]])\nThe websocket client allows you to connect and listen to exchange messages.\n\n```js\nconst { feedFor } = require('coinbase-pro-feed')\n\nsocketFor(['btc-eur'], { channels })\n  .on('open', () =\u003e {\n    console.log('open') // socket connected\n  })\n  .on('data' (data) =\u003e {\n    console.log('data:', data) // parsed messages\n  })\n  .on('error', (err) =\u003e {\n    console.error('error:', err) // socket error\n  })\n  .on('close', () =\u003e {\n    console.log('close') // socket closed\n  })\n```\n\n## Command Line Interface (CLI)\nWhen installed globally it is possibile to access the command line interface:\n\n```shell\nnpm install --global coinbase-pro-feed\n```\n\n#### Usage\n```shell\ncoinbase-pro-feed btc-eur eth-eur ltc-eur\n\n# stdout compatible with http://jsonlines.org\n```\n\n\u003c!--\n\nThe client will automatically subscribe to the heartbeat channel.\nBy default, the full channel will be subscribed to unless other channels are requested.\n\nconst websocket = new Gdax.WebsocketClient(\n  ['BTC-USD', 'ETH-USD'],\n  'wss://ws-feed-public.sandbox.pro.coinbase.com',\n  {\n    key: 'suchkey',\n    secret: 'suchsecret',\n    passphrase: 'muchpassphrase',\n  },\n  { channels: ['full', 'level2'] }\n);\nOptionally, change subscriptions at runtime:\n\nwebsocket.unsubscribe({ channels: ['full'] });\n\nwebsocket.subscribe({ product_ids: ['LTC-USD'], channels: ['ticker', 'user'] });\n\nwebsocket.subscribe({\n  channels: [\n    {\n      name: 'user',\n      product_ids: ['ETH-USD'],\n    },\n  ],\n});\n\nwebsocket.unsubscribe({\n  channels: [\n    {\n      name: 'user',\n      product_ids: ['LTC-USD'],\n    },\n    {\n      name: 'user',\n      product_ids: ['ETH-USD'],\n    },\n  ],\n});\nThe following events can be emitted from the WebsocketClient:\n\nopen\nmessage\nclose\nerror\n --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoputzer%2Fcoinbase-pro-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivoputzer%2Fcoinbase-pro-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoputzer%2Fcoinbase-pro-feed/lists"}