@reactivemarkets/switchboard-sdk
Version:
SDK for the Reactive Markets Switchboard
54 lines (39 loc) • 1.17 kB
Markdown
The Reactive Switchboard SDK for JavaScript. See [Developer Docs](https://developer.reactivemarkets.com) for full documentation
```js
import { MarketDataClient, toJS } from "@reactivemarkets/switchboard-sdk";
const marketDataClient = new MarketDataClient({
apiKey: MY_API_KEY,
});
marketDataClient
.on("open", () => {
marketDataClient.subscribe({
markets: [{
symbol: "BTCUSD",
venue: "REX",
}],
});
})
.on("snapshot", (snapshot) => {
console.log(toJS(snapshot));
});
```
```bash
npm i @reactivemarkets/switchboard-sdk
```
To install all dependencies and build run:
```bash
git clone https://github.com/reactivemarkets/switchboard-js.git
cd switchboard-js
npm ci
npm run build
```
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on
this repository](https://github.com/reactivemarkets/switchboard-js/tags).
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for
details.