UNPKG

@gazsiazasz/binance-api

Version:

Binance API (REST + WebSocket) for Node.js

7 lines (6 loc) 350 B
// Axios proxy not works in browser, manual setup const proxy = (url, endpoint, { host, port, username, password }) => { const proxy = (username && password) ? `${host}:${port}/?username=${username}&password=${password}` : `${host}:${port}` return (typeof proxy == 'string') ? proxy + '/' + endpoint : url + endpoint } module.exports = proxy