Skip to content

Commit 093469f

Browse files
Daniel1984JacobPlaster
authored andcommitted
marketAveragePrice gettign rid of model
1 parent 5547101 commit 093469f

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

lib/rest2.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ const {
3737
ChangeLog,
3838
PublicPulseProfile,
3939
PulseMessage,
40-
Invoice,
41-
TradingAvgPrice,
42-
FundingAvgRate
40+
Invoice
4341
} = require('bfx-api-node-models')
4442

4543
const RESTv1 = require('./rest1')
@@ -419,13 +417,7 @@ class RESTv2 {
419417
*/
420418
marketAveragePrice (params, cb) {
421419
const usp = new URLSearchParams(params)
422-
const transformerKey = (usp.get('symbol') || '')[0]
423-
const transformer = {
424-
t: TradingAvgPrice,
425-
f: FundingAvgRate
426-
}[transformerKey]
427-
428-
return this._makePublicRequest(`/calc/trade/avg?${usp.toString()}`, cb, transformer || null)
420+
return this._makePublicPostRequest(`/calc/trade/avg?${usp.toString()}`, cb)
429421
}
430422

431423
/**

0 commit comments

Comments
 (0)