@@ -527,16 +527,19 @@ class RESTv2 {
527527 }
528528
529529 /**
530- * @param {string } symbol
530+ * @param {string } symbol - optional, omit/leave empty for all
531531 * @param {number } start
532532 * @param {number } end
533533 * @param {number } limit
534534 * @param {Method } cb
535535 * @return {Promise } p
536536 * @see https://docs.bitfinex.com/v2/reference#rest-auth-funding-offers-hist
537537 */
538- fundingOfferHistory ( symbol = 'tBTCUSD' , start = null , end = null , limit = null , cb ) {
539- return this . _makeAuthRequest ( `/auth/r/funding/offers/${ symbol } /hist` , {
538+ fundingOfferHistory ( symbol , start = null , end = null , limit = null , cb ) {
539+ const url = ! _isEmpty ( symbol )
540+ ? `/auth/r/funding/offers/${ symbol } /hist`
541+ : '/auth/r/funding/offers/hist'
542+ return this . _makeAuthRequest ( url , {
540543 start, end, limit
541544 } , cb , FundingOffer )
542545 }
@@ -552,16 +555,19 @@ class RESTv2 {
552555 }
553556
554557 /**
555- * @param {string } symbol
558+ * @param {string } symbol - optional, omit/leave empty for all
556559 * @param {number } start
557560 * @param {number } end
558561 * @param {number } limit
559562 * @param {Method } cb
560563 * @return {Promise } p
561564 * @see https://docs.bitfinex.com/v2/reference#rest-auth-funding-loans-hist
562565 */
563- fundingLoanHistory ( symbol = 'tBTCUSD' , start = null , end = null , limit = null , cb ) {
564- return this . _makeAuthRequest ( `/auth/r/funding/loans/${ symbol } /hist` , {
566+ fundingLoanHistory ( symbol , start = null , end = null , limit = null , cb ) {
567+ const url = ! _isEmpty ( symbol )
568+ ? `/auth/r/funding/loans/${ symbol } /hist`
569+ : '/auth/r/funding/loans/hist'
570+ return this . _makeAuthRequest ( url , {
565571 start, end, limit
566572 } , cb , FundingLoan )
567573 }
@@ -577,16 +583,19 @@ class RESTv2 {
577583 }
578584
579585 /**
580- * @param {string } symbol
586+ * @param {string } symbol - optional, omit/leave empty for all
581587 * @param {number } start
582588 * @param {number } end
583589 * @param {number } limit
584590 * @param {Method } cb
585591 * @return {Promise } p
586592 * @see https://docs.bitfinex.com/v2/reference#rest-auth-funding-credits-hist
587593 */
588- fundingCreditHistory ( symbol = 'tBTCUSD' , start = null , end = null , limit = null , cb ) {
589- return this . _makeAuthRequest ( `/auth/r/funding/credits/${ symbol } /hist` , {
594+ fundingCreditHistory ( symbol , start = null , end = null , limit = null , cb ) {
595+ const url = ! _isEmpty ( symbol )
596+ ? `/auth/r/funding/credits/${ symbol } /hist`
597+ : '/auth/r/funding/credits/hist'
598+ return this . _makeAuthRequest ( url , {
590599 start, end, limit
591600 } , cb , FundingCredit )
592601 }
0 commit comments