Skip to content

Commit

Permalink
Merge branch 'release/4.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
straumat committed May 23, 2021
2 parents 47d2265 + 1f3d771 commit b020e25
Show file tree
Hide file tree
Showing 117 changed files with 835 additions and 173 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '11'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

# ================================================================================================================
- name: Retrieve the sources
Expand All @@ -28,7 +25,13 @@ jobs:
- name: Build, run tests, package and deploy to Maven central
id: package
run: |
mvn package
mvn install -Dgpg.skip
# ================================================================================================================
- name: Retrieve the version
id: version
run: |
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
# ================================================================================================================
- name: Test Cassandre trading bot maven archetype - basic strategy
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,9 @@ jobs:
# ================================================================================================================
- name: Build Changelog
id: build_changelog
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: heinrichreimer/[email protected]
with:
commitMode: true
fromTag: ${{ steps.package.outputs.version }}
toTag: ${{ steps.package.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}

# ================================================================================================================
- name: Create the release
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@

<hr>

<h3 align="center">Cassandre makes it easy to create your crypto trading bot in Java</h2>
<h3 align="center">Create and run your java crypto trading bot in minutes</h2>

<p align="center">
<a href="https://discord.gg/sv3VXuTgFS">
<img src="https://img.shields.io/discord/796141274171310110.svg?logo=discord&label=Discord"
alt="Cassandre trading bot discord" />
alt="Cassandre trading bot on discord" />
</a>
<a href="https://www.codacy.com/gh/cassandre-tech/cassandre-trading-bot?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cassandre-tech/cassandre-trading-bot&amp;utm_campaign=Badge_Grade">
<img src="https://api.codacy.com/project/badge/Grade/f26dc41008a64bb18dcd404b46b69fc8"
alt="Cassandre trading bot codacy" />
alt="Cassandre trading bot on codacy" />
</a>
<a href="https://search.maven.org/search?q=g:tech.cassandre.trading.bot">
<img src="https://img.shields.io/maven-central/v/tech.cassandre.trading.bot/cassandre-trading-bot-project.svg?label=Maven%20Central"
alt="Cassandre trading bot on Maven Central Repository" />
alt="Cassandre trading bot on Maven Central repository" />
</a>
</p>

Expand All @@ -34,6 +34,6 @@
<p align="center">
<a href="https://github.com/cassandre-tech/cassandre-trading-bot/actions">
<img src="https://github.com/cassandre-tech/cassandre-trading-bot/workflows/Continuous%20integration/badge.svg"
alt="Cassandre trading bot integration with gitHub actions" />
alt="Cassandre trading bot continuous integration" />
</a>
</p>
89 changes: 56 additions & 33 deletions docs/src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ module.exports = {
['meta', {name: 'apple-mobile-web-app-capable', content: 'yes'}],
['meta', {name: 'apple-mobile-web-app-status-bar-style', content: 'black'}],
// Favicons.
['link', { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/images/favicon/apple-icon-57x57.png"}],
['link', { rel: "apple-touch-icon", sizes: "60x60", href: "/assets/images/favicon/apple-icon-60x60.png"}],
['link', { rel: "apple-touch-icon", sizes: "72x72", href: "/assets/images/favicon/apple-icon-72x72.png"}],
['link', { rel: "apple-touch-icon", sizes: "76x76", href: "/assets/images/favicon/apple-icon-76x76.png"}],
['link', { rel: "apple-touch-icon", sizes: "114x114", href: "/assets/images/favicon/apple-icon-114x114.png"}],
['link', { rel: "apple-touch-icon", sizes: "120x120", href: "/assets/images/favicon/apple-icon-120x120.png"}],
['link', { rel: "apple-touch-icon", sizes: "144x144", href: "/assets/images/favicon/apple-icon-144x144.png"}],
['link', { rel: "apple-touch-icon", sizes: "152x152", href: "/assets/images/favicon/apple-icon-152x152.png"}],
['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/assets/images/favicon/apple-icon-180x180.png"}],
['link', { rel: "icon", sizes: "192x192", href: "/assets/images/favicon/android-icon-192x192.png"}],
['link', { rel: "icon", sizes: "32x32", href: "/assets/images/favicon/favicon-32x32.pn"}],
['link', { rel: "icon", sizes: "96x96", href: "/assets/images/favicon/favicon-96x96.png"}],
['link', { rel: "icon", sizes: "16x16", href: "/assets/images/favicon/favicon-16x16.png"}],
['link', { rel: "manifest", href: "/assets/images/favicon/manifest.json"}],
['link', { rel: "msapplication-TileColor", content: "#fffff"}],
['link', { rel: "msapplication-TileImage", href: "/assets/images/favicon/ms-icon-144x144.png"}],
['link', {rel: "apple-touch-icon", sizes: "57x57", href: "/assets/images/favicon/apple-icon-57x57.png"}],
['link', {rel: "apple-touch-icon", sizes: "60x60", href: "/assets/images/favicon/apple-icon-60x60.png"}],
['link', {rel: "apple-touch-icon", sizes: "72x72", href: "/assets/images/favicon/apple-icon-72x72.png"}],
['link', {rel: "apple-touch-icon", sizes: "76x76", href: "/assets/images/favicon/apple-icon-76x76.png"}],
['link', {rel: "apple-touch-icon", sizes: "114x114", href: "/assets/images/favicon/apple-icon-114x114.png"}],
['link', {rel: "apple-touch-icon", sizes: "120x120", href: "/assets/images/favicon/apple-icon-120x120.png"}],
['link', {rel: "apple-touch-icon", sizes: "144x144", href: "/assets/images/favicon/apple-icon-144x144.png"}],
['link', {rel: "apple-touch-icon", sizes: "152x152", href: "/assets/images/favicon/apple-icon-152x152.png"}],
['link', {rel: "apple-touch-icon", sizes: "180x180", href: "/assets/images/favicon/apple-icon-180x180.png"}],
['link', {rel: "icon", sizes: "192x192", href: "/assets/images/favicon/android-icon-192x192.png"}],
['link', {rel: "icon", sizes: "32x32", href: "/assets/images/favicon/favicon-32x32.pn"}],
['link', {rel: "icon", sizes: "96x96", href: "/assets/images/favicon/favicon-96x96.png"}],
['link', {rel: "icon", sizes: "16x16", href: "/assets/images/favicon/favicon-16x16.png"}],
['link', {rel: "manifest", href: "/assets/images/favicon/manifest.json"}],
['link', {rel: "msapplication-TileColor", content: "#fffff"}],
['link', {rel: "msapplication-TileImage", href: "/assets/images/favicon/ms-icon-144x144.png"}],
// For social networks.
['meta', {property: 'og:url', content: 'https://trading-bot.cassandre.tech'}],
['meta', {property: 'og:title', content: 'Cassandre trading bot framework'}],
Expand Down Expand Up @@ -69,42 +69,65 @@ module.exports = {
nav: [
{
text: 'Why Cassandre ?',
ariaLabel: 'Why Cassandre menu',
ariaLabel: 'Why Cassandre',
items: [
{text: 'Overview', link: '/why-cassandre/overview'},
{text: 'Architecture', link: '/why-cassandre/architecture'},
{text: 'Features & roadmap', link: '/why-cassandre/features-and-roadmap'},
{text: 'Supported exchanges', link: '/why-cassandre/supported-cryptocurrency-exchanges'}
]
},
{
text: 'Learn',
ariaLabel: 'Learn menu',
ariaLabel: 'Learn',
items: [
{text: 'Quickstart', link: '/learn/quickstart'},
{text: 'Position management', link: '/learn/position-management'},
{text: 'Dry mode & backtesting', link: '/learn/dry-mode-and-backtesting'},
{text: 'Database structure', link: '/learn/database-structure'},
{
text: 'Deploy & run', items: [
{text: 'Using docker', link: '/learn/deploy-and-run/docker'},
{text: 'Using qovery', link: '/learn/deploy-and-run/qovery'}
text: 'Basics', items: [
{text: 'Quickstart', link: '/learn/quickstart'},
{text: 'Position management', link: '/learn/position-management'},
{text: 'Dry mode & backtesting', link: '/learn/dry-mode-and-backtesting'},
]
},
{
text: 'Advanced', items: [
{text: 'Technical analysis', link: '/learn/technical-analysis'},
]
},
{
text: 'Structure', items: [
{text: 'Database', link: '/learn/database-structure'},
{text: 'Architecture', link: '/learn/architecture'},
]
}
]
},
{
text: 'Deploy & run',
ariaLabel: 'Deploy & run',
items: [
{text: 'Using Docker', link: '/deploy-and-run/docker'},
{text: 'Using Qovery', link: '/deploy-and-run/qovery'}
]
},
{
text: 'Ressources',
ariaLabel: 'Ressources menu',
ariaLabel: 'Ressources',
items: [
{text: 'Trading basics', link: '/ressources/trading-basics'},
{text: 'Articles', link: '/ressources/articles'},
{text: 'Books', link: '/ressources/books'},
{
text: 'Trading',
ariaLabel: 'Trading',
items: [
{text: 'Trading basics', link: '/ressources/trading-basics'},
]
},
{
text: 'Things to read',
ariaLabel: 'Things to read',
items: [

{text: 'Articles', link: '/ressources/articles'},
{text: 'Books', link: '/ressources/books'},
]
},
{
text: 'How-tos', items: [
{
Expand All @@ -122,8 +145,8 @@ module.exports = {
],
},
{
text: 'Contact / help',
ariaLabel: 'Contact menu',
text: 'Contact / Support',
ariaLabel: 'Contact',
items: [
{text: 'Email', link: 'mailto:[email protected]'},
{text: 'Twitter', link: 'https://twitter.com/CassandreTech'},
Expand All @@ -149,6 +172,6 @@ module.exports = {
plugins: [
['@vuepress/plugin-back-to-top'],
['@vuepress/plugin-medium-zoom'],
['@vuepress/plugin-google-analytics', { 'ga': 'UA-158255496-1' }]
['@vuepress/plugin-google-analytics', {'ga': 'UA-158255496-1'}]
]
}
Binary file modified docs/src/.vuepress/public/assets/backup/Banner A.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/.vuepress/public/assets/backup/Banner A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/.vuepress/public/assets/backup/Banner B.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/.vuepress/public/assets/backup/Banner B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified docs/src/.vuepress/public/assets/backup/Cassandre-B.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/.vuepress/public/assets/backup/Cassandre-B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/.vuepress/public/assets/images/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added docs/src/deploy-and-run/qovery-create-project.png
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ WORKDIR /build
COPY pom.xml .
RUN mvn dependency:go-offline -B
# Copy source files and compile them (.dockerignore should handle what to copy).
COPY . .
COPY ../.. .
RUN mvn -DskipTests=true package spring-boot:repackage

# Creates our image.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
home: true
heroImage: assets/images/logo/cassandre-trading-bot-without-text.png
tagline: An open-source framework that makes it easy to create your crypto trading bot in Java
tagline: Create your java crypto trading bot in minutes
actionText: Quick Start
actionLink: /learn/quickstart
features:
Expand All @@ -10,6 +10,6 @@ features:
- title: Create your strategy in minutes
details: Just code when you want to take short/long positions, set the rules, and we take care of everything (buying, selling, rules management, orders, trades, and tickers).
- title: Dry mode & backtesting made easy
details: We provide a dry mode to simulate exchange replies to your orders, so you can make tests. We also provide a spring boot starter to backtest your bot on historical data.
details: We provide a dry mode to simulate exchange replies to your orders to easily test your strategy. We also provide a spring boot starter to backtest your bot on historical data.
footer:
---
File renamed without changes.
Binary file modified docs/src/learn/cassandre-trading-bot-database.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
8 changes: 4 additions & 4 deletions docs/src/learn/position-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The first step is to create the rules you want to apply to the position thanks t
PositionRulesDTO rules = PositionRulesDTO.builder()
.stopGainPercentage(100)
.stopLossPercentage(50)
.create();
.build();
```

Then, you can create the position with that rule:
Expand All @@ -37,7 +37,7 @@ For example, if we receive a new price of 3000 USDT for 1 ETH, Cassandre will ca
You can then know your exact gain on this position by calling the [getGain()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getGain%28%29) method.

## Short position
A [short position](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/strategy/GenericCassandreStrategy.html#createShortPosition(tech.cassandre.trading.bot.dto.util.CurrencyPairDTO,java.math.BigDecimal,tech.cassandre.trading.bot.dto.position.PositionRulesDTO)) works the same way but the opposite way. With a short position, you bet that the price will go down.
A [short position](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/strategy/GenericCassandreStrategy.html#createShortPosition(tech.cassandre.trading.bot.dto.util.CurrencyPairDTO,java.math.BigDecimal,tech.cassandre.trading.bot.dto.position.PositionRulesDTO)) works the opposite way. With a short position, you bet that the price will go down.

Let's say you create a short position on 1 ETH with this command:

Expand All @@ -52,9 +52,9 @@ Note: if you want to check if you have enough funds available (at 1 ETH in our c
:::

## Gains
On a non-closed positions, you can get the:
On a position you can get the:
* The lowest calculated gain with [getLowestPrice()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getLowestCalculatedGain())
* The highest calculated gain with [getHighestGainPrice()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getHighestGainPrice())
* The latest calculated gain with [getLatestGainPrice](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getLatestGainPrice())

On a closed position, you can get the gain & fees with [getGain()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getGain())
Once the position is closed, you can get the gain & fees with [getGain()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/dto/position/PositionDTO.html#getGain())
6 changes: 3 additions & 3 deletions docs/src/learn/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Quickstart
# Quickstart

::: tip
If you are new to trading, you can read our tutorial [Trading basics](../ressources/trading-basics.md).
If you are new to trading, you can read our tutorial "[Trading basics](../ressources/trading-basics.md)".
:::

## Create your project
Expand Down Expand Up @@ -228,7 +228,7 @@ Cassandre trading bot also provides positions to manage your trade automatically
PositionRulesDTO rules = PositionRulesDTO.builder()
.stopGainPercentage(10)
.stopLossPercentage(5)
.create();
.build();
// Create position.
createLongPosition(new CurrencyPairDTO(BTC, USDT),
new BigDecimal("0,001"),
Expand Down
2 changes: 1 addition & 1 deletion docs/src/learn/technical-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Cassandre provides positions to manage your trading automatically. First, we cre
Then we called the [createLongPosition()](https://www.javadoc.io/doc/tech.cassandre.trading.bot/cassandre-trading-bot-spring-boot-autoconfigure/latest/tech/cassandre/trading/bot/strategy/GenericCassandreStrategy.html#createLongPosition%28tech.cassandre.trading.bot.dto.util.CurrencyPairDTO,java.math.BigDecimal,tech.cassandre.trading.bot.dto.position.PositionRulesDTO%29) method. It will automatically create a buy order. From now, with every ticker received, Cassandre will check the gain or loss made on this position; if it triggers one of the rules, Cassandre will automatically create a sell order to close it.

::: tip
You can learn more about positions in the [Position chapter](../position-management.md).
You can learn more about positions in the [Position chapter](./position-management.md).
:::

::: tip
Expand Down
Binary file modified docs/src/learn/technical_analysis_chart.png
2 changes: 1 addition & 1 deletion docs/src/ressources/how-tos/how-to-build-from-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mvn package
```bash
vuepress dev docs/src
```
Documentation web site is now running at [http://0.0.0.0:8080/](http://0.0.0.0:8080/).
Documentation website will be accessible at [http://0.0.0.0:8080/](http://0.0.0.0:8080/).

### Build static website
```bash
Expand Down
1 change: 0 additions & 1 deletion docs/src/ressources/how-tos/how-to-create-a-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Update libraries used by archetypes:
* [trading-bot-archetypes/basic-archetype/src/main/resources/archetype-resources/pom.xml](https://github.com/cassandre-tech/cassandre-trading-bot/blob/development/trading-bot-archetypes/basic-archetype/src/main/resources/archetype-resources/pom.xml).
* [trading-bot-archetypes/basic-ta4j-archetype/src/main/resources/archetype-resources/pom.xml](https://github.com/cassandre-tech/cassandre-trading-bot/blob/development/trading-bot-archetypes/basic-ta4j-archetype/src/main/resources/archetype-resources/pom.xml).
* Change roadmap content in `why-cassandre/features-and-roadmap.md`.

## Create the release with Maven
You must be using `ssh` and not `https`, to switch to `ssh`, type :
Expand Down
Diff not rendered.
Loading

0 comments on commit b020e25

Please sign in to comment.