From 8737d5333dc675e80b74b542d91a5dc11b27dbde Mon Sep 17 00:00:00 2001 From: Fabrizio Amodio Date: Mon, 2 Jan 2023 16:10:30 +0100 Subject: [PATCH 1/3] missing aff_code bug in updateOrder --- lib/order.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/order.js b/lib/order.js index 50c862f..806ccea 100644 --- a/lib/order.js +++ b/lib/order.js @@ -388,6 +388,11 @@ class Order extends Model { changes.id = this.id // tag with ID + if (_isString(this.affiliateCode) && !_isEmpty(this.affiliateCode)) { + changes.meta = {}; + changes.meta.aff_code = this.affiliateCode // eslint-disable-line + } + if (changes.price) changes.price = preparePrice(changes.price) if (changes.amount) changes.amount = prepareAmount(changes.amount) if (changes.delta) changes.delta = prepareAmount(changes.delta) From f0b4f095af5e69959e06c1549f105b4aba2ed947 Mon Sep 17 00:00:00 2001 From: Fabrizio Amodio Date: Thu, 5 Jan 2023 10:42:58 +0100 Subject: [PATCH 2/3] Version Bump & changelog --- CHANGELOG | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5fd17e7..2f33311 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +#1.6.4 +- fix: added missing aff_code in updateOrder + #1.6.3 - fix: public trade unserializing from snapshot diff --git a/package.json b/package.json index 161ed20..3595a77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bfx-api-node-models", - "version": "1.6.3", + "version": "1.6.4", "description": "Object models for usage with the Bitfinex node API", "engines": { "node": ">=8.3.0" From 2e014c8790894a8dd99956909ed4a89869adfd47 Mon Sep 17 00:00:00 2001 From: Fabrizio Amodio Date: Sat, 5 Aug 2023 12:50:28 +0000 Subject: [PATCH 3/3] Revert "Merge branch 'master' into master" This reverts commit 15c494b548e50f88d483d7a6586b0c1323c3a311, reversing changes made to f0b4f095af5e69959e06c1549f105b4aba2ed947. --- CHANGELOG | 16 +- docs/AccountSummary.html | 4 +- docs/Alert.html | 4 +- docs/AuthPermission.html | 4 +- docs/BalanceInfo.html | 4 +- docs/Candle.html | 4 +- docs/ChangeLog.html | 4 +- docs/CoreSettings.html | 4 +- docs/Currency.html | 4 +- docs/FundingCredit.html | 4 +- docs/FundingInfo.html | 4 +- docs/FundingLoan.html | 4 +- docs/FundingOffer.html | 4 +- docs/FundingTicker.html | 4 +- docs/FundingTickerHist.html | 4 +- docs/FundingTrade.html | 4 +- docs/Invoice.html | 4 +- docs/LedgerEntry.html | 4 +- docs/Liquidations.html | 4 +- docs/Login.html | 4 +- docs/MarginInfo.html | 4 +- docs/Model.html | 4 +- docs/Movement.html | 4 +- docs/MovementInfo.html | 1047 ----------------- docs/Notification.html | 4 +- docs/Order.html | 338 +----- docs/OrderBook.html | 4 +- docs/Position.html | 4 +- docs/PublicPulseProfile.html | 4 +- docs/PublicTrade.html | 4 +- docs/PulseMessage.html | 4 +- docs/StatusMessagesDeriv.html | 4 +- docs/SymbolDetails.html | 4 +- docs/Trade.html | 4 +- docs/TradingTicker.html | 4 +- docs/TradingTickerHist.html | 4 +- docs/TransactionFee.html | 4 +- docs/UserInfo.html | 4 +- docs/Wallet.html | 4 +- docs/WalletHist.html | 4 +- docs/WeightedAverages.html | 817 ------------- docs/account_summary.js.html | 4 +- docs/alert.js.html | 4 +- docs/auth_permission.js.html | 4 +- docs/balance_info.js.html | 4 +- docs/candle.js.html | 4 +- docs/change_log.js.html | 4 +- docs/core_settings.js.html | 4 +- docs/currency.js.html | 4 +- docs/funding_credit.js.html | 4 +- docs/funding_info.js.html | 4 +- docs/funding_loan.js.html | 4 +- docs/funding_offer.js.html | 8 +- docs/funding_ticker.js.html | 4 +- docs/funding_ticker_hist.js.html | 4 +- docs/funding_trade.js.html | 4 +- docs/global.html | 4 +- docs/index.html | 4 +- docs/invoice.js.html | 4 +- docs/ledger_entry.js.html | 4 +- docs/liquidations.js.html | 4 +- docs/login.js.html | 4 +- docs/margin_info.js.html | 4 +- docs/model.js.html | 4 +- docs/movement.js.html | 4 +- docs/movement_info.js.html | 178 --- docs/notification.js.html | 4 +- docs/order.js.html | 41 +- docs/order_book.js.html | 4 +- docs/position.js.html | 6 +- docs/public_pulse_profile.js.html | 4 +- docs/public_trade.js.html | 6 +- docs/pulse_message.js.html | 4 +- docs/status_messages_deriv.js.html | 4 +- docs/symbol_details.js.html | 4 +- docs/trade.js.html | 4 +- docs/trading_ticker.js.html | 4 +- docs/trading_ticker_hist.js.html | 4 +- docs/transaction_fee.js.html | 4 +- docs/user_info.js.html | 4 +- ...assign_from_collection_or_instance.js.html | 4 +- docs/util_is_collection.js.html | 4 +- docs/validators_amount.js.html | 4 +- docs/validators_array.js.html | 4 +- docs/validators_bool.js.html | 4 +- docs/validators_currency.js.html | 4 +- docs/validators_date.js.html | 4 +- docs/validators_number.js.html | 4 +- docs/validators_object.js.html | 4 +- docs/validators_price.js.html | 4 +- docs/validators_string.js.html | 4 +- docs/validators_symbol.js.html | 4 +- docs/wallet.js.html | 4 +- docs/wallet_hist.js.html | 4 +- docs/weighted_averages.js.html | 143 --- lib/funding_offer.js | 4 +- lib/index.js | 2 - lib/movement_info.js | 105 -- lib/order.js | 4 +- lib/position.js | 2 +- lib/weighted_averages.js | 70 -- package.json | 4 +- test/lib/models/candle.js | 7 +- test/lib/models/funding_ticker.js | 2 +- test/lib/models/funding_ticker_hist.js | 2 +- test/lib/models/movement_info.js | 50 - test/lib/models/order.js | 2 +- test/lib/models/order_book.js | 10 +- test/lib/models/position.js | 2 +- test/lib/models/trading_ticker.js | 2 +- test/lib/models/trading_ticker_hist.js | 2 +- test/lib/models/weighted_averages.js | 33 - 112 files changed, 240 insertions(+), 3003 deletions(-) delete mode 100644 docs/MovementInfo.html delete mode 100644 docs/WeightedAverages.html delete mode 100644 docs/movement_info.js.html delete mode 100644 docs/weighted_averages.js.html delete mode 100644 lib/movement_info.js delete mode 100644 lib/weighted_averages.js delete mode 100644 test/lib/models/movement_info.js delete mode 100644 test/lib/models/weighted_averages.js diff --git a/CHANGELOG b/CHANGELOG index 70d6119..2f33311 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,20 +1,10 @@ -# 1.8.1 -- fix: Add extra Weighted Averages fields for trades timestamps - -# 1.8.0 -- feature: Weighted Averages model - -# 1.7.1 -- fix: Change FundingOffer, Order, Position model to support new rest api signature -- fix: Test coverage to support new rest api signature - -# 1.7.0 -- feature: Currency Movement Info model +#1.6.4 +- fix: added missing aff_code in updateOrder #1.6.3 - fix: public trade unserializing from snapshot -# 1.6.2 +#1.6.2 - feature: visible on hit option supported for hidden orders # 1.6.0 diff --git a/docs/AccountSummary.html b/docs/AccountSummary.html index 201f1b9..5074197 100644 --- a/docs/AccountSummary.html +++ b/docs/AccountSummary.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -894,7 +894,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Alert.html b/docs/Alert.html index 25f5403..d74e104 100644 --- a/docs/Alert.html +++ b/docs/Alert.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -688,7 +688,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/AuthPermission.html b/docs/AuthPermission.html index 8c461aa..508df6a 100644 --- a/docs/AuthPermission.html +++ b/docs/AuthPermission.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -664,7 +664,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/BalanceInfo.html b/docs/BalanceInfo.html index 7f08f0a..123bca3 100644 --- a/docs/BalanceInfo.html +++ b/docs/BalanceInfo.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -642,7 +642,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Candle.html b/docs/Candle.html index d7213cc..4b0684d 100644 --- a/docs/Candle.html +++ b/docs/Candle.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -733,7 +733,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 224d577..be0a68a 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -687,7 +687,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/CoreSettings.html b/docs/CoreSettings.html index b5c61fc..712b951 100644 --- a/docs/CoreSettings.html +++ b/docs/CoreSettings.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -664,7 +664,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Currency.html b/docs/Currency.html index 2e98b14..2aba216 100644 --- a/docs/Currency.html +++ b/docs/Currency.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -710,7 +710,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingCredit.html b/docs/FundingCredit.html index c336e74..e5afa37 100644 --- a/docs/FundingCredit.html +++ b/docs/FundingCredit.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1021,7 +1021,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingInfo.html b/docs/FundingInfo.html index f33ac65..a14d60c 100644 --- a/docs/FundingInfo.html +++ b/docs/FundingInfo.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -693,7 +693,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingLoan.html b/docs/FundingLoan.html index 8dd7072..d23a822 100644 --- a/docs/FundingLoan.html +++ b/docs/FundingLoan.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -998,7 +998,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingOffer.html b/docs/FundingOffer.html index 015e465..982ec33 100644 --- a/docs/FundingOffer.html +++ b/docs/FundingOffer.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1686,7 +1686,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingTicker.html b/docs/FundingTicker.html index 97f592b..ace305e 100644 --- a/docs/FundingTicker.html +++ b/docs/FundingTicker.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1138,7 +1138,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingTickerHist.html b/docs/FundingTickerHist.html index 8c905ac..90e1f1b 100644 --- a/docs/FundingTickerHist.html +++ b/docs/FundingTickerHist.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -928,7 +928,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/FundingTrade.html b/docs/FundingTrade.html index 5815f3a..ad58d23 100644 --- a/docs/FundingTrade.html +++ b/docs/FundingTrade.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -892,7 +892,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Invoice.html b/docs/Invoice.html index a917a65..aba5729 100644 --- a/docs/Invoice.html +++ b/docs/Invoice.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -769,7 +769,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/LedgerEntry.html b/docs/LedgerEntry.html index f4ea7ef..c03000d 100644 --- a/docs/LedgerEntry.html +++ b/docs/LedgerEntry.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -734,7 +734,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Liquidations.html b/docs/Liquidations.html index 0d4165d..42d0112 100644 --- a/docs/Liquidations.html +++ b/docs/Liquidations.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -867,7 +867,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Login.html b/docs/Login.html index 6992d46..a6d827f 100644 --- a/docs/Login.html +++ b/docs/Login.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -687,7 +687,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/MarginInfo.html b/docs/MarginInfo.html index c002190..59e4c8e 100644 --- a/docs/MarginInfo.html +++ b/docs/MarginInfo.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -693,7 +693,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Model.html b/docs/Model.html index 295390a..9883b58 100644 --- a/docs/Model.html +++ b/docs/Model.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1195,7 +1195,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Movement.html b/docs/Movement.html index 34d5f40..76e0388 100644 --- a/docs/Movement.html +++ b/docs/Movement.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -848,7 +848,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/MovementInfo.html b/docs/MovementInfo.html deleted file mode 100644 index 79e88fd..0000000 --- a/docs/MovementInfo.html +++ /dev/null @@ -1,1047 +0,0 @@ - - - - - - MovementInfo - Documentation - - - - - - - - - - - - - - - - - - - -
- -

MovementInfo

- - - - - - - -
- -
- -

- MovementInfo -

- -

Currency Movement Info model

- - -
- -
- -
- - - - -

Constructor

- - -

new MovementInfo(data)

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -object -| - -Array - - - -

movement data

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -number - - - -

id

currency - - -string - - - -

currency

currencyName - - -string - - - -

currency name

remark - - -string - - - -

remarks related to movement

mtsStarted - - -number - - - -

movement start timestamp

mtsUpdated - - -number - - - -

last update timestamp

status - - -string - - - -

status

amount - - -number - - - -

moved amount

fees - - -number - - - -

paid fees

destinationAddress - - -string - - - -

destination address

memo - - -string - - - -

memo/tag related to transaction

transactionId - - -string - - - -

transaction ID

note - - -string - - - -

transaction note

bankFees - - -number - - - -

wire bank fees

bankRouterId - - -number - - - -

identifier of bank router

externalBankMovId - - -string - - - -

external provider movement id

externalBankMovStatus - - -string - - - -

external provider movement status

externalBankMovDescription - - -string - - - -

external provider movement info

externalBankAccInfo - - -object - - - -

external provider bank account information for user

- -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -

Methods

- - - - - - -

(static) unserialize(data) → {object}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Array.<object> -| - -object -| - -Array.<Array> -| - -Array - - - -

data to convert to POJO

- - - - - - - - - - - - - - - - -
Returns:
- - -
-

pojo

-
- - - -
-
- Type -
-
- -object - - -
-
- - - - - - - - - - -

(static) validate(data) → {string}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-

Validates a given MovementInfo instance

-
- - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Array.<object> -| - -object -| - -Array.<MovementInfo> -| - -MovementInfo -| - -Array - - - -

instance to validate

- - - - - - - - - - - - - - - - -
Returns:
- - -
-

error - null if instance is valid

-
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - -
- -
- - - - - - -
- -
- -
- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/Notification.html b/docs/Notification.html index 3a97cbe..2b5be5f 100644 --- a/docs/Notification.html +++ b/docs/Notification.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -756,7 +756,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Order.html b/docs/Order.html index 54970a0..a880947 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -78,7 +78,7 @@

new OrderSource:
@@ -973,7 +973,7 @@

(static) Source:
@@ -1131,7 +1131,7 @@

(static) Source:
@@ -1289,7 +1289,7 @@

(static)
Source:
@@ -1452,7 +1452,7 @@

(static) val
Source:
@@ -1622,7 +1622,7 @@

(async) cancel<
Source:
@@ -1783,7 +1783,7 @@

cbGIDSource:
@@ -1893,7 +1893,7 @@

getBas
Source:
@@ -2002,7 +2002,7 @@

getL
Source:
@@ -2111,7 +2111,7 @@

getNo
Source:
@@ -2220,7 +2220,7 @@

getQu
Source:
@@ -2329,7 +2329,7 @@

Source:
@@ -2434,7 +2434,7 @@

isHiddenSource:
@@ -2539,7 +2539,7 @@

isOCOSource:
@@ -2644,7 +2644,7 @@

isPa
Source:
@@ -2761,7 +2761,7 @@

isPosi
Source:
@@ -2866,7 +2866,7 @@

isPostOnly<
Source:
@@ -2971,7 +2971,7 @@

isReduceO
Source:
@@ -3064,111 +3064,6 @@

Returns:
-

isVisibleOnHit() → {boolean}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Returns:
- - -
-

visibleOnHit

-
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - -

modifyFlag(flag, active) → {number}

@@ -3181,7 +3076,7 @@

modifyFlag<
Source:
@@ -3362,7 +3257,7 @@

(async) recre
Source:
@@ -3523,7 +3418,7 @@

regi
Source:
@@ -3659,7 +3554,7 @@

remove
Source:
@@ -3799,7 +3694,7 @@

rese
Source:
@@ -3895,7 +3790,7 @@

setHiddenSource:
@@ -4055,7 +3950,7 @@

set
Source:
@@ -4214,7 +4109,7 @@

setOCOSource:
@@ -4448,7 +4343,7 @@

setPo
Source:
@@ -4607,7 +4502,7 @@

setPostOnl
Source:
@@ -4766,7 +4661,7 @@

setReduc
Source:
@@ -4914,165 +4809,6 @@

Returns:
-

setVisibleOnHit(v) → {number}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-

Update the meta object. The rest part of the hidden order will be visible -after first hit(partial execution).

-
- - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
v - - -boolean - - - -

visibleOnHit value

- - - - - - - - - - - - - - - - -
Returns:
- - -
-

meta

-
- - - -
-
- Type -
-
- -number - - -
-
- - - - - - - - - -

(async) submit(apiInterface) → {Promise}

@@ -5085,7 +4821,7 @@

(async) submit<
Source:
@@ -5246,7 +4982,7 @@

toNew
Source:
@@ -5370,7 +5106,7 @@

toPreviewSource:
@@ -5480,7 +5216,7 @@

toStringSource:
@@ -5590,7 +5326,7 @@

(async) update<
Source:
@@ -5814,7 +5550,7 @@

updateFrom<
Source:
@@ -5965,7 +5701,7 @@

Throws:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/OrderBook.html b/docs/OrderBook.html index d93637e..9bc95fe 100644 --- a/docs/OrderBook.html +++ b/docs/OrderBook.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -2506,7 +2506,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Position.html b/docs/Position.html index 01b7d17..533c7a9 100644 --- a/docs/Position.html +++ b/docs/Position.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1655,7 +1655,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/PublicPulseProfile.html b/docs/PublicPulseProfile.html index a22402a..d271f09 100644 --- a/docs/PublicPulseProfile.html +++ b/docs/PublicPulseProfile.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -838,7 +838,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/PublicTrade.html b/docs/PublicTrade.html index 323ff92..ef7668d 100644 --- a/docs/PublicTrade.html +++ b/docs/PublicTrade.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -674,7 +674,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/PulseMessage.html b/docs/PulseMessage.html index a5ac699..8b8e108 100644 --- a/docs/PulseMessage.html +++ b/docs/PulseMessage.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1108,7 +1108,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/StatusMessagesDeriv.html b/docs/StatusMessagesDeriv.html index b192533..37526e6 100644 --- a/docs/StatusMessagesDeriv.html +++ b/docs/StatusMessagesDeriv.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -802,7 +802,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/SymbolDetails.html b/docs/SymbolDetails.html index cd6d18c..4f61f45 100644 --- a/docs/SymbolDetails.html +++ b/docs/SymbolDetails.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -733,7 +733,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Trade.html b/docs/Trade.html index fface60..f189747 100644 --- a/docs/Trade.html +++ b/docs/Trade.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -956,7 +956,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/TradingTicker.html b/docs/TradingTicker.html index ba9147a..e03a42a 100644 --- a/docs/TradingTicker.html +++ b/docs/TradingTicker.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -1066,7 +1066,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/TradingTickerHist.html b/docs/TradingTickerHist.html index 791de6d..f346ac0 100644 --- a/docs/TradingTickerHist.html +++ b/docs/TradingTickerHist.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -905,7 +905,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/TransactionFee.html b/docs/TransactionFee.html index b71ba9a..c83d359 100644 --- a/docs/TransactionFee.html +++ b/docs/TransactionFee.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -641,7 +641,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/UserInfo.html b/docs/UserInfo.html index a2980ca..77085aa 100644 --- a/docs/UserInfo.html +++ b/docs/UserInfo.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -713,7 +713,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/Wallet.html b/docs/Wallet.html index 373c5fd..a632d17 100644 --- a/docs/Wallet.html +++ b/docs/Wallet.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -710,7 +710,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/WalletHist.html b/docs/WalletHist.html index d18ed47..9d35f6b 100644 --- a/docs/WalletHist.html +++ b/docs/WalletHist.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -733,7 +733,7 @@
Returns:

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:02 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/WeightedAverages.html b/docs/WeightedAverages.html deleted file mode 100644 index 464d34f..0000000 --- a/docs/WeightedAverages.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - WeightedAverages - Documentation - - - - - - - - - - - - - - - - - - - -
- -

WeightedAverages

- - - - - - - -
- -
- -

- WeightedAverages -

- -

Weighted Averages model

- - -
- -
- -
- - - - -

Constructor

- - -

new WeightedAverages(data)

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -object -| - -Array - - - -

weighted averages data

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
tradeCount - - -number - - - -

trade count

sumBuyingSpent - - -number - - - -

sum buying spent

sumBuyingAmount - - -number - - - -

sum buying amount

sumSellingSpent - - -number - - - -

sum selling spent

sumSellingAmount - - -number - - - -

sum selling amount

buyingWeightedPrice - - -number - - - -

buying weighted price

sellingWeightedPrice - - -number - - - -

selling weighted price

firstTradeMts - - -number - - - -

first trade ms timestamp

lastTradeMts - - -number - - - -

last trade ms timestamp

- -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -

Methods

- - - - - - -

(static) unserialize(data) → {object}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Array.<object> -| - -object -| - -Array.<Array> -| - -Array - - - -

data to convert to POJO

- - - - - - - - - - - - - - - - -
Returns:
- - -
-

pojo

-
- - - -
-
- Type -
-
- -object - - -
-
- - - - - - - - - - -

(static) validate(data) → {string}

- - - - - - -
- - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-

Validates a given WeightedAverages instance

-
- - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
data - - -Array.<object> -| - -object -| - -Array.<WeightedAverages> -| - -WeightedAverages -| - -Array - - - -

instance to validate

- - - - - - - - - - - - - - - - -
Returns:
- - -
-

error - null if instance is valid

-
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - -
- -
- - - - - - -
- -
- -
- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. -
- - - - - - - - - - - \ No newline at end of file diff --git a/docs/account_summary.js.html b/docs/account_summary.js.html index e82694e..c16964e 100644 --- a/docs/account_summary.js.html +++ b/docs/account_summary.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -152,7 +152,7 @@

account_summary.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/alert.js.html b/docs/alert.js.html index 9a9b0e4..d974c4b 100644 --- a/docs/alert.js.html +++ b/docs/alert.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -114,7 +114,7 @@

alert.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/auth_permission.js.html b/docs/auth_permission.js.html index becef63..3698de9 100644 --- a/docs/auth_permission.js.html +++ b/docs/auth_permission.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -112,7 +112,7 @@

auth_permission.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/balance_info.js.html b/docs/balance_info.js.html index d6897c7..e3db0b2 100644 --- a/docs/balance_info.js.html +++ b/docs/balance_info.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -108,7 +108,7 @@

balance_info.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/candle.js.html b/docs/candle.js.html index 72275ec..8527b17 100644 --- a/docs/candle.js.html +++ b/docs/candle.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -120,7 +120,7 @@

candle.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/change_log.js.html b/docs/change_log.js.html index 7adb951..5221f7a 100644 --- a/docs/change_log.js.html +++ b/docs/change_log.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -116,7 +116,7 @@

change_log.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/core_settings.js.html b/docs/core_settings.js.html index 4b71c20..cae3248 100644 --- a/docs/core_settings.js.html +++ b/docs/core_settings.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -108,7 +108,7 @@

core_settings.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/currency.js.html b/docs/currency.js.html index 9d09732..c301c57 100644 --- a/docs/currency.js.html +++ b/docs/currency.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -123,7 +123,7 @@

currency.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_credit.js.html b/docs/funding_credit.js.html index 2b96dc2..98d1fb3 100644 --- a/docs/funding_credit.js.html +++ b/docs/funding_credit.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -165,7 +165,7 @@

funding_credit.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_info.js.html b/docs/funding_info.js.html index c8f1e2d..cfc945e 100644 --- a/docs/funding_info.js.html +++ b/docs/funding_info.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -146,7 +146,7 @@

funding_info.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_loan.js.html b/docs/funding_loan.js.html index d34ca70..c186f4e 100644 --- a/docs/funding_loan.js.html +++ b/docs/funding_loan.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -168,7 +168,7 @@

funding_loan.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_offer.js.html b/docs/funding_offer.js.html index 4c28631..0a8c3df 100644 --- a/docs/funding_offer.js.html +++ b/docs/funding_offer.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -144,7 +144,7 @@

funding_offer.js

throw new Error('no API interface provided') } - return apiInterface.submitFundingOffer({ offer: this }).then((offerArray) => { + return apiInterface.submitFundingOffer(this).then((offerArray) => { Object.assign(this, FundingOffer.unserialize(offerArray)) return this }) @@ -161,7 +161,7 @@

funding_offer.js

throw new Error('no API interface provided') } - return apiInterface.cancelFundingOffer({ id: this.id }).then((offerArray) => { + return apiInterface.cancelFundingOffer(this.id).then((offerArray) => { Object.assign(this, FundingOffer.unserialize(offerArray)) return this }) @@ -269,7 +269,7 @@

funding_offer.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_ticker.js.html b/docs/funding_ticker.js.html index cdc0fa5..e2853ff 100644 --- a/docs/funding_ticker.js.html +++ b/docs/funding_ticker.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -165,7 +165,7 @@

funding_ticker.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_ticker_hist.js.html b/docs/funding_ticker_hist.js.html index a1baf4f..022b289 100644 --- a/docs/funding_ticker_hist.js.html +++ b/docs/funding_ticker_hist.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -137,7 +137,7 @@

funding_ticker_hist.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/funding_trade.js.html b/docs/funding_trade.js.html index 6ba7bb5..e0fed3a 100644 --- a/docs/funding_trade.js.html +++ b/docs/funding_trade.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -154,7 +154,7 @@

funding_trade.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/global.html b/docs/global.html index 9ad59e6..0c864c1 100644 --- a/docs/global.html +++ b/docs/global.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -444,7 +444,7 @@
Properties

- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index e87ea6b..13808d4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -201,7 +201,7 @@

Examples


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/invoice.js.html b/docs/invoice.js.html index 3255187..8259a03 100644 --- a/docs/invoice.js.html +++ b/docs/invoice.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -126,7 +126,7 @@

invoice.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/ledger_entry.js.html b/docs/ledger_entry.js.html index 30e78fb..7c6cc3d 100644 --- a/docs/ledger_entry.js.html +++ b/docs/ledger_entry.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -135,7 +135,7 @@

ledger_entry.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/liquidations.js.html b/docs/liquidations.js.html index 88266f6..be0bd6a 100644 --- a/docs/liquidations.js.html +++ b/docs/liquidations.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -146,7 +146,7 @@

liquidations.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/login.js.html b/docs/login.js.html index 92fb9c9..0e384ba 100644 --- a/docs/login.js.html +++ b/docs/login.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -114,7 +114,7 @@

login.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/margin_info.js.html b/docs/margin_info.js.html index d4e7c60..208c23b 100644 --- a/docs/margin_info.js.html +++ b/docs/margin_info.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -180,7 +180,7 @@

margin_info.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/model.js.html b/docs/model.js.html index 6d82ae8..9cf98a3 100644 --- a/docs/model.js.html +++ b/docs/model.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -242,7 +242,7 @@

model.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/movement.js.html b/docs/movement.js.html index 4032d9b..609a52e 100644 --- a/docs/movement.js.html +++ b/docs/movement.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -138,7 +138,7 @@

movement.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/movement_info.js.html b/docs/movement_info.js.html deleted file mode 100644 index d9b0457..0000000 --- a/docs/movement_info.js.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - movement_info.js - Documentation - - - - - - - - - - - - - - - - - - - -
- -

movement_info.js

- - - - - - - -
-
-
'use strict'
-
-const numberValidator = require('./validators/number')
-const dateValidator = require('./validators/date')
-const amountValidator = require('./validators/amount')
-const currencyValidator = require('./validators/currency')
-const stringValidator = require('./validators/string')
-const objectValidator = require('./validators/object')
-const Model = require('./model')
-const fields = {
-  id: 0,
-  currency: 1,
-  currencyName: 2,
-  remark: 4,
-  mtsStarted: 5,
-  mtsUpdated: 6,
-  status: 9,
-  amount: 12,
-  fees: 13,
-  destinationAddress: 16,
-  memo: 17,
-  transactionId: 20,
-  note: 21,
-  bankFees: 24,
-  bankRouterId: 25,
-  externalBankMovId: 28,
-  externalBankMovStatus: 29,
-  externalBankMovDescription: 30,
-  externalBankAccInfo: 31
-}
-
-/**
- * Currency Movement Info model
- */
-class MovementInfo extends Model {
-  /**
-   * @param {object|Array} data - movement data
-   * @param {number} data.id - id
-   * @param {string} data.currency - currency
-   * @param {string} data.currencyName - currency name
-   * @param {string} data.remark - remarks related to movement
-   * @param {number} data.mtsStarted - movement start timestamp
-   * @param {number} data.mtsUpdated - last update timestamp
-   * @param {string} data.status - status
-   * @param {number} data.amount - moved amount
-   * @param {number} data.fees - paid fees
-   * @param {string} data.destinationAddress - destination address
-   * @param {string} data.memo - memo/tag related to transaction
-   * @param {string} data.transactionId - transaction ID
-   * @param {string} data.note - transaction note
-   * @param {number} data.bankFees - wire bank fees
-   * @param {number} data.bankRouterId - identifier of bank router
-   * @param {string} data.externalBankMovId - external provider movement id
-   * @param {string} data.externalBankMovStatus - external provider movement status
-   * @param {string} data.externalBankMovDescription - external provider movement info
-   * @param {object} data.externalBankAccInfo - external provider bank account information for user
-   */
-  constructor (data = {}) {
-    super({ data, fields })
-  }
-
-  /**
-   * @param {object[]|object|Array[]|Array} data - data to convert to POJO
-   * @returns {object} pojo
-   */
-  static unserialize (data) {
-    return super.unserialize({ data, fields })
-  }
-
-  /**
-   * Validates a given MovementInfo instance
-   *
-   * @param {object[]|object|MovementInfo[]|MovementInfo|Array} data - instance to validate
-   * @returns {string} error - null if instance is valid
-   */
-  static validate (data) {
-    return super.validate({
-      data,
-      fields,
-      validators: {
-        id: numberValidator,
-        currency: currencyValidator,
-        currencyName: stringValidator,
-        remark: stringValidator,
-        mtsStarted: dateValidator,
-        mtsUpdated: dateValidator,
-        status: stringValidator,
-        amount: amountValidator,
-        fees: numberValidator,
-        destinationAddress: stringValidator,
-        memo: stringValidator,
-        transactionId: stringValidator,
-        note: stringValidator,
-        bankFees: numberValidator,
-        bankRouterId: numberValidator,
-        externalBankMovId: stringValidator,
-        externalBankMovStatus: stringValidator,
-        externalBankMovDescription: stringValidator,
-        externalBankAccInfo: objectValidator
-      }
-    })
-  }
-}
-
-module.exports = MovementInfo
-
-
-
- - - - - - -
- -
- -
- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. -
- - - - - - - - - - - diff --git a/docs/notification.js.html b/docs/notification.js.html index 7481080..c52ed4e 100644 --- a/docs/notification.js.html +++ b/docs/notification.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -123,7 +123,7 @@

notification.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/order.js.html b/docs/order.js.html index 1b07f72..8458689 100644 --- a/docs/order.js.html +++ b/docs/order.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -54,7 +54,6 @@

order.js

const _compact = require('lodash/compact') const _flatten = require('lodash/flatten') const _includes = require('lodash/includes') -const _isBoolean = require('lodash/isBoolean') const _isUndefined = require('lodash/isUndefined') const { prepareAmount, preparePrice } = require('bfx-api-node-util') @@ -148,7 +147,6 @@

order.js

if (!this.flags) this.flags = 0 if (!_isUndefined(data.hidden)) this.setHidden(data.hidden) - if (!_isUndefined(data.visibleOnHit)) this.setVisibleOnHit(data.visibleOnHit) if (!_isUndefined(data.postonly)) this.setPostOnly(data.postonly) if (!_isUndefined(data.reduceonly)) this.setReduceOnly(data.reduceonly) if (!_isUndefined(data.oco)) { @@ -207,7 +205,6 @@

order.js

/market/.test(type.toLowerCase()) ? 'MARKET' : preparePrice(price), this.isHidden() && 'hidden', - this.isVisibleOnHit() && 'visible-on-hit', this.isPostOnly() && 'post-only', this.isReduceOnly() && 'reduce-only', this.isPositionClose() && 'pos-close', @@ -231,13 +228,6 @@

order.js

return !!(this.flags & Order.flags.HIDDEN) } - /** - * @returns {boolean} visibleOnHit - */ - isVisibleOnHit () { - return !!(this.isHidden() && this.meta && this.meta.make_visible) - } - /** * @returns {boolean} postonly */ @@ -292,32 +282,9 @@

order.js

* @returns {number} finalFlags */ setHidden (v) { - if (!v && this.meta) { - delete this.meta.make_visible - } return this.modifyFlag(Order.flags.HIDDEN, v) } - /** - * Update the meta object. The rest part of the hidden order will be visible - * after first hit(partial execution). - * - * @param {boolean} v - visibleOnHit value - * @returns {number} meta - */ - setVisibleOnHit (v) { - if (!this.isHidden() || !_isBoolean(v)) { - return - } - - this.meta = { - ...(this.meta || {}), - make_visible: +v - } - - return this.meta - } - /** * Update the post-only flag value. If post-only and the order would * immediately fill, the order is automatically cancelled. @@ -528,7 +495,7 @@

order.js

throw new Error('no API interface provided') } - const orderArr = await apiInterface.submitOrder({ order: this }) + const orderArr = await apiInterface.submitOrder(this) Object.assign(this, Order.unserialize(orderArr)) return this } @@ -543,7 +510,7 @@

order.js

if (!apiInterface) throw new Error('no API interface provided') if (!this.id) throw new Error('order has no ID') - return apiInterface.cancelOrder({ id: this.id }) + return apiInterface.cancelOrder(this.id) } /** @@ -833,7 +800,7 @@

order.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/order_book.js.html b/docs/order_book.js.html index c5213f6..030b3e5 100644 --- a/docs/order_book.js.html +++ b/docs/order_book.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -601,7 +601,7 @@

order_book.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/position.js.html b/docs/position.js.html index f3c6ccc..f8bcf80 100644 --- a/docs/position.js.html +++ b/docs/position.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -131,7 +131,7 @@

position.js

throw new Error('claim position only supported on RESTv2') } - return apiInterface.claimPosition({ id: this.id }).then((positionArray) => { + return apiInterface.claimPosition(this.id).then((positionArray) => { Object.assign(this, Position.unserialize(positionArray)) return this }) @@ -251,7 +251,7 @@

position.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/public_pulse_profile.js.html b/docs/public_pulse_profile.js.html index 3759164..8c3ea4f 100644 --- a/docs/public_pulse_profile.js.html +++ b/docs/public_pulse_profile.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -144,7 +144,7 @@

public_pulse_profile.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/public_trade.js.html b/docs/public_trade.js.html index d588acc..78a3b70 100644 --- a/docs/public_trade.js.html +++ b/docs/public_trade.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -102,7 +102,7 @@

public_trade.js

* @returns {object} pojo */ static unserialize (data) { - if ((_isArray(data[0]) && data[0].length === 5) || (_isObject(data[0]) && data[0].rate) || data.length === 5) { + if ((_isArray(data[0]) && data[0].length === 5) || (data.length === 5)) { return super.unserialize({ data, fields: FUNDING_FIELDS }) } else { return super.unserialize({ data, fields: TRADING_FIELDS }) @@ -169,7 +169,7 @@

public_trade.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/pulse_message.js.html b/docs/pulse_message.js.html index 3de29fd..c556978 100644 --- a/docs/pulse_message.js.html +++ b/docs/pulse_message.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -209,7 +209,7 @@

pulse_message.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/status_messages_deriv.js.html b/docs/status_messages_deriv.js.html index a9d5b89..740b08b 100644 --- a/docs/status_messages_deriv.js.html +++ b/docs/status_messages_deriv.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -130,7 +130,7 @@

status_messages_deriv.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/symbol_details.js.html b/docs/symbol_details.js.html index 8701620..190c3b8 100644 --- a/docs/symbol_details.js.html +++ b/docs/symbol_details.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -122,7 +122,7 @@

symbol_details.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/trade.js.html b/docs/trade.js.html index 8c132c5..5140587 100644 --- a/docs/trade.js.html +++ b/docs/trade.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -167,7 +167,7 @@

trade.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/trading_ticker.js.html b/docs/trading_ticker.js.html index c28c55b..be64228 100644 --- a/docs/trading_ticker.js.html +++ b/docs/trading_ticker.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -155,7 +155,7 @@

trading_ticker.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/trading_ticker_hist.js.html b/docs/trading_ticker_hist.js.html index 80028aa..43cdaa1 100644 --- a/docs/trading_ticker_hist.js.html +++ b/docs/trading_ticker_hist.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -133,7 +133,7 @@

trading_ticker_hist.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/transaction_fee.js.html b/docs/transaction_fee.js.html index 426d92c..4a6cdeb 100644 --- a/docs/transaction_fee.js.html +++ b/docs/transaction_fee.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -110,7 +110,7 @@

transaction_fee.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/user_info.js.html b/docs/user_info.js.html index 799b904..d6ca3d8 100644 --- a/docs/user_info.js.html +++ b/docs/user_info.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -119,7 +119,7 @@

user_info.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/util_assign_from_collection_or_instance.js.html b/docs/util_assign_from_collection_or_instance.js.html index df7601d..55be468 100644 --- a/docs/util_assign_from_collection_or_instance.js.html +++ b/docs/util_assign_from_collection_or_instance.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -113,7 +113,7 @@

util/assign_from_collection_or_instance.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/util_is_collection.js.html b/docs/util_is_collection.js.html index eec2041..d3c31f1 100644 --- a/docs/util_is_collection.js.html +++ b/docs/util_is_collection.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

util/is_collection.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_amount.js.html b/docs/validators_amount.js.html index 9d8699f..02ac712 100644 --- a/docs/validators_amount.js.html +++ b/docs/validators_amount.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -69,7 +69,7 @@

validators/amount.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_array.js.html b/docs/validators_array.js.html index 35ac8b6..ff55cf7 100644 --- a/docs/validators_array.js.html +++ b/docs/validators_array.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -70,7 +70,7 @@

validators/array.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_bool.js.html b/docs/validators_bool.js.html index 5b75007..eafc047 100644 --- a/docs/validators_bool.js.html +++ b/docs/validators_bool.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

validators/bool.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_currency.js.html b/docs/validators_currency.js.html index 7348f13..348f2e7 100644 --- a/docs/validators_currency.js.html +++ b/docs/validators_currency.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -74,7 +74,7 @@

validators/currency.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_date.js.html b/docs/validators_date.js.html index 0efaddb..4acea3b 100644 --- a/docs/validators_date.js.html +++ b/docs/validators_date.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

validators/date.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_number.js.html b/docs/validators_number.js.html index 586a68f..28b3bf8 100644 --- a/docs/validators_number.js.html +++ b/docs/validators_number.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

validators/number.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_object.js.html b/docs/validators_object.js.html index 7641b65..1a64eec 100644 --- a/docs/validators_object.js.html +++ b/docs/validators_object.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

validators/object.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_price.js.html b/docs/validators_price.js.html index 07b482a..e56cf36 100644 --- a/docs/validators_price.js.html +++ b/docs/validators_price.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -72,7 +72,7 @@

validators/price.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_string.js.html b/docs/validators_string.js.html index 2d5942f..cbebfde 100644 --- a/docs/validators_string.js.html +++ b/docs/validators_string.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -75,7 +75,7 @@

validators/string.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/validators_symbol.js.html b/docs/validators_symbol.js.html index 18b35c9..1a2b07e 100644 --- a/docs/validators_symbol.js.html +++ b/docs/validators_symbol.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -74,7 +74,7 @@

validators/symbol.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/wallet.js.html b/docs/wallet.js.html index 8d8f339..83abc1d 100644 --- a/docs/wallet.js.html +++ b/docs/wallet.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -125,7 +125,7 @@

wallet.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/wallet_hist.js.html b/docs/wallet_hist.js.html index 0731e70..93b6bdb 100644 --- a/docs/wallet_hist.js.html +++ b/docs/wallet_hist.js.html @@ -29,7 +29,7 @@ -

Home

Classes

Global

+

Home

Classes

Global

@@ -130,7 +130,7 @@

wallet_hist.js


- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Thu Oct 28 2021 16:31:01 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/weighted_averages.js.html b/docs/weighted_averages.js.html deleted file mode 100644 index dbdfd50..0000000 --- a/docs/weighted_averages.js.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - weighted_averages.js - Documentation - - - - - - - - - - - - - - - - - - - -
- -

weighted_averages.js

- - - - - - - -
-
-
'use strict'
-
-const numberValidator = require('./validators/number')
-const Model = require('./model')
-const fields = {
-  tradeCount: 0,
-  sumBuyingSpent: 1,
-  sumBuyingAmount: 2,
-  sumSellingSpent: 4,
-  sumSellingAmount: 5,
-  buyingWeightedPrice: 7,
-  sellingWeightedPrice: 8,
-  firstTradeMts: 10,
-  lastTradeMts: 11
-}
-
-/**
- * Weighted Averages model
- */
-class WeightedAverages extends Model {
-  /**
-   * @param {object|Array} data - weighted averages data
-   * @param {number} data.tradeCount - trade count
-   * @param {number} data.sumBuyingSpent - sum buying spent
-   * @param {number} data.sumBuyingAmount - sum buying amount
-   * @param {number} data.sumSellingSpent - sum selling spent
-   * @param {number} data.sumSellingAmount - sum selling amount
-   * @param {number} data.buyingWeightedPrice - buying weighted price
-   * @param {number} data.sellingWeightedPrice - selling weighted price
-   * @param {number} data.firstTradeMts - first trade ms timestamp
-   * @param {number} data.lastTradeMts - last trade ms timestamp
-   */
-  constructor (data = {}) {
-    super({ data, fields })
-  }
-
-  /**
-   * @param {object[]|object|Array[]|Array} data - data to convert to POJO
-   * @returns {object} pojo
-   */
-  static unserialize (data) {
-    return super.unserialize({ data, fields })
-  }
-
-  /**
-   * Validates a given WeightedAverages instance
-   *
-   * @param {object[]|object|WeightedAverages[]|WeightedAverages|Array} data - instance to validate
-   * @returns {string} error - null if instance is valid
-   */
-  static validate (data) {
-    return super.validate({
-      data,
-      fields,
-      validators: {
-        tradeCount: numberValidator,
-        sumBuyingSpent: numberValidator,
-        sumBuyingAmount: numberValidator,
-        sumSellingSpent: numberValidator,
-        sumSellingAmount: numberValidator,
-        buyingWeightedPrice: numberValidator,
-        sellingWeightedPrice: numberValidator,
-        firstTradeMts: numberValidator,
-        lastTradeMts: numberValidator
-      }
-    })
-  }
-}
-
-module.exports = WeightedAverages
-
-
-
- - - - - - -
- -
- -
- Documentation generated by JSDoc 3.6.11 on Wed Jul 05 2023 11:37:00 GMT+0300 (Eastern European Summer Time) using the docdash theme. -
- - - - - - - - - - - diff --git a/lib/funding_offer.js b/lib/funding_offer.js index 743717f..29654ad 100644 --- a/lib/funding_offer.js +++ b/lib/funding_offer.js @@ -98,7 +98,7 @@ class FundingOffer extends Model { throw new Error('no API interface provided') } - return apiInterface.submitFundingOffer({ offer: this }).then((offerArray) => { + return apiInterface.submitFundingOffer(this).then((offerArray) => { Object.assign(this, FundingOffer.unserialize(offerArray)) return this }) @@ -115,7 +115,7 @@ class FundingOffer extends Model { throw new Error('no API interface provided') } - return apiInterface.cancelFundingOffer({ id: this.id }).then((offerArray) => { + return apiInterface.cancelFundingOffer(this.id).then((offerArray) => { Object.assign(this, FundingOffer.unserialize(offerArray)) return this }) diff --git a/lib/index.js b/lib/index.js index e65d4ef..cd9ef6c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -25,7 +25,6 @@ module.exports = { LedgerEntry: require('./ledger_entry'), Liquidations: require('./liquidations'), Movement: require('./movement'), - MovementInfo: require('./movement_info'), UserInfo: require('./user_info'), Currency: require('./currency'), StatusMessagesDeriv: require('./status_messages_deriv'), @@ -39,7 +38,6 @@ module.exports = { AccountSummary: require('./account_summary'), AuthPermission: require('./auth_permission'), CoreSettings: require('./core_settings'), - WeightedAverages: require('./weighted_averages'), isCollection: require('./util/is_collection') } diff --git a/lib/movement_info.js b/lib/movement_info.js deleted file mode 100644 index 2b52cb0..0000000 --- a/lib/movement_info.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' - -const numberValidator = require('./validators/number') -const dateValidator = require('./validators/date') -const amountValidator = require('./validators/amount') -const currencyValidator = require('./validators/currency') -const stringValidator = require('./validators/string') -const objectValidator = require('./validators/object') -const Model = require('./model') -const fields = { - id: 0, - currency: 1, - currencyName: 2, - remark: 4, - mtsStarted: 5, - mtsUpdated: 6, - status: 9, - amount: 12, - fees: 13, - destinationAddress: 16, - memo: 17, - transactionId: 20, - note: 21, - bankFees: 24, - bankRouterId: 25, - externalBankMovId: 28, - externalBankMovStatus: 29, - externalBankMovDescription: 30, - externalBankAccInfo: 31 -} - -/** - * Currency Movement Info model - */ -class MovementInfo extends Model { - /** - * @param {object|Array} data - movement data - * @param {number} data.id - id - * @param {string} data.currency - currency - * @param {string} data.currencyName - currency name - * @param {string} data.remark - remarks related to movement - * @param {number} data.mtsStarted - movement start timestamp - * @param {number} data.mtsUpdated - last update timestamp - * @param {string} data.status - status - * @param {number} data.amount - moved amount - * @param {number} data.fees - paid fees - * @param {string} data.destinationAddress - destination address - * @param {string} data.memo - memo/tag related to transaction - * @param {string} data.transactionId - transaction ID - * @param {string} data.note - transaction note - * @param {number} data.bankFees - wire bank fees - * @param {number} data.bankRouterId - identifier of bank router - * @param {string} data.externalBankMovId - external provider movement id - * @param {string} data.externalBankMovStatus - external provider movement status - * @param {string} data.externalBankMovDescription - external provider movement info - * @param {object} data.externalBankAccInfo - external provider bank account information for user - */ - constructor (data = {}) { - super({ data, fields }) - } - - /** - * @param {object[]|object|Array[]|Array} data - data to convert to POJO - * @returns {object} pojo - */ - static unserialize (data) { - return super.unserialize({ data, fields }) - } - - /** - * Validates a given MovementInfo instance - * - * @param {object[]|object|MovementInfo[]|MovementInfo|Array} data - instance to validate - * @returns {string} error - null if instance is valid - */ - static validate (data) { - return super.validate({ - data, - fields, - validators: { - id: numberValidator, - currency: currencyValidator, - currencyName: stringValidator, - remark: stringValidator, - mtsStarted: dateValidator, - mtsUpdated: dateValidator, - status: stringValidator, - amount: amountValidator, - fees: numberValidator, - destinationAddress: stringValidator, - memo: stringValidator, - transactionId: stringValidator, - note: stringValidator, - bankFees: numberValidator, - bankRouterId: numberValidator, - externalBankMovId: stringValidator, - externalBankMovStatus: stringValidator, - externalBankMovDescription: stringValidator, - externalBankAccInfo: objectValidator - } - }) - } -} - -module.exports = MovementInfo diff --git a/lib/order.js b/lib/order.js index ca183a9..806ccea 100644 --- a/lib/order.js +++ b/lib/order.js @@ -487,7 +487,7 @@ class Order extends Model { throw new Error('no API interface provided') } - const orderArr = await apiInterface.submitOrder({ order: this }) + const orderArr = await apiInterface.submitOrder(this) Object.assign(this, Order.unserialize(orderArr)) return this } @@ -502,7 +502,7 @@ class Order extends Model { if (!apiInterface) throw new Error('no API interface provided') if (!this.id) throw new Error('order has no ID') - return apiInterface.cancelOrder({ id: this.id }) + return apiInterface.cancelOrder(this.id) } /** diff --git a/lib/position.js b/lib/position.js index 88230fd..460c7da 100644 --- a/lib/position.js +++ b/lib/position.js @@ -85,7 +85,7 @@ class Position extends Model { throw new Error('claim position only supported on RESTv2') } - return apiInterface.claimPosition({ id: this.id }).then((positionArray) => { + return apiInterface.claimPosition(this.id).then((positionArray) => { Object.assign(this, Position.unserialize(positionArray)) return this }) diff --git a/lib/weighted_averages.js b/lib/weighted_averages.js deleted file mode 100644 index 30a0dcd..0000000 --- a/lib/weighted_averages.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict' - -const numberValidator = require('./validators/number') -const Model = require('./model') -const fields = { - tradeCount: 0, - sumBuyingSpent: 1, - sumBuyingAmount: 2, - sumSellingSpent: 4, - sumSellingAmount: 5, - buyingWeightedPrice: 7, - sellingWeightedPrice: 8, - firstTradeMts: 10, - lastTradeMts: 11 -} - -/** - * Weighted Averages model - */ -class WeightedAverages extends Model { - /** - * @param {object|Array} data - weighted averages data - * @param {number} data.tradeCount - trade count - * @param {number} data.sumBuyingSpent - sum buying spent - * @param {number} data.sumBuyingAmount - sum buying amount - * @param {number} data.sumSellingSpent - sum selling spent - * @param {number} data.sumSellingAmount - sum selling amount - * @param {number} data.buyingWeightedPrice - buying weighted price - * @param {number} data.sellingWeightedPrice - selling weighted price - * @param {number} data.firstTradeMts - first trade ms timestamp - * @param {number} data.lastTradeMts - last trade ms timestamp - */ - constructor (data = {}) { - super({ data, fields }) - } - - /** - * @param {object[]|object|Array[]|Array} data - data to convert to POJO - * @returns {object} pojo - */ - static unserialize (data) { - return super.unserialize({ data, fields }) - } - - /** - * Validates a given WeightedAverages instance - * - * @param {object[]|object|WeightedAverages[]|WeightedAverages|Array} data - instance to validate - * @returns {string} error - null if instance is valid - */ - static validate (data) { - return super.validate({ - data, - fields, - validators: { - tradeCount: numberValidator, - sumBuyingSpent: numberValidator, - sumBuyingAmount: numberValidator, - sumSellingSpent: numberValidator, - sumSellingAmount: numberValidator, - buyingWeightedPrice: numberValidator, - sellingWeightedPrice: numberValidator, - firstTradeMts: numberValidator, - lastTradeMts: numberValidator - } - }) - } -} - -module.exports = WeightedAverages diff --git a/package.json b/package.json index f25c49b..3595a77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bfx-api-node-models", - "version": "1.8.1", + "version": "1.6.4", "description": "Object models for usage with the Bitfinex node API", "engines": { "node": ">=8.3.0" @@ -41,7 +41,7 @@ }, "homepage": "http://bitfinexcom.github.io/bfx-api-node-models/", "devDependencies": { - "bfx-api-node-rest": "^5.1.0", + "bfx-api-node-rest": "^4.1.2", "chai": "^4.2.0", "docdash": "^1.2.0", "husky": "^4.2.3", diff --git a/test/lib/models/candle.js b/test/lib/models/candle.js index 1696a55..51d4bfb 100644 --- a/test/lib/models/candle.js +++ b/test/lib/models/candle.js @@ -27,12 +27,7 @@ describe('Candle model', () => { it('unserializes live data correctly', async () => { const rest = new RESTv2() - - const arr = await rest.candles({ - timeframe: '1D', - symbol: 'tBTCUSD', - section: 'hist' - }) + const arr = await rest.candles('tBTCUSD') arr.forEach(candle => { const obj = Candle.unserialize(candle) diff --git a/test/lib/models/funding_ticker.js b/test/lib/models/funding_ticker.js index da3c2d3..b95340b 100644 --- a/test/lib/models/funding_ticker.js +++ b/test/lib/models/funding_ticker.js @@ -101,7 +101,7 @@ describe('FundingTicker model', () => { it('unserializes live data correctly', async () => { const rest = new RESTv2() - const arr = await rest.ticker({ symbol: 'fUSD' }) + const arr = await rest.ticker('fUSD') const obj = FundingTicker.unserialize(arr) assert.strictEqual(obj.symbol, arr[0]) diff --git a/test/lib/models/funding_ticker_hist.js b/test/lib/models/funding_ticker_hist.js index 01c1f55..5d724d3 100644 --- a/test/lib/models/funding_ticker_hist.js +++ b/test/lib/models/funding_ticker_hist.js @@ -74,7 +74,7 @@ describe('FundingTicker history model', () => { it('unserializes live data correctly', async () => { const rest = new RESTv2() - const arr = await rest.ticker({ symbol: 'fUSD' }) + const arr = await rest.ticker('fUSD') const obj = FundingTickerHist.unserialize(arr) assert.strictEqual(obj.symbol, arr[0]) diff --git a/test/lib/models/movement_info.js b/test/lib/models/movement_info.js deleted file mode 100644 index 6c236f3..0000000 --- a/test/lib/models/movement_info.js +++ /dev/null @@ -1,50 +0,0 @@ -//* eslint-env mocha */ -'use strict' - -const { CURRENCIES } = require('bfx-hf-util') -const { MovementInfo } = require('../../../lib') -const testModel = require('../../helpers/test_model') -const testModelValidation = require('../../helpers/test_model_validation') - -const VALID_CURRENCIES = Object.values(CURRENCIES) - -describe('MovementInfo model', () => { - testModel({ - model: MovementInfo, - orderedFields: [ - 'id', 'currency', 'currencyName', null, 'remark', 'mtsStarted', 'mtsUpdated', - null, null, 'status', null, null, 'amount', 'fees', null, null, - 'destinationAddress', 'memo', null, null, 'transactionId', 'note', - null, null, 'bankFees', 'bankRouterId', null, null, 'externalBankMovId', - 'externalBankMovStatus', 'externalBankMovDescription', 'externalBankAccInfo' - ] - }) - - testModelValidation({ - model: MovementInfo, - validData: { - id: new Array(...(new Array(5))).map(() => Math.random()), - currency: VALID_CURRENCIES, - currencyName: VALID_CURRENCIES, // pull data from somewhere - remark: VALID_CURRENCIES, - mtsStarted: new Array(...(new Array(5))).map(() => Math.random()), - mtsUpdated: new Array(...(new Array(5))).map(() => Math.random()), - status: VALID_CURRENCIES, - amount: new Array(...(new Array(5))).map(() => Math.random()), - fees: new Array(...(new Array(5))).map(() => Math.random()), - destinationAddress: VALID_CURRENCIES, - memo: VALID_CURRENCIES, - transactionId: VALID_CURRENCIES, - note: VALID_CURRENCIES, - bankFees: new Array(...(new Array(5))).map(() => Math.random()), - bankRouterId: new Array(...(new Array(5))).map(() => Math.random()), - externalBankMovId: VALID_CURRENCIES, - externalBankMovStatus: VALID_CURRENCIES, - externalBankMovDescription: VALID_CURRENCIES, - externalBankAccInfo: new Array(...(new Array(5))).map(() => ({ - router: `my-router-${Math.random()}`, - meta: { [`foo-${Math.random()}`]: `bar-${Math.random()}` } - })) - } - }) -}) diff --git a/test/lib/models/order.js b/test/lib/models/order.js index 11f9d71..4b2c0f4 100644 --- a/test/lib/models/order.js +++ b/test/lib/models/order.js @@ -512,7 +512,7 @@ describe('Order model', () => { it('calls cancelOrder on the interface', (done) => { const o = new Order({ id: 42 }) o.cancel({ - cancelOrder: async ({ id }) => { + cancelOrder: async (id) => { assert.strictEqual(id, 42) done() return [] diff --git a/test/lib/models/order_book.js b/test/lib/models/order_book.js index f7280ea..ee3646b 100644 --- a/test/lib/models/order_book.js +++ b/test/lib/models/order_book.js @@ -766,10 +766,7 @@ describe('OrderBook model', () => { it('unserializes live trading data correctly', async () => { const rest = new RESTv2() - const book = await rest.orderBook({ - symbol: 'tBTCUSD', - prec: 'P0' - }) + const book = await rest.orderBook('tBTCUSD', 'P0') const obj = new OrderBook(book) let firstAsk = -1 @@ -792,10 +789,7 @@ describe('OrderBook model', () => { it('unserializes live funding data correctly', async () => { const rest = new RESTv2() - const book = await rest.orderBook({ - symbol: 'fUSD', - prec: 'P0' - }) + const book = await rest.orderBook('fUSD', 'P0') const obj = new OrderBook(book) let firstAsk = -1 diff --git a/test/lib/models/position.js b/test/lib/models/position.js index 3af6461..4a2cef3 100644 --- a/test/lib/models/position.js +++ b/test/lib/models/position.js @@ -83,7 +83,7 @@ describe('Position model', () => { it('calls claimPosition on the interface', (done) => { const p = new Position({ id: 42 }) p.claim({ - claimPosition: async ({ id }) => { + claimPosition: async (id) => { assert.strictEqual(id, 42) done() return [] diff --git a/test/lib/models/trading_ticker.js b/test/lib/models/trading_ticker.js index a9e746f..8ccb104 100644 --- a/test/lib/models/trading_ticker.js +++ b/test/lib/models/trading_ticker.js @@ -90,7 +90,7 @@ describe('TradingTicker model', () => { it('unserializes live data correctly', async () => { const rest = new RESTv2() - const arr = await rest.ticker({ symbol: 'tBTCUSD' }) + const arr = await rest.ticker('tBTCUSD') const obj = TradingTicker.unserialize(arr) assert.strictEqual(obj.symbol, arr[0]) diff --git a/test/lib/models/trading_ticker_hist.js b/test/lib/models/trading_ticker_hist.js index df49d2b..ac24470 100644 --- a/test/lib/models/trading_ticker_hist.js +++ b/test/lib/models/trading_ticker_hist.js @@ -71,7 +71,7 @@ describe('TradingTickerHistory model', () => { it('unserializes live data correctly', async () => { const rest = new RESTv2() - const arr = await rest.ticker({ symbol: 'tBTCUSD' }) + const arr = await rest.ticker('tBTCUSD') const obj = TradingTickerHist.unserialize(arr) assert.strictEqual(obj.symbol, arr[0]) diff --git a/test/lib/models/weighted_averages.js b/test/lib/models/weighted_averages.js deleted file mode 100644 index 86c4aa6..0000000 --- a/test/lib/models/weighted_averages.js +++ /dev/null @@ -1,33 +0,0 @@ -//* eslint-env mocha */ -'use strict' - -const { WeightedAverages } = require('../../../lib') -const testModel = require('../../helpers/test_model') -const testModelValidation = require('../../helpers/test_model_validation') - -describe('WeightedAverages model', () => { - testModel({ - model: WeightedAverages, - orderedFields: [ - 'tradeCount', 'sumBuyingSpent', 'sumBuyingAmount', null, - 'sumSellingSpent', 'sumSellingAmount', null, - 'buyingWeightedPrice', 'sellingWeightedPrice', null, - 'firstTradeMts', 'lastTradeMts' - ] - }) - - testModelValidation({ - model: WeightedAverages, - validData: { - tradeCount: new Array(...(new Array(5))).map(() => Math.random()), - sumBuyingSpent: new Array(...(new Array(5))).map(() => Math.random()), - sumBuyingAmount: new Array(...(new Array(5))).map(() => Math.random()), - sumSellingSpent: new Array(...(new Array(5))).map(() => Math.random()), - sumSellingAmount: new Array(...(new Array(5))).map(() => Math.random()), - buyingWeightedPrice: new Array(...(new Array(5))).map(() => Math.random()), - sellingWeightedPrice: new Array(...(new Array(5))).map(() => Math.random()), - firstTradeMts: new Array(...(new Array(5))).map(() => Math.random()), - lastTradeMts: new Array(...(new Array(5))).map(() => Math.random()) - } - }) -})