{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"3e114d40-0403-4633-a1d1-9a7a491ae5f8","name":"Corporate Subaccount API","description":"# API Documentation\n\n## API Change Log\n\nNo change\n\n## Introduction\n\nWelcome to the Corporate Subaccount API documentation. This API allows you to manage institutions, subaccounts, transfer assets between subaccounts, and perform asset swaps within a corporate context. Please refer to the following documentation for details on available endpoints, request/response formats, and authentication.\n\n## Authentication Requests\n\nTo ensure secure communication between your client and the Corporate Subaccount API, we employ HMAC-SHA512 (Hash-based Message Authentication Code with Secure Hash Algorithm 512-bit) for authentication. This method involves the use of an API key and a secret key to generate a signature, which is included in the request headers.\n\nThe API key must be sent along with the request inside the custom HTTP header `Key` value. The Secret key is used to compute HMAC-SHA512 of the request’s query (when using the HTTP GET or DELETE method) or request’s body (when using the POST or PUT method), which then encoded using hexadecimal. The result then sent inside the custom HTTP header `Sign` value.\n\nFor request using HTTP POST and parameters in the body, the request header must set the `Content-Type` value to `application/x-www-form-urlencoded`.\n\nAll requests must include a `timestamp` field that contains the value of the current Unix timestamp in seconds. Make sure the client operating system sync their time with the nearest time server, otherwise the request will be rejected if the `timestamp` value has 8 seconds differences with the server time.\n\nFor example, given an API key `XYZ` and Secret key `secr3t`\n\n```\nhash := HMAC_SHA512(\"timestamp=1574423788\", \"secr3t\")\n\n ```\n\nThen encode the resulting `hash` into hexadecimal\n\n```\nsign := HEX(hash)\n// sign is equal to\n// \"12ecea7e52e12ed753b7aa7e97efa5307086f50f8c31062822443afd204b4778bca5ddd02555d03d\"\n\n ```\n\nFinally, send the GET request to API trade history using the `Key` and `Sign` header,\n\n```\nGET /v3/institutions?timestamp=1574423788 HTTP/1.1\nAccept: application/json\nKey: XYZ\nSign: 12ecea7e52e12ed753b7aa7e97efa5307086f50f8c31062822443afd204b4778bca5ddd02555d03d\n\n ```\n\n## API Endpoints\n\nAll HTTP requests must be sent to: `https://api.campinvestment.com/v3`\n\n**Success**\n\nA successful response is indicated by HTTP status code 200 and may contain an optional body. If the response has a body it will be documented under each resource below.\n\n**Common HTTP error codes**\n\n| Status Code | Reason |\n| --- | --- |\n| 400 | Bad Request – Invalid request format |\n| 401 | Unauthorized – Invalid API Key |\n| 403 | Forbidden – You do not have access to the requested resource |\n| 404 | Resource Not Found |\n| 500 | Internal Server Error – We had a problem with our server |\n\n**API Errors**\n\n| Error Code | Reason |\n| --- | --- |\n| ERR_SUBACCOUNT_CODE_USED | The code has been used by other |\n| ERR_NOT_ALLOWED | You are not allowed to perform this action |\n| ERR_INVALID_ID | Invalid or empty parameter id |\n| ERR_INVALID_FROM_ID | Invalid or empty parameter from_id this is your subaccount identity |\n| ERR_INVALID_TO_ID | Invalid or empty parameter to_id this is your subaccount identity |\n| ERR_INVALID_ASSET | Invalid or empty parameter asset |\n| ERR_INVALID_AMOUNT | Invalid or empty parameter amount |\n| ERR_INVALID_INSTITUTION_ID | Invalid or empty parameter institution_id |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"15930022","team":1724982,"collectionId":"3e114d40-0403-4633-a1d1-9a7a491ae5f8","publishedId":"2s9YytfLMb","public":true,"publicUrl":"https://documenter-api.postman.tech/view/15930022/2s9YytfLMb","privateUrl":"https://go.postman.co/documentation/15930022-3e114d40-0403-4633-a1d1-9a7a491ae5f8","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Manage sub-accounts, transfers and swap your assets"},{"name":"title","value":"CSA Public API"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":"https://content.pstmn.io/bec349b4-4149-4720-8149-baef3f827004/Y2FtcC1pbnZlc3RtZW50LXdoaXRlLnBuZw==","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":"https://content.pstmn.io/a5c3c2d1-e69c-40ca-bf5f-1737fc3d46a8/Y2FtcC1pbnZlc3RtZW50LWdvbGQucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2024-02-05T06:55:27.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"CSA Public API","description":"Manage sub-accounts, transfers and swap your assets"},"logos":{"logoLight":"https://content.pstmn.io/a5c3c2d1-e69c-40ca-bf5f-1737fc3d46a8/Y2FtcC1pbnZlc3RtZW50LWdvbGQucG5n","logoDark":"https://content.pstmn.io/bec349b4-4149-4720-8149-baef3f827004/Y2FtcC1pbnZlc3RtZW50LXdoaXRlLnBuZw=="}},"statusCode":200},"environments":[{"name":"CSA Sandbox","id":"d3db8b5c-d3a9-403a-8f6d-45189bed5ac7","owner":"15930022","values":[{"key":"url","value":"https://api.campinvestment.internal","enabled":true},{"key":"private_api_key","value":"W6yMw5eo-zvFPJQgb-yUaKxFWE-55rJIPUT-baPIGmHZ","enabled":true},{"key":"private_api_secret","value":"ea622e0003b00d0ed5bec3990045baa97c3fff63a295a9eb8b30984ed24bb66ce86edd71d0cc0c7b","enabled":true},{"key":"private_sign","value":"","enabled":true},{"key":"private_request_body","value":"","enabled":true,"type":"default"},{"key":"REQUEST_BODY","value":"","enabled":true,"type":"default"},{"key":"otp_token","value":"","enabled":true,"type":"any"},{"key":"otp_method","value":"","enabled":true,"type":"any"},{"key":"swap_quote_id","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/91130a10c9c4884569edb0272595b287c90909825b67e5dfa295d0d35e40a629","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"CSA Sandbox","value":"15930022-d3db8b5c-d3a9-403a-8f6d-45189bed5ac7"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s9YytfLMb"}