rentorm / 3commas-api-node

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

botUpdate Function bug passing arrays #22

Open walidbahgat opened 2 years ago

walidbahgat commented 2 years ago

i used below example but it always update the pairs "with last pair in the array", below is an example

const botUpdate = async () => { let data = await api.botUpdate( { name: 'ABC', pairs: [ 'USDT_BTC', 'USDT_ADA', 'USDT_XRP' ], base_order_volume: '10.0', take_profit: '0.2', safety_order_volume: '10.0', martingale_volume_coefficient: '0.5', martingale_step_coefficient: '0.25', max_safety_orders: 2, active_safety_orders_count: 2, safety_order_step_percentage: '1.0', take_profit_type: 'total', strategy_list: [ { options: {time: "1m", type: 'buy_or_strong_buy'}, strategy: 'trading_view' } ], bot_id: XXXXXXXXX } ) } botUpdate()

1st Issue: the trading pairs is only updated to the single last pair 2nd Issue: strategy_list is not updated in the bot at all

Slyther commented 2 years ago

stringify the arrays, that should do the trick