Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitget-node-api

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitget-node-api

Node.js/typescript connector for Bidget REST APIs and WebSockets

  • 1.0.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Instructions

Install

npm i bitget-api-node-npm

API

const bitgetApi = require('bitget-api-node-npm')
const { test, describe, expect } = require('@jest/globals')

const apiKey = ''
const secretKey = ''
const passphrase = ''
describe('test accounts', () => {
  test('accounts', () => {
    const mixAccountApi = new bitgetApi.default.MixAccountApi(apiKey, secretKey, passphrase)
    mixAccountApi.accounts('umcbl').then((data) => {
      console.info(data)
    })
  })
})

websocket

var bitgetApi = require('bitget-api-node-npm')

const apiKey = ''
const secretKey = ''
const passphrase = ''
//Implementation class for processing messages
class ListennerObj extends bitgetApi.Listenner {
  reveice(message) {
    console.info('>>>' + message)
  }
}

const listenner = new ListennerObj()
const bitgetWsClient = new bitgetApi.BitgetWsClient(listenner, apiKey, secretKey, passphrase)
const subArr = new Array()

const subscribeOne = new bitgetApi.SubscribeReq('mc', 'ticker', 'BTCUSD')
const subscribeTow = new bitgetApi.SubscribeReq('SP', 'candle1W', 'BTCUSDT')

subArr.push(subscribeOne)
subArr.push(subscribeTow)

bitgetWsClient.subscribe(subArr)

Keywords

FAQs

Package last updated on 17 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc