Skip to content

Commit

Permalink
Feature/update api (#49)
Browse files Browse the repository at this point in the history
* feat: update api sdk done

* [email protected] update high-frequency api done

* feat: readme update

* feat: readme update

* feat: readme update

* feat: readme update

* feat: changelog update

* feat: update updateTime

* feat: update updateTime

* feat: update updateTime

* feat: update updateTime

* feat: update demo

* patch docs for ws

* patch docs for ws

* update jest for exp

* update jest for exp

---------

Co-authored-by: owen <[email protected]>
  • Loading branch information
Allandy and guozimo1 authored Jun 30, 2023
1 parent 8a79c5d commit 98d4e6b
Show file tree
Hide file tree
Showing 33 changed files with 4,475 additions and 40 deletions.
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## [1.0.5-beta](https://github.com/Kucoin/kucoin-node-sdk/compare/v1.0.4...v1.0.5-beta) (2023-06-25)


### Features

* changelog update ([26c7b58](https://github.com/Kucoin/kucoin-node-sdk/commit/26c7b5868d010145e6772adeb93318db0f9ca421))
* readme update ([beec87d](https://github.com/Kucoin/kucoin-node-sdk/commit/beec87d2e941ed23cec99968fc223f186f236198))
* readme update ([48eed92](https://github.com/Kucoin/kucoin-node-sdk/commit/48eed9266f85d078290de26371e7aa1c6af33851))
* readme update ([a63be9c](https://github.com/Kucoin/kucoin-node-sdk/commit/a63be9c9283b927afcd1aec404a5179851a75f5b))
* readme update ([c9832f6](https://github.com/Kucoin/kucoin-node-sdk/commit/c9832f6764d8987e77ae9e8a5d7039f299c404ff))
* update api sdk done ([c89f572](https://github.com/Kucoin/kucoin-node-sdk/commit/c89f572f92455185cfb9c441ed6bd025c2462e08))
* update demo ([58f3f7b](https://github.com/Kucoin/kucoin-node-sdk/commit/58f3f7b945ac63046cff97b28cc752e6b88e61e2))
* update updateTime ([428aba7](https://github.com/Kucoin/kucoin-node-sdk/commit/428aba71ed84e7dd6f3af911978772e3c07511e6))
* update updateTime ([957234d](https://github.com/Kucoin/kucoin-node-sdk/commit/957234d8c26b09faee3a374f4b611b23dde5273c))
* update updateTime ([e0feb20](https://github.com/Kucoin/kucoin-node-sdk/commit/e0feb20577123be35fdd0835b684ca21e233ad84))
* update updateTime ([3cab49b](https://github.com/Kucoin/kucoin-node-sdk/commit/3cab49b4b122e82c6cefaf8a207a0b1851cdb23a))



## [1.0.5-beta](https://github.com/Kucoin/kucoin-node-sdk/compare/v1.0.4...v1.0.5-beta) (2023-05-31)


### Features

* changelog update ([26c7b58](https://github.com/Kucoin/kucoin-node-sdk/commit/26c7b5868d010145e6772adeb93318db0f9ca421))
* readme update ([beec87d](https://github.com/Kucoin/kucoin-node-sdk/commit/beec87d2e941ed23cec99968fc223f186f236198))
* readme update ([48eed92](https://github.com/Kucoin/kucoin-node-sdk/commit/48eed9266f85d078290de26371e7aa1c6af33851))
* readme update ([a63be9c](https://github.com/Kucoin/kucoin-node-sdk/commit/a63be9c9283b927afcd1aec404a5179851a75f5b))
* readme update ([c9832f6](https://github.com/Kucoin/kucoin-node-sdk/commit/c9832f6764d8987e77ae9e8a5d7039f299c404ff))
* update api sdk done ([c89f572](https://github.com/Kucoin/kucoin-node-sdk/commit/c89f572f92455185cfb9c441ed6bd025c2462e08))
* update updateTime ([428aba7](https://github.com/Kucoin/kucoin-node-sdk/commit/428aba71ed84e7dd6f3af911978772e3c07511e6))
* update updateTime ([957234d](https://github.com/Kucoin/kucoin-node-sdk/commit/957234d8c26b09faee3a374f4b611b23dde5273c))
* update updateTime ([e0feb20](https://github.com/Kucoin/kucoin-node-sdk/commit/e0feb20577123be35fdd0835b684ca21e233ad84))
* update updateTime ([3cab49b](https://github.com/Kucoin/kucoin-node-sdk/commit/3cab49b4b122e82c6cefaf8a207a0b1851cdb23a))



## [1.0.5-beta](https://github.com/Kucoin/kucoin-node-sdk/compare/v1.0.4...v1.0.5-beta) (2023-05-25)


### Features

* changelog update ([26c7b58](https://github.com/Kucoin/kucoin-node-sdk/commit/26c7b5868d010145e6772adeb93318db0f9ca421))
* readme update ([beec87d](https://github.com/Kucoin/kucoin-node-sdk/commit/beec87d2e941ed23cec99968fc223f186f236198))
* readme update ([48eed92](https://github.com/Kucoin/kucoin-node-sdk/commit/48eed9266f85d078290de26371e7aa1c6af33851))
* readme update ([a63be9c](https://github.com/Kucoin/kucoin-node-sdk/commit/a63be9c9283b927afcd1aec404a5179851a75f5b))
* readme update ([c9832f6](https://github.com/Kucoin/kucoin-node-sdk/commit/c9832f6764d8987e77ae9e8a5d7039f299c404ff))
* update api sdk done ([c89f572](https://github.com/Kucoin/kucoin-node-sdk/commit/c89f572f92455185cfb9c441ed6bd025c2462e08))
* update updateTime ([3cab49b](https://github.com/Kucoin/kucoin-node-sdk/commit/3cab49b4b122e82c6cefaf8a207a0b1851cdb23a))



## [1.0.5-beta](https://github.com/Kucoin/kucoin-node-sdk/compare/v1.0.4...v1.0.5-beta) (2023-05-25)


### Features

* readme update ([beec87d](https://github.com/Kucoin/kucoin-node-sdk/commit/beec87d2e941ed23cec99968fc223f186f236198))
* readme update ([48eed92](https://github.com/Kucoin/kucoin-node-sdk/commit/48eed9266f85d078290de26371e7aa1c6af33851))
* readme update ([a63be9c](https://github.com/Kucoin/kucoin-node-sdk/commit/a63be9c9283b927afcd1aec404a5179851a75f5b))
* readme update ([c9832f6](https://github.com/Kucoin/kucoin-node-sdk/commit/c9832f6764d8987e77ae9e8a5d7039f299c404ff))
* update api sdk done ([c89f572](https://github.com/Kucoin/kucoin-node-sdk/commit/c89f572f92455185cfb9c441ed6bd025c2462e08))



99 changes: 84 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# kucoin-node-sdk
# kucoin-node-sdk for KuCoin API
KuCoin API SDK for Node.js language

The detailed document [https://docs.kucoin.com](https://docs.kucoin.com).

[![Latest Version](https://img.shields.io/github/v/release/Kucoin/kucoin-node-sdk.svg?style=flat-square)](https://github.com/Kucoin/kucoin-node-sdk/releases)

## Env

```
Expand All @@ -18,6 +22,26 @@ yarn add kucoin-node-sdk
```


## Init Configure
```
{
baseUrl: '',
apiAuth: {
key: '', // KC-API-KEY
secret: '', // API-Secret
passphrase: '', // KC-API-PASSPHRASE
},
authVersion: 2, // KC-API-KEY-VERSION. Notice: for v2 API-KEY, not required for v1 version.
}
```
You can use `baseUrl` method to change evironment.
| **Environment** | **BaseUri** |
| -------- | -------- |
| *Production* `DEFAULT` | https://openapi-v2.kucoin.com |
| *Sandbox* | https://openapi-sandbox.kucoin.com |

If you only need to use the public web socket client or REST client public method, you can igonre `withApiKey` method. To customize your own API implementation, you may use the `with*API` method we provided for you.

## Usage

```
Expand All @@ -33,23 +57,19 @@ const main = async () => {
console.log(getTimestampRl.data);
};
/** Run Demo */
main();
```
/** Run Demo for all apis */
REST API: yarn dev
SW: yarn dev-ws (you can opt the params for different sw demo in demo,such as follow exp)
"dev-ws": "cross-env PRODUCTION=dev nodemon demo/xxx_demo.js",
### Init Configure
```
{
baseUrl: '',
apiAuth: {
key: '', // KC-API-KEY
secret: '', // API-Secret
passphrase: '', // KC-API-PASSPHRASE
},
authVersion: 2, // KC-API-KEY-VERSION. Notice: for v2 API-KEY, not required for v1 version.
}
```

## Demo SDK for all APIS

DEMO: [demo/index.js](https://github.com/Kucoin/kucoin-node-sdk/blob/master/demo/index.js)


## API Modules

### Rest/User
Expand All @@ -59,6 +79,7 @@ Signature is required for this part.

#### Rest/User/UserInfo
- [x] getSubUsers
- [x] getPaginatedSubUsers
#### Rest/User/Account
- [x] createAccount
- [x] getAccountsList
Expand All @@ -70,6 +91,16 @@ Signature is required for this part.
- [x] getTransferable
- [x] transferBetweenMasterUserAndSubUser
- [x] innerTransfer
- [x] getAccountSummaryInfo
- [x] createSubAccount
- [x] getSubAccountSpotApiList
- [x] createSpotAPIsForSubAccount
- [x] updateSubAccountSpotApis
- [x] deleteSubAccountSpotApis
- [x] getPaginatedSubAccountInformation
- [x] transferToHFAccount
- [x] getHighFrequencyAccountLedger

#### Rest/User/Deposit
- [x] createDepositAddress
- [x] getDepositAddressV2
Expand Down Expand Up @@ -102,6 +133,24 @@ Signature is required for this part.
- [x] getRecentOrders
- [x] getOrderByID
- [x] getSingleActiveOrderByClientOid
- [x] placeHfOrder
- [x] syncPlaceHfOrder
- [x] placeMultipleHfOrders
- [x] syncPlaceMultipleHfOrders
- [x] modifyOrder
- [x] cancelOrdersByOrderId
- [x] syncCancelOrdersByOrderId
- [x] cancelOrderByClientOid
- [x] syncCancelOrdersByClientOid
- [x] cancelSpecifiedNumberOfOrdersByOrderId
- [x] cancelAllHfOrdersBySymbol
- [x] obtainListOfActiveHfOrders
- [x] obtainListOfSymbolWithActiveHfOrders
- [x] obtainListOfFilledHfOrders
- [x] detailsOfAsingleHfOrder
- [x] obtainDetailsOfASingleHfOrder
- [x] hfAutoCancelSetting
- [x] queryHfAutoCancelOrderSetting
#### Rest/Trade/StopOrder
- [x] postStopOrder
- [x] cancelOrder
Expand All @@ -110,9 +159,12 @@ Signature is required for this part.
- [x] getStopOrderList
- [x] getOrderByClientOid
- [x] cancelSingleOrderByClientOid
- [x] getSingleStopOrderInfo
- [x] cancelStopOrder
#### Rest/Trade/Fills
- [x] getFillsList
- [x] getRecentFills
- [x] getHfTransactionRecords

### Rest/Market
```
Expand All @@ -124,6 +176,7 @@ Signature is not required for this part
- [x] getAllTickers
- [x] get24hrStats
- [x] getMarketList
- [x] getSymbolsList
#### Rest/Market/OrderBook
- [x] getLevel2_20
- [x] getLevel2_100
Expand All @@ -136,6 +189,7 @@ Signature is not required for this part
- [x] getCurrencies
- [x] getCurrencyDetail
- [x] getFiatPrice
- [x] getCurrencyDetail
#### Rest/Margin/MarginInfo
- [x] getMarkPrice
- [x] getMarginConfigurationInfo
Expand All @@ -159,6 +213,15 @@ Signature is not required for this part
- [x] getAccountLendRecord
- [x] getLendingMarketData
- [x] getMarginFillsTradeData
#### Rest/Margin/Isolated
- [x] queryIsolatedMarginTradingPairConfiguration
- [x] queryIsolatedMarginAccountInfo
- [x] querySingleIsolatedMarginAccountInfo
- [x] isolatedMarginBorrowing
- [x] queryOutstandingRepaymentRecords
- [x] queryRepaymentRecords
- [x] quickRepayment
- [x] singleRepayment

#### Rest/Others
- [x] getTimestamp
Expand All @@ -181,6 +244,12 @@ DEMO: [demo/level2_demo.js](https://github.com/Kucoin/kucoin-node-sdk/blob/maste

### API.websocket.Level3

### test exp
```
yarn test
```

// TODO

## LICENSE
Expand Down
Loading

0 comments on commit 98d4e6b

Please sign in to comment.