Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kucoin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
rongjun
kucoin
Commits
1872bc3d
Commit
1872bc3d
authored
Oct 04, 2018
by
rongjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
e5fc7018
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
api_kucoin.js
api_kucoin.js
+2
-0
kucoinCollector.js
kucoinCollector.js
+9
-10
No files found.
api_kucoin.js
View file @
1872bc3d
...
...
@@ -115,6 +115,8 @@ class biboxApi {
updateData
=
[[
response
.
data
.
price
,
newCount
]];
}
asks
=
mergeDepth
(
asks
,
updateData
,
true
);
console
.
log
(
updateData
)
console
.
log
(
asks
)
}
else
if
(
result
.
data
.
type
===
'BUY'
){
const
oldD
=
totalOrderbook
[
symbol
];
let
has
=
false
;
...
...
kucoinCollector.js
View file @
1872bc3d
...
...
@@ -204,25 +204,18 @@ class BiboxCollector extends BaseCollector{
const
data
=
result
.
data
;
const
timeStamp
=
result
.
timestamp
;
const
symbol
=
result
.
symbol
;
if
(
symbol
===
'HST-ETH'
){
console
.
log
(
symbol
,
': subscribe ok'
)
console
.
log
(
data
.
SELL
)
console
.
log
(
data
.
BUY
)
}
callback
(
data
.
SELL
.
slice
(
0
,
depth
).
map
((
item
)
=>
[
item
[
0
],
item
[
1
]]),
data
.
BUY
.
slice
(
0
,
depth
).
map
((
item
)
=>
[
item
[
0
],
item
[
1
]]),
symbol
,
timeStamp
);
}
})
}
_runMonitor
(
callback
){
let
balanceMap
=
{};
let
need
=
1
;
if
(
!
coinInfoMap
){
_getCoinsInfo
(){
console
.
log
(
'start get coin info...'
);
coinInfoMap
=
{}
this
.
api
.
coins_info
((
error
,
result
)
=>
{
if
(
error
){
console
.
error
(
'get coins info error'
)
console
.
error
(
'get coins info error'
);
this
.
_getCoinsInfo
();
}
else
{
if
(
result
.
data
){
for
(
let
d
of
result
.
data
){
...
...
@@ -232,6 +225,12 @@ class BiboxCollector extends BaseCollector{
}
});
}
_runMonitor
(
callback
){
let
balanceMap
=
{};
let
need
=
1
;
if
(
!
coinInfoMap
){
this
.
_getCoinsInfo
()
}
this
.
api
.
balance
(
20
,
1
,
(
error
,
result
)
=>
{
if
(
error
){
console
.
error
(
"get balance by rest error:"
);
...
...
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