Commit 2ffcc307 by zihan

添加日志

parent 641c2ebb
const constants = require('./constants');
const biboxApi = require('./api_kucoin');
const StateFilled = 3;
const StateNew = 1;
const StatePartiallyFilled = 2;
const StatePartiallyCancelled = 4;
const StateCancelled = 5;
const StateCancelling = 6;
// const StateFilled = 3;
// const StateNew = 1;
// const StatePartiallyFilled = 2;
// const StatePartiallyCancelled = 4;
// const StateCancelled = 5;
// const StateCancelling = 6;
function returnFakeOrder(symbol, price, amount) {
return {
......@@ -73,6 +73,7 @@ class Order {
console.log(result)
this.api.searchOrder(orderId, symbol, side, this._handleFOKSearchResult.bind(this, orderId, symbol, side, price, finalCallback));
}else if (order.pendingAmount === 0 || !order.isActive) {
console.log(order);
finalCallback(null, convertToRecordOrder(order, price));
} else if (order.dealAmount === 0 || (order.dealAmount > 0 && order.pendingAmount >0)) {
this.api.cancelOrder(orderId, symbol, side, (error, result) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment