Commit Graph

8 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