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

bitget-api-node-npm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitget-api-node-npm

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

  • 1.0.1
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
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 Console = require('console')

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')
var Console = require('console')

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 15 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