{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"0472c0bc-8188-4d71-a36a-9233abb7f359","name":"YouHodler Public API MultiHODL","description":"# Getting start\n\nTo integrate with our platform on the test environment, please email our support team at [support@youhodler.com](mailto:support@youhodler.com). We will send you an access token and UUID that you can use.\n\nAccess token is valid for 4 weeks and will expire after.\n\n## Authentication\n\nAll API queries must be made over HTTPS, and plain HTTP will be refused.\n\nBearer authorization type should be used to add the access token to the Authorization header.\n\nAll requests must contain the following header:\n\n`x-device-type : api`  \n`x-device-uuid : {UUID}`  \n`x-use-i18n-errors : true`\n\n## Structure\nWe divided our request by groups. Bellow you can find the description REST API requests and response examples.\n\nTo get rates:\n- [Get Rates](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#4ea16af2-d8df-4386-a1fc-19e46e306722) - to get rates  all instruments on YouHodler;\n- [Get Rates Chart](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#5c8c705c-2e16-4409-bb43-951016b427ff) - to get rates on selected instruments and data;\n\nTo get information about balances of account:\n- [Balance](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#0c0c3ffa-de55-4305-ac43-06be115e32e4)\n\nTo work with MultiHODL you can use:\n- [Get MultiHODL Overview](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#d1b6ea5d-2902-4e5d-9d46-e6e5905dafaf) - returns information about current pledged and current profit;\n- [Get MultiHODLS Open](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#1ea3a153-9885-4e0f-a42c-e8448d833c4f) - returns list of MultiHODLs in status Open;\n- [Get MultiHODLs Pending](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#21716f34-8a23-469d-86e0-29a62397e865) - returns list of MultiHODLs in status Pending;\n- [Get MultiHODLs Closed](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#fc44a727-1c26-43e6-82c8-cb8e72ee545a) - returns list of MultiHODLs in status Closed;\n- [Get MultiHODL Tariffs](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#1fa4e5fc-98da-40eb-bc79-0cc074dce716) - returns list of available instruments for you;\n- [Calculate MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#4fe4afe9-142c-4ef5-b518-14aa0c7dc497) - returns calculated data to create a position;\n- [Create MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#21f5401a-f26e-4c7b-ada3-f6d6b9dbbd2e) - creates MultiHODL;\n- [Create Pending MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#e2cde80a-1642-4741-8d68-1578ffc3b9eb) - creates MultiHODL in status Pending;\n- [Calculate Existed MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#8288a90d-82d5-4689-8792-54c66f5db1a2) - returns calculated data to update existed MultiHODL;\n- [Get MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#3690208f-c049-4829-ad43-ec67d66d2120) - returns info about MultiHODL;\n- [Update MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#75a3500e-f8c0-43ec-ac3d-b8d83ca75b46) - updates take profit and stop loss in the existed MultiHODL;\n- [Close Now MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#6b39fb8b-9efa-4398-8a8f-fc53ab14b2dc) - closes MultiHODL on the platform YouHodler;\n- [Cancel MultiHODL](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#8c0f2c0a-f46e-4c74-a3a0-2f6e77bf331a) - cancels MultiHODL and changes the status to CANCEL.\n    \n\n# Rates\n\nYouHodler provides rates for instruments of MultiHODL, order execution is made on the same rates. We suggest starting to get a price feed with the request [Get Rates](https://documenter.getpostman.com/view/20504079/2s93m5zLwc#4ea16af2-d8df-4386-a1fc-19e46e306722), where you can specify trading pairs and get data for the selected period. You can get fresh rates after receiving some data to create a connection via WebSocket.\n\n## WebSocket for rates\n\nTo receive up-to-date rates from our platform, you can set up a WebSocket connection.\n\n### Connection\n\nURL - _**wss://{stand}/ws/**_\n\nFor connecting we use the [socket.io](http://socket.io) library and we strongly recommend using it for you. Right now, the library is using version 4.x. The major difference with the previous version is an authorization. After creating a connection, the [socket.io](http://socket.io) library automatically sends a message for authorization with your _access token_. More details - [https://socket.io/docs/v4/client-options/#auth](https://socket.io/docs/v4/client-options/#auth)\n\nTo receive up-to-date information, it will be enough to send one message. The server will return data only for the last subscription. For example, if you subscribe in the first message on the rates BTC/UDST and then subscribe in the second message on the rates ETH/USDT, the server will send only the price of ETH.\n\n#### Params\n\n| **Name** | **Value** |\n| --- | --- |\n| EIO | 4 |\n| transport | websocket |\n\n### SUB rates-selected\n\n#### Request\n\n| **Name** | **Type** | **Required** | **Description** |\n| --- | --- | --- | --- |\n| name | String | Yes | Name of channel |\n| symbols | Array of string | Yes | Lisit of coins |\n| symbols.{coin} | String | Yes | Symbol of coinFormat - coin1/coin2Usually coin2 is usd or usdt |\n| throttle | Integer | Yes | Delay in the flow |\n\n``` json\n42[\n    \"sub\",\n    {\n        \"name\": \"rates-selected\",\n        \"symbols\": [\n            \"chf/usd\",\n            \"eur/usd\",\n            \"gbp/usd\",\n            \"usdt/usd\",\n            \"usdc/usd\",\n            \"busd/usd\",\n            \"dai/usd\",\n            \"tusd/usd\"\n        ],\n        \"throttle\": 1000\n    }\n]\n\n```\n\n#### Message of response\n\n| **Name** | **Type** | **Description** |\n| --- | --- | --- |\n| name | String | Name of channel |\n| \\[\\].{n}.fromTicker | String | Symbol of base ticker |\n| toTicker | String | Symbol of quote ticker |\n| date | Date TimeTimestamp | Date of close candle |\n| price | Float | Price of coin (mid) |\n| bid | Float | Bid of coin |\n| ask | Float | Ask of coin |\n| diff24h | Float | Difference between current price (mid) and price (mid) 24 hour ago |\n| updated | Date TimeTimestamp | Date of processed price |\n\n``` json\n42[\n    \"rates-selected\",\n    [\n        {\n            \"fromTicker\": \"chf\",\n            \"toTicker\": \"usd\",\n            \"date\": 1670228555000,\n            \"price\": 1.0686672116869447,\n            \"bid\": 1.066479,\n            \"ask\": 1.070856,\n            \"diff24h\": 0.001147,\n            \"updated\": 1670228556028\n        },\n        {\n            \"fromTicker\": \"eur\",\n            \"toTicker\": \"usd\",\n            \"date\": 1670228555000,\n            \"price\": 1.054335,\n            \"bid\": 1.050093,\n            \"ask\": 1.058577,\n            \"diff24h\": 0.000205,\n            \"updated\": 1670228556028\n        },\n        {\n            \"fromTicker\": \"gbp\",\n            \"toTicker\": \"usd\",\n            \"date\": 1670228555000,\n            \"price\": 1.2276150000000001,\n            \"bid\": 1.221422,\n            \"ask\": 1.233808,\n            \"diff24h\": -0.00169,\n            \"updated\": 1670228556028\n        }\n    ]\n]\n\n```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"20504079","collectionId":"0472c0bc-8188-4d71-a36a-9233abb7f359","publishedId":"2s93m5zLwc","public":true,"publicUrl":"https://documenter-api.postman.tech/view/20504079/2s93m5zLwc","privateUrl":"https://go.postman.co/documentation/20504079-0472c0bc-8188-4d71-a36a-9233abb7f359","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2023-06-06T11:27:53.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"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/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","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"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93m5zLwc"}