Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

pass length #19

Merged
merged 1 commit into from
Jun 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Exchange {
return this.getBuyQuote(-amount, baseCurrency, quoteCurrency);
}

getTrades (QuoteClass) {
getTrades (QuoteClass, length) {
assert(QuoteClass, 'QuoteClass required');
var save = () => {
return this.delegate.save.bind(this.delegate)().then(() => this._trades);
Expand Down Expand Up @@ -112,7 +112,8 @@ class Exchange {
trade.process(this._trades);
}
};
return this._TradeClass.fetchAll(this._api)

return this._TradeClass.fetchAll(this._api, length)
.then(update)
.then(process)
.then(save);
Expand Down