Skip to content

Commit 54165c8

Browse files
authored
Merge pull request #8 from Zizwar/dev3
Dev3 to main
2 parents 07ea6a7 + 3737b7d commit 54165c8

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM denoland/deno:1.10.3
2+
3+
# port listens to.
4+
EXPOSE 1993
5+
6+
WORKDIR /app
7+
8+
# Prefer not to run as root.
9+
USER deno
10+
11+
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
12+
# Ideally cache deps.ts will download and compile _all_ external files used in main.js.
13+
COPY deps.js .
14+
RUN deno cache deps.js
15+
16+
# These steps will be re-run upon each file change in your working directory:
17+
ADD . .
18+
# Compile the main app so that it doesn't need to be compiled each startup/entry.
19+
RUN deno cache main.js
20+
21+
CMD ["run", "--allow-net","--allow-env", "--allow-read", "main.js"]

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ API_SECRET_BINANCE =
2121
INTERVAL_TIME =
2222
```
2323

24-
4- run in terminal
24+
4 - RUN
25+
- in terminal
2526
```sh
26-
deno run --allow-net --allow-env --allow-read app.js
27+
$ deno run --allow-net --allow-env --allow-read app.js
28+
```
29+
- in docker
30+
```sh
31+
$ docker build -t app . && docker run -it --init -p 1993:1993 app
2732
```
2833
## exemple
2934

app.js renamed to main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { INTERVAL_TIME = 1 } = ENV;
44

55
const denoBot = new DenoBot();
66
const ping = await denoBot.ping;
7+
console.log("isDenoBotConectToFutures="+ping ? "yes :)":"no :(")
78
denoBot.stratigy = "onlyRsis";
89
//const balanceUSDT = await denoBot.getBalance("USDT");
910
//const balanceBUSD = await denoBot.getBalance("BUSD");
@@ -29,7 +30,7 @@ const tfx = (val) => +parseFloat(val).toFixed(5)
2930

3031

3132
const quantity = 0.3
32-
33+
/*
3334
console.info(
3435
await denoBot.binance.futuresOrder({
3536
type: 'TAKE_PROFIT',
@@ -43,7 +44,7 @@ console.info(
4344
//activatePrice: 0.001 - 0.001 * 0.2,
4445
}).catch(console.error)
4546
)
46-
47+
*/
4748
//console.log(await denoBot.binance.withdrawHistory())
4849
/*
4950
setInterval(async _ => {

0 commit comments

Comments
 (0)