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
191d5585
Commit
191d5585
authored
Oct 05, 2018
by
zihan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉冗余代码
parent
b65ca6aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
62 deletions
+0
-62
kucoinCollector.js
kucoinCollector.js
+0
-62
No files found.
kucoinCollector.js
View file @
191d5585
...
@@ -15,68 +15,6 @@ const Strategy3MaxAmountMap = {
...
@@ -15,68 +15,6 @@ const Strategy3MaxAmountMap = {
KCS
:
600
,
KCS
:
600
,
}
}
function
mergeDepthAsk
(
oldDepth
,
updateDepth
)
{
const
results
=
[];
const
cal
=
{
old
:
0
,
updated
:
0
};
for
(;
cal
.
old
<
oldDepth
.
length
||
cal
.
updated
<
updateDepth
.
length
;)
{
// if(results.length === length){
// break;
// }
if
(
oldDepth
[
cal
.
old
]
===
undefined
)
{
updateDepth
[
cal
.
updated
][
1
]
>
1
e
-
8
&&
results
.
push
(
updateDepth
[
cal
.
updated
]);
cal
.
updated
++
;
}
else
if
(
updateDepth
[
cal
.
updated
]
===
undefined
)
{
results
.
push
(
oldDepth
[
cal
.
old
]);
cal
.
old
++
;
}
else
if
(
parseFloat
(
oldDepth
[
cal
.
old
][
0
])
>
parseFloat
(
updateDepth
[
cal
.
updated
][
0
]))
{
updateDepth
[
cal
.
updated
][
1
]
>
1
e
-
8
&&
results
.
push
(
updateDepth
[
cal
.
updated
]);
cal
.
updated
++
;
}
else
if
(
parseFloat
(
oldDepth
[
cal
.
old
][
0
])
===
parseFloat
(
updateDepth
[
cal
.
updated
][
0
]))
{
if
(
parseFloat
(
updateDepth
[
cal
.
updated
][
1
])
>
1
e
-
8
)
{
results
.
push
(
updateDepth
[
cal
.
updated
]);
}
cal
.
updated
++
;
cal
.
old
++
;
}
else
{
results
.
push
(
oldDepth
[
cal
.
old
]);
cal
.
old
++
;
}
}
return
results
}
function
mergeDepthBid
(
oldDepth
,
updateDepth
)
{
const
result
=
[];
const
cal
=
{
old
:
0
,
updated
:
0
};
for
(;
cal
.
old
<
oldDepth
.
length
||
cal
.
updated
<
updateDepth
.
length
;)
{
// if(result.length === length){
// break;
// }
if
(
oldDepth
[
cal
.
old
]
===
undefined
)
{
updateDepth
[
cal
.
updated
][
1
]
>
1
e
-
8
&&
result
.
push
(
updateDepth
[
cal
.
updated
]);
cal
.
updated
++
;
}
else
if
(
updateDepth
[
cal
.
updated
]
===
undefined
)
{
result
.
push
(
oldDepth
[
cal
.
old
]);
cal
.
old
++
;
}
else
if
(
parseFloat
(
oldDepth
[
cal
.
old
][
0
])
<
parseFloat
(
updateDepth
[
cal
.
updated
][
0
]))
{
updateDepth
[
cal
.
updated
][
1
]
>
1
e
-
8
&&
result
.
push
(
updateDepth
[
cal
.
updated
]);
cal
.
updated
++
;
}
else
if
(
parseFloat
(
oldDepth
[
cal
.
old
][
0
])
===
parseFloat
(
updateDepth
[
cal
.
updated
][
0
]))
{
if
(
parseFloat
(
updateDepth
[
cal
.
updated
][
1
])
>
1
e
-
8
)
{
result
.
push
(
updateDepth
[
cal
.
updated
++
]);
cal
.
old
++
;
}
else
{
cal
.
updated
++
;
cal
.
old
++
;
}
}
else
{
result
.
push
(
oldDepth
[
cal
.
old
++
])
}
}
return
result
;
}
class
BiboxCollector
extends
BaseCollector
{
class
BiboxCollector
extends
BaseCollector
{
constructor
(
wantedSymbols
){
constructor
(
wantedSymbols
){
super
(
"KUCOIN"
,
baseCurrencies
,
machine
,
wantedSymbols
);
super
(
"KUCOIN"
,
baseCurrencies
,
machine
,
wantedSymbols
);
...
...
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