Skip to content

Commit 8b211c7

Browse files
committed
Update to v2 private signing/API and update getFullOrderBook() endpoints
1 parent dbe1dfe commit 8b211c7

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

kucoin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const Kucoin = {
4040
header.headers['KC-API-TIMESTAMP'] = nonce
4141
header.headers['KC-API-KEY'] = this.apiKey
4242
header.headers['KC-API-PASSPHRASE'] = this.passphrase
43+
header.headers['KCS-API-KEY-VERSION'] = 2
4344
return header
4445
},
4546
formatQuery: function(queryObj) {

lib/market.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Market.getOrderBook = async function(symbol) {
9999
symbol = string
100100
*/
101101
Market.getFullOrderBook = async function(symbol) {
102-
let endpoint = `/api/v2/market/orderbook/level2?symbol=${symbol}`
102+
let endpoint = `/api/v3/market/orderbook/level2?symbol=${symbol}`
103103
let url = this.baseURL + endpoint
104104
let result = await axios.get(url)
105105
return result.data
@@ -111,7 +111,7 @@ Market.getFullOrderBook = async function(symbol) {
111111
symbol = string
112112
*/
113113
Market.getFullOrderBookAtomic = async function(symbol) {
114-
let endpoint = `/api/v2/market/orderbook/level3?symbol=${symbol}`
114+
let endpoint = `/api/v3/market/orderbook/level3?symbol=${symbol}`
115115
let url = this.baseURL + endpoint
116116
let result = await axios.get(url)
117117
return result.data

lib/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ User.createDepositAddress = async function(params) {
119119
}
120120
*/
121121
User.getDepositAddress = async function(params) {
122-
let endpoint = `/api/v1/deposit-addresses?currency=${params.currency}`
122+
let endpoint = `/api/v2/deposit-addresses?currency=${params.currency}`
123123
delete params.currency
124124
let url = this.baseURL + endpoint
125125
let result = await axios.get(url, this.sign(endpoint, params, 'GET'))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kucoin-node-api",
3-
"version": "1.2.2",
3+
"version": "2.0.0",
44
"description": "Node.js KuCoin Cryptocurrency Exchange v2 API Wrapper/SDK",
55
"main": "kucoin.js",
66
"scripts": {

0 commit comments

Comments
 (0)