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
ec193f8f
Commit
ec193f8f
authored
Jun 16, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
8ddbdefe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
change2.js
change2.js
+7
-6
No files found.
change2.js
View file @
ec193f8f
...
@@ -18,6 +18,7 @@ const ccxt = require('ccxt')
...
@@ -18,6 +18,7 @@ const ccxt = require('ccxt')
let
exchange
let
exchange
let
info
exchange
.
urls
[
'
api
'
]
=
exchange
.
urls
[
'
test
'
];
exchange
.
urls
[
'
api
'
]
=
exchange
.
urls
[
'
test
'
];
...
@@ -30,11 +31,11 @@ async function init() {
...
@@ -30,11 +31,11 @@ async function init() {
client
.
on
(
'
error
'
,
(
err
)
=>
console
.
log
(
'
Redis Client Error
'
,
err
));
client
.
on
(
'
error
'
,
(
err
)
=>
console
.
log
(
'
Redis Client Error
'
,
err
));
await
client
.
connect
();
await
client
.
connect
();
let
info
=
await
fs
.
readFileSync
(
'
info.json
'
,
'
utf8
'
);
info
=
await
fs
.
readFileSync
(
'
info.json
'
,
'
utf8
'
);
info
=
JSON
.
parse
(
info
)
info
=
JSON
.
parse
(
info
)
exchange
=
new
ccxt
.
bybit
({
exchange
=
new
ccxt
.
bybit
({
apiKey
:
"
JIYbRCdXjr7Hi0GyUB
"
,
apiKey
:
info
.
apiKey
,
secret
:
"
vMTlNjgUNZJNQ7LzgNWr4549cNrehrkFpGzC
"
,
secret
:
info
.
secret
,
enableRateLimit
:
true
,
enableRateLimit
:
true
,
})
})
...
@@ -283,8 +284,8 @@ async function closer(sig, date, bigData, id, pair) {
...
@@ -283,8 +284,8 @@ async function closer(sig, date, bigData, id, pair) {
lastToken
=
lastToken
.
replace
(
/_/g
,
''
).
replace
(
/Lp/g
,
''
).
replace
(
/BTC/g
,
''
).
replace
(
/ /g
,
''
)
lastToken
=
lastToken
.
replace
(
/_/g
,
''
).
replace
(
/Lp/g
,
''
).
replace
(
/BTC/g
,
''
).
replace
(
/ /g
,
''
)
const
[
data
,
delStatus
]
=
await
client
const
[
data
,
delStatus
]
=
await
client
.
multi
()
.
multi
()
.
get
(
sig
)
.
get
(
info
.
apiKey
+
sig
)
.
del
(
sig
)
.
del
(
info
.
apiKey
+
sig
)
.
exec
();
.
exec
();
...
@@ -371,7 +372,7 @@ async function adder(sig, qty, date, allData,pair) {
...
@@ -371,7 +372,7 @@ async function adder(sig, qty, date, allData,pair) {
console
.
log
(
'
Add Suc With id
'
,
d
.
id
,
sig
)
console
.
log
(
'
Add Suc With id
'
,
d
.
id
,
sig
)
const
[
add
]
=
await
client
const
[
add
]
=
await
client
.
multi
()
.
multi
()
.
set
(
sig
,
JSON
.
stringify
({
pair
:
d
.
info
.
symbol
,
side
:
d
.
side
,
qty
:
d
.
amount
,
price
:
d
.
price
}))
.
set
(
info
.
apiKey
+
sig
,
JSON
.
stringify
({
pair
:
d
.
info
.
symbol
,
side
:
d
.
side
,
qty
:
d
.
amount
,
price
:
d
.
price
}))
.
exec
();
.
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