coinbase / coinbase-pro-node

DEPRECATED — The official Node.js library for Coinbase Pro
Apache License 2.0
844 stars 316 forks source link

Historic Data seems funky #393

Closed halfcreative closed 4 years ago

halfcreative commented 5 years ago

Calling on historic data for BTC-USD, some of the values for open and close don't seem to be correct. I get similar, incorrect data on both the sandbox and default endpoint. Calling for the historic values for the past 30 days gave me :

[ [ 1572825600, 9130.01, 9343.52, 9202.9, 9273.22, 23831.17194258 ], [ 1572739200, 8600, 9500, 9306.87, 9203.08, 19295.13102384 ], [ 1572652800, 8850.65, 9500, 9247.55, 9306.81, 23990.36035004 ], [ 1572566400, 9059.83, 9357.41, 9157.52, 9247.55, 41791.10417319 ], [ 1572480000, 5000, 9397.47, 9165.6, 9155.15, 54070.84603797 ], [ 1572393600, 4644.52, 9999.99, 9431.38, 9165.01, 60131.08611993 ], [ 1572307200, 6799.96, 10000, 9452.32, 9431.38, 9208.99954582 ], [ 1572220800, 680.01, 10000, 6799.98, 9450.43, 13223.36189979 ], [ 1572134400, 680.01, 10000001, 6800, 680.01, 2898.60498532 ], [ 1572048000, 680.01, 20646, 8669.51, 3740, 31507.64969885 ], [ 1571961600, 6800, 8728.68, 7430.87, 8669.51, 44107.77894625 ], [ 1571875200, 6800, 8112.15, 7474.93, 7430.88, 45891.27777718 ], [ 1571788800, 3600, 8298.31, 8024.76, 7476.86, 41344.87525542 ], [ 1571702400, 3600, 10000000.99, 5600.01, 8025.04, 28310.62188549 ], [ 1571616000, 3600, 20000, 6800, 6800, 3050.11608152 ], [ 1571529600, 3600, 15149.99, 7958.56, 3600, 1551.67068801 ], [ 1571443200, 7000, 15000, 7954.99, 7932.21, 17994.96507104 ], [ 1571356800, 7000, 15000, 8076.32, 7954.45, 30322.42472599 ], [ 1571270400, 7000, 15000, 7589.04, 8075.36, 14055.13002833 ], [ 1571184000, 7000, 15000, 10000, 7589.04, 443.80777129 ], [ 1571097600, 7000, 15000, 7000, 10000, 130719.74430306 ], [ 1571011200, 7000, 15000, 8257, 7000, 4072.65317933 ], [ 1570924800, 7000, 15000, 8308.33, 7000.02, 3112.4509643 ], [ 1570838400, 680.01, 815213.99, 8271.37, 8309.31, 28275.63894586 ], [ 1570752000, 680.01, 815214, 8587.5, 8268.74, 771513.11892116 ], [ 1570665600, 680.01, 22000, 8590.01, 8587.07, 278099.72339537 ], [ 1570579200, 4854.64, 8682.81, 8185.53, 8590.01, 25262.36207938 ], [ 1570492800, 8117.35, 8681.98, 8208.94, 8185.36, 38165.30101526 ], [ 1570406400, 7209, 8267.71, 7862.51, 8209.76, 35258.54794546 ], [ 1570320000, 7061, 8596.02, 8147.63, 7862.51, 22774.96876127 ] ]

I highlighted lines that look especially suspicious. When I go online to look at the opening and closing price for those dates and unsurprisingly they do not seem to be correct. The granularity used is 86400, and I'm interested in getting the closing price for each day over the specified period

halfcreative commented 5 years ago

Reminder to those looking at this data that the format is returned [ time, low, high, open, close ] Thus for the highlighted days the reported "close" price is 680 and 3600 which are way too low compared to the values reported elsewhere.

halfcreative commented 5 years ago

Correction: this occurs only for Sandbox. I was checking the wrong endpoint

drewrothstein commented 4 years ago

Hi, we are closing out PRs + Issues as this project is being archived.