Closed papegaill closed 3 years ago
Tested this (because I really want it to be available) and found if you omit the forcedMode
option you get an error.
Is it sending the header with an empty value, which the API is interpreting as invalid, when it shouldn't be sending the header at all (in which case it'll sync it with the web app as per https://github.com/3commas-io/3commas-official-api-docs/#api-modesreal-or-paper)?
Code example:
const threeCommasAPI = require('./3commas-api-node')
dotenv.config()
const tc = new threeCommasAPI({
apiKey: API_KEY,
apiSecret: API_SECRET,
// forcedMode: 'real',
})
tc
.getBots()
.then(bots => {
console.log(bots)
})
.catch(error => console.log(error))
Output:
{
error: 'forced_mode_invalid',
error_description: "Forced mode is not included in the ['real', 'paper']"
}
To fix issue: https://github.com/rentorm/3commas-api-node/issues/19 To be able to force 'paper' or 'real' mode account, like so: