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

use-upbit-api

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-upbit-api

This is React Custom Hook for upbit api

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

use-upbit-api

GitHub Workflow Status Weekly Downloads version types

The use-upbit-api custom hook for Upbit API (Korea crypto exchange). In the previous, Upbit API's Websocket usage in React is difficult for developer who is unfamiliar with websocket in React, but this React Custom Hook solve the problem. Let's use this awesome custom hooks!

npm

Git Repository

View Demo

TOTALEXAMPLE


Install

npm install --save use-upbit-api

Hooks

REST API

useFetchMarketCode

WEBSOCKET API

useWsTicker

useWsOrderbook

useWsTrade


useFetchMarketCode

useFetchMarketCode hook is used to fetch market codes from upbit api

const {isLoading, marketCodes} = useFetchMarketCode(
  (options = {throttle_time: 400, debug: false}), // default option, can be modified.
);

useWsTicker

useWsTicker is a custom hook that connects to a WebSocket API and retrieves real-time ticker data for a given market code.

const {socket, isConnected, socketData} = useWsTicker(
  targetMarketCode,
  (options = {throttle_time: 400, debug: false}), // default option, can be modified.
);

useWsOrderbook

useWsOrderbook is a custom hook that connects to a WebSocket API and retrieves real-time order book data for a given market code.

const {socket, isConnected, socketData} = useWsOrderbook(
  targetMarketCode,
  (options = {throttle_time: 400, debug: false}), // default option, can be modified.
);

useWsTrade

useWsTrade is a custom hook that connects to a WebSocket API and retrieves real-time trade data for a given market code.

const {socket, isConnected, socketData} = useWsTrade(
  targetMarketCode,
  (options = {throttle_time: 400, max_length_queue: 100, debug: false}), // default option, can be modified.
);

Contributing

If you want to contribute to use-upbit-api, please contact me rkdalsgur032@unist.ac.kr

License

Licensed under the MIT License, Copyright © 2022-present MinHyeok Kang.

Keywords

FAQs

Package last updated on 09 Apr 2023

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