mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
1.1 KiB
1.1 KiB
GRVT
Node.js & JavaScript client for GRVT REST APIs & WebSockets
Installing
Using npm:
npm install @grvt/client
Using yarn:
yarn add @grvt/client
Using pnpm:
pnpm add @grvt/client
Once 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'))