本文整理了Java中org.knowm.xchange.dto.marketdata.OrderBook.update()
方法的一些代码示例,展示了OrderBook.update()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OrderBook.update()
方法的具体详情如下:
包路径:org.knowm.xchange.dto.marketdata.OrderBook
类名称:OrderBook
方法名:update
[英]Given an OrderBookUpdate, it will replace a matching limit order in the orderbook if one is found, or add a new if one is not. timeStamp will be updated if the new timestamp is non-null and in the future.
[中]给定OrderBookUpdate,如果找到一个,它将替换orderbook中匹配的限制订单,如果没有,它将添加一个新的限制订单。如果新的时间戳不为空,则将在将来更新时间戳。
代码示例来源:origin: knowm/XChange
/**
* Given a new LimitOrder, it will replace a matching limit order in the orderbook if one is
* found, or add the new LimitOrder if one is not. timeStamp will be updated if the new timestamp
* is non-null and in the future.
*
* @param limitOrder the new LimitOrder
*/
public void update(LimitOrder limitOrder) {
update(getOrders(limitOrder.getType()), limitOrder);
updateDate(limitOrder.getTimestamp());
}
代码示例来源:origin: sutra/okcoin-client
);
orderBook.update(bidUpdate);
orderBook.update(askUpdate);
代码示例来源:origin: org.knowm.xchange/xchange-core
/**
* Given a new LimitOrder, it will replace a matching limit order in the orderbook if one is
* found, or add the new LimitOrder if one is not. timeStamp will be updated if the new timestamp
* is non-null and in the future.
*
* @param limitOrder the new LimitOrder
*/
public void update(LimitOrder limitOrder) {
update(getOrders(limitOrder.getType()), limitOrder);
updateDate(limitOrder.getTimestamp());
}
代码示例来源:origin: bitrich-info/xchange-stream
ob.bids.forEach((key, value) -> subscription.orderBook.update(new OrderBookUpdate(
OrderType.BID,
null,
depth.getEventTime(),
value)));
ob.asks.forEach((key, value) -> subscription.orderBook.update(new OrderBookUpdate(
OrderType.ASK,
null,
代码示例来源:origin: sutra/okcoin-client
switch (action) {
case MDUpdateAction.NEW:
this.orderBook.update(limitOrder);
break;
case MDUpdateAction.CHANGE:
this.orderBook.update(limitOrder);
break;
case MDUpdateAction.DELETE:
limitOrder.getLimitPrice(),
limitOrder.getTimestamp(), BigDecimal.ZERO);
this.orderBook.update(orderBookUpdate);
break;
default:
内容来源于网络,如有侵权,请联系作者删除!