Skip to content

Commit 4f0c12c

Browse files
authored
feat(export-type): export class to default (#4)
1 parent b8fce02 commit 4f0c12c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ wrapper for upbit API
33

44
### Installation
55
```sh
6-
$ npm run ci
6+
$ npm ci
77
```
88

99
### Build
@@ -18,6 +18,15 @@ wrapper for upbit API
1818
$ npm run format # Check prettier
1919
```
2020

21+
### How to Use
22+
```typescript
23+
import * as ApiUpbit from 'node-upbit-api';
24+
25+
new ApiUpbit('accessKey', 'secretKey').getAccounts().then((accounts) => {
26+
console.log(accounts);
27+
});
28+
```
29+
2130
### Available API List
2231
- Exchange API
2332
- Assets

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { v4 as uuidV4 } from 'uuid';
2222
/**
2323
* UPBIT API DOCUMENTS: https://docs.upbit.com/docs
2424
*/
25-
export class ApiUpbit {
25+
export default class ApiUpbit {
2626
/**
2727
* UPBIT API Authorization Policy
2828
* Get Authroization Key: https://upbit.com/service_center/open_api_guide
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import { GetOrdersResponse } from './get-orders-response.interface';
22

3-
export type PostOrdersResponse = GetOrdersResponse & { avg_price: string };
3+
export type PostOrdersResponse = GetOrdersResponse & {
4+
/** Average Price */
5+
avg_price: string;
6+
};

0 commit comments

Comments
 (0)