Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
ai
Commits
3b6db2da
Commit
3b6db2da
authored
Jul 26, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
bdb66fcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
31 deletions
+7
-31
test_json.js
test_json.js
+2
-2
trade.js
trade.js
+5
-29
No files found.
test_json.js
View file @
3b6db2da
...
...
@@ -2,8 +2,8 @@ let _ = require('lodash')
let
fs
=
require
(
'
fs
'
)
let
t
=
'
btc1&7&5.8&9_btcLp1819RZDD75_2.908100846521906_-1.5056680161943328_RunupZeroDrawDown_7.5
'
//
t='0,00:00,Sell,BTCUSDT,22374.3,22133.6,2022.07.25 20:09:00.000,-1.0757878458767458,3.708719378930288,-0.23062174012147219'
t
=
t
.
split
(
'
_
'
)
t
=
'
0,00:00,Sell,BTCUSDT,22374.3,22133.6,2022.07.25 20:09:00.000,-1.0757878458767458,3.708719378930288,-0.23062174012147219
'
t
=
t
.
split
(
'
,
'
)
for
(
let
i
=
0
;
i
<
t
.
length
;
i
++
)
console
.
log
(
i
,
t
[
i
])
...
...
trade.js
View file @
3b6db2da
...
...
@@ -43,7 +43,7 @@ async function init() {
// exchange.urls['api'] = exchange.urls['test'];
run
()
balanceUpdater
()
//
balanceUpdater()
}
...
...
@@ -104,7 +104,7 @@ async function run() {
}
//
checker()
checker
()
console
.
log
(
datas
)
}
...
...
@@ -169,10 +169,9 @@ async function make(name) {
}
async
function
updateVars
(
name
)
{
let
lastFile
=
await
fs
.
readFileSync
(
path
+
name
,
'
utf8
'
)
lastFile
=
lastFile
.
split
(
'
\n
'
)
let
lastData
=
lastFile
[
lastFile
.
length
-
2
]
async
function
updateVars
(
name
,
lastData
)
{
// lastData = lastFile[lastFile.length - 2]
let
sig
=
''
let
allData
=
getAllFromName
(
name
)
...
...
@@ -377,29 +376,6 @@ async function adder(sig, qty, date, allData,pair) {
}
// console.log(d)
// if (typeof d.id !== "undefined") {
// await sleep(60000)
// try {
// d = await exchange.fetchOrder(d.id, d.info.symbol)
// console.log('Add Suc With id', d.id, sig)
// const [add] = await client
// .multi()
// .set(sig, JSON.stringify({pair: d.info.symbol, side: d.side, qty: d.amount, price: d.average}))
// .exec();
// }
// catch (e)
// {
//
// console.log('Add Suc With id', d.id, sig)
// console.log(sig,'Have Problem Reding Order so try offline')
// const [add] = await client
// .multi()
// .set(sig, JSON.stringify({pair: d.info.symbol, side: d.side, qty: d.amount, price: d.price}))
// .exec();
// }
//
// }
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment