@grvt/client
v1.6.22
Published
Node.js & JavaScript client for GRVT REST APIs & WebSockets
Readme
GRVT
Node.js & JavaScript client for GRVT REST APIs & WebSockets
Installing
Using npm:
npm install @grvt/clientUsing yarn:
yarn add @grvt/clientUsing pnpm:
pnpm add @grvt/clientOnce the package is installed, you can import the library using import or require approach:
import GRVT from '@grvt/client'You can also use the default export, since the named export is just a re-export from the GRVT factory:
import GRVT from '@grvt/client'
console.log(
new GRVT.MDG({
host: 'https://market-data.dev.gravitymarkets.io',
version: 'v1'
})
)If you use require for importing:
const GRVT = require('@grvt/client')
console.log(
new GRVT.MDG({
host: 'https://market-data.dev.gravitymarkets.io',
version: 'v1'
})
)To use WebSocket (available only in browsers/platforms that support WebSocket)
import { EStreamEndpoints, WS } from '@grvt/client/ws'
console.log(new WS('wss://market-data.dev.gravitymarkets.io/ws'))