Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EN-7164] Add candle events #19

Merged
merged 25 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e0cbb26
[EN-7164] Add candle events
AnatolyKalin Aug 8, 2023
d0898e7
[EN-7164] Add candle events
AnatolyKalin Aug 9, 2023
5587baa
[EN-7164] Add candle events
AnatolyKalin Aug 9, 2023
5320558
[EN-7164] Add candle events
AnatolyKalin Aug 9, 2023
972fe0a
[EN-7164] Add candle events
AnatolyKalin Aug 10, 2023
8445c87
[EN-7164] Add candle events
AnatolyKalin Aug 10, 2023
8a4eb48
[EN-7164] Add candle events
AnatolyKalin Aug 10, 2023
728cf07
[EN-7164] Add candle events
AnatolyKalin Aug 10, 2023
c1027a8
[EN-7164] Add candle events
AnatolyKalin Aug 11, 2023
49c38f1
[EN-7164] Add candle events
AnatolyKalin Aug 11, 2023
18ad6cc
[EN-7164] Add candle events
AnatolyKalin Aug 11, 2023
0b08e09
[EN-7164] Add candle events
AnatolyKalin Aug 12, 2023
aa7992b
[EN-7164] Add candle events
AnatolyKalin Aug 12, 2023
d00a07e
[EN-7164] Add candle events: CandlePeriod
AnatolyKalin Aug 13, 2023
b3e1dc0
[EN-7164] Add candle events: CandlePrice
AnatolyKalin Aug 13, 2023
92baa1e
[EN-7164] Add candle events: CandlePrice
AnatolyKalin Aug 13, 2023
2db3ed7
[EN-7164] Add candle events: CandlePriceLevel
AnatolyKalin Aug 13, 2023
74f7595
[EN-7164] Add candle events: CandleSession
AnatolyKalin Aug 14, 2023
0c1e65c
[EN-7164] Add candle events: CandleSymbol
AnatolyKalin Aug 14, 2023
807642e
[EN-7164] Add candle events: CandleSymbol
AnatolyKalin Aug 14, 2023
b48580f
[EN-7164] Add candle events: Candle
AnatolyKalin Aug 14, 2023
215d66e
[EN-7164] Add candle events: Candle
AnatolyKalin Aug 14, 2023
f5e2c90
[EN-7164] Add candle events: CandleSymbolTest
AnatolyKalin Aug 14, 2023
5048f65
[EN-7164] Add candle events: CandleSymbolTest
AnatolyKalin Aug 14, 2023
d9238b2
[EN-7164] Add candle events: docs
AnatolyKalin Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: 'Release'
XCODE_VERSION: '15.0'
GCC_VERSION: '12'

jobs:
build:
strategy:
matrix:
# os: [windows-latest, macos-latest, ubuntu-latest]
os: [ windows-latest, macos-latest, ubuntu-22.04 ]
os: [ windows-latest, macos-13, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Select Xcode version
if: ${{ contains(matrix.os, 'macos') }}
run: sudo xcode-select -s '/Applications/Xcode_${{env.XCODE_VERSION}}.app/Contents/Developer'

- name: Select gcc version
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
export CC=gcc-${{env.GCC_VERSION}}
export CXX=g++-${{env.GCC_VERSION}}

- name: Prepare build
run: |
ls
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,28 @@ jobs:
strategy:
matrix:
# os: [windows-latest, macos-latest, ubuntu-latest]
os: [ windows-latest, macos-latest, ubuntu-22.04 ]
os: [ windows-latest, macos-13, ubuntu-22.04 ]
#os: [ ubuntu-22.04 ]
buildType: [ Release, Debug ]
#buildType: [ Release ]
runs-on: ${{ matrix.os }}
env:
XCODE_VERSION: '15.0'
GCC_VERSION: '12'

steps:
- uses: actions/checkout@v3

- name: Select Xcode version
if: ${{ contains(matrix.os, 'macos') }}
run: sudo xcode-select -s '/Applications/Xcode_${{env.XCODE_VERSION}}.app/Contents/Developer'

- name: Select gcc version
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
export CC=gcc-${{env.GCC_VERSION}}
export CXX=g++-${{env.GCC_VERSION}}

- name: Prepare build
run: |
ls
Expand Down
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ project(dxFeedGraalCxxApi)
set(DXFCXX_VERSION "0.0.0" CACHE STRING "The dxFeed Graal CXX API package version")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CXX_EXTENSIONS OFF)
set(C_EXTENSIONS OFF)

Expand Down Expand Up @@ -128,6 +130,18 @@ set(dxFeedNativeAPIEventSources
src/event/EventMapper.cpp
)

set(dxFeedNativeAPIEventCandleSources
src/event/candle/Candle.cpp
src/event/candle/CandleAlignment.cpp
src/event/candle/CandleExchange.cpp
src/event/candle/CandlePeriod.cpp
src/event/candle/CandlePrice.cpp
src/event/candle/CandlePriceLevel.cpp
src/event/candle/CandleType.cpp
src/event/candle/CandleSession.cpp
src/event/candle/CandleSymbol.cpp
)

set(dxFeedNativeAPIEventMarketSources
src/event/market/AnalyticOrder.cpp
src/event/market/Direction.cpp
Expand Down Expand Up @@ -161,6 +175,11 @@ set(dxFeedNativeAPIEventOptionSources
src/event/option/Series.cpp
)

set(dxFeedNativeAPIScheduleSources
src/schedule/SessionFilter.cpp
src/schedule/SessionType.cpp
)

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH ON)
Expand All @@ -185,8 +204,10 @@ add_library(${PROJECT_NAME}_static STATIC
${dxFeedNativeAPISymbolsSources}
${dxFeedNativeAPISystemSources}
${dxFeedNativeAPIEventSources}
${dxFeedNativeAPIEventCandleSources}
${dxFeedNativeAPIEventMarketSources}
${dxFeedNativeAPIEventOptionSources}
${dxFeedNativeAPIScheduleSources}
src/api.cpp
)

Expand All @@ -199,8 +220,10 @@ add_library(${PROJECT_NAME} SHARED
${dxFeedNativeAPISymbolsSources}
${dxFeedNativeAPISystemSources}
${dxFeedNativeAPIEventSources}
${dxFeedNativeAPIEventCandleSources}
${dxFeedNativeAPIEventMarketSources}
${dxFeedNativeAPIEventOptionSources}
${dxFeedNativeAPIScheduleSources}
src/api.cpp
)

Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,20 @@ Find useful information in our self-service dxFeed Knowledge Base or .NET API do

[Visual C++ Redistributable 2015](https://www.microsoft.com/en-us/download/details.aspx?id=52685)

### Linux

gcc 12.1+

### MacOS

Xcode 14.3+

## Installation

Examples of how to install the library can be found [here](https://github.com/dxFeed/dxfeed-graal-cxx-api-samples).

The API is delivered as a dynamic library (`dxFeedGraalCxxApi.so|dll|dylib`) and a static one (`dxFeedGraalCxxApi.a|lib`).
Also it depends on `DxFeedGraalNativeSdk.so|dll|dylib`. Please place it nearby or available on `PATH`.
Also, it depends on `DxFeedGraalNativeSdk.so|dll|dylib`. Please place it nearby or available on `PATH`.

## Usage

Expand Down Expand Up @@ -281,7 +289,7 @@ be downloaded from [Release](https://github.com/dxFeed/dxfeed-graal-cxx-api/rele
- [Candle](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/candle/Candle.html) - event with open, high, low, and
close prices and other information for a specific period
- [ ] dxFeed Graal C API
- [ ] dxFeed Graal C++ API
- [x] dxFeed Graal C++ API
- [Quote](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/market/Quote.html) is a snapshot of the best bid and
ask prices and other fields that change with each quote
- [ ] dxFeed Graal C API
Expand Down Expand Up @@ -344,7 +352,7 @@ be downloaded from [Release](https://github.com/dxFeed/dxfeed-graal-cxx-api/rele
with [DXFeedSubscription](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html) class to
subscribe for [Candle](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/candle/Candle.html) events
- [ ] dxFeed Graal C API
- [ ] dxFeed Graal C++ API
- [x] dxFeed Graal C++ API

### Subscriptions & Models

Expand Down
12 changes: 4 additions & 8 deletions include/dxfeed_graal_cpp_api/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
#include "internal/utils/StringUtils.hpp"
#include "internal/utils/debug/Debug.hpp"

#include "api/DXEndpoint.hpp"
#include "api/DXFeed.hpp"
#include "api/DXFeedSubscription.hpp"
#include "api/FilteredSubscriptionSymbol.hpp"
#include "api/osub/IndexedEventSubscriptionSymbol.hpp"
#include "api/osub/TimeSeriesSubscriptionSymbol.hpp"
#include "api/osub/WildcardSymbol.hpp"
#include "event/DXEvent.hpp"
#include "api/ApiModule.hpp"
#include "entity/EntityModule.hpp"
#include "event/EventModule.hpp"
#include "schedule/ScheduleModule.hpp"
#include "symbols/StringSymbol.hpp"
#include "symbols/SymbolWrapper.hpp"
#include "system/System.hpp"
12 changes: 12 additions & 0 deletions include/dxfeed_graal_cpp_api/api/ApiModule.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../internal/Conf.hpp"

#include "osub/OsubModule.hpp"
#include "DXEndpoint.hpp"
#include "DXFeed.hpp"
#include "DXFeedSubscription.hpp"
#include "FilteredSubscriptionSymbol.hpp"
1 change: 0 additions & 1 deletion include/dxfeed_graal_cpp_api/api/DXFeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "../internal/Isolate.hpp"
#include "../internal/JavaObjectHandler.hpp"

#include "../event/DXEvent.hpp"
#include "DXFeedSubscription.hpp"

#include <memory>
Expand Down
6 changes: 4 additions & 2 deletions include/dxfeed_graal_cpp_api/api/DXFeedSubscription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

#include "../internal/Conf.hpp"

#include "../event/DXEvent.hpp"
#include "../entity/EntityModule.hpp"
#include "../event/EventType.hpp"
#include "../event/EventTypeEnum.hpp"
#include "../internal/Common.hpp"
#include "../internal/Handler.hpp"
#include "../internal/JavaObjectHandler.hpp"
#include "../symbols/StringSymbol.hpp"
#include "../symbols/SymbolWrapper.hpp"
#include "dxfeed_graal_cpp_api/api/osub/WildcardSymbol.hpp"
#include "osub/WildcardSymbol.hpp"

#if __cpp_lib_parallel_algorithm
# include <execution>
Expand Down
10 changes: 10 additions & 0 deletions include/dxfeed_graal_cpp_api/api/osub/OsubModule.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../../internal/Conf.hpp"

#include "IndexedEventSubscriptionSymbol.hpp"
#include "TimeSeriesSubscriptionSymbol.hpp"
#include "WildcardSymbol.hpp"
9 changes: 9 additions & 0 deletions include/dxfeed_graal_cpp_api/entity/EntityModule.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../internal/Conf.hpp"

#include "Entity.hpp"
#include "SharedEntity.hpp"
50 changes: 0 additions & 50 deletions include/dxfeed_graal_cpp_api/event/DXEvent.hpp

This file was deleted.

19 changes: 19 additions & 0 deletions include/dxfeed_graal_cpp_api/event/EventModule.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../internal/Conf.hpp"

#include "candle/CandleModule.hpp"
#include "market/MarketModule.hpp"
#include "misc/MiscModule.hpp"
#include "option/OptionModule.hpp"
#include "EventFlag.hpp"
#include "EventMapper.hpp"
#include "EventType.hpp"
#include "EventTypeEnum.hpp"
#include "IndexedEvent.hpp"
#include "IndexedEventSource.hpp"
#include "LastingEvent.hpp"
#include "TimeSeriesEvent.hpp"
2 changes: 1 addition & 1 deletion include/dxfeed_graal_cpp_api/event/EventType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <memory>
#include <string>

#include "../entity/SharedEntity.hpp"
#include "../entity/EntityModule.hpp"

namespace dxfcpp {

Expand Down
Loading