Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.
This repository was archived by the owner on Aug 23, 2019. It is now read-only.

CSV column headers incorrect when reduce option set to false #34

@donovanhide

Description

@donovanhide
$ 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:

rows[i].value[9] = moment.utc(rows[i].value[9]).format(),
rows[i].value[11] = parseInt(rows[i].id, 10) //ledger_index

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions