npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

upbit-client

v0.4.1

Published

Javascript client for Upbit.com Open API.

Downloads

21

Readme

Javascript Client for Upbit API

Javascript client for using Upbit API. TypeScript Supported.

ES6+ Browser and Node.js both are supported.

Installation

$ yarn add upbit-client
# npm i upbit-client

Requirements

You have to get Access key & Secret Key signed by Upbit.com to use this client.

Visit here to get the keys.

Usage

HTTP Request

import { Upbit } from 'upbit-client'
const upbit = new Upbit({ 
  access_key: '',
  secret_key: '',
})

const codes = await upbit.GetMarketCodes()
// [
//   { 
//     market: 'KRW-BTC', 
//     korean_name: '비트코인', 
//     english_name: 'Bitcoin'
//   },
//   ...
// ]

WebSocket

import { UpbitWebSocket } from 'upbit-client'
const upbit_ws = new UpbitWebSocket()

upbit_ws.Open({ type: "ticker", codes: ["KRW-BTC"] }, () => {
  console.log("upbit socket connected.");
});

upbit_ws.OnClose(() => {
  console.log("closed.");
});

upbit_ws.OnMessage((data) => {
  console.log(data)
  // {
  //   ty: 'ticker',
  //   cd: 'KRW-BTC',
  //   op: 40008000,
  //   hp: 41000000,
  //   lp: 39674000,
  //   tp: 40441000,
  //   pcp: 40008000,
  //   atp: 256707458304.6534,
  //   c: 'RISE',
  //   cp: 433000,
  //   scp: 433000,
  //   cr: 0.0108228354,
  //   scr: 0.0108228354,
  //   ab: 'ASK',
  //   tv: 0.00416811,
  //   atv: 6379.30820304,
  //   tdt: '20210119',
  //   ttm: '133506',
  //   ttms: 1611063306000,
  //   aav: 3573.13708979,
  //   abv: 2806.17111325,
  //   h52wp: 48550000,
  //   h52wdt: '2021-01-08',
  //   l52wp: 5489000,
  //   l52wdt: '2020-03-13',
  //   ts: null,
  //   ms: 'ACTIVE',
  //   msfi: null,
  //   its: false,
  //   dd: null,
  //   mw: 'NONE',
  //   tms: 1611063306635,
  //   atp24h: 343031046559.8189,
  //   atv24h: 8541.35594639,
  //   st: 'REALTIME'
  // }
  // ]
});

API Limit

Last updated by 2020-03-10

Exchange API

주문

  • 초당 8회, 분당 200회

주문 외

  • 초당 30회, 분당 900회

Quotation API

Websocket 연결 요청 수 제한

  • 초당 5회, 분당 100회

REST API 요청 수 제한

  • 분당 600회, 초당 10회 (종목, 캔들, 체결, 티커, 호가별)

References