ripple-data-api icon indicating copy to clipboard operation
ripple-data-api copied to clipboard

CSV column headers incorrect when reduce option set to false

Open donovanhide opened this issue 10 years ago • 0 comments

$ curl -s 'https://api.ripplecharts.com/api/offersExercised'  -H 'content-type: application/json' --data-binary '{"startTime":"2015-08-12T16:20:59+00:00","endTime":"2015-08-13T16:20:59+00:00","base":{"currency":"XRP"},"counter":{"currency":"USD","issuer":"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"},"reduce":false,"format":"csv"}' | head -n2
startTime, baseVolume, counterVolume, count, open, high, low, close, vwap, openTime, closeTime
2015-08-12T16:58:40+00:00, 0.00816949540641152, 122, 0.996678439582205, rGWBfkHZUECBtpSt22donchB263cgAfdhJ, rHsZHqa5oMQNL5hFm4kfLd47aEMYjPstpg, FD3815DE4689E86D1CDBDA1C1DDF5E5F0201DFCCDB5325B4188364B9966F7FBB, 15215831
$ curl -s 'https://api.ripplecharts.com/api/offersExercised'  -H 'content-type: application/json' --data-binary '{"startTime":"2015-08-12T16:20:59+00:00","endTime":"2015-08-13T16:20:59+00:00","base":{"currency":"XRP"},"counter":{"currency":"USD","issuer":"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"},"format":"csv"}' | head -n2
startTime, baseVolume, counterVolume, count, open, high, low, close, vwap, openTime, closeTime
2015-08-12T17:00:00+00:00, 380.986896, 3.0903335008797, 3, 0.008170342891115635, 0.008170342891115635, 0.008101764530000014, 0.008170342891115635, 0.008111390531604269, Wed Aug 12 2015 17:26:50 GMT+0000, Wed Aug 12 2015 17:44:30 GMT+0000

Row values are overwritten here and adopt the reduced column names: https://github.com/ripple/ripple-data-api/blob/210ec524647e7976dcd711a3e90ee63363d196b4/api/routes/accountOffersExercised.js#L262-L263

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

donovanhide avatar Aug 13 '15 16:08 donovanhide