@@ -344,7 +344,11 @@ def test_get_timeline(self):
344344 "period" : "day" ,
345345 "preClose" : 229.09 ,
346346 "intraday" : {
347- "items" : [{"time" : 1754919000000 , "volume" : 1656620 , "price" : 226.75 , "avgPrice" : 227.75438 }, {"time" : 1754919060000 , "volume" : 426781 , "price" : 226.6 , "avgPrice" : 227.51157 }, {"time" : 1754919120000 , "volume" : 267382 , "price" : 226.31 , "avgPrice" : 227.40694 }, {"time" : 1754919180000 , "volume" : 322976 , "price" : 226.045 , "avgPrice" : 227.25978 }, {"time" : 1754919240000 , "volume" : 229321 , "price" : 226.06 , "avgPrice" : 226.0 }],
347+ "items" : [{"time" : 1754919000000 , "volume" : 1656620 , "price" : 226.75 , "avgPrice" : 227.75438 },
348+ {"time" : 1754919060000 , "volume" : 426781 , "price" : 226.6 , "avgPrice" : 227.51157 },
349+ {"time" : 1754919120000 , "volume" : 267382 , "price" : 226.31 , "avgPrice" : 227.40694 },
350+ {"time" : 1754919180000 , "volume" : 322976 , "price" : 226.045 , "avgPrice" : 227.25978 },
351+ {"time" : 1754919240000 , "volume" : 229321 , "price" : 226.06 , "avgPrice" : 226.0 }],
348352 "beginTime" :
349353 - 1 ,
350354 "endTime" :
@@ -420,8 +424,19 @@ def test_get_timeline_history(self):
420424 def test_get_bars (self ):
421425 if self .is_mock :
422426 mock_data = {
423- "code" : 0 , "message" : "success" , "timestamp" : 1754990841014 , "data" : [{"symbol" : "AAPL" , "period" : "day" , "items" : [{"time" : 1754366400000 , "volume" : 44155079 , "open" : 203.4 , "close" : 202.92 , "high" : 205.34 , "low" : 202.16 , "amount" : 8.987659222543882E9 }, {"time" : 1754452800000 , "volume" : 108483103 , "open" : 205.63 , "close" : 213.25 , "high" : 215.38 , "low" : 205.59 , "amount" : 2.315468887474085E10 }, {"time" : 1754539200000 , "volume" : 90224834 , "open" : 218.875 , "close" : 220.03 , "high" : 220.85 , "low" : 216.58 , "amount" : 1.9798494559887737E10 }, {"time" : 1754625600000 , "volume" : 113853967 , "open" : 220.83 , "close" : 229.35 , "high" : 231.0 , "low" : 219.25 , "amount" : 2.589128470726625E10 }, {"time" : 1754884800000 , "volume" : 61806132 , "open" : 227.92 , "close" : 227.18 , "high" : 229.56 , "low" : 224.76 , "amount" : 1.4164248430829714E10 }]
424- }]
427+ "code" : 0 , "message" : "success" , "timestamp" : 1754990841014 , "data" : [
428+ {"symbol" : "AAPL" , "period" : "day" , "items" : [
429+ {"time" : 1754366400000 , "volume" : 44155079 , "open" : 203.4 , "close" : 202.92 , "high" : 205.34 ,
430+ "low" : 202.16 , "amount" : 8.987659222543882E9 },
431+ {"time" : 1754452800000 , "volume" : 108483103 , "open" : 205.63 , "close" : 213.25 , "high" : 215.38 ,
432+ "low" : 205.59 , "amount" : 2.315468887474085E10 },
433+ {"time" : 1754539200000 , "volume" : 90224834 , "open" : 218.875 , "close" : 220.03 , "high" : 220.85 ,
434+ "low" : 216.58 , "amount" : 1.9798494559887737E10 },
435+ {"time" : 1754625600000 , "volume" : 113853967 , "open" : 220.83 , "close" : 229.35 , "high" : 231.0 ,
436+ "low" : 219.25 , "amount" : 2.589128470726625E10 },
437+ {"time" : 1754884800000 , "volume" : 61806132 , "open" : 227.92 , "close" : 227.18 , "high" : 229.56 ,
438+ "low" : 224.76 , "amount" : 1.4164248430829714E10 }]
439+ }]
425440 }
426441 web_utils .do_request = MagicMock (
427442 return_value = json .dumps (mock_data ).encode ())
@@ -489,7 +504,10 @@ def test_get_trade_ticks(self):
489504 1754991710630 ,
490505 "data" : [{
491506 "symbol" : "AAPL" , "beginIndex" : 482299 , "endIndex" : 482499 ,
492- "items" : [{"time" : 1754942403109 , "volume" : 406 , "price" : 227.18 , "type" : "-" }, {"time" : 1754942403109 , "volume" : 26215 , "price" : 227.18 , "type" : "-" }, {"time" : 1754942403109 , "volume" : 884 , "price" : 227.18 , "type" : "-" }, {"time" : 1754942403109 , "volume" : 200 , "price" : 227.18 , "type" : "-" }]
507+ "items" : [{"time" : 1754942403109 , "volume" : 406 , "price" : 227.18 , "type" : "-" },
508+ {"time" : 1754942403109 , "volume" : 26215 , "price" : 227.18 , "type" : "-" },
509+ {"time" : 1754942403109 , "volume" : 884 , "price" : 227.18 , "type" : "-" },
510+ {"time" : 1754942403109 , "volume" : 200 , "price" : 227.18 , "type" : "-" }]
493511 }]
494512 }
495513 web_utils .do_request = MagicMock (
0 commit comments