Unfortunately neither version is outputting data. This is what I ended up with - did I get it wrong?
var check = context.get('recordKeeper');
const input = msg.payload.filter(s => s.status.type == "stop_loss_finished" || s.status.type == "finished");
for(let obj of input){
if(!(check.hasOwnProperty(obj.id))){
check[obj.id] = obj;
obj.pair = (String(obj.pair)).replace("USDT_", "")
obj.trade_id = obj.id
obj.profit_usd = Number(obj.profit.usd).toFixed(2)
obj.profit_percent = obj.profit.percent
obj.position = Number(obj.position.total.value).toFixed(0)
obj.volume = obj.data.current_price.quote_volume
obj.close_price = obj.data.average_close_price
obj.closed = obj.data.closed_at
if (obj.status.type === "stop_loss_finished") {obj.status = "SL"} else if (obj.status.type === "finished") {obj.status = "TP"} else if (obj.status.type === "panic_sold") {obj.status = "โฆ"} else {
obj.status= obj.status.type
}
if (obj.stop_loss.enabled) {
obj.to_sl = ((1 - obj.stop_loss.conditional.price.value / obj.data.average_enter_price) * 100).toFixed(2)
}
if (obj.status.type == "stop_loss_finished") {
obj.S_L = (((obj.data.average_enter_price - obj.stop_loss.conditional.price.value) / obj.data.average_enter_price) * 100).toFixed(2)
}
if (obj.status.type == "finished") {
obj.T_P = (((obj.take_profit.steps[0].price.value - obj.data.average_enter_price) / obj.data.average_enter_price) * 100).toFixed(2)
}
obj.in = obj.note.split("_")
obj.frames = obj.in[0]
obj.gain = obj.in[1]
obj.gain_st = obj.in[2]
obj.freq = obj.in[3]
obj.analysis = obj.in[4]
obj.tp_a = obj.in[5]
obj.tp_trl_a = obj.in[6]
obj.sl_a = obj.in[7]
obj.sl_trl_a = obj.in[8]
obj.tm_a = obj.in[9]
}
}
context.set('recordKeeper', check);
msg = {};
msg.payload = check;
return msg;
This is what the input looks (a piece of it, the whole thing exceeded allowable length)
{"_msgid":"804be7c4c990acfc","settings":{"input":"2022-11-29T23:48:08.245Z","input_format":"","input_tz":"Europe/London","output_format":"","output_locale":"C","output_tz":"America/New_York"},"method":"GET","url":"https://api.3commas.io/public/api/v2/smart_trades?status=successfully_finished&order_by=closed_at&per_page=100&from=2022-11-29T18:48:08.245Z","headers":{"date":"Wed, 30 Nov 2022 23:48:09 GMT","content-type":"application/json","transfer-encoding":"chunked","connection":"close","etag":"W/\"752f6a5dd55038266b5b0ff395db6004\"","cache-control":"max-age=0, private, must-revalidate","x-request-id":"0303bd52a701d93a09ddb1d3f7581e83","x-runtime":"1.199921","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-credentials":"true","access-control-allow-headers":"DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,apikey,signature","access-control-expose-headers":"Content-Length,Content-Range","strict-transport-security":"max-age=31536000; includeSubDomains; preload","cf-cache-status":"DYNAMIC","set-cookie":["__cf_bm=KAwj2qdahQJ1TeFurGn8NzQvIFbSaR7YszSjTDsInsQ-1669852089-0-AUsA5xatvDcx5f26v/UIqYoSXtpSBFOJNELEGPcJtzEadofX4uTZcx32BuD4y01VrMyh/v/ek//tV1G2h4HNFSA=; path=/; expires=Thu, 01-Dec-22 00:18:09 GMT; domain=.api.3commas.io; HttpOnly; Secure; SameSite=None"],"server":"cloudflare","cf-ray":"772778e03f0fd676-CDG","x-node-red-request-node":"1fa3d55c"},"payload":[{"id":21614892,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_PERP","instant":false,"status":{"type":"stop_loss_finished","basic_type":"stop_loss_finished","title":"Stop Loss finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"18682.5","editable":false},"price":{"value":"0.53571","value_without_commission":"0.53518","editable":false},"total":{"value":"10008.49885035"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":true,"breakeven":false,"order_type":"market","editable":false,"price":{"value":null},"conditional":{"price":{"value":"0.53749","type":"last","percent":null},"trailing":{"enabled":true,"percent":null}},"timeout":{"enabled":true,"value":1},"status":{"type":"finished","basic_type":"finished","title":"Finished"}},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m--_1.37_3_3_NEUTRAL_2.5_1_2_๐ก_1","note_raw":"5m--_1.37_3_3_NEUTRAL_2.5_1_2_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"14.848","bid":"0.52913","ask":"0.52991","last":"0.52945","quote_volume":"21672677.2004991"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.53571","average_close_price":"0.52848","average_enter_price_without_commission":"0.53518","average_close_price_without_commission":"0.52901","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"18682.5","entered_total":"10008.49885035","closed_amount":"18682.5","closed_total":"9873.346095675","created_at":"2022-11-30T23:19:39.929Z","updated_at":"2022-11-30T23:19:39.929Z","closed_at":"2022-11-30T23:45:19.825Z","type":"smart_trade"},"profit":{"volume":"-135.152754675","usd":"-135.152754675","percent":"-1.35","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614628,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_ETH","instant":false,"status":{"type":"panic_sold","basic_type":"panic_sold","title":"Closed at Market Price"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"0.7732","editable":false},"price":{"value":"1296.45","value_without_commission":"1295.16","editable":false},"total":{"value":"1002.41912971"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{"id":90590103,"type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"},"units":{"value":"0.7732"},"price":{"value":"1292.94","value_without_commission":"1294.24"},"total":{"value":"1002.419129712"}},"note":"undefined","note_raw":"undefined","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"6.596","bid":"1299.43","ask":"1299.44","last":"1299.46","quote_volume":"1026947241.270657"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"1296.45","average_close_price":"1292.94","average_enter_price_without_commission":"1295.16","average_close_price_without_commission":"1294.24","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":false,"base_position_step_finished":true,"entered_amount":"0.7732","entered_total":"1002.419129712","closed_amount":"0.7732","closed_total":"999.705661632","created_at":"2022-11-30T22:44:40.964Z","updated_at":"2022-11-30T22:44:40.964Z","closed_at":"2022-11-30T22:53:20.666Z","type":"smart_trade"},"profit":{"volume":"-2.71346808","usd":"-2.71346808","percent":"-0.27","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614623,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_ETH","instant":false,"status":{"type":"panic_sold","basic_type":"panic_sold","title":"Closed at Market Price"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"0.7725","editable":false},"price":{"value":"1296.21","value_without_commission":"1294.92","editable":false},"total":{"value":"1001.3260257"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{"id":90590102,"type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"},"units":{"value":"0.7725"},"price":{"value":"1292.94","value_without_commission":"1294.24"},"total":{"value":"1001.3260257"}},"note":"undefined","note_raw":"undefined","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"6.596","bid":"1299.43","ask":"1299.44","last":"1299.46","quote_volume":"1026947241.270657"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"1296.21","average_close_price":"1292.94","average_enter_price_without_commission":"1294.92","average_close_price_without_commission":"1294.24","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":false,"base_position_step_finished":true,"entered_amount":"0.7725","entered_total":"1001.3260257","closed_amount":"0.7725","closed_total":"998.8005996","created_at":"2022-11-30T22:43:59.626Z","updated_at":"2022-11-30T22:43:59.626Z","closed_at":"2022-11-30T22:53:17.963Z","type":"smart_trade"},"profit":{"volume":"-2.5254261","usd":"-2.5254261","percent":"-0.25","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614064,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_PERL","instant":false,"status":{"type":"stop_loss_finished","basic_type":"stop_loss_finished","title":"Stop Loss finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"531632.1","editable":false},"price":{"value":"0.01881","value_without_commission":"0.0188","editable":false},"total":{"value":"10004.67816348"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":true,"breakeven":false,"order_type":"market","editable":false,"price":{"value":null},"conditional":{"price":{"value":"0.01851","type":"last","percent":null},"trailing":{"enabled":true,"percent":null}},"timeout":{"enabled":true,"value":1},"status":{"type":"finished","basic_type":"finished","title":"Finished"}},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_1.05_1_3_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_1.05_1_3_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"3.518","bid":"0.01855","ask":"0.01856","last":"0.01854","quote_volume":"974695.579876"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.01881","average_close_price":"0.01845","average_enter_price_without_commission":"0.0188","average_close_price_without_commission":"0.01847","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"531632.1","entered_total":"10004.67816348","closed_amount":"531632.1","closed_total":"9809.425642113","created_at":"2022-11-30T21:34:46.049Z","updated_at":"2022-11-30T21:34:46.049Z","closed_at":"2022-11-30T22:25:47.738Z","type":"smart_trade"},"profit":{"volume":"-195.252521367","usd":"-195.252521367","percent":"-1.95","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614084,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_FRONT","instant":false,"status":{"type":"finished","basic_type":"finished","title":"Finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"48631.0","editable":false},"price":{"value":"0.2042","value_without_commission":"0.204","editable":false},"total":{"value":"9930.644724"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[{"id":90587570,"order_type":"market","editable":false,"units":{"value":"48631.0"},"price":{"value":"0.206713","type":"last","percent":null},"volume":"100.0","total":"10052.659903","trailing":{"enabled":true,"percent":"-1.0"},"status":{"type":"finished","basic_type":"finished","title":"Finished"},"data":{"cancelable":false,"panic_sell_available":false},"position":1}]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_1.65_1_3_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_1.65_1_3_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"5.336","bid":"0.2048","ask":"0.2053","last":"0.2053","quote_volume":"692069.2501"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.2042","average_close_price":"0.2049","average_enter_price_without_commission":"0.204","average_close_price_without_commission":"0.2052","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"48631.0","entered_total":"9930.644724","closed_amount":"48631.0","closed_total":"9969.1021188","created_at":"2022-11-30T21:37:00.913Z","updated_at":"2022-11-30T21:37:00.913Z","closed_at":"2022-11-30T21:51:17.310Z","type":"smart_trade"},"profit":{"volume":"38.4573948","usd":"38.4573948","percent":"0.39","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614068,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_DREP","instant":false,"status":{"type":"finished","basic_type":"finished","title":"Finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"29895.0","editable":false},"price":{"value":"0.3389","value_without_commission":"0.3386","editable":false},"total":{"value":"10132.569447"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[{"id":90587484,"order_type":"market","editable":false,"units":{"value":"29895.0"},"price":{"value":"0.336305","type":"last","percent":null},"volume":"100.0","total":"10053.837975","trailing":{"enabled":true,"percent":"-1.0"},"status":{"type":"finished","basic_type":"finished","title":"Finished"},"data":{"cancelable":false,"panic_sell_available":false},"position":1}]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_1.18_1_3_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_1.18_1_3_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"7.059","bid":"0.3367","ask":"0.337","last":"0.3367","quote_volume":"554817.2402"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.3389","average_close_price":"0.3342","average_enter_price_without_commission":"0.3386","average_close_price_without_commission":"0.3346","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"29895.0","entered_total":"10132.569447","closed_amount":"29895.0","closed_total":"9992.864133","created_at":"2022-11-30T21:35:02.961Z","updated_at":"2022-11-30T21:35:02.961Z","closed_at":"2022-11-30T21:41:05.739Z","type":"smart_trade"},"profit":{"volume":"-139.705314","usd":"-139.705314","percent":"-1.38","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614070,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_FORTH","instant":false,"status":{"type":"finished","basic_type":"finished","title":"Finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"2922.6","editable":false},"price":{"value":"3.5","value_without_commission":"3.5","editable":false},"total":{"value":"10239.3291"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[{"id":90587498,"order_type":"market","editable":false,"units":{"value":"2922.6"},"price":{"value":"3.5353","type":"last","percent":null},"volume":"100.0","total":"10332.26778","trailing":{"enabled":true,"percent":"-1.0"},"status":{"type":"finished","basic_type":"finished","title":"Finished"},"data":{"cancelable":false,"panic_sell_available":false},"position":1}]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_2.09_1_3_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_2.09_1_3_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"4.276","bid":"3.17","ask":"3.18","last":"3.17","quote_volume":"2321988.6728"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"3.5","average_close_price":"3.48","average_enter_price_without_commission":"3.5","average_close_price_without_commission":"3.49","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"2922.6","entered_total":"10239.3291","closed_amount":"2922.6","closed_total":"10189.674126","created_at":"2022-11-30T21:35:16.147Z","updated_at":"2022-11-30T21:35:16.147Z","closed_at":"2022-11-30T21:38:28.008Z","type":"smart_trade"},"profit":{"volume":"-49.654974","usd":"-49.654974","percent":"-0.48","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21614045,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_FORTH","instant":false,"status":{"type":"finished","basic_type":"finished","title":"Finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"2994.01","editable":false},"price":{"value":"3.42","value_without_commission":"3.42","editable":false},"total":{"value":"10249.7537142"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[{"id":90587384,"order_type":"market","editable":false,"units":{"value":"2994.01"},"price":{"value":"3.5361","type":"last","percent":null},"volume":"100.0","total":"10587.118761","trailing":{"enabled":true,"percent":"-1.0"},"status":{"type":"finished","basic_type":"finished","title":"Finished"},"data":{"cancelable":false,"panic_sell_available":false},"position":1}]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_1.58_1_3_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_1.58_1_3_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"4.276","bid":"3.17","ask":"3.18","last":"3.17","quote_volume":"2321988.6728"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"3.42","average_close_price":"3.48","average_enter_price_without_commission":"3.42","average_close_price_without_commission":"3.49","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"2994.01","entered_total":"10249.7537142","closed_amount":"2994.01","closed_total":"10438.6458051","created_at":"2022-11-30T21:32:46.013Z","updated_at":"2022-11-30T21:32:46.013Z","closed_at":"2022-11-30T21:38:27.609Z","type":"smart_trade"},"profit":{"volume":"188.8920909","usd":"188.8920909","percent":"1.84","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21613878,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_ERN","instant":false,"status":{"type":"stop_loss_finished","basic_type":"stop_loss_finished","title":"Stop Loss finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"4544.1","editable":false},"price":{"value":"2.18","value_without_commission":"2.178","editable":false},"total":{"value":"9906.9468498"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":true,"breakeven":false,"order_type":"market","editable":false,"price":{"value":null},"conditional":{"price":{"value":"2.1986","type":"last","percent":null},"trailing":{"enabled":true,"percent":null}},"timeout":{"enabled":true,"value":1},"status":{"type":"finished","basic_type":"finished","title":"Finished"}},"reduce_funds":{"steps":[]},"market_close":{},"note":"---_1.44_2_2_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"---_1.44_2_2_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"17.238","bid":"2.188","ask":"2.19","last":"2.19","quote_volume":"20921460.4329"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"2.18","average_close_price":"2.191","average_enter_price_without_commission":"2.178","average_close_price_without_commission":"2.194","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"4544.1","entered_total":"9906.9468498","closed_amount":"4544.1","closed_total":"9959.7856446","created_at":"2022-11-30T21:10:30.745Z","updated_at":"2022-11-30T21:10:30.745Z","closed_at":"2022-11-30T21:20:43.604Z","type":"smart_trade"},"profit":{"volume":"52.8387948","usd":"52.8387948","percent":"0.53","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21611740,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_MLN","instant":false,"status":{"type":"finished","basic_type":"finished","title":"Finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"454.834","editable":false},"price":{"value":"22.34","value_without_commission":"22.32","editable":false},"total":{"value":"10162.04677488"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[{"id":90577322,"order_type":"market","editable":false,"units":{"value":"454.834"},"price":{"value":"22.2069","type":"last","percent":null},"volume":"100.0","total":"10100.4531546","trailing":{"enabled":true,"percent":"-1.0"},"status":{"type":"finished","basic_type":"finished","title":"Finished"},"data":{"cancelable":false,"panic_sell_available":false},"position":1}]},"stop_loss":{"enabled":false},"reduce_funds":{"steps":[]},"market_close":{},"note":"-15m--_3.04_3_1_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"-15m--_3.04_3_1_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"3.55","bid":"20.97","ask":"21.02","last":"21.0","quote_volume":"1099984.39531"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"22.34","average_close_price":"22.06","average_enter_price_without_commission":"22.32","average_close_price_without_commission":"22.09","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"454.834","entered_total":"10162.04677488","closed_amount":"454.834","closed_total":"10037.23577694","created_at":"2022-11-30T18:02:23.278Z","updated_at":"2022-11-30T18:02:23.278Z","closed_at":"2022-11-30T18:04:31.769Z","type":"smart_trade"},"profit":{"volume":"-124.81099794","usd":"-124.81099794","percent":"-1.23","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21610742,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_FIS","instant":false,"status":{"type":"stop_loss_finished","basic_type":"stop_loss_finished","title":"Stop Loss finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"32450.0","editable":false},"price":{"value":"0.3076","value_without_commission":"0.3073","editable":false},"total":{"value":"9981.856885"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":true,"breakeven":false,"order_type":"market","editable":false,"price":{"value":null},"conditional":{"price":{"value":"0.3035","type":"last","percent":null},"trailing":{"enabled":true,"percent":null}},"timeout":{"enabled":true,"value":1},"status":{"type":"finished","basic_type":"finished","title":"Finished"}},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_1.02_0.5_2_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_1.02_0.5_2_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"day_change_percent":"2.881","bid":"0.3097","ask":"0.3108","last":"0.3107","quote_volume":"486589.9993"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.3076","average_close_price":"0.3006","average_enter_price_without_commission":"0.3073","average_close_price_without_commission":"0.301","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"32450.0","entered_total":"9981.856885","closed_amount":"32450.0","closed_total":"9757.68255","created_at":"2022-11-30T16:37:08.711Z","updated_at":"2022-11-30T16:37:08.711Z","closed_at":"2022-11-30T17:34:47.300Z","type":"smart_trade"},"profit":{"volume":"-224.174335","usd":"-224.174335","percent":"-2.25","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false},{"id":21610660,"version":2,"account":{"id":32144558,"type":"paper_trading","name":"Paper Account 1006740","market":"Paper trading account","link":"/accounts/32144558"},"pair":"USDT_STEEM","instant":false,"status":{"type":"stop_loss_finished","basic_type":"stop_loss_finished","title":"Stop Loss finished"},"leverage":{"enabled":false},"position":{"type":"buy","editable":false,"units":{"value":"56179.7","editable":false},"price":{"value":"0.1771","value_without_commission":"0.177","editable":false},"total":{"value":"9953.7507069"},"order_type":"market","status":{"type":"finished","basic_type":"finished","title":"Finished"}},"take_profit":{"enabled":true,"steps":[]},"stop_loss":{"enabled":true,"breakeven":false,"order_type":"market","editable":false,"price":{"value":null},"conditional":{"price":{"value":"0.176","type":"last","percent":null},"trailing":{"enabled":true,"percent":null}},"timeout":{"enabled":true,"value":1},"status":{"type":"finished","basic_type":"finished","title":"Finished"}},"reduce_funds":{"steps":[]},"market_close":{},"note":"5m---_0.62_0.5_2_S.BUY_1.5_1_1.5_๐ก_1","note_raw":"5m---_0.62_0.5_2_S.BUY_1.5_1_1.5_๐ก_1","skip_enter_step":false,"data":{"editable":false,"current_price":{"editable":false,"current_price":{"day_change_percent":"0.985","bid":"0.041","ask":"0.0411","last":"0.041","quote_volume":"3497944.3767"},"target_price_type":"price","base_order_finished":true,"missing_funds_to_close":0,"liquidation_price":null,"average_enter_price":"0.0414","average_close_price":"0.0415","average_enter_price_without_commission":"0.0414","average_close_price_without_commission":"0.0416","panic_sell_available":false,"add_funds_available":false,"reduce_funds_available":false,"force_start_available":false,"force_process_available":false,"cancel_available":false,"finished":true,"base_position_step_finished":true,"entered_amount":"238095.0","entered_total":"9866.990133","closed_amount":"238095.0","closed_total":"9894.847248","created_at":"2022-11-29T22:34:16.901Z","updated_at":"2022-11-29T22:34:16.901Z","closed_at":"2022-11-29T22:37:23.134Z","type":"smart_trade"},"profit":{"volume":"27.857115","usd":"27.857115","percent":"0.28","roe":null},"margin":{"amount":null,"total":null},"is_position_not_filled":false}],"statusCode":200,"responseUrl":"https://api.3commas.io/public/api/v2/smart_trades?status=successfully_finished&order_by=closed_at&per_page=100&from=2022-11-29T18:48:08.245Z","redirectList":[],"retry":0,"responseCookies":{"__cf_bm":{"path":"/","expires":"Thu, 01-Dec-22 00:18:09 GMT","domain":".api.3commas.io","SameSite":"None","value":"KAwj2qdahQJ1TeFurGn8NzQvIFbSaR7YszSjTDsInsQ-1669852089-0-AUsA5xatvDcx5f26v/UIqYoSXtpSBFOJNELEGPcJtzEadofX4uTZcx32BuD4y01VrMyh/v/ek//tV1G2h4HNFSA="}}}
Thanks for your patience ...