forked from jesse-ai/jesse
-
Notifications
You must be signed in to change notification settings - Fork 0
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
72 changed files
with
7,518 additions
and
15 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
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,40 @@ | ||
export default { | ||
// The the starting balance of the wallet in USD: | ||
startingBalance: parseInt(process.env.STARTING_BALANCE), | ||
// If not, how many dollars should it use: | ||
positionSize: parseInt(process.env.STARTING_BALANCE), | ||
// Should it use all of account's balance for positions: | ||
tradeWithWholeBalance: !!parseInt(process.env.COMPOUNDING_POSITION_SIZING), | ||
|
||
// list of currencies to consider | ||
symbolsToConsider: process.env.SYMBOLS.split(','), | ||
// The symbol to trade. We'll make this an array in the future. | ||
symbolToTrade: process.env.TRADING_SYMBOL.toUpperCase(), | ||
|
||
// list of timeFrames to consider | ||
timeFramesToConsider: process.env.TIMEFRAMES.split(','), | ||
// Which candle type do you intend trade on: | ||
timeFrameToTrade: process.env.TRADING_TIMEFRAME.toLowerCase(), | ||
|
||
// Accepted values are: 'backtest', 'livetrade', 'fitness'. | ||
tradingMode: process.env.TRADING_MODE, | ||
|
||
// candle files for a single period of time | ||
candleFiles: { | ||
folder: 'BitFinex', | ||
|
||
// [7 months] [training data] | ||
// date: '2018-03-22.2018-10-17' | ||
// [2 months] [testing data] | ||
// date: '2018-08-19.2018-10-17' | ||
// 2 hours period use for feature testing backTest | ||
date: '2019-01-11.2019-01-11' | ||
}, | ||
|
||
// this would enable many console.log()s in the code, which are helpful for debugging. | ||
debugMode: !!(parseInt(process.env.DEBUG_MODE)), | ||
|
||
// is it running in jest tests. This value is set inside | ||
// jest files whenever running a jest test file. | ||
isTesting: false, | ||
} |
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,12 @@ | ||
export default { | ||
dashboardItems: { | ||
info: true, | ||
candles: true, | ||
positions: true, | ||
guide: false, | ||
errors: true, | ||
warnings: true, | ||
trades: true, | ||
orders: true, | ||
} | ||
} |
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,16 @@ | ||
export default { | ||
// The exchange market we're trading in. Used in for http and websocket requests. | ||
marketToTradeIn: process.env.EXCHANGE, | ||
|
||
// trading fee (in percent) per order. In our backTests, we always consider ourselves as the take | ||
tradingFee: parseFloat(process.env.FEE), | ||
|
||
// API keys and secrets of exchanges. | ||
exchanges: { | ||
Bitfinex: { | ||
baseURL: process.env.BITFINEX_URL, | ||
apiKey: process.env.BITFINEX_API_KEY, | ||
apiSecret: process.env.BITFINEX_API_SECRET, | ||
}, | ||
}, | ||
} |
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,15 @@ | ||
import app from './app'; | ||
import logging from './logging'; | ||
import exchanges from './exchanges'; | ||
import sentry from './sentry'; | ||
import dashboard from './dashboard'; | ||
import notifications from './notifications'; | ||
|
||
export default { | ||
...app, | ||
...logging, | ||
...exchanges, | ||
...sentry, | ||
...dashboard, | ||
notifications: { ...notifications } | ||
}; |
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,20 @@ | ||
export default { | ||
// here you can filter items that you wish yo see in reports after the trading is done. | ||
reportItems: { | ||
averageR: true, | ||
}, | ||
|
||
// here you can filter items that you intend to see when debugMode is enabled. (work in progress) | ||
debugItems: { | ||
orderSubmission: true, | ||
shorterPeriodCandles: true, | ||
executedOrderDetection: true, | ||
executedOrderStep: true, | ||
activePosition: true, | ||
progressBar: true, | ||
others: true | ||
}, | ||
|
||
// Accepted values are null and 'file'. ('database' will be added.) | ||
logDriver: process.env.LOG_DRIVER.toLowerCase(), | ||
} |
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,41 @@ | ||
import Driver from 'jesse-notifications-telegram'; | ||
import NotificationsDriverInterface from "../core/services/Notifier/NotificationsDriverInterface"; | ||
|
||
interface NotificationsConfigInterface { | ||
enable: boolean; | ||
driver: NotificationsDriverInterface; | ||
events: eventsInterface; | ||
} | ||
|
||
interface eventsInterface { | ||
errors: boolean; | ||
liveTradeStarted: boolean; | ||
liveTradeStopped: boolean; | ||
submittedOrders: boolean; | ||
cancelledOrders: boolean; | ||
executedOrders: boolean; | ||
openedPosition: boolean; | ||
updatedPosition: boolean; | ||
} | ||
|
||
const notifications: NotificationsConfigInterface = { | ||
// setting this to 0 will disable notifications entirely | ||
enable: !!(parseInt(process.env.ENABLE_NOTIFICATIONS)), | ||
|
||
// set the imported notifications driver | ||
driver: new Driver(), | ||
|
||
// events to report reported | ||
events: { | ||
errors: true, | ||
liveTradeStarted: true, | ||
liveTradeStopped: true, | ||
submittedOrders: true, | ||
cancelledOrders: true, | ||
executedOrders: true, | ||
openedPosition: true, | ||
updatedPosition: true, | ||
}, | ||
} | ||
|
||
export default notifications; |
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,5 @@ | ||
export default { | ||
useSentryForExceptionReporting: !!parseInt(process.env.ENABLE_SENTRY), | ||
|
||
sentryDSN: process.env.SENTRY_DSN, | ||
} |
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,6 @@ | ||
export default class ConflictingOrders extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'ConflictingOrders'; | ||
} | ||
} |
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,6 @@ | ||
export default class EmptyPosition extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'EmptyPosition'; | ||
} | ||
} |
Oops, something went wrong.