UNPKG

dvf-client-js

Version:

<img src="https://avatars1.githubusercontent.com/u/56512535?s=200&v=4" align="right" />

15 lines (13 loc) 412 B
const { post } = require('request-promise') module.exports = async dvf => { const url = dvf.config.api + '/v1/trading/r/getConf' try { const exchangeConf = await post(url, { json: {} }) dvf.config = Object.assign({}, dvf.config, exchangeConf) return exchangeConf } catch (error) { // TODO: use logger // console.log('error getting config from dvf-pub-api') return dvf.config } }