requestContent = json_decode(var('request.content')) if(requestContent['type'] == "buy") { if(requestContent['position'] == "0") { request( 'adresNowegoWebhooka', //tutaj jak mamy buy i 0 json_encode([ "message_type": "bot", "bot_id": 10070800, "email_token": "ten token", "delay_seconds": 0 ]), 'POST'); } else { request( 'adresNowegoWebhooka', //tutaj jak mamy buy i 1 json_encode([ "message_type": "bot", "bot_id": 10070800, "email_token": "ten token", "delay_seconds": 0 ]), 'POST'); } } else { if(requestContent['position'] == "0") { request( 'adresNowegoWebhooka', //tutaj jak mamy sell i 0 json_encode([ "message_type": "bot", "bot_id": 10070800, "email_token": "ten token", "delay_seconds": 0 ]), 'POST'); } else { request( 'adresNowegoWebhooka', //tutaj jak mamy sell i -1 json_encode([ "message_type": "bot", "bot_id": 10070800, "email_token": "ten token", "delay_seconds": 0 ]), 'POST'); } }