{"id":21561753,"url":"https://github.com/synonymdev/slashtags-widget-price-feed","last_synced_at":"2025-07-16T16:31:06.129Z","repository":{"id":104962281,"uuid":"543412628","full_name":"synonymdev/slashtags-widget-price-feed","owner":"synonymdev","description":null,"archived":true,"fork":false,"pushed_at":"2024-05-16T11:47:40.000Z","size":27837,"stargazers_count":0,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T13:02:03.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/synonymdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-30T03:19:56.000Z","updated_at":"2024-06-07T12:27:26.000Z","dependencies_parsed_at":"2023-07-25T00:15:14.175Z","dependency_job_id":"63cc0dd8-ec8e-4498-84db-63b9d1aafaf3","html_url":"https://github.com/synonymdev/slashtags-widget-price-feed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synonymdev/slashtags-widget-price-feed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-price-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-price-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-price-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-price-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/slashtags-widget-price-feed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-widget-price-feed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524626,"owners_count":23782014,"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","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":[],"created_at":"2024-11-24T09:27:53.229Z","updated_at":"2025-07-16T16:31:05.523Z","avatar_url":"https://github.com/synonymdev.png","language":"JavaScript","readme":"# slashtags-widget-price-feed\n\nProvides price information as a slashtags feed.\n\n## Usage\n\n### Feed\n\nCopy `config/config.example.json` to `config/config.json` then edit the relay address.\n\n```bash\ncp config/config.example.json config/config.json\n```\n\nStart the feed writer\n\n```bash\nnpm start\n```\n\nIt will generate a `keyPair` and persist that in `config/config.json` for future sessions.\n\nIt should print: `Running Bitcoin price feed: slashfeed:\u003cid\u003e/Bitcoin Price?relay=\u003crelay-address\u003e`\n\n### Reader\n\nTo read The price feed use the `Reader` helper class.\n\n```js\nconst { Feed, Reader } = require('slashtags-widget-price-feed')\n\n(async () =\u003e {\n  const client = new Client({ storage: './path/to/feed/storage', relay: 'https://web-relay.example.com' })\n  const feed = new Feed(client, config, { icon })\n\n  await feed.ready() \n\n  const client = new Client({ storage: './path/to/reader/storage'})\n\n  const readerClient = new Client({ storage: tmpdir() })\n  const reader = new Reader(readerClient, feed.url)\n\n  reader.subscribeLatestPrice('BTCUSD', price =\u003e {\n    // BTC/USD price (latest)\n  })\n\n  reader.subscribePastDayCandles('BTCUSD', candles =\u003e {\n    // BTC/USD price candles for the past day\n  })\n\n  reader.subscribePastWeekCandles('BTCUSD', candles =\u003e {\n    // BTC/USD price candles for the past week\n  })\n\n  reader.subscribePastMonthCandles('BTCUSD', candles =\u003e {\n    // BTC/USD price candles for the past month\n  })\n})\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-widget-price-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Fslashtags-widget-price-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-widget-price-feed/lists"}