{"info":{"_postman_id":"297f7ce1-64af-45a3-8999-287952e29b87","name":"Slayz Documentation","description":"<html><head></head><body><p>Slayz App Api Documentation</p>\n<h2 id=\"creating-a-request\">Creating a Request</h2>\n<p>All private API calls must contain the following headers:</p>\n<ul>\n<li><p><strong>AUTHORIZATION</strong>: The token provided by us must be passed</p>\n</li>\n<li><p><strong>ACCESS-USER</strong> Username as a string.</p>\n</li>\n<li><p><strong>ACCESS-PASSPHRASE</strong> The passphrase you specified when creating the API key.</p>\n</li>\n<li><p><strong>ACCESS-TIMESTAMP</strong> A timestamp for your request.</p>\n</li>\n<li><p><strong>ACCESS-SIGN</strong> The signature (see Signing a Message).</p>\n</li>\n<li><p><strong>ACCESS-KEY</strong> The api key as a string.</p>\n</li>\n</ul>\n<p>Content-Type should be set as application/json</p>\n<h2 id=\"signing-a-message\">Signing a Message</h2>\n<p>The <strong>ACCESS-SIGN</strong> header should be generated by using keyed (<strong>secret_key</strong>) <strong>HMAC-SHA256</strong> of api_key + username + pass_phrase + timestamp + body (where + represents string concatenation)</p>\n<p>The timestamp value should be the same in the <strong>ACCESS-TIMESTAMP</strong> header.</p>\n<p>The <strong>body</strong> is the request body string as JSON or \"{}\" if there is no request body.</p>\n<p>Example Pre-Request Script:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">//add access user\nvar user = pm.collectionVariables.get(\"customerNumber\");\npm.request.addHeader({\n    key: \"Access-User\", \n    value: user\n});\n//apply hash\nvar secretKey = pm.collectionVariables.get(\"secretKey\");\nvar token = pm.collectionVariables.get(\"token\");\nvar apiKey = \"\"; // Boş string bırakılması gerekiyor\nvar timestamp = new Date().toISOString();\nvar body = (pm.request.body ?? \"{}\").toString();\nif (body == null || body == undefined || body == \"\") {\n    body = \"{}\";\n}\npm.request.addHeader({\n    key: \"Access-Timestamp\", \n    value: timestamp\n});\npm.request.addHeader({\n    key: \"Access-Key\", \n    value: apiKey\n});\npm.request.addHeader({\n    key: \"Authorization\", \n    value: \"Bearer \" + token\n});\n//calculate sign\nvar signedString = apiKey + user + timestamp + body;\nvar sign = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(signedString, secretKey)).toUpperCase();\npm.request.addHeader({\n    key: \"Access-Sign\", \n    value: sign\n});\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"3500242","collectionId":"297f7ce1-64af-45a3-8999-287952e29b87","publishedId":"2sAXqv3fQA","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FFB800"},"publishDate":"2024-09-23T12:54:22.000Z"},"item":[{"name":"api","item":[{"name":"Asset","item":[{"name":"/api/Asset/v2/all","id":"c2296c22-d923-4fe1-bca9-ee5cda9bceae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/Asset/v2/all","description":"<p>ilgili servis müşterinin US ve TR borsalarındaki mevcut varlık bilglerini ve anlık bakiye bilgilerini içerir</p>\n","urlObject":{"path":["api","Asset","v2","all"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"4bbb07cc-ba7e-4f1d-812f-149f22d400c6","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":"https://your-api-url.com/api/Asset/v2/all"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"grandTotalLocal\": 22541.53289549104,\n        \"grandTotalForeign\": 1281.0167313384508814340444181,\n        \"local\": {\n            \"funds\": [],\n            \"stocks\": [],\n            \"totalFundAmount\": 0,\n            \"totalStockAmount\": 0,\n            \"totalProfitLoss\": 0,\n            \"totalFundProfitLoss\": 0,\n            \"totalInvestmentAmount\": 0,\n            \"totalCashAmount\": 13730.86,\n            \"grandTotal\": 13730.86,\n            \"availableAmount\": 0,\n            \"availableAmountString\": \"0\",\n            \"timeSpan\": \"2024-09-23T10:18:06.9995796+00:00\"\n        },\n        \"foreign\": {\n            \"funds\": [],\n            \"stocks\": [\n                {\n                    \"stockCode\": \"META\",\n                    \"quantity\": 0.185874296,\n                    \"quantityAvailable\": 0.185874296,\n                    \"quantityAvailableString\": \"0.185874296\",\n                    \"totalAmount\": 105.571024,\n                    \"averageCost\": 537.998,\n                    \"profitLoss\": 5.571025,\n                    \"profitLossDaily\": 1.230488,\n                    \"profitLossPercentage\": 0.0557102505571025,\n                    \"profitLossDailyPercentage\": 0.0117930005649961\n                }\n            ],\n            \"totalFundAmount\": 0,\n            \"totalStockAmount\": 105.571024,\n            \"totalProfitLoss\": 5.571025,\n            \"totalFundProfitLoss\": 0,\n            \"totalInvestmentAmount\": 105.571024,\n            \"totalCashAmount\": 399,\n            \"grandTotal\": 504.571024,\n            \"availableAmount\": 399,\n            \"availableAmountString\": \"399\",\n            \"timeSpan\": \"2024-09-23T10:18:07.3312431+00:00\"\n        }\n    }\n}"}],"_postman_id":"c2296c22-d923-4fe1-bca9-ee5cda9bceae"},{"name":"/api/Asset/stock/:symbol","id":"8baa8026-a69d-4238-b8a4-b969b8a019ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/Asset/stock/:symbol","description":"<p>İlgili servis müşterinin belirtilen hisse için anlık varlık bilgilerini içerir</p>\n","urlObject":{"path":["api","Asset","stock",":symbol"],"host":[""],"query":[],"variable":[{"id":"84d67602-5eeb-4b34-983e-1de80b597c24","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"amet","key":"symbol"}]}},"response":[{"id":"5478e4b6-1500-4ac0-a024-ada911369377","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":{"raw":"https://your-api-url.com/api/Asset/stock/:symbol","protocol":"https","host":["your-api-url","com"],"path":["api","Asset","stock",":symbol"],"variable":[{"key":"symbol","value":"AAPL","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"stockCode\": \"META\",\n        \"quantity\": 0.185874296,\n        \"quantityAvailable\": 0,\n        \"quantityAvailableString\": null,\n        \"totalAmount\": 105.571024,\n        \"averageCost\": 537.998,\n        \"profitLoss\": 5.571025,\n        \"profitLossDaily\": 1.230488,\n        \"profitLossPercentage\": 557102505571025,\n        \"profitLossDailyPercentage\": 117930005649961\n    }\n}"}],"_postman_id":"8baa8026-a69d-4238-b8a4-b969b8a019ac"},{"name":"/api/Asset/t-balance/:market","id":"3e60a74d-995b-493d-b9e0-c97c616c2e08","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/Asset/t-balance/:market","description":"<p>İlgili servis müşterinin T0, T1, T2 zamanındaki bakiye bilgisini içerir</p>\n","urlObject":{"path":["api","Asset","t-balance",":market"],"host":[""],"query":[],"variable":[{"type":"any","value":"","key":"market"}]}},"response":[{"id":"afd21257-5699-431e-af96-c75d867a0d74","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":{"raw":"https://your-api-url.com/api/Asset/t-balance/:market","protocol":"https","host":["your-api-url","com"],"path":["api","Asset","t-balance",":market"],"variable":[{"key":"market","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"tBalance\": 13730.86,\n        \"t1Balance\": 13730.86,\n        \"t2Balance\": 13730.86\n    }\n}"}],"_postman_id":"3e60a74d-995b-493d-b9e0-c97c616c2e08"}],"id":"aad1627a-7029-409d-9cf8-ef9449d1f00e","_postman_id":"aad1627a-7029-409d-9cf8-ef9449d1f00e","description":""},{"name":"Order","item":[{"name":"/api/Order/GetOrders","id":"dba55d98-898c-4995-b65b-9688035b95ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"completed\",\n  \"startDate\": \"2024-09-01\",\n  \"endDate\": \"2024-09-30\",\n  \"symbols\": [],\n  \"pageNumber\": 0\n}","options":{"raw":{"language":"json"}}},"url":"/api/Order/GetOrders","description":"<p>İlgili servis müşterinin gönderilecek parametrelere göre geçmişteki veya şuanki açık, tamamlanan, iptal edilmiş taleplerini içerir.</p>\n<h3 id=\"parametre-detayları\"><strong>Parametre Detayları:</strong></h3>\n<p><strong>status</strong> (TR borsası için): failed, canceled, filled, expired</p>\n<p><strong>status</strong> (US borsaları için): failed, canceled, filled, expired, forwarded_to_provider, partially_filled (partially_filled emrin bir kısmının gerçekleştiğini ilgili işlemin daha tamamlanmadığını belirtir)</p>\n<p><strong>symbols</strong>: Hangi hisseler için veri isteniyorsa o hisseler \",\" ayracı ile gönderilmelidir. Örneğin: symbols:AAPL,META. Boş bırakılır ise tümünü döndürür</p>\n<p><strong>pageNumber</strong>: İlk sayfa için 0 atılmalıdır</p>\n","urlObject":{"path":["api","Order","GetOrders"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"7d63f333-053b-4299-851a-3c9f822e9f4c","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"completed\",\n  \"startDate\": \"2024-09-01\",\n  \"endDate\": \"2024-09-30\",\n  \"symbols\": [],\n  \"pageNumber\": 0\n}","options":{"raw":{"language":"json"}}},"url":"https://your-api-url.com/api/Order/GetOrders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"market\": null,\n            \"clientOrderId\": \"60488d9424944fdcafef992872e65309\",\n            \"symbol\": \"META\",\n            \"quantity\": 0,\n            \"notional\": 100,\n            \"price\": 537.998,\n            \"type\": \"market\",\n            \"status\": \"filled\",\n            \"filledPrice\": 537.998,\n            \"limitPrice\": 0,\n            \"stopPrice\": 0,\n            \"timeInForce\": \"day\",\n            \"side\": \"buy\",\n            \"commission\": 1,\n            \"filledQuantity\": 0.185874296,\n            \"createdAt\": \"2024-09-17T14:07:56.20987Z\",\n            \"createdAtNew\": \"2024-09-17T14:07:56.2098700+00:00\",\n            \"filledAt\": \"2024-09-17T14:07:56.215851Z\",\n            \"filledAtNew\": \"2024-09-17T14:07:56.2158510+00:00\",\n            \"expiredAt\": null,\n            \"expiredAtNew\": null,\n            \"cancelledAt\": null,\n            \"cancelledAtNew\": null,\n            \"updatable\": false\n        }\n    ]\n}"}],"_postman_id":"dba55d98-898c-4995-b65b-9688035b95ef"},{"name":"/api/Order/{market}","id":"f690bac2-6af8-4309-a270-70aa31c87e39","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"/api/Order/:market?status=filled&startDate=2024-09-01&endDate=2024-09-30&symbols=META,AAPL&pageNumber=0","description":"<p>Belirtilen market değeri için ilgili market üzerinde yapılan işlemleri listeler. Parametrelerin kullanım şekli \"/api/Order/GetOrders\" servisi ile aynıdır</p>\n","urlObject":{"path":["api","Order",":market"],"host":[""],"query":[{"key":"status","value":"filled"},{"key":"startDate","value":"2024-09-01"},{"key":"endDate","value":"2024-09-30"},{"key":"symbols","value":"META,AAPL"},{"key":"pageNumber","value":"0"}],"variable":[{"type":"any","value":"us","key":"market"}]}},"response":[{"id":"12dc3bed-56e2-4d4c-a4a5-b9d809fb2bbf","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"https://your-api-url.com/api/Order/:market?status=filled&startDate=2024-09-01&endDate=2024-09-30&symbols=META,AAPL&pageNumber=0","protocol":"https","host":["your-api-url","com"],"path":["api","Order",":market"],"query":[{"key":"status","value":"filled"},{"key":"startDate","value":"2024-09-01"},{"key":"endDate","value":"2024-09-30"},{"key":"symbols","value":"META,AAPL"},{"key":"pageNumber","value":"0"}],"variable":[{"key":"market","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"market\": null,\n            \"clientOrderId\": \"60488d9424944fdcafef992872e65309\",\n            \"symbol\": \"META\",\n            \"quantity\": 0,\n            \"notional\": 100,\n            \"price\": 537.998,\n            \"type\": \"market\",\n            \"status\": \"filled\",\n            \"filledPrice\": 537.998,\n            \"limitPrice\": 0,\n            \"stopPrice\": 0,\n            \"timeInForce\": \"day\",\n            \"side\": \"buy\",\n            \"commission\": 1,\n            \"filledQuantity\": 0.185874296,\n            \"createdAt\": \"2024-09-17T14:07:56.20987Z\",\n            \"createdAtNew\": \"2024-09-17T14:07:56.2098700+00:00\",\n            \"filledAt\": \"2024-09-17T14:07:56.215851Z\",\n            \"filledAtNew\": \"2024-09-17T14:07:56.2158510+00:00\",\n            \"expiredAt\": null,\n            \"expiredAtNew\": null,\n            \"cancelledAt\": null,\n            \"cancelledAtNew\": null,\n            \"updatable\": false\n        }\n    ]\n}"}],"_postman_id":"f690bac2-6af8-4309-a270-70aa31c87e39"},{"name":"/api/Order/insta-update/:orderId","id":"e28e12cc-dbf6-4c66-b5e1-771a5437fdaa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"newQuantity\": \"0\",\n  \"newLimitPrice\": null\n}","options":{"raw":{"language":"json"}}},"url":"/api/Order/insta-update/:orderId","description":"<p>Belirtilen orderId parametresine göre ilgili emir için güncelleme talebi gönderir.</p>\n<p>US için kullanımına izin verilmemektedir. Sadece TR borsası emirlerinde kullanılabilir.</p>\n<p>İlgili servis çağırıldıktan sonra dönen transactionId parametresi ile \"/api/Order/update/execute/:transactionId\" servisi çağırılarak emir güncellenebilir.</p>\n","urlObject":{"path":["api","Order","insta-update",":orderId"],"host":[""],"query":[],"variable":[{"id":"257447f4-3c3d-4aa2-af0d-e63eba865201","type":"any","value":"","key":"orderId"}]}},"response":[{"id":"df45656a-82f0-4ef2-b782-d1c1256cbc51","name":"Success","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"{\n  \"newQuantity\": \"0\",\n  \"newLimitPrice\": null\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://your-api-url.com/api/Order/update/estimate/:orderId","protocol":"https","host":["your-api-url","com"],"path":["api","Order","update","estimate",":orderId"],"variable":[{"key":"orderId","value":"XXXXXXX","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"e28e12cc-dbf6-4c66-b5e1-771a5437fdaa"},{"name":"/api/Order/cancel/:orderId","id":"dad56b15-0523-4158-8597-63049d5088d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/api/Order/cancel/480e27cff9a04383992616405ba25386","description":"<p>İlgili servis aktif olan bir emrin iptali işlemini gerçekleştirir.</p>\n","urlObject":{"path":["api","Order","cancel","480e27cff9a04383992616405ba25386"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"15a2f6ec-5f42-4477-9487-d216b6f303a3","name":"Success","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":{"raw":"https://your-api-url.com/api/Order/cancel/:orderId","protocol":"https","host":["your-api-url","com"],"path":["api","Order","cancel",":orderId"],"variable":[{"key":"orderId","value":"XXXXXX","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"dad56b15-0523-4158-8597-63049d5088d0"}],"id":"a8ee339c-1add-40e2-af85-49ca2804be8f","_postman_id":"a8ee339c-1add-40e2-af85-49ca2804be8f","description":""},{"name":"Stock","item":[{"name":"/api/stock","id":"b1691d1d-4d8f-4e11-add5-17c5c84b77e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"/api/stock","description":"<h3 id=\"get-apistock\">GET /api/stock</h3>\n<p>This endpoint retrieves stock information.</p>\n<h4 id=\"request\">Request</h4>\n<p>This is a simple GET request with no request body.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"i\": 13112, // Unique Id\n    \"n\": \"Apple\", // Stock Name\n    \"c\": \"A\", // market (A=US, B=TR)\n    \"m\": \"NASDAQ\", // \n    \"f\": true, // Is Fractionable\n    \"ps\": \"Teknoloji\", // Sector\n    \"psi\": 4533, // Sector Unique Id\n    \"t\": \"AAPL\", // Stock Symbol\n    \"p\": 1, // Popularity Index\n    \"ty\": 1, \n    \"mc\": null, // Market Code\n    \"mcap\": 269476.0, // Market Cap\n    \"v\": 72914.0, // Volume\n    \"bs\": true, // Buy Status\n    \"ss\": false // Sell Status\n}\n\n</code></pre>\n","urlObject":{"path":["api","stock"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"61424ddf-6c56-4d7a-9cf7-a6089878c315","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://your-api-url.com/api/stock"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"i\": 1,\n            \"n\": \"Chevron\",\n            \"c\": \"A\",\n            \"m\": \"NYSE\",\n            \"f\": true,\n            \"ps\": \"Enerji\",\n            \"psi\": 4513,\n            \"t\": \"CVX\",\n            \"p\": 0,\n            \"ty\": 1,\n            \"mc\": null,\n            \"mcap\": 29364,\n            \"v\": 20004,\n            \"bs\": true,\n            \"ss\": true\n        }\n    ]\n}"}],"_postman_id":"b1691d1d-4d8f-4e11-add5-17c5c84b77e3"},{"name":"/api/stock/v2/prices","id":"f51b12da-5174-46ee-be8a-338d5d8c490f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"stocks\": [\n    {\n      \"market\": \"us\",\n      \"symbol\": \"AAPL\"\n    },\n    {\n      \"market\": \"tr\",\n      \"symbol\": \"TUPRS\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"/api/stock/v2/prices","description":"<p>Requestte gönderilen hisseler için fiyat bilgisini döner</p>\n<p>Örnek Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"code\": \"AAPL\",\n        \"openPrice\": 228.87,\n        \"lastPrice\": 228.54,\n        \"dailyChange\": -0.15,\n        \"dailyChangeAmount\": 0,\n        \"lastUpdateTime\": \"2024-09-20T19:59:59.9473946+00:00\",\n        \"ceiling\": 0,\n        \"floorPrice\": 0\n    },\n    {\n        \"code\": \"TUPRS\",\n        \"openPrice\": 0,\n        \"lastPrice\": 167.8,\n        \"dailyChange\": 1.15,\n        \"dailyChangeAmount\": 1.9,\n        \"lastUpdateTime\": \"2024-09-23T10:05:43+00:00\",\n        \"ceiling\": 0,\n        \"floorPrice\": 0\n    }\n]\n\n</code></pre>\n","urlObject":{"path":["api","stock","v2","prices"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"7083711b-e65e-4cc0-ba2d-1f934e228467","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"{\n  \"stocks\": [\n    {\n      \"market\": \"us\",\n      \"symbol\": \"AAPL\"\n    },\n    {\n      \"market\": \"tr\",\n      \"symbol\": \"TUPRS\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://your-api-url.com/api/stock/v2/prices"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"code\": \"AAPL\",\n            \"openPrice\": 228.87,\n            \"lastPrice\": 228.54,\n            \"dailyChange\": -0.15,\n            \"dailyChangeAmount\": 0,\n            \"lastUpdateTime\": \"2024-09-20T19:59:59.9473946+00:00\",\n            \"ceiling\": 0,\n            \"floorPrice\": 0\n        },\n        {\n            \"code\": \"TUPRS\",\n            \"openPrice\": 0,\n            \"lastPrice\": 167.8,\n            \"dailyChange\": 1.15,\n            \"dailyChangeAmount\": 1.9,\n            \"lastUpdateTime\": \"2024-09-23T10:05:43+00:00\",\n            \"ceiling\": 0,\n            \"floorPrice\": 0\n        }\n    ]\n}"}],"_postman_id":"f51b12da-5174-46ee-be8a-338d5d8c490f"},{"name":"/api/stock/:symbol/insta-buy","id":"e34c6f70-12b7-44b7-8925-6d481f569fac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"market\": \"us\",\n  \"symbol\": \"AAPL\",\n  \"quantity\": \"1\",\n  \"notional\": \"\",\n  \"price\": \"\",\n  \"type\": \"limit\",\n  \"limitPrice\": \"235.45\",\n  \"timeInForce\": \"day\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/stock/AAPL/insta-buy","description":"<p>İlgili hisse için satın alım işlemi oluşturur. Bu işlemden sonra dönen orderId parametresi ile \"/api/stock/execute/:orderId\" servisi çağırılarak buy işlemi tamamlanır.</p>\n","urlObject":{"path":["api","stock","AAPL","insta-buy"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"8b8a428a-5ac6-4f06-a642-0d23a0b071a9","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"{\n  \"market\": \"us\",\n  \"symbol\": \"AAPL\",\n  \"quantity\": \"0.00437617\",\n  \"notional\": \"1\",\n  \"price\": \"228.51\",\n  \"type\": \"market\",\n  \"limitPrice\": \"228.51\",\n  \"timeInForce\": \"day\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://your-api-url.com/api/stock/:symbol/insta-buy","protocol":"https","host":["your-api-url","com"],"path":["api","stock",":symbol","insta-buy"],"variable":[{"key":"symbol","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"status\" : \"success\",\n  \"data\" : {\n    \"amount\" : 1,\n    \"orderId\" : \"78278da734174491862b23213bf462de\",\n    \"quantity\" : 0.0085954949999999999,\n    \"symbol\" : \"NVDA\",\n    \"price\" : 0,\n    \"defaultCommission\" : 0,\n    \"totalAmount\" : 1,\n    \"commission\" : 0\n  }\n}"}],"_postman_id":"e34c6f70-12b7-44b7-8925-6d481f569fac"},{"name":"/api/stock/:symbol/insta-sell","id":"d46c6658-0c12-4658-a4b6-b03775ad90d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"market\": \"tr\",\n  \"symbol\": \"YKBNK\",\n  \"quantity\": \"1\",\n  \"notional\": \"\",\n  \"price\": \"24.92\",\n  \"type\": \"market\",\n  \"limitPrice\": \"24.92\",\n  \"timeInForce\": \"day\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/stock/FFIE/insta-sell","description":"<p>İlgili hisse için şatış işlemi oluşturur. Bu işlemden sonra dönen orderId parametresi ile \"/api/stock/execute/:orderId\" servisi çağırılarak sell işlemi tamamlanır.</p>\n","urlObject":{"path":["api","stock","FFIE","insta-sell"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"05db324b-8982-4fb1-8dab-31a385c72577","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"body":{"mode":"raw","raw":"{\n  \"market\": \"us\",\n  \"symbol\": \"AAPL\",\n  \"quantity\": \"0.00437617\",\n  \"notional\": \"\",\n  \"price\": \"228.51\",\n  \"type\": \"market\",\n  \"limitPrice\": \"228.51\",\n  \"timeInForce\": \"day\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://your-api-url.com/api/stock/:symbol/insta-sell","protocol":"https","host":["your-api-url","com"],"path":["api","stock",":symbol","insta-sell"],"variable":[{"key":"symbol","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"status\" : \"success\",\r\n  \"data\" : {\r\n    \"amount\" : 18.350000000000001,\r\n    \"orderId\" : \"63a547d4a081437e84655ae3267a23c4\",\r\n    \"quantity\" : 1,\r\n    \"symbol\" : \"DURKN\",\r\n    \"price\" : 18.350000000000001,\r\n    \"defaultCommission\" : 0,\r\n    \"totalAmount\" : 18.350000000000001,\r\n    \"commission\" : 0\r\n  }\r\n}"}],"_postman_id":"d46c6658-0c12-4658-a4b6-b03775ad90d2"}],"id":"4a94b756-bcf5-4f11-a12a-bbec157319f4","_postman_id":"4a94b756-bcf5-4f11-a12a-bbec157319f4","description":""},{"name":"Clock","item":[{"name":"/api/Clock","id":"e0e7a7fa-4e77-44cc-8446-c4209cc15617","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/Clock","description":"<h1 id=\"clock-api\">Clock API</h1>\n<p>İlgili servis borsaların açılış/kapanış saat bilgisini ve şuanki durum bilgisini içerir.</p>\n","urlObject":{"path":["api","Clock"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"bef21ce9-6a52-46dd-8f0a-568522d6d136","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":"/api/Clock"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"tr\": {\n            \"isOpen\": true,\n            \"nextOpen\": \"2024-10-03T07:00:00+00:00\",\n            \"nextClose\": \"2024-10-02T15:00:00+00:00\"\n        },\n        \"us\": {\n            \"isOpen\": false,\n            \"nextOpen\": \"2024-10-02T13:30:00+00:00\",\n            \"nextClose\": \"2024-10-02T20:00:00+00:00\"\n        }\n    }\n}"}],"_postman_id":"e0e7a7fa-4e77-44cc-8446-c4209cc15617"},{"name":"/api/Clock/:market","id":"1b700f6b-640c-43a5-8473-ebdace61a282","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/Clock/:market","description":"<p>İlgili servis queryde gönderilen borsanın açılış/kapanış saat bilgisini ve şuanki durum bilgisini içerir.</p>\n<p>:market =&gt; tr ve us parametrelerinden birini içermelidir</p>\n","urlObject":{"path":["api","Clock",":market"],"host":[""],"query":[],"variable":[{"description":{"content":"<p>tr ve us parametrelerinden birini içermelidir</p>\n","type":"text/plain"},"type":"any","value":"tr","key":"market"}]}},"response":[{"id":"4c0cb790-9f46-4b35-a561-b31902777330","name":"Success","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer <token>","description":"Added as a part of security scheme: bearer"}],"url":{"raw":"/api/Clock/:market","host":[""],"path":["api","Clock",":market"],"variable":[{"key":"market","value":"tr"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"isOpen\": true,\n        \"nextOpen\": \"2024-10-03T07:00:00+00:00\",\n        \"nextClose\": \"2024-10-02T15:00:00+00:00\"\n    }\n}"}],"_postman_id":"1b700f6b-640c-43a5-8473-ebdace61a282"}],"id":"fb899291-13ec-4e54-81ac-bfb228e66b0c","_postman_id":"fb899291-13ec-4e54-81ac-bfb228e66b0c","description":""}],"id":"4be9b6c4-3f11-4378-b1f0-755bd2356628","event":[{"listen":"prerequest","script":{"id":"00123568-7f0f-45b0-9ff0-288b8b55db12","type":"text/javascript","exec":["//add access user","var user = pm.collectionVariables.get(\"customerNumber\");","pm.request.addHeader({","    key: \"Access-User\", ","    value: user","});","","//apply hash","var secretKey = pm.collectionVariables.get(\"secretKey\");","var token = pm.collectionVariables.get(\"token\");","var apiKey = ''; // Boş string bırakılması gerekiyor","var timestamp = new Date().toISOString();","var body = (pm.request.body ?? \"{}\").toString();","","if (body == null || body == undefined || body == \"\") {","    body = \"{}\";","}","","pm.request.addHeader({","    key: \"Access-Timestamp\", ","    value: timestamp","});","pm.request.addHeader({","    key: \"Access-Key\", ","    value: apiKey","});","pm.request.addHeader({","    key: \"Authorization\", ","    value: \"Bearer \" + token","});","","//calculate sign","var signedString = apiKey + user + timestamp + body;","var sign = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(signedString, secretKey)).toUpperCase();","","pm.request.addHeader({","    key: \"Access-Sign\", ","    value: sign","});"]}},{"listen":"test","script":{"id":"3872c4f0-2b93-47ad-aaf5-c3e9e76cdaad","type":"text/javascript","exec":[""]}}],"_postman_id":"4be9b6c4-3f11-4378-b1f0-755bd2356628","description":""}],"event":[{"listen":"prerequest","script":{"id":"a5d0f73f-f618-4ae5-8d14-a6d71ff68948","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"55b3ba06-c181-4ad7-b856-3b95ac51ef0f","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"","type":"string"},{"key":"token","value":""},{"key":"secretKey","value":""},{"key":"customerNumber","value":""},{"key":"test","value":"","type":"string","disabled":true}]}