Skip to content

Commit

Permalink
add PROXY_URL option
Browse files Browse the repository at this point in the history
  • Loading branch information
bn951 committed Aug 25, 2020
1 parent b5d41f0 commit fc6fb4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ var DEFAULT_BASE = 'https://api.binance.com';
var candleFields = exports.candleFields = ['openTime', 'open', 'high', 'low', 'close', 'volume', 'closeTime', 'quoteVolume', 'trades', 'baseAssetVolume', 'quoteAssetVolume'];

exports.default = function (opts) {
var BASE = opts.BASE_HTTP_URL || DEFAULT_BASE;
var _base = opts.BASE_HTTP_URL || DEFAULT_BASE;
var BASE = opts.PROXY_URL ? '' + opts.PROXY_URL + _base : _base;

/**
* Build query string for uri encoded url based on json object
Expand Down
3 changes: 2 additions & 1 deletion src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const candleFields = [
]

export default (opts) => {
const BASE = opts.BASE_HTTP_URL || DEFAULT_BASE
const _base = opts.BASE_HTTP_URL || DEFAULT_BASE
const BASE = opts.PROXY_URL ? `${opts.PROXY_URL}${_base}` : _base

/**
* Build query string for uri encoded url based on json object
Expand Down

0 comments on commit fc6fb4f

Please sign in to comment.