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

Feature sequelize sqlite3 #131

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2307bf
Add text filter to logs page
egisz May 5, 2020
8574a2b
use datatables in logs page start of work
egisz May 11, 2020
ca845ff
sequelize semi working
egisz May 11, 2020
aafc930
Merge branch 'master' of https://github.com/Haehnchen/crypto-trading-…
egisz May 11, 2020
25dcae1
fix date filters, make same based on timestamp
egisz May 11, 2020
40fca20
limit columns in query result
egisz May 11, 2020
fe2cbce
fix winston sequelize logging paramaters
egisz May 12, 2020
921dbd9
fix log page filters, source bootstrap and datatables libraries from …
egisz May 20, 2020
af023d4
Merge branch 'master' of https://github.com/Haehnchen/crypto-trading-…
egisz May 21, 2020
7069e24
fix eslint errors
egisz May 21, 2020
c75d30c
bootstrap as npm packadge
egisz May 26, 2020
04f6295
server/client side debugging
egisz May 26, 2020
5f8cb59
datatables in application views
egisz May 26, 2020
3ecceac
Merge branch 'master' of https://github.com/Haehnchen/crypto-trading-…
egisz May 26, 2020
0f20ed1
update dependences, sourch css and js from npm
egisz May 26, 2020
aaf3333
fix responsive tables to colapse
egisz May 26, 2020
4b22364
add db migration file and set it run automatically after npm install
egisz May 26, 2020
f1e5d8a
remove sql script as it is generated by sequelize
egisz May 27, 2020
8e6673e
detection of environment
egisz May 28, 2020
0362e39
fix logs page formatting
egisz May 28, 2020
077475a
fix signal logging - missed out await
egisz May 29, 2020
330c5ee
fix logs table wrap
egisz May 29, 2020
42d6eaf
fix Candlestick model condition
egisz Jun 3, 2020
aeaa943
fix pairs page error when no watchdogs present
egisz Jun 3, 2020
b9b8e02
update travis config
egisz Jun 15, 2020
afda66a
another fix to travis config
egisz Jun 16, 2020
85e1087
fix failing tests
egisz Jun 16, 2020
a0d1ed7
Merge branch 'master' of github.com:egisz/crypto-trading-bot into fea…
egisz Jun 16, 2020
6643851
fix signals date column
egisz Jul 3, 2020
a187ea2
Merge remote-tracking branch 'origin/master' into feature_sequelize_s…
egisz Jul 14, 2020
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
10 changes: 10 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// .sequelizerc

const path = require('path');

module.exports = {
'config': path.resolve('conf.json'),
'models-path': path.resolve('src', 'modules', 'repository'),
'seeders-path': path.resolve('db', 'seeders'),
'migrations-path': path.resolve('db', 'migrations')
};
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ language: node_js
node_js:
- '10'

before_install:
- cp conf.json.dist conf.json

install:
- npm install

Expand Down
34 changes: 23 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,26 @@
"version": "0.2.0",
"configurations": [
{
"name": "Server",
"type": "node",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/index.js",
"args": ["trade"]
},
{
"name": "Client",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080/",
"webRoot": "${workspaceRoot}/web/static/js"
},
{
"name": "Mocha Tests",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
//"-u",
Expand All @@ -22,17 +39,12 @@
"skipFiles": [
"<node_internals>/**"
]
},

}
],
"compounds": [
{
"type": "node",
"request": "launch",
"name": "Bot-DEV",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\index.js",
"args": ["trade"]
"name": "Server/Client",
"configurations": ["Server", "Client"]
}
]
]
}
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ TODOS:

* node.js
* sqlite3
* [sequelize ORM](https://sequelize.org/)
* [technicalindicators](https://github.com/anandanand84/technicalindicators)
* [tulipindicators - tulind](https://tulipindicators.org/list)
* [TA-Lib](https://mrjbq7.github.io/ta-lib/)
* twig
* [twig](https://www.npmjs.com/package/twig)
* express
* Bootstrap v4
* [datatables](https://datatables.net/)
* Tradingview widgets

## How to use
Expand Down Expand Up @@ -84,11 +86,6 @@ Provide a configuration with your exchange credentials
cp conf.json.dist conf.json
```

Create a new sqlite database use bot.sql scheme to create the tables
```
sqlite3 bot.db < bot.sql
```

Lets start it

```
Expand Down
84 changes: 0 additions & 84 deletions bot.sql

This file was deleted.

18 changes: 17 additions & 1 deletion conf.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,21 @@
}
]
}
]
],

"development": {
"storage": "bot.db",
"dialect": "sqlite",
"operatorsAliases": false
},
"test": {
"storage": ":memory:",
"dialect": "sqlite",
"operatorsAliases": false
},
"production": {
"storage": "bot.db",
"dialect": "sqlite",
"operatorsAliases": false
}
}
5 changes: 5 additions & 0 deletions db/migrations/20200526142117-initial.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.dropAllTables();
}
};
Loading