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
44c746aa
Commit
44c746aa
authored
Sep 14, 2018
by
rongjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
1b1498c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
kucoinCollector.js
kucoinCollector.js
+6
-5
strategy3.js
strategy3.js
+1
-0
No files found.
kucoinCollector.js
View file @
44c746aa
...
...
@@ -66,8 +66,8 @@ class BiboxCollector extends BaseCollector{
// restSymbols.push(symbol);
// }
// }
const
perInterval
=
6
;
const
totalInterval
=
perInterval
*
restSymbols
.
length
+
50
;
const
perInterval
=
10
;
const
totalInterval
=
perInterval
*
restSymbols
.
length
;
setInterval
(()
=>
{
const
sortedSymbols
=
restSymbols
.
sort
(()
=>
{
return
Math
.
random
()
>
0.5
...
...
@@ -121,7 +121,7 @@ class BiboxCollector extends BaseCollector{
return
symbolDetail
.
pair
;
}
getFeeRate
(
fromCurrency
,
toCurrency
){
return
0
;
return
0
.001
;
}
processAmount
(
fromCurrency
,
toCurrency
,
amount
){
//有可能会由于数值过小,传进来的amount被表示为科学计数法法
...
...
@@ -141,8 +141,9 @@ class BiboxCollector extends BaseCollector{
return
price
;
}
getCurrencyMaxReturnAmount
(
currency
){
const
balance
=
this
.
getCurrencyBalance
(
currency
);
return
Math
.
min
(
Strategy3MaxAmountMap
[
currency
],
balance
);
return
Strategy3MaxAmountMap
[
currency
];
// const balance = this.getCurrencyBalance(currency);
// return Math.min(Strategy3MaxAmountMap[currency],balance);
}
getDepthPrintStr
(
fromCurrency
,
toCurrency
,
depth
=
1
){
return
super
.
getDepthPrintStr
(
fromCurrency
,
toCurrency
,
3
);
...
...
strategy3.js
View file @
44c746aa
...
...
@@ -244,6 +244,7 @@ class Strategy3 {
const
buyFirst
=
result
[
9
];
if
(
totalMarginRate
>
this
.
_getMinMargin
())
{
console
.
log
(
`发现利差:
${
totalMarginRate
}
,buyDepth:
${
buyDepth
}
,sellDepth
${
sellDepth
}
,returnDepth
${
returnDepth
}
`
);
return
-
1
;
return
[
baseCurrency1
,
midCurrency
,
baseCurrency2
,
totalMarginRate
,
buyPrice
,
sellPrice
,
returnPrice
,
amount
,
returnAmount
,
rawBuyPrice
,
rawSellPrice
,
rawReturnPrice
,
buyFirst
];
}
}
...
...
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