diff --git a/README.md b/README.md index 84acb95..1251dbd 100644 --- a/README.md +++ b/README.md @@ -330,6 +330,34 @@ api.getMarginAccount() api.getWithdrawalsList(params) ``` +```javascript +/* + Get Withdrawal info By ID + GET /api/v1/withdrawals/ + params = { + withdrawalId: string + } + response : { + { + "code": "200000", + "data": { + "id": "5bd6e9286d99522a52e458de", + "currency": "BTC", + "address": "1ABCdefGhiJkl...", + "memo": "", + "amount": "0.5", + "fee": "0.0005", + "walletTxId": "b6f7a12d8e4f...", + "status": "SUCCESS", + "createdAt": 1609400000000, + "updatedAt": 1609401000000 + } + } + } +*/ +api.getWithdrawalByID(params) +``` + ```javascript /* Get Repay Record diff --git a/lib/user.js b/lib/user.js index ce6c51a..8267d4d 100644 --- a/lib/user.js +++ b/lib/user.js @@ -204,6 +204,21 @@ User.getWithdrawalsList = async function(params = {}) { return result.data } +/* + Get Withdrawal info By ID + GET /api/v1/withdrawals/ + params = { + withdrawalId: string + } +*/ +User.getWithdrawalByID = async function(params = {}) { + let endpoint = '/api/v1/withdrawals/' + params.withdrawalId + delete params.withdrawalId + let url = this.baseURL + endpoint + let result = await axios.get(url, this.sign(endpoint, params, 'GET')) + return result.data +} + /* Get Withdrawal Quotas GET /api/v1/withdrawals/quotas diff --git a/package-lock.json b/package-lock.json index 052e330..f53b620 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kucoin-node-api", - "version": "2.1.4", + "version": "2.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "kucoin-node-api", - "version": "2.1.4", + "version": "2.1.6", "license": "ISC", "dependencies": { "axios": "^0.21.1", diff --git a/package.json b/package.json index 161c39d..8543638 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kucoin-node-api", - "version": "2.1.5", + "version": "2.1.6", "description": "Node.js KuCoin Cryptocurrency Exchange v2 API Wrapper/SDK", "main": "kucoin.js", "scripts": {