rentorm / 3commas-api-node

NodeJS wrapper for Official 3commas API
GNU General Public License v3.0
43 stars 28 forks source link

v2 proposal #15

Open rentorm opened 4 years ago

rentorm commented 4 years ago

Make this library simple and as pure wrapper (which it basically is), so it can support any current 3commas API methods.

This is already possible in v1.*, using following example:

const api = require('3commas-api-node')

const apiCall = new api({
  apiKey: '',
  apiSecret: ''
})

// get last 20 active deals
const showActiveDeals = async () => {
  let data = await apiCall.makeRequest(
  // method
  'GET',
  // path
  '/public/api/ver1/deals?'
  // params
  {
    limit: 20,
    scope: 'active',
  })
  console.log(data)
}

showActiveDeals()

Proposal is to remove all other functions, just leave makeRequest function and release it as v2. Update README with example usage and noting deprecated functions included in v1.*

Amantel commented 3 years ago

It's a breaking change, but that's sound like a good idea. There are some 3commas v2 functions that are missing, and either we should spend time adding them (quite easy), or we do as you suggest and focus on wrapper. In later case there is no need for continuous support

bgarciaoliveira commented 3 years ago

just use axios if you want to have freedom. this is not the point of an wrapper