{"id":17116462,"url":"https://github.com/dakimura/jsmarketstore","last_synced_at":"2026-04-13T00:44:53.921Z","repository":{"id":57284536,"uuid":"338470238","full_name":"dakimura/jsmarketstore","owner":"dakimura","description":"Unofficial Node.js driver for marketstore","archived":false,"fork":false,"pushed_at":"2021-03-28T08:31:12.000Z","size":151,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T18:56:20.674Z","etag":null,"topics":["alpaca","analysis","javascript","marketstore","node","nodejs","npm","timeseries","timeseries-analysis","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dakimura.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-02-13T01:02:47.000Z","updated_at":"2024-03-04T17:36:00.000Z","dependencies_parsed_at":"2022-09-17T02:11:28.921Z","dependency_job_id":null,"html_url":"https://github.com/dakimura/jsmarketstore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fjsmarketstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fjsmarketstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fjsmarketstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Fjsmarketstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dakimura","download_url":"https://codeload.github.com/dakimura/jsmarketstore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191622,"owners_count":20575248,"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":["alpaca","analysis","javascript","marketstore","node","nodejs","npm","timeseries","timeseries-analysis","typescript"],"created_at":"2024-10-14T17:48:55.208Z","updated_at":"2026-04-13T00:44:53.870Z","avatar_url":"https://github.com/dakimura.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsmarketstore\nUnofficial client library for [marketstore](https://github.com/alpacahq/marketstore).\n\n## Install\n```\nnpm install jsmarketstore\n```\n\n## Usage\n\nAssume that the marketstore server is running on your localhost, and listening 5993 port.\n\n```typescript\nimport {Client, Column, DataType, ListSymbolsFormat, Params} from \"jsmarketstore\";\n\nconst cli = new Client('http://localhost:5993/rpc')\nconst symbol = 'TEST'\nconst timeframe = '1Sec'\nconst attributeGroup = 'Tick'\nconst tbk: string = symbol + '/' + timeframe + '/' + attributeGroup\n\n// write data -\u003e list symbols -\u003e query data -\u003e delete the data\ncli\n    .write(\n        [\n            ['Epoch', DataType.INT64],\n            ['Bid', DataType.FLOAT32],\n            ['Ask', DataType.FLOAT32],\n        ],\n        [\n            [Date.parse('2021-03-08 00:00:00') / 1000, 10.0, 20.0],\n            [Date.parse('2021-03-09 00:00:00') / 1000, 30.0, 40.0],\n        ],\n        tbk,\n        true,\n    )\n    .catch((reason: any) =\u003e {\n        console.log(\"failed to write data:\" + reason)\n    })\n    .then(() =\u003e {\n        console.log('write data to ' + tbk + '.')\n        return cli.listSymbols(ListSymbolsFormat.Symbol)\n    })\n    .catch((reason: any) =\u003e {\n        console.log(\"failed to list symbols:\" + reason)\n    })\n    .then((symbols: string[]) =\u003e {\n        console.log('list symbols:')\n        console.log(symbols)\n        const params: Params = new Params(symbols[0], timeframe, attributeGroup)\n        return cli.query(params)\n    })\n    .catch((reason: any) =\u003e {\n        console.log(\"failed to query data:\" + reason)\n    })\n    .then((response: Map\u003cnumber, Column\u003e) =\u003e {\n        console.log('query ' + tbk + ':')\n        console.log(response)\n        return cli.destroy(tbk)\n    })\n    .catch((reason: any) =\u003e {\n        console.log(\"failed to destroy bucket:\" + reason)\n    })\n    .then(() =\u003e {\n        console.log('destroyed:' + tbk)\n    })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Fjsmarketstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdakimura%2Fjsmarketstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Fjsmarketstore/lists"}