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 - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

package.json
{
"name": "use-upbit-api",
"version": "1.0.8",
"version": "1.0.9",
"description": "This is React Custom Hook for upbit api",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,2 +0,2 @@

# use-upbit-api v1.0.8
# use-upbit-api v1.0.9

@@ -41,8 +41,18 @@ **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!

| Argument | Description | Type | Format | Default |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **targetMarketCodes** | Targeted market codes to Websocket API | ObjectArray | { `market: string`, `korean_name: string`, `english_name: string`} [ ] <br><br> - targetMarketCodes **should be strictly Object Array**, **not Object** . | `[ {market: "KRW-BTC", korean_name: "비트코인", english_name: "Bitcoin" } ]` |
| **type** | Websocket Connection Type | String | `"ticker"` <br>`"orderbook"` <br> `"trade"` <br> <br>**- Strictly above one of the three types above** | `"ticker"` |
| **option** | throttle_time : period of updating socketData <br> max_length_queue : In "trade" type, max length of trade history queue | Object | { <br> `throttle_time: number`,<br> `max_length_queue: number` <br> } <br><br> **- Too Low throttle_time (less than 400ms) may cause unexpectable bug. <br><br> - Too Large max_length_queue can make too large memory use.** | `{ throttle_time: 400, max_length_queue: 100 }` |
**Default Value**
```jsx
targetMarketCodes : [
{ market: "KRW-BTC", korean_name: "비트코인", english_name: "Bitcoin" },
]
type : "ticker"
option : { throttle_time: 400, max_length_queue: 100 }
```
| Argument | Description | Type | Format |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **targetMarketCodes** | Targeted market codes to Websocket API | ObjectArray | { `market: string`, `korean_name: string`, `english_name: string`} [ ] <br><br> - targetMarketCodes **should be strictly Object Array**, **not Object** . |
| **type** | Websocket Connection Type | String | `"ticker"` <br>`"orderbook"` <br> `"trade"` <br> <br>**- Strictly above one of the three types above** |
| **option** | throttle_time : period of updating socketData <br> max_length_queue : In "trade" type, max length of trade history queue | Object | { <br> `throttle_time: number`,<br> `max_length_queue: number` <br> } <br><br> **- Too Low throttle_time (less than 400ms) may cause unexpectable bug. <br><br> - Too Large max_length_queue can make too large memory use.** |
| Return | Description | Type | Format |

@@ -49,0 +59,0 @@ | --------------- | ------------------------------------------------------ | ---------------- | -------------------------------------------------- |

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