Socket
Socket
Sign inDemoInstall

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 2.0.7 to 2.0.8

2

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

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

@@ -49,5 +49,11 @@ # use-upbit-api

```tsx
const {isLoading, marketCodes} = useFetchMarketCode(
(options = {debug: false}), // default option, can be modified.
);
import {useFetchMarketCode} from 'use-upbit-api';
function Component() {
const {isLoading, marketCodes} = useFetchMarketCode(
(options = {debug: false}), // default option, can be modified.
);
//...
}
```

@@ -66,16 +72,24 @@

```tsx
const [targetMarketCode, _] = useState([
{
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
},
...
]);
import { useWsTicker } from "use-upbit-api";
const {socket, isConnected, socketData} = useWsTicker(
targetMarketCode, // should be array
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, debug: false}), // default option, can be modified.
);
function Component() {
const [targetMarketCode, _] = useState([
{
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
},
...
]);
const {socket, isConnected, socketData} = useWsTicker(
targetMarketCode, // should be array
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, debug: false}), // default option, can be modified.
);
// ...
}
```

@@ -88,13 +102,19 @@

```tsx
const [targetMarketCode, _] = useState({
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
});
import {useWsOrderbook} from 'use-upbit-api';
const {socket, isConnected, socketData} = useWsOrderbook(
targetMarketCode, // should be above form object
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, debug: false}), // default option, can be modified.
);
function Component() {
const [targetMarketCode, _] = useState({
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
});
const {socket, isConnected, socketData} = useWsOrderbook(
targetMarketCode, // should be above form object
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, debug: false}), // default option, can be modified.
);
// ...
}
```

@@ -108,13 +128,19 @@

```tsx
const [targetMarketCode, _] = useState({
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
});
import {useWsTrade} from 'use-upbit-api';
const {socket, isConnected, socketData} = useWsTrade(
targetMarketCode, // should be above form object
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, max_length_queue: 100, debug: false}), // default option, can be modified.
);
function Component() {
const [targetMarketCode, _] = useState({
market: 'KRW-BTC',
korean_name: '비트코인',
english_name: 'Bitcoin',
});
const {socket, isConnected, socketData} = useWsTrade(
targetMarketCode, // should be above form object
onError, // onError?: (error: Error) => void // optional, user for using ErrorBoundary
(options = {throttle_time: 400, max_length_queue: 100, debug: false}), // default option, can be modified.
);
// ...
}
```

@@ -121,0 +147,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