Commit Graph

21 Commits

Author SHA1 Message Date
Stefano Raggi e39791ac6c Upgrade RestSharp library from v105.2.3 to v106.6.10 2019-07-17 10:28:35 +02:00
Michael Handschuh a6640c0886 Adds API support for /splits and /dividends endpoints 2018-08-15 13:45:12 -04:00
Martin Molinero 10fd09be19 API endpoint prices will now return Symbol 2018-08-13 12:25:15 -03:00
Martin Molinero b253668b1d Adding new API endpoint prices 2018-08-04 10:57:41 -03:00
Ivan Mushketyk 39b272608f Add tests in ApiTests 2017-03-04 03:00:56 -08:00
Andrew Hart a1c231321f Implemented api methods for new file api endpoints 2016-11-02 13:12:01 -04:00
Andrew Hart 9bb33183f7 Added new ProjectFile methods to IApi 2016-11-01 16:21:53 -04:00
Andrew f494653ec2 Live Algorithm Management with QC Api v2 (#577)
* Recommitted. Fixed missing code

* Renamed tests for Api to ApiTests

* Renamed Live to LiveAlgorithm

* Add LiveAlgorithm configuration classes for supported brokerages

The QuantConnect api v2 enables users to launch live algorithms with one of the supported brokerages. The LiveAlgorithmSettings class adds brokerage specific configuration classes that will allow algorithms to be configured to run live on a specific brokerage.

* Projects can now be updated via the Api v2

* Projects can be created via the Api with LiveAlgorithmSettings class

* Renamed CreateLive to CreateLiveAlgorithm in IApi

* Added tests for luanching live algorithms via api V2 for brokerages

* Created ProjectUpdateResponse to represent api response when project is updated

The new class ProjectUpdateResponse derives from RestReponse and adds a field, Files, that represents the project files associated with a project.   This new class is now what the Api method returns.  A new test, Update_ProjectFiles_Successfully, tests updating the files for a project via the Api

* Refactored ApiTests and expanded ApiTest docs

* Renamed brokerage specific classes that derive from BaseLiveAlgorithmSettings

* Refactored Oanda and Tradier LiveAlgorithm settings

Tradier and Oanda do not required certain parameters like password and username to trade live, however, they are required for the QC Api v2.  A new constructor was added to BaseLiveAlgorithmSettings that does not take in these parameters and sets the unneeded parameters to blank strings.  Tradier and Oanda LiveAlgorithmSettings  implement this new constructor.

* Minor tweaks to OandaLiveAlgorithmSettings

* Brokerage Api tests now use appropriate algorithms

Some brokerage tests were using algorithms that traded securities that did not pertain to the brokerage.  This has been corrected.

* Refactored naming of certain Api methods to be more consistent

* Added extra parameters to Api method ListLiveAlgorithms

* Added class that represents chart data from "live/read" api endpoint

* Minor change to LiveAlgorithmResults

* Version is now an optional parameter for LiveAlgorithmApiSettingsWrapper

* Minor formatting changes to long method signatures in Api.cs

* IApi now accepts versionId for CreateLiveAlgorithm

* Removed BrokerageName from LiveAlgorithmSettings.

* Fixed spelling mistake

* Added custom JsonConverter for LiveAlgorithmResults

In order to properly deserialize the results of an algorithm from the api endpoint "live/read", a custom deserializer is added to deal with null ChartPoints.  In order to deserialize ChartPoints that are null, ChartPoint has been changed from a struct to a class.

* Fixed type-o in ApiTests

* Add Ignore NUnit attribute to ApiTests

* Removed ApiAlgorithmStatus

In order to better align with the rest of the project, ApiAlgorithmStatus has been replaced by the existing AlgorithmStatus enum.  Only certain values of AlgorithmStatus can be used with the Api.  Unsuported values throw an ArgumentException error.

* Changed Resolution field in LiveAlgorithmResults from string to enum

* BrokerageEnvironment enum added to represent live/paper trading

* Environment set based on user in InteractiveBrokersLiveAlgorithmSettings

* Minor tweaks to BaseLiveAlgorithmSettings constructor

* Environment is hard coded for TradierLiveAlgorithmSettings

* Updated ApiTests to reflect changes to LiveAlgorithmSettings

* ApiConnection uses OrderJsonConverter to deserialize orders

* AlgorithmStatus is now nullable for ListLiveAlgorithms

* Tweaked account variable for InteractiveBrokersLiveAlgorithmSettings

* Replaced null comparisons with call to HasValue for LiveAlgo status
2016-10-03 15:03:37 -04:00
Andrew Hart 500e1f9c1d Minor tweaks to API test: Download_AndSave_DataCorrectly
In order to avoid false positives when downloading and saving test data, if the test data exist already the data is removed before the download starts.
2016-09-20 11:02:10 -04:00
Andrew Hart 4585ffe62d Live Logs can now be filtered by date. 2016-09-20 09:17:55 -04:00
Andrew Hart 93d2273c9a Minor changes to URI construction and API Initialization.
In order to better handle future scenerios, a new URI is constructed from the data download link returned from the API.  The URI host, scheme and query+path is used to reconstruct the link to download the data.

In addition, the API Initialize() method now takes the dataFolder as a parameter and saves it as a private variable  so as to not read the data folder from the config every time.
2016-09-19 17:47:54 -04:00
Andrew Hart 16c4e7159a Expanded API tests for reading logs of live algorithms 2016-09-19 16:58:22 -04:00
Andrew Hart 41a446f4b1 Added test for downloading data purchased on QC 2016-09-19 16:07:09 -04:00
jaredbroad 7080916b16 Extended the api to support listing active and past algorithms 2016-07-14 15:00:17 -04:00
jaredbroad 355d375afa Removed unused variable, made initialize setup the api class 2016-07-11 15:50:10 -04:00
jaredbroad d885b31b14 Extended tests to test all three languages 2016-07-11 15:50:10 -04:00
jaredbroad 47ddfcaa9d Increase backtest timeout 2016-07-11 15:50:10 -04:00
jaredbroad d6b1c65b76 Rename to more english readable method names for API 2016-07-11 15:50:10 -04:00
jaredbroad 2b1a070420 Added backtest update test 2016-07-11 15:50:10 -04:00
jaredbroad d374494418 Backtest API methods and tests 2016-07-11 15:50:10 -04:00
jaredbroad ccd8551c6d First draft of Lean API v2 2016-07-11 15:50:10 -04:00