-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
120 changed files
with
6,759 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ jobs: | |
# ================================================================================================================ | ||
# Upload cassandre-trading-bot-spring-boot-autoconfigure assets to the release (jar, sources, javadoc). | ||
- name: Upload cassandre-trading-bot-spring-boot-autoconfigure jar | ||
continue-on-error: true | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -80,6 +81,7 @@ jobs: | |
asset_content_type: application/java-archive | ||
|
||
- name: Upload cassandre-trading-bot-spring-boot-autoconfigure sources | ||
continue-on-error: true | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -90,6 +92,7 @@ jobs: | |
asset_content_type: application/java-archive | ||
|
||
- name: Upload cassandre-trading-bot-spring-boot-autoconfigure javadoc | ||
continue-on-error: true | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -102,6 +105,7 @@ jobs: | |
# ================================================================================================================ | ||
# Upload cassandre-trading-bot-spring-boot-starter assets to the release (jar). | ||
- name: Upload cassandre-trading-bot-spring-boot-starter jar | ||
continue-on-error: true | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -113,6 +117,7 @@ jobs: | |
|
||
# ================================================================================================================ | ||
- name: Publish the release announce on Twitter | ||
continue-on-error: true | ||
uses: ethomson/send-tweet-action@v1 | ||
env: | ||
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | ||
|
@@ -128,6 +133,7 @@ jobs: | |
|
||
# ================================================================================================================ | ||
- name: Publish the release announce on Discord | ||
continue-on-error: true | ||
uses: Ilshidur/[email protected] | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# GraphQL API | ||
|
||
::: warning | ||
Available in 5.0.4 release. | ||
::: | ||
|
||
## Overview | ||
Cassandre GraphQL API allows you to ONLY query your data (balances, strategies, orders, trades and positions). | ||
|
||
## Installation | ||
To deploy the GraphQLAPI, just add this spring boot starter to your pom: | ||
```xml | ||
<dependency> | ||
<groupId>tech.cassandre.trading.bot</groupId> | ||
<artifactId>cassandre-trading-bot-spring-boot-starter-api-graphql</artifactId> | ||
<version>CASSANDRE_LATEST_RELEASE</version> | ||
</dependency> | ||
``` | ||
|
||
## Access the API with GraphiQL | ||
Start the application and open a browser to [http://localhost:8080/graphiql](http://localhost:8080/graphiql). GraphiQL is a query editor that comes out of the box with the DGS framework. | ||
|
||
To start, you can try this query to display all your strategies: | ||
``` | ||
query { | ||
strategies{ strategyId name } | ||
} | ||
``` | ||
|
||
## Secure your API | ||
To protect the access to your API with a key, add this property: `cassandre.trading.bot.api.graphql.key` in your `applications.properties`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Import historical data | ||
|
||
::: warning | ||
Available in 5.0.4 release. | ||
::: | ||
|
||
## Overview | ||
This feature allows you to import historical data (tickers you selected) in Cassandre database, so you can initialise your strategy. | ||
|
||
## Data file & format | ||
At startup, Cassandre will search for all files starting with `tickers-to-import` and ending with `csv`. | ||
|
||
This is how the file must be formatted: | ||
``` | ||
CURRENCY_PAIR,OPEN,LAST,BID,ASK,HIGH,LOW,VWAP,VOLUME,QUOTE_VOLUME,BID_SIZE,ASK_SIZE,TIMESTAMP | ||
"BTC/USDT","0.00000001","0.00000002","0.00000003","0.00000004","0.00000005","0.00000006","0.00000007","0.00000008","0.00000009","0.00000010","0.00000011",1508546000 | ||
"BTC/USDT","1.00000001","1.00000002","1.00000003","1.00000004","1.00000005","1.00000006","1.00000007","1.00000008","1.00000009","1.00000010","1.00000011",1508446000 | ||
"ETH/USDT","2.00000001","2.00000002","2.00000003","2.00000004","2.00000005","2.00000006","2.00000007","2.00000008","2.00000009","2.00000010","2.00000011",1508346000 | ||
``` | ||
|
||
## When to initialize data? | ||
In you strategy, you should implement the `initialize()` method. This method is executed by Cassandre before any other data (tickers, orders, trades...) is pushed to the strategy. | ||
|
||
## Access your data in your strategy | ||
In your strategy, you can access the data with two methods: | ||
* `List<TickerDTO> getImportedTickers()`. | ||
* `List<TickerDTO> getImportedTickers(CurrencyPairDTO currencyPairDTO)`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.