XChange icon indicating copy to clipboard operation
XChange copied to clipboard

[Kucoin] NullPointerException on equals(getId()) from Trade

Open trixprod opened this issue 2 years ago • 1 comments

Hello, Xchange is returning Kucoin trades with null id :

Trade{ type=BID, originalAmount=4.127400000000000000, instrument=ORAI/USDT, price=6.057, timestamp=Sun Jan 26 12:05:47 UTC 78177, **id='null',** makerOrderId='null', takerOrderId='null'} The trade class need a mandatory Id to check equals :

public boolean equals(Object o) { if (this == o) { return true; } else { return o != null && this.getClass() == o.getClass() ? this.id.equals(((Trade)o).getId()) : false; } }

trixprod avatar Mar 18 '23 12:03 trixprod

I suppose that it is better to do the check in the Kucoin class, since this is not a standard situation

rizer1980 avatar Mar 18 '23 19:03 rizer1980