Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Market order web socket info does not contain price, average nor cost information #472

Open
hodlerhacks opened this issue Aug 15, 2023 · 0 comments

Comments

@hodlerhacks
Copy link

hodlerhacks commented Aug 15, 2023

Using the CCXT library to monitor order events (using the websockets API), market order events don't contain price, average nor cost information.

Using exchange.watchOrders(), in case of a market sell order (as an example), I get the following result:

{
info: {
clientOid: '1b6ba5f5-284e-48bd-8038-f4291055f674',
filledSize: '16.8524',
orderId: '64d7571b088c5200013399fd',
orderTime: 1691834139204,
orderType: 'market',
remainFunds: '0',
remainSize: '0',
side: 'sell',
size: '16.8524',
status: 'done',
symbol: 'XRP-USDT',
ts: '1691834139226000000',
type: 'filled'
},
symbol: 'XRP/USDT',
id: '64d7571b088c5200013399fd',
clientOrderId: '1b6ba5f5-284e-48bd-8038-f4291055f674',
timestamp: 1691834139204,
datetime: '2023-08-12T09:55:39.204Z',
lastTradeTimestamp: undefined,
type: 'market',
timeInForce: 'IOC',
postOnly: undefined,
side: 'sell',
price: undefined,
stopPrice: undefined,
triggerPrice: undefined,
amount: 16.8524,
cost: undefined,
average: undefined,
filled: 16.8524,
remaining: 0,
status: 'closed',
fee: undefined,
trades: [],
fees: [],
lastUpdateTimestamp: undefined,
reduceOnly: undefined,
takeProfitPrice: undefined,
stopLossPrice: undefined,
}

Price/average/cost are missing from the CCXT data, but as it appears from the above, it's also missing from the raw data received from the Kucoin API, which is in the info: { } part. (This has been confirmed by the CCXT team.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant