{"collection":{"info":{"_postman_id":"c7d127cb-1e82-43fd-a892-6c2e9e7d8c49","name":"Cancel_Order_BUY","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","updatedAt":"2023-12-28T02:17:34.000Z","uid":"14729559-c7d127cb-1e82-43fd-a892-6c2e9e7d8c49","createdAt":"2023-12-27T10:30:39.000Z","lastUpdatedBy":"14729559"},"item":[{"name":"Create_order","event":[{"listen":"test","script":{"id":"bbf065a2-7816-4981-8544-efa41da8654b","exec":["//TC_1: Check status code\r","pm.test(\"status code is 200\", function(){\r"," pm.response.to.have.status(200);\r","});\r","//TC_2:Check message\r","let jsondata=pm.response.json();\r","pm.test(\"Check message response: success\",function(){\r"," pm.expect(jsondata.result).to.eql(\"Success\");\r","});"],"type":"text/javascript"}}],"id":"51d399c7-5653-4abc-9882-dc7aadd239f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n \"accountNo\": \"CA-00000146\",\r\n \"cif\": \"test_00013\",\r\n \"clordId\": \"CA_1\",\r\n \"orderSide\": \"BUY\",\r\n \"orderQty\": 10,\r\n \"exchangeCode\": \"SGX\",\r\n \"stockCode\": \"Z74\",\r\n \"currencyCode\": \"SGD\",\r\n \"orderValidity\": \"DAY\",\r\n \"orderLot\": \"BOARD\",\r\n \"orderType\": \"LIMIT_ORDER\",\r\n \"rewardCode\": \"null\",\r\n \"estimatedNetAmount\": 100,\r\n \"fees\": \"5\",\r\n \"orderDatetime\": \"2023-12-26T16:55:41.864275200\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseUrl}}/internal/order-creation?price={{price}}&fee={{fee}}","host":["{{baseUrl}}"],"path":["internal","order-creation"],"query":[{"key":"price","value":"{{price}}"},{"key":"fee","value":"{{fee}}"}]}},"response":[],"uid":"14729559-51d399c7-5653-4abc-9882-dc7aadd239f7"},{"name":"Before_tradingLimit","event":[{"listen":"test","script":{"id":"025e6f61-bdf5-45e8-983e-e81f864c0f64","exec":["var jsonData = JSON.parse(responseBody);\r","pm.globals.set(\"tradinglimit\", jsonData.value);\r","pm.globals.get (\"tradinglimit\");"],"type":"text/javascript"}}],"id":"abefb465-e310-4dd4-9b9a-77b8633fb2bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"accept","value":"*/*"}],"url":{"raw":"https://gcw-bo-api.dev.rakutentrade.com/api/v1/bo/wallet/calculateTradingLimitValue?cif=test_00013¤cy=SGD","protocol":"https","host":["gcw-bo-api","dev","rakutentrade","com"],"path":["api","v1","bo","wallet","calculateTradingLimitValue"],"query":[{"key":"cif","value":"test_00013"},{"key":"currency","value":"SGD"}]}},"response":[],"uid":"14729559-abefb465-e310-4dd4-9b9a-77b8633fb2bc"},{"name":"CA_1","event":[{"listen":"test","script":{"id":"3507459c-f24f-4f54-b4c2-c7fc5ccdc7a6","exec":["//TC_1: Check status code\r","pm.test(\"status code is 200\", function(){\r"," pm.response.to.have.status(200);\r","});\r","//TC_2:Check message\r","let jsondata=pm.response.json();\r","pm.test(\"Check message response: success\",function(){\r"," pm.expect(jsondata.result).to.eql(\"Success\");\r","});"],"type":"text/javascript"}}],"id":"5cbc51a1-86fe-424e-8ecf-82dc3b233549","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n \"orderId\": \"CA_1\"\n}"},"url":{"raw":"https://cash-bo-api.dev.rakutentrade.com/internal/order-cancel","protocol":"https","host":["cash-bo-api","dev","rakutentrade","com"],"path":["internal","order-cancel"]}},"response":[],"uid":"14729559-5cbc51a1-86fe-424e-8ecf-82dc3b233549"},{"name":"After_tradingLimit","event":[{"listen":"test","script":{"id":"025e6f61-bdf5-45e8-983e-e81f864c0f64","exec":["var jsonData = pm.response.json();\r","\r","var newTradingLimit = jsonData.value;\r","\r","var oldTradinglimit = pm.globals.get('tradinglimit');\r","\r","parseInt(pm.globals.get('price'))\r","\r","parseInt(pm.globals.get('fee'))\r","\r","pm.test(\"Difference between new and old trading limit \", function () {\r"," pm.expect(oldTradinglimit + parseInt(pm.globals.get('price')) + parseInt(pm.globals.get('fee'))).to.be.eql(newTradingLimit);\r","});\r",""],"type":"text/javascript"}}],"id":"53e00147-c8ac-4a45-a934-4cccf048d12b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"accept","value":"*/*"}],"url":{"raw":"https://gcw-bo-api.dev.rakutentrade.com/api/v1/bo/wallet/calculateTradingLimitValue?cif=test_00013¤cy=SGD","protocol":"https","host":["gcw-bo-api","dev","rakutentrade","com"],"path":["api","v1","bo","wallet","calculateTradingLimitValue"],"query":[{"key":"cif","value":"test_00013"},{"key":"currency","value":"SGD"}]}},"response":[],"uid":"14729559-53e00147-c8ac-4a45-a934-4cccf048d12b"}]}}