org.knowm.xchange.dto.marketdata.OrderBook.update()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.knowm.xchange.dto.marketdata.OrderBook.update()方法的一些代码示例,展示了OrderBook.update()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OrderBook.update()方法的具体详情如下:
包路径:org.knowm.xchange.dto.marketdata.OrderBook
类名称:OrderBook
方法名:update

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:

相关文章