Skip to content

Commit

Permalink
Update baseUrl of REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
lyu-huiyang committed Feb 16, 2023
1 parent 8a79c5d commit ccb8a8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demo/config.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module.exports = {
/** set API baseUrl, */
/** if not set this key, or empty, or false, or undefined, */
/** default baseUrl will be set by `process.env.PRODUCTION` */
/** if process.env.PRODUCTION === 'prod', the default value will be https://api.kucoin.io */
/** else use sandbox as https://openapi-sandbox.kucoin.io */
baseUrl: 'https://openapi-sandbox.kucoin.cc',
/** if process.env.PRODUCTION === 'prod', the default value will be https://api.kucoin.com */
/** else use sandbox as https://openapi-sandbox.kucoin.com */
baseUrl: 'https://openapi-sandbox.kucoin.com',
/** Auth infos */
/** key is API key */
/** secret is API secret */
Expand Down
2 changes: 1 addition & 1 deletion demo/level2_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const API = require('../src');
const config = require('./config');
API.init({
...config,
baseUrl: 'https://api.kucoin.io',
baseUrl: 'https://api.kucoin.com',
});

// ws demo
Expand Down
4 changes: 2 additions & 2 deletions src/lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const constructHttp = () => {
let _baseUrl = baseUrl;
if (!_baseUrl) {
_baseUrl = process.env.PRODUCTION === 'prod'
? 'https://api.kucoin.io'
: 'https://openapi-sandbox.kucoin.io';
? 'https://api.kucoin.com'
: 'https://openapi-sandbox.kucoin.com';
}

const Http = createHttp({
Expand Down

0 comments on commit ccb8a8f

Please sign in to comment.