CCXT fetch_order_book datetime not match

88 Views Asked by At

i m using the function kucoin.fetchOrderBook() from ccxt library to get bids and asks but the datetime what results is 2 hours before. why time not match?

function argument needs only ohlcvdata e limit.

Is a big question for me. Someone can help me?

kucoin.fetchOrderBook(COIN1) {'symbol': 'BNB/USDT:USDT', 'bids': [[243.82, 4589.0], [243.81, 1054.0], [243.8, 1517.0], [243.79, 750.0], [243.78, 104.0], [243.77, 108.0], [243.76, 1004.0], [243.75, 530.0], [243.74, 486.0], [243.73, 2633.0], [243.72, 506.0], [243.7, 764.0], [243.69, 650.0], [243.68, 2155.0], [243.67, 176.0], [243.66, 756.0], [243.65, 251.0], [243.64, 241.0], [243.63, 2700.0], [243.61, 72.0]], 'asks': [[243.83, 4832.0], [243.84, 549.0], [243.85, 2604.0], [243.86, 1418.0], [243.87, 958.0], [243.88, 2565.0], [243.89, 750.0], [243.9, 150.0], [243.92, 650.0], [243.94, 4244.0], [243.95, 1441.0], [243.96, 854.0], [243.97, 1951.0], [243.98, 19613.0], [244.0, 650.0], [244.02, 547.0], [244.04, 16524.0], [244.06, 571.0], [244.07, 5540.0], [244.08, 4164.0]], 'timestamp': 1691347099077, 'datetime': '2023-08-06T18:38:19.077Z', 'nonce': 1684641322926}

1

There are 1 best solutions below

0
On

The timestamp returned from exchanges is usually in UTC (GMT+0) but your local time-zone is probably GMT+2; that's why you get 2 hours difference.