3commas-api-node icon indicating copy to clipboard operation
3commas-api-node copied to clipboard

v2 proposal

Open rentorm opened this issue 5 years ago • 2 comments

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.*

rentorm avatar Sep 25 '20 17:09 rentorm

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

Amantel avatar Jun 04 '21 08:06 Amantel

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

bgarciaoliveira avatar Oct 10 '21 05:10 bgarciaoliveira