Skip to content

Commit

Permalink
cryptocom fetchMyTrades since pagination fix #11330
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jan 14, 2022
1 parent 440832f commit cca89fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/cryptocom.js
Expand Up @@ -1041,6 +1041,9 @@ module.exports = class cryptocom extends Exchange {
if (since !== undefined) {
// maximum date range is one day
request['start_ts'] = since;
const now = this.milliseconds ();
const endTimestamp = this.sim (since, 24 * 60 * 60 * 1000);
request['end_ts'] = Math.min (now, endTimestamp);
}
if (limit !== undefined) {
request['page_size'] = limit;
Expand Down

0 comments on commit cca89fe

Please sign in to comment.