diff --git a/src/main/java/com/binance/api/client/domain/ExecutionType.java b/src/main/java/com/binance/api/client/domain/ExecutionType.java
index b6760b794..4da14d863 100644
--- a/src/main/java/com/binance/api/client/domain/ExecutionType.java
+++ b/src/main/java/com/binance/api/client/domain/ExecutionType.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Order execution type.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum ExecutionType {
NEW,
CANCELED,
diff --git a/src/main/java/com/binance/api/client/domain/OrderRejectReason.java b/src/main/java/com/binance/api/client/domain/OrderRejectReason.java
index 7da9173b4..29f5e47f0 100644
--- a/src/main/java/com/binance/api/client/domain/OrderRejectReason.java
+++ b/src/main/java/com/binance/api/client/domain/OrderRejectReason.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Order reject reason values.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum OrderRejectReason {
NONE,
UNKNOWN_INSTRUMENT,
diff --git a/src/main/java/com/binance/api/client/domain/OrderSide.java b/src/main/java/com/binance/api/client/domain/OrderSide.java
index c477436bd..db74f9373 100644
--- a/src/main/java/com/binance/api/client/domain/OrderSide.java
+++ b/src/main/java/com/binance/api/client/domain/OrderSide.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Buy/Sell order side.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum OrderSide {
BUY,
SELL
diff --git a/src/main/java/com/binance/api/client/domain/OrderStatus.java b/src/main/java/com/binance/api/client/domain/OrderStatus.java
index 478dd4d56..81656c722 100644
--- a/src/main/java/com/binance/api/client/domain/OrderStatus.java
+++ b/src/main/java/com/binance/api/client/domain/OrderStatus.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Status of a submitted order.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum OrderStatus {
NEW,
PARTIALLY_FILLED,
diff --git a/src/main/java/com/binance/api/client/domain/OrderType.java b/src/main/java/com/binance/api/client/domain/OrderType.java
index 46eb162c2..11d484e5e 100644
--- a/src/main/java/com/binance/api/client/domain/OrderType.java
+++ b/src/main/java/com/binance/api/client/domain/OrderType.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Type of order to submit to the system.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum OrderType {
LIMIT,
MARKET,
diff --git a/src/main/java/com/binance/api/client/domain/TimeInForce.java b/src/main/java/com/binance/api/client/domain/TimeInForce.java
index 49e266431..2d2f50db1 100644
--- a/src/main/java/com/binance/api/client/domain/TimeInForce.java
+++ b/src/main/java/com/binance/api/client/domain/TimeInForce.java
@@ -1,5 +1,7 @@
package com.binance.api.client.domain;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Time in force to indicate how long an order will remain active before it is executed or expires.
*
@@ -9,6 +11,7 @@
*
* @see http://www.investopedia.com/terms/t/timeinforce.asp
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum TimeInForce {
GTC,
IOC,
diff --git a/src/main/java/com/binance/api/client/domain/account/AssetBalance.java b/src/main/java/com/binance/api/client/domain/account/AssetBalance.java
index 9f90aafa4..3dae789ec 100644
--- a/src/main/java/com/binance/api/client/domain/account/AssetBalance.java
+++ b/src/main/java/com/binance/api/client/domain/account/AssetBalance.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
@@ -8,6 +9,7 @@
*
* @see Account
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class AssetBalance {
/**
diff --git a/src/main/java/com/binance/api/client/domain/account/DepositAddress.java b/src/main/java/com/binance/api/client/domain/account/DepositAddress.java
index 2ca99502f..0aba6dc05 100644
--- a/src/main/java/com/binance/api/client/domain/account/DepositAddress.java
+++ b/src/main/java/com/binance/api/client/domain/account/DepositAddress.java
@@ -1,11 +1,13 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* A deposit address for a given asset.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class DepositAddress {
private String address;
diff --git a/src/main/java/com/binance/api/client/domain/account/DepositHistory.java b/src/main/java/com/binance/api/client/domain/account/DepositHistory.java
index 792f3fa9d..4ac86ee7c 100644
--- a/src/main/java/com/binance/api/client/domain/account/DepositHistory.java
+++ b/src/main/java/com/binance/api/client/domain/account/DepositHistory.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -11,6 +12,7 @@
*
* @see Deposit
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class DepositHistory {
@JsonProperty("depositList")
diff --git a/src/main/java/com/binance/api/client/domain/account/NewOrder.java b/src/main/java/com/binance/api/client/domain/account/NewOrder.java
index 635e1ddac..221c07d36 100644
--- a/src/main/java/com/binance/api/client/domain/account/NewOrder.java
+++ b/src/main/java/com/binance/api/client/domain/account/NewOrder.java
@@ -4,11 +4,13 @@
import com.binance.api.client.domain.OrderSide;
import com.binance.api.client.domain.OrderType;
import com.binance.api.client.domain.TimeInForce;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* A trade order to enter or exit a position.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class NewOrder {
/**
diff --git a/src/main/java/com/binance/api/client/domain/account/NewOrderResponseType.java b/src/main/java/com/binance/api/client/domain/account/NewOrderResponseType.java
index c465f85a7..836a571d5 100644
--- a/src/main/java/com/binance/api/client/domain/account/NewOrderResponseType.java
+++ b/src/main/java/com/binance/api/client/domain/account/NewOrderResponseType.java
@@ -1,9 +1,12 @@
package com.binance.api.client.domain.account;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Desired response type of NewOrder requests.
* @see NewOrderResponse
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum NewOrderResponseType {
ACK,
RESULT,
diff --git a/src/main/java/com/binance/api/client/domain/account/Trade.java b/src/main/java/com/binance/api/client/domain/account/Trade.java
index 574e16b7b..df0d14e3b 100644
--- a/src/main/java/com/binance/api/client/domain/account/Trade.java
+++ b/src/main/java/com/binance/api/client/domain/account/Trade.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -8,6 +9,7 @@
/**
* Represents an executed trade.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class Trade {
/**
diff --git a/src/main/java/com/binance/api/client/domain/account/TradeHistoryItem.java b/src/main/java/com/binance/api/client/domain/account/TradeHistoryItem.java
index a4470a0c1..68d017754 100644
--- a/src/main/java/com/binance/api/client/domain/account/TradeHistoryItem.java
+++ b/src/main/java/com/binance/api/client/domain/account/TradeHistoryItem.java
@@ -1,12 +1,14 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Represents an executed trade history item.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class TradeHistoryItem {
/**
* Trade id.
diff --git a/src/main/java/com/binance/api/client/domain/account/WithdrawHistory.java b/src/main/java/com/binance/api/client/domain/account/WithdrawHistory.java
index 4694c0d09..3a3d50f12 100644
--- a/src/main/java/com/binance/api/client/domain/account/WithdrawHistory.java
+++ b/src/main/java/com/binance/api/client/domain/account/WithdrawHistory.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.util.List;
@@ -10,6 +11,7 @@
*
* @see Withdraw
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class WithdrawHistory {
private List withdrawList;
diff --git a/src/main/java/com/binance/api/client/domain/account/request/OrderRequest.java b/src/main/java/com/binance/api/client/domain/account/request/OrderRequest.java
index 2221af12d..c890a01d9 100644
--- a/src/main/java/com/binance/api/client/domain/account/request/OrderRequest.java
+++ b/src/main/java/com/binance/api/client/domain/account/request/OrderRequest.java
@@ -1,11 +1,13 @@
package com.binance.api.client.domain.account.request;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Base request parameters for order-related methods.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class OrderRequest {
private final String symbol;
diff --git a/src/main/java/com/binance/api/client/domain/event/CandlestickEvent.java b/src/main/java/com/binance/api/client/domain/event/CandlestickEvent.java
index 31cbe1e4f..1019eb6f3 100644
--- a/src/main/java/com/binance/api/client/domain/event/CandlestickEvent.java
+++ b/src/main/java/com/binance/api/client/domain/event/CandlestickEvent.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.event;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -11,6 +12,7 @@
*/
@JsonDeserialize(using = CandlestickEventDeserializer.class)
@JsonSerialize(using = CandlestickEventSerializer.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
public class CandlestickEvent {
private String eventType;
diff --git a/src/main/java/com/binance/api/client/domain/event/ListenKey.java b/src/main/java/com/binance/api/client/domain/event/ListenKey.java
index 555d0af16..cfce64396 100644
--- a/src/main/java/com/binance/api/client/domain/event/ListenKey.java
+++ b/src/main/java/com/binance/api/client/domain/event/ListenKey.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.event;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Dummy type to wrap a listen key from a server response.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ListenKey {
private String listenKey;
diff --git a/src/main/java/com/binance/api/client/domain/general/ExchangeFilter.java b/src/main/java/com/binance/api/client/domain/general/ExchangeFilter.java
index ef4907925..e492111a8 100644
--- a/src/main/java/com/binance/api/client/domain/general/ExchangeFilter.java
+++ b/src/main/java/com/binance/api/client/domain/general/ExchangeFilter.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.general;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
@@ -10,6 +11,7 @@
*
* The MAX_ALGO_ORDERS filter defines the maximum number of "algo" orders an account is allowed to have open on the exchange. "Algo" orders are STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ExchangeFilter {
private FilterType filterType;
diff --git a/src/main/java/com/binance/api/client/domain/general/FilterType.java b/src/main/java/com/binance/api/client/domain/general/FilterType.java
index 63fef1659..0ddedda51 100644
--- a/src/main/java/com/binance/api/client/domain/general/FilterType.java
+++ b/src/main/java/com/binance/api/client/domain/general/FilterType.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Filters define trading rules on a symbol or an exchange. Filters come in two forms: symbol filters and exchange filters.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum FilterType {
// Symbol
PRICE_FILTER,
diff --git a/src/main/java/com/binance/api/client/domain/general/RateLimit.java b/src/main/java/com/binance/api/client/domain/general/RateLimit.java
index 8f0e3fd1a..e8d963c33 100644
--- a/src/main/java/com/binance/api/client/domain/general/RateLimit.java
+++ b/src/main/java/com/binance/api/client/domain/general/RateLimit.java
@@ -1,11 +1,13 @@
package com.binance.api.client.domain.general;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Rate limits.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class RateLimit {
private RateLimitType rateLimitType;
diff --git a/src/main/java/com/binance/api/client/domain/general/RateLimitInterval.java b/src/main/java/com/binance/api/client/domain/general/RateLimitInterval.java
index bc316061d..0c8f65fca 100644
--- a/src/main/java/com/binance/api/client/domain/general/RateLimitInterval.java
+++ b/src/main/java/com/binance/api/client/domain/general/RateLimitInterval.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Rate limit intervals.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum RateLimitInterval {
SECOND,
MINUTE,
diff --git a/src/main/java/com/binance/api/client/domain/general/RateLimitType.java b/src/main/java/com/binance/api/client/domain/general/RateLimitType.java
index 4ca0fadb8..db43d5d39 100644
--- a/src/main/java/com/binance/api/client/domain/general/RateLimitType.java
+++ b/src/main/java/com/binance/api/client/domain/general/RateLimitType.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Rate limiters.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum RateLimitType {
REQUEST_WEIGHT,
ORDERS
diff --git a/src/main/java/com/binance/api/client/domain/general/ServerTime.java b/src/main/java/com/binance/api/client/domain/general/ServerTime.java
index 9b7475271..ec4880313 100644
--- a/src/main/java/com/binance/api/client/domain/general/ServerTime.java
+++ b/src/main/java/com/binance/api/client/domain/general/ServerTime.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Time of the server running Binance's REST API.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ServerTime {
private Long serverTime;
diff --git a/src/main/java/com/binance/api/client/domain/general/SymbolFilter.java b/src/main/java/com/binance/api/client/domain/general/SymbolFilter.java
index 4ad81163a..068e0ba28 100644
--- a/src/main/java/com/binance/api/client/domain/general/SymbolFilter.java
+++ b/src/main/java/com/binance/api/client/domain/general/SymbolFilter.java
@@ -1,5 +1,7 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Filters define trading rules on a symbol or an exchange. Filters come in two forms: symbol filters and exchange filters.
*
@@ -13,6 +15,7 @@
*
* The MAX_ALGO_ORDERS filter defines the maximum number of "algo" orders an account is allowed to have open on a symbol. "Algo" orders are STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class SymbolFilter {
// PRICE_FILTER
diff --git a/src/main/java/com/binance/api/client/domain/general/SymbolStatus.java b/src/main/java/com/binance/api/client/domain/general/SymbolStatus.java
index e9ddff627..c12647540 100644
--- a/src/main/java/com/binance/api/client/domain/general/SymbolStatus.java
+++ b/src/main/java/com/binance/api/client/domain/general/SymbolStatus.java
@@ -1,8 +1,11 @@
package com.binance.api.client.domain.general;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Status of a symbol on the exchange.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum SymbolStatus {
PRE_TRADING,
TRADING,
diff --git a/src/main/java/com/binance/api/client/domain/market/BookTicker.java b/src/main/java/com/binance/api/client/domain/market/BookTicker.java
index c91f3a76f..67b007ea8 100644
--- a/src/main/java/com/binance/api/client/domain/market/BookTicker.java
+++ b/src/main/java/com/binance/api/client/domain/market/BookTicker.java
@@ -1,11 +1,13 @@
package com.binance.api.client.domain.market;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Represents the best price/qty on the order book for a given symbol.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class BookTicker {
/**
diff --git a/src/main/java/com/binance/api/client/domain/market/CandlestickInterval.java b/src/main/java/com/binance/api/client/domain/market/CandlestickInterval.java
index 3bd4887e3..b34334977 100644
--- a/src/main/java/com/binance/api/client/domain/market/CandlestickInterval.java
+++ b/src/main/java/com/binance/api/client/domain/market/CandlestickInterval.java
@@ -1,9 +1,12 @@
package com.binance.api.client.domain.market;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
/**
* Kline/Candlestick intervals.
* m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public enum CandlestickInterval {
ONE_MINUTE("1m"),
THREE_MINUTES("3m"),
diff --git a/src/main/java/com/binance/api/client/domain/market/OrderBook.java b/src/main/java/com/binance/api/client/domain/market/OrderBook.java
index d5054a9e6..98ffb10e1 100644
--- a/src/main/java/com/binance/api/client/domain/market/OrderBook.java
+++ b/src/main/java/com/binance/api/client/domain/market/OrderBook.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.market;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.util.List;
@@ -8,6 +9,7 @@
/**
* Order book of a symbol in Binance.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class OrderBook {
/**
diff --git a/src/main/java/com/binance/api/client/domain/market/OrderBookEntry.java b/src/main/java/com/binance/api/client/domain/market/OrderBookEntry.java
index 3bc946a7d..7d4d2635b 100644
--- a/src/main/java/com/binance/api/client/domain/market/OrderBookEntry.java
+++ b/src/main/java/com/binance/api/client/domain/market/OrderBookEntry.java
@@ -1,6 +1,7 @@
package com.binance.api.client.domain.market;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -11,6 +12,7 @@
*/
@JsonDeserialize(using = OrderBookEntryDeserializer.class)
@JsonSerialize(using = OrderBookEntrySerializer.class)
+@JsonIgnoreProperties(ignoreUnknown = true)
public class OrderBookEntry {
private String price;
diff --git a/src/main/java/com/binance/api/client/domain/market/TickerPrice.java b/src/main/java/com/binance/api/client/domain/market/TickerPrice.java
index e2444cbc8..2c7a036ac 100644
--- a/src/main/java/com/binance/api/client/domain/market/TickerPrice.java
+++ b/src/main/java/com/binance/api/client/domain/market/TickerPrice.java
@@ -1,11 +1,13 @@
package com.binance.api.client.domain.market;
import com.binance.api.client.constant.BinanceApiConstants;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Wraps a symbol and its corresponding latest price.
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class TickerPrice {
/**