Skip to content

Commit bfb96fa

Browse files
authored
Develop of Theta Data Provider (#1)
* update: .gitignore * update: ignore `Data/*` folder in .gitignore * feat: prepare structure of data folders * feat: workflow and GH's templates * feat: DataQueueHandler for Option * feat: prepare Test project * feat: test for DQH * feat: symbolMapper * feat: Contract WS model * feat: Handle Trade/Quote response with aggregator * feat: convert string to Date extension * feat: IsConnected flag from ws connection * feat: ITimeProvider in DataProvider * feat: ThetaData incapsulate Rest API Client logic * feat: IDataQueueUniverseProvider && IOptionChainProvider feat: GetLean in SymbolMapper feat: generic entity for REST responses feat: test for IDataQueueUniverseProvider and IOptionChainProvider * remove: not used usings * refactor: SymbolMapper + tests * rename: extension converting date * rename: RestResponse to BaseResponse * refactor: RestApi BaseUrl * feat: free space command run in workflow file * move: BaseResponse to Common folder * feat: log of requested url * refactor: global variable of restClient and add comment * feat: first impl GetHistory Option * refactor: symbolMapper + new tests * refactor: symbolMapper use Market USA * feat: create symbol extension in test * feat: DQH additional test cases * feat: exception msg in converter classes * refactor: short type to byte in EOD entity * fix: validation of OpenInterest tickType * refactor: GetHistory of Daily TickType data feat: GetHistory Tests * feat: validation of correct status code response * feat: add validation subscription on IndexOption symbol * fix: missed double quotes * feat: support of muliple pages requests/responses feat: base entity for Header of Responses feat: json null string converter cuz API return "null" like a a string * feat: Exchanges' code collection remove: condition collection refactor: some property in entities * feat: exchange's code to WS responses * fix: convert time in history request * feat: GetHistory tests * feat: DataDownloader refactor: history test refactor: DataQueueUniverse provider * refactor: skip empty Response for Trade of Quote Daily * feat: xml description RestApiClient * feat: Trade(Tick,Min,Hour) DataConsolidator refactor: test's GetHistory * refactor: IOptionChainProvider and IDataQueueUniverseProvider * feat: add json description file * refactor: use Lean consolidator for trade ticks * fix: OptionStyle in GetOptionContractList * refactor: LookupSymbols remove: GetTickTime() remove: not use variables * remove: CachingOptionChainProvider for OptionChainProvider instance * revert: not use param to explicit in LookupSymbols * remove: duplicate validation in OptionChain feat: test option future chains * feat: ValidateSubscription() * feat: additional test case with invalid param of GetHIstory * feat: implement different subscription price plan * fix: wrong validation of available subscription process * refactor:test: DQH multiple subscription * refactor: use custom convert for Date From API * refactor: use generic format for date ThetaData extension * feat: Custom Json convert For ThetaData DateTime format from WS
1 parent 7c455c4 commit bfb96fa

52 files changed

Lines changed: 4547 additions & 21 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/issue_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--- This template provides sections for bugs and features. Please delete any irrelevant sections before submitting -->
2+
3+
#### Expected Behavior
4+
<!--- Required. Describe the behavior you expect to see for your case. -->
5+
6+
#### Actual Behavior
7+
<!--- Required. Describe the actual behavior for your case. -->
8+
9+
#### Potential Solution
10+
<!--- Optional. Describe any potential solutions and/or thoughts as to what may be causing the difference between expected and actual behavior. -->
11+
12+
#### Reproducing the Problem
13+
<!--- Required for Bugs. Describe how to reproduce the problem. This can be via a failing unit test or a simplified algorithm that reliably demonstrates this issue. -->
14+
15+
#### System Information
16+
<!--- Required for Bugs. Include any system specific information, such as OS. -->
17+
18+
#### Checklist
19+
<!--- Confirm that you've provided all the required information. -->
20+
<!--- Required fields --->
21+
- [ ] I have completely filled out this template
22+
- [ ] I have confirmed that this issue exists on the current `master` branch
23+
- [ ] I have confirmed that this is not a duplicate issue by searching [issues](https://github.com/QuantConnect/Lean/issues)
24+
<!--- Required for Bugs, feature request can delete the line below. -->
25+
- [ ] I have provided detailed steps to reproduce the issue
26+
27+
<!--- Template inspired by https://github.com/stevemao/github-issue-templates -->

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
<!--- Provide a general summary of your changes in the Title above -->
3+
4+
#### Description
5+
<!--- Describe your changes in detail -->
6+
7+
#### Related Issue
8+
<!--- This project only accepts pull requests related to open issues -->
9+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
10+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
11+
<!--- Please link to the issue here: -->
12+
13+
#### Motivation and Context
14+
<!--- Why is this change required? What problem does it solve? -->
15+
16+
#### Requires Documentation Change
17+
<!--- Please indicate if these changes will require updates to documentation, and if so, specify what changes are required -->
18+
19+
#### How Has This Been Tested?
20+
<!--- Please describe in detail how you tested your changes. -->
21+
<!--- Include details of your testing environment, and the tests you ran to -->
22+
<!--- see how your change affects other areas of the code, etc. -->
23+
24+
#### Types of changes
25+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
26+
- [ ] Bug fix (non-breaking change which fixes an issue)
27+
- [ ] Refactor (non-breaking change which improves implementation)
28+
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
29+
- [ ] New feature (non-breaking change which adds functionality)
30+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
31+
- [ ] Non-functional change (xml comments/documentation/etc)
32+
33+
#### Checklist:
34+
<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->
35+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
36+
- [ ] My code follows the code style of this project.
37+
- [ ] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).
38+
- [ ] I have added tests to cover my changes. <!--- If not applicable, please explain why -->
39+
- [ ] All new and existing tests passed.
40+
- [ ] My branch follows the naming convention `bug-<issue#>-<description>` or `feature-<issue#>-<description>`
41+
42+
<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->

.github/workflows/gh-actions.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Free space
15+
run: df -h && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
16+
17+
- name: Checkout Lean Same Branch
18+
id: lean-same-branch
19+
uses: actions/checkout@v2
20+
continue-on-error: true
21+
with:
22+
ref: ${{ github.ref }}
23+
repository: QuantConnect/Lean
24+
path: Lean
25+
26+
- name: Checkout Lean Master
27+
if: steps.lean-same-branch.outcome != 'success'
28+
uses: actions/checkout@v2
29+
with:
30+
repository: QuantConnect/Lean
31+
path: Lean
32+
33+
- name: Move Lean
34+
run: mv Lean ../Lean
35+
36+
- name: Run Image
37+
uses: addnab/docker-run-action@v3
38+
with:
39+
image: quantconnect/lean:foundation
40+
options: -v /home/runner/work:/__w --workdir /__w/Lean.DataSource.ThetaData/Lean.DataSource.ThetaData -e QC_THETADATA_USERNAME=${{ secrets.THETADATA_USERNAME }} -e QC_THETADATA_PASSWORD=${{ secrets.THETADATA_PASSWORD }} -e QC_JOB_USER_ID=${{ secrets.JOB_USER_ID }} -e QC_API_ACCESS_TOKEN=${{ secrets.API_ACCESS_TOKEN }} -e QC_JOB_ORGANIZATION_ID=${{ secrets.JOB_ORGANIZATION_ID }}
41+
42+
- name: Build QuantConnect.ThetaData
43+
run: dotnet build ./QuantConnect.ThetaData/QuantConnect.DataSource.ThetaData.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1
44+
45+
- name: Build QuantConnect.ThetaData.Tests
46+
run: dotnet build ./QuantConnect.ThetaData.Tests/QuantConnect.DataSource.ThetaData.Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1
47+
48+
- name: Run QuantConnect.ThetaData.Tests
49+
run: dotnet test ./QuantConnect.ThetaData.Tests/bin/Release/QuantConnect.Lean.DataSource.ThetaData.dll

0 commit comments

Comments
 (0)