Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
swagger_api [2018/05/28 09:50]
t1m3c
swagger_api [2019/03/08 12:31] (current)
taniman
Line 78: Line 78:
  
 ---- ----
-== Save == 
  
-Unfortunately at the moment Swagger API does not permit us to enter the required line breaks to successfully save an entire configuration file. The save function can only be used successfully for [[Hotconfig]] entries until this is resolved.+== Save==
  
-The save operation allows you to overwrite the contents of a particular configuration file. It replaces the entire file.+The save function can only be used successfully for [[Hotconfig]] entries.
  
 Parameters: Parameters:
   * ''​fileName''​ - The name of the particular configuration file   * ''​fileName''​ - The name of the particular configuration file
-  * ''​configName''​ - The name of the configuration +  * ''​configName''​ - Currently only `HOTCONFIG` allowed 
-  * ''​saveData''​ - The contents (settings) ​you wish to overwrite the file with.+  * ''​saveData''​ - The `HOTCONFIG` lines you want to save
   * ''​license''​ - Your ProfitTrailer license   * ''​license''​ - Your ProfitTrailer license
  
-Select the desired fileName, fill in the three parameters and click {{::​try_it_out.png?​nolink|}} to overwrite the configuration file.+Select the desired fileName, fill in the three parameters and click {{::​try_it_out.png?​nolink|}} to save your setting.
  
 **Curl Example** **Curl Example**
Line 103: Line 102:
  
 <file java> <file java>
-curl -d "​license=xxx&​fileName=INDICATORS&​saveData=#​BB_candle_period%20%3D%20300%0A#​BB_sma%20%3D%202%0A%0A" http://​localhost:​8081/​settingsapi/​settings/​save+curl -d "​license=xxx&​fileName=HOTCONFIG&​saveData=XXX_bought_price%20%3D%200.01" http://​localhost:​8081/​settingsapi/​settings/​save
 </​file>​ </​file>​
  
-would set+would send 
 + 
 +`XXX_bought_price = 0.1` 
 + 
 +---- 
 +== SaveAll== 
 + 
 +Unfortunately at the moment Swagger API UI does not permit us to enter the required line breaks to successfully save an entire configuration file. But use your programming language of choice to do so. 
 + 
 +The save operation allows you to overwrite the contents of a particular configuration file. It replaces the entire file. 
 + 
 +Parameters:​ 
 +  * ''​fileName''​ - The name of the particular configuration file 
 +  * ''​configName''​ - The name of the configuration 
 +  * ''​pairsData''​ - The contents (settings) you wish to overwrite the PAIRS config with (cannot be empty). 
 +  * ''​dcaData''​ - The contents (settings) you wish to overwrite the DCA config with (cannot be empty). 
 +  * ''​indicatorsData''​ - The contents (settings) you wish to overwrite the INDICATORS config with (cannot be empty). 
 +  * ''​license''​ - Your ProfitTrailer license
  
-#​BB_candle_period = 300 \\ +Select the desired fileName, fill in the parameters and click {{::​try_it_out.png?​nolink|}} to overwrite the configuration files.
-#BB_std = 2+
  
  
  • swagger_api.1527501043.txt.gz
  • Last modified: 11 months ago
  • by t1m3c