From 0ebb4b4e49cfce5c3b8c7de4042e3ecb3ee4ab9c Mon Sep 17 00:00:00 2001 From: "stepan.murenets" Date: Sat, 30 Jan 2021 21:56:35 +0300 Subject: [PATCH 1/3] fixed extra slash in /api makeRequest --- src/BinanceApiClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BinanceApiClient.ts b/src/BinanceApiClient.ts index 30de731..4410f0f 100644 --- a/src/BinanceApiClient.ts +++ b/src/BinanceApiClient.ts @@ -774,7 +774,7 @@ export class BinanceApiClient { ...parameters: [string, any][] ): Promise { const apiUrl: URL = new URL( - Path.join("/api", apiVersion, accessedResource), + Path.join("api", apiVersion, accessedResource), "https://api.binance.com" ); From f32ddc666f72b19f44ddda3372e36fa3712dc659 Mon Sep 17 00:00:00 2001 From: "stepan.murenets" Date: Sat, 30 Jan 2021 23:24:07 +0300 Subject: [PATCH 2/3] added build folder --- .gitignore | 4 +- build/index.js | 90 +++ build/index.js.map | 1 + build/src/BinanceApiClient.js | 563 ++++++++++++++++++ build/src/BinanceApiClient.js.map | 1 + build/src/enums/ApiVersion.js | 13 + build/src/enums/ApiVersion.js.map | 1 + build/src/enums/AuthenticationMethod.js | 13 + build/src/enums/AuthenticationMethod.js.map | 1 + build/src/enums/CandlestickInterval.js | 25 + build/src/enums/CandlestickInterval.js.map | 1 + build/src/enums/FilterType.js | 17 + build/src/enums/FilterType.js.map | 1 + build/src/enums/HttpMethod.js | 14 + build/src/enums/HttpMethod.js.map | 1 + build/src/enums/OrderExecutionStatus.js | 16 + build/src/enums/OrderExecutionStatus.js.map | 1 + build/src/enums/OrderRejectionMotive.js | 20 + build/src/enums/OrderRejectionMotive.js.map | 1 + build/src/enums/OrderSide.js | 12 + build/src/enums/OrderSide.js.map | 1 + build/src/enums/OrderStatus.js | 17 + build/src/enums/OrderStatus.js.map | 1 + build/src/enums/OrderType.js | 17 + build/src/enums/OrderType.js.map | 1 + build/src/enums/RateLimitInterval.js | 10 + build/src/enums/RateLimitInterval.js.map | 1 + build/src/enums/RateLimitType.js | 12 + build/src/enums/RateLimitType.js.map | 1 + build/src/enums/ResponseType.js | 13 + build/src/enums/ResponseType.js.map | 1 + build/src/enums/SymbolStatus.js | 17 + build/src/enums/SymbolStatus.js.map | 1 + build/src/enums/SymbolType.js | 11 + build/src/enums/SymbolType.js.map | 1 + build/src/enums/TimeInForce.js | 13 + build/src/enums/TimeInForce.js.map | 1 + build/src/errors/ApiError.js | 16 + build/src/errors/ApiError.js.map | 1 + build/src/errors/AuthenticationError.js | 26 + build/src/errors/AuthenticationError.js.map | 1 + build/src/models/account/AccountData.js | 72 +++ build/src/models/account/AccountData.js.map | 1 + build/src/models/account/Balance.js | 33 + build/src/models/account/Balance.js.map | 1 + build/src/models/candlestick/Candlestick.js | 89 +++ .../src/models/candlestick/Candlestick.js.map | 1 + build/src/models/depth/LatestPrice.js | 26 + build/src/models/depth/LatestPrice.js.map | 1 + build/src/models/depth/OrderBook.js | 33 + build/src/models/depth/OrderBook.js.map | 1 + build/src/models/filter/LotSizeFilter.js | 33 + build/src/models/filter/LotSizeFilter.js.map | 1 + .../src/models/filter/MaxAlgoOrdersFilter.js | 19 + .../models/filter/MaxAlgoOrdersFilter.js.map | 1 + build/src/models/filter/MaxOrdersFilter.js | 19 + .../src/models/filter/MaxOrdersFilter.js.map | 1 + .../models/filter/MinimumNotionalFilter.js | 19 + .../filter/MinimumNotionalFilter.js.map | 1 + build/src/models/filter/PriceFilter.js | 33 + build/src/models/filter/PriceFilter.js.map | 1 + build/src/models/filter/RateLimit.js | 32 + build/src/models/filter/RateLimit.js.map | 1 + .../filter/abstraction/ExchangeFilter.js | 3 + .../filter/abstraction/ExchangeFilter.js.map | 1 + .../models/filter/abstraction/SymbolFilter.js | 3 + .../filter/abstraction/SymbolFilter.js.map | 1 + build/src/models/misc/ExchangeInfo.js | 75 +++ build/src/models/misc/ExchangeInfo.js.map | 1 + build/src/models/misc/Symbol.js | 112 ++++ build/src/models/misc/Symbol.js.map | 1 + build/src/models/order/CanceledOrderData.js | 40 ++ .../src/models/order/CanceledOrderData.js.map | 1 + build/src/models/order/Order.js | 108 ++++ build/src/models/order/Order.js.map | 1 + .../src/models/order/OrderAcknowledgement.js | 40 ++ .../models/order/OrderAcknowledgement.js.map | 1 + build/src/models/order/OrderFull.js | 28 + build/src/models/order/OrderFull.js.map | 1 + build/src/models/order/OrderResult.js | 91 +++ build/src/models/order/OrderResult.js.map | 1 + build/src/models/order/PlacedOrder.js | 26 + build/src/models/order/PlacedOrder.js.map | 1 + build/src/models/order/PlacedOrderFill.js | 40 ++ build/src/models/order/PlacedOrderFill.js.map | 1 + build/src/models/ticker/Ticker.js | 47 ++ build/src/models/ticker/Ticker.js.map | 1 + build/src/models/ticker/TickerStatistics.js | 124 ++++ .../src/models/ticker/TickerStatistics.js.map | 1 + build/src/models/trade/Trade.js | 82 +++ build/src/models/trade/Trade.js.map | 1 + .../models/websocket/account/AccountUpdate.js | 30 + .../websocket/account/AccountUpdate.js.map | 1 + .../candlestick/CandlestickUpdate.js | 138 +++++ .../candlestick/CandlestickUpdate.js.map | 1 + .../models/websocket/depth/OrderBookUpdate.js | 54 ++ .../websocket/depth/OrderBookUpdate.js.map | 1 + .../src/models/websocket/order/OrderUpdate.js | 129 ++++ .../models/websocket/order/OrderUpdate.js.map | 1 + .../src/models/websocket/trade/TradeUpdate.js | 75 +++ .../models/websocket/trade/TradeUpdate.js.map | 1 + 101 files changed, 2640 insertions(+), 2 deletions(-) create mode 100644 build/index.js create mode 100644 build/index.js.map create mode 100644 build/src/BinanceApiClient.js create mode 100644 build/src/BinanceApiClient.js.map create mode 100644 build/src/enums/ApiVersion.js create mode 100644 build/src/enums/ApiVersion.js.map create mode 100644 build/src/enums/AuthenticationMethod.js create mode 100644 build/src/enums/AuthenticationMethod.js.map create mode 100644 build/src/enums/CandlestickInterval.js create mode 100644 build/src/enums/CandlestickInterval.js.map create mode 100644 build/src/enums/FilterType.js create mode 100644 build/src/enums/FilterType.js.map create mode 100644 build/src/enums/HttpMethod.js create mode 100644 build/src/enums/HttpMethod.js.map create mode 100644 build/src/enums/OrderExecutionStatus.js create mode 100644 build/src/enums/OrderExecutionStatus.js.map create mode 100644 build/src/enums/OrderRejectionMotive.js create mode 100644 build/src/enums/OrderRejectionMotive.js.map create mode 100644 build/src/enums/OrderSide.js create mode 100644 build/src/enums/OrderSide.js.map create mode 100644 build/src/enums/OrderStatus.js create mode 100644 build/src/enums/OrderStatus.js.map create mode 100644 build/src/enums/OrderType.js create mode 100644 build/src/enums/OrderType.js.map create mode 100644 build/src/enums/RateLimitInterval.js create mode 100644 build/src/enums/RateLimitInterval.js.map create mode 100644 build/src/enums/RateLimitType.js create mode 100644 build/src/enums/RateLimitType.js.map create mode 100644 build/src/enums/ResponseType.js create mode 100644 build/src/enums/ResponseType.js.map create mode 100644 build/src/enums/SymbolStatus.js create mode 100644 build/src/enums/SymbolStatus.js.map create mode 100644 build/src/enums/SymbolType.js create mode 100644 build/src/enums/SymbolType.js.map create mode 100644 build/src/enums/TimeInForce.js create mode 100644 build/src/enums/TimeInForce.js.map create mode 100644 build/src/errors/ApiError.js create mode 100644 build/src/errors/ApiError.js.map create mode 100644 build/src/errors/AuthenticationError.js create mode 100644 build/src/errors/AuthenticationError.js.map create mode 100644 build/src/models/account/AccountData.js create mode 100644 build/src/models/account/AccountData.js.map create mode 100644 build/src/models/account/Balance.js create mode 100644 build/src/models/account/Balance.js.map create mode 100644 build/src/models/candlestick/Candlestick.js create mode 100644 build/src/models/candlestick/Candlestick.js.map create mode 100644 build/src/models/depth/LatestPrice.js create mode 100644 build/src/models/depth/LatestPrice.js.map create mode 100644 build/src/models/depth/OrderBook.js create mode 100644 build/src/models/depth/OrderBook.js.map create mode 100644 build/src/models/filter/LotSizeFilter.js create mode 100644 build/src/models/filter/LotSizeFilter.js.map create mode 100644 build/src/models/filter/MaxAlgoOrdersFilter.js create mode 100644 build/src/models/filter/MaxAlgoOrdersFilter.js.map create mode 100644 build/src/models/filter/MaxOrdersFilter.js create mode 100644 build/src/models/filter/MaxOrdersFilter.js.map create mode 100644 build/src/models/filter/MinimumNotionalFilter.js create mode 100644 build/src/models/filter/MinimumNotionalFilter.js.map create mode 100644 build/src/models/filter/PriceFilter.js create mode 100644 build/src/models/filter/PriceFilter.js.map create mode 100644 build/src/models/filter/RateLimit.js create mode 100644 build/src/models/filter/RateLimit.js.map create mode 100644 build/src/models/filter/abstraction/ExchangeFilter.js create mode 100644 build/src/models/filter/abstraction/ExchangeFilter.js.map create mode 100644 build/src/models/filter/abstraction/SymbolFilter.js create mode 100644 build/src/models/filter/abstraction/SymbolFilter.js.map create mode 100644 build/src/models/misc/ExchangeInfo.js create mode 100644 build/src/models/misc/ExchangeInfo.js.map create mode 100644 build/src/models/misc/Symbol.js create mode 100644 build/src/models/misc/Symbol.js.map create mode 100644 build/src/models/order/CanceledOrderData.js create mode 100644 build/src/models/order/CanceledOrderData.js.map create mode 100644 build/src/models/order/Order.js create mode 100644 build/src/models/order/Order.js.map create mode 100644 build/src/models/order/OrderAcknowledgement.js create mode 100644 build/src/models/order/OrderAcknowledgement.js.map create mode 100644 build/src/models/order/OrderFull.js create mode 100644 build/src/models/order/OrderFull.js.map create mode 100644 build/src/models/order/OrderResult.js create mode 100644 build/src/models/order/OrderResult.js.map create mode 100644 build/src/models/order/PlacedOrder.js create mode 100644 build/src/models/order/PlacedOrder.js.map create mode 100644 build/src/models/order/PlacedOrderFill.js create mode 100644 build/src/models/order/PlacedOrderFill.js.map create mode 100644 build/src/models/ticker/Ticker.js create mode 100644 build/src/models/ticker/Ticker.js.map create mode 100644 build/src/models/ticker/TickerStatistics.js create mode 100644 build/src/models/ticker/TickerStatistics.js.map create mode 100644 build/src/models/trade/Trade.js create mode 100644 build/src/models/trade/Trade.js.map create mode 100644 build/src/models/websocket/account/AccountUpdate.js create mode 100644 build/src/models/websocket/account/AccountUpdate.js.map create mode 100644 build/src/models/websocket/candlestick/CandlestickUpdate.js create mode 100644 build/src/models/websocket/candlestick/CandlestickUpdate.js.map create mode 100644 build/src/models/websocket/depth/OrderBookUpdate.js create mode 100644 build/src/models/websocket/depth/OrderBookUpdate.js.map create mode 100644 build/src/models/websocket/order/OrderUpdate.js create mode 100644 build/src/models/websocket/order/OrderUpdate.js.map create mode 100644 build/src/models/websocket/trade/TradeUpdate.js create mode 100644 build/src/models/websocket/trade/TradeUpdate.js.map diff --git a/.gitignore b/.gitignore index 1609414..a35c328 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ bower_components .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release +# build/Release # Dependency directories node_modules/ @@ -59,7 +59,7 @@ typings/ .env # Build output -build +# build ### JetBrains # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm diff --git a/build/index.js b/build/index.js new file mode 100644 index 0000000..825cc7e --- /dev/null +++ b/build/index.js @@ -0,0 +1,90 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BinanceApiClient = exports.TradeUpdate = exports.Trade = exports.TickerStatistics = exports.Ticker = exports.Symbol = exports.LatestPrice = exports.ExchangeInfo = exports.CandlestickUpdate = exports.Candlestick = exports.Balance = exports.AccountUpdate = exports.AccountData = exports.PlacedOrderFill = exports.PlacedOrder = exports.OrderUpdate = exports.OrderResult = exports.OrderFull = exports.OrderBookUpdate = exports.OrderBook = exports.OrderAcknowledgement = exports.Order = exports.CanceledOrderData = exports.RateLimit = exports.PriceFilter = exports.MinimumNotionalFilter = exports.MaxOrdersFilter = exports.MaxAlgoOrdersFilter = exports.LotSizeFilter = exports.AuthenticationError = exports.ApiError = exports.TimeInForce = exports.SymbolType = exports.SymbolStatus = exports.ResponseType = exports.RateLimitType = exports.RateLimitInterval = exports.OrderType = exports.OrderStatus = exports.OrderSide = exports.OrderRejectionMotive = exports.OrderExecutionStatus = exports.CandlestickInterval = void 0; +var CandlestickInterval_1 = require("./src/enums/CandlestickInterval"); +Object.defineProperty(exports, "CandlestickInterval", { enumerable: true, get: function () { return CandlestickInterval_1.CandlestickInterval; } }); +var OrderExecutionStatus_1 = require("./src/enums/OrderExecutionStatus"); +Object.defineProperty(exports, "OrderExecutionStatus", { enumerable: true, get: function () { return OrderExecutionStatus_1.OrderExecutionStatus; } }); +var OrderRejectionMotive_1 = require("./src/enums/OrderRejectionMotive"); +Object.defineProperty(exports, "OrderRejectionMotive", { enumerable: true, get: function () { return OrderRejectionMotive_1.OrderRejectionMotive; } }); +var OrderSide_1 = require("./src/enums/OrderSide"); +Object.defineProperty(exports, "OrderSide", { enumerable: true, get: function () { return OrderSide_1.OrderSide; } }); +var OrderStatus_1 = require("./src/enums/OrderStatus"); +Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return OrderStatus_1.OrderStatus; } }); +var OrderType_1 = require("./src/enums/OrderType"); +Object.defineProperty(exports, "OrderType", { enumerable: true, get: function () { return OrderType_1.OrderType; } }); +var RateLimitInterval_1 = require("./src/enums/RateLimitInterval"); +Object.defineProperty(exports, "RateLimitInterval", { enumerable: true, get: function () { return RateLimitInterval_1.RateLimitInterval; } }); +var RateLimitType_1 = require("./src/enums/RateLimitType"); +Object.defineProperty(exports, "RateLimitType", { enumerable: true, get: function () { return RateLimitType_1.RateLimitType; } }); +var ResponseType_1 = require("./src/enums/ResponseType"); +Object.defineProperty(exports, "ResponseType", { enumerable: true, get: function () { return ResponseType_1.ResponseType; } }); +var SymbolStatus_1 = require("./src/enums/SymbolStatus"); +Object.defineProperty(exports, "SymbolStatus", { enumerable: true, get: function () { return SymbolStatus_1.SymbolStatus; } }); +var SymbolType_1 = require("./src/enums/SymbolType"); +Object.defineProperty(exports, "SymbolType", { enumerable: true, get: function () { return SymbolType_1.SymbolType; } }); +var TimeInForce_1 = require("./src/enums/TimeInForce"); +Object.defineProperty(exports, "TimeInForce", { enumerable: true, get: function () { return TimeInForce_1.TimeInForce; } }); +var ApiError_1 = require("./src/errors/ApiError"); +Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } }); +var AuthenticationError_1 = require("./src/errors/AuthenticationError"); +Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return AuthenticationError_1.AuthenticationError; } }); +var LotSizeFilter_1 = require("./src/models/filter/LotSizeFilter"); +Object.defineProperty(exports, "LotSizeFilter", { enumerable: true, get: function () { return LotSizeFilter_1.LotSizeFilter; } }); +var MaxAlgoOrdersFilter_1 = require("./src/models/filter/MaxAlgoOrdersFilter"); +Object.defineProperty(exports, "MaxAlgoOrdersFilter", { enumerable: true, get: function () { return MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter; } }); +var MaxOrdersFilter_1 = require("./src/models/filter/MaxOrdersFilter"); +Object.defineProperty(exports, "MaxOrdersFilter", { enumerable: true, get: function () { return MaxOrdersFilter_1.MaxOrdersFilter; } }); +var MinimumNotionalFilter_1 = require("./src/models/filter/MinimumNotionalFilter"); +Object.defineProperty(exports, "MinimumNotionalFilter", { enumerable: true, get: function () { return MinimumNotionalFilter_1.MinimumNotionalFilter; } }); +var PriceFilter_1 = require("./src/models/filter/PriceFilter"); +Object.defineProperty(exports, "PriceFilter", { enumerable: true, get: function () { return PriceFilter_1.PriceFilter; } }); +var RateLimit_1 = require("./src/models/filter/RateLimit"); +Object.defineProperty(exports, "RateLimit", { enumerable: true, get: function () { return RateLimit_1.RateLimit; } }); +var CanceledOrderData_1 = require("./src/models/order/CanceledOrderData"); +Object.defineProperty(exports, "CanceledOrderData", { enumerable: true, get: function () { return CanceledOrderData_1.CanceledOrderData; } }); +var Order_1 = require("./src/models/order/Order"); +Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return Order_1.Order; } }); +var OrderAcknowledgement_1 = require("./src/models/order/OrderAcknowledgement"); +Object.defineProperty(exports, "OrderAcknowledgement", { enumerable: true, get: function () { return OrderAcknowledgement_1.OrderAcknowledgement; } }); +var OrderBook_1 = require("./src/models/depth/OrderBook"); +Object.defineProperty(exports, "OrderBook", { enumerable: true, get: function () { return OrderBook_1.OrderBook; } }); +var OrderBookUpdate_1 = require("./src/models/websocket/depth/OrderBookUpdate"); +Object.defineProperty(exports, "OrderBookUpdate", { enumerable: true, get: function () { return OrderBookUpdate_1.OrderBookUpdate; } }); +var OrderFull_1 = require("./src/models/order/OrderFull"); +Object.defineProperty(exports, "OrderFull", { enumerable: true, get: function () { return OrderFull_1.OrderFull; } }); +var OrderResult_1 = require("./src/models/order/OrderResult"); +Object.defineProperty(exports, "OrderResult", { enumerable: true, get: function () { return OrderResult_1.OrderResult; } }); +var OrderUpdate_1 = require("./src/models/websocket/order/OrderUpdate"); +Object.defineProperty(exports, "OrderUpdate", { enumerable: true, get: function () { return OrderUpdate_1.OrderUpdate; } }); +var PlacedOrder_1 = require("./src/models/order/PlacedOrder"); +Object.defineProperty(exports, "PlacedOrder", { enumerable: true, get: function () { return PlacedOrder_1.PlacedOrder; } }); +var PlacedOrderFill_1 = require("./src/models/order/PlacedOrderFill"); +Object.defineProperty(exports, "PlacedOrderFill", { enumerable: true, get: function () { return PlacedOrderFill_1.PlacedOrderFill; } }); +var AccountData_1 = require("./src/models/account/AccountData"); +Object.defineProperty(exports, "AccountData", { enumerable: true, get: function () { return AccountData_1.AccountData; } }); +var AccountUpdate_1 = require("./src/models/websocket/account/AccountUpdate"); +Object.defineProperty(exports, "AccountUpdate", { enumerable: true, get: function () { return AccountUpdate_1.AccountUpdate; } }); +var Balance_1 = require("./src/models/account/Balance"); +Object.defineProperty(exports, "Balance", { enumerable: true, get: function () { return Balance_1.Balance; } }); +var Candlestick_1 = require("./src/models/candlestick/Candlestick"); +Object.defineProperty(exports, "Candlestick", { enumerable: true, get: function () { return Candlestick_1.Candlestick; } }); +var CandlestickUpdate_1 = require("./src/models/websocket/candlestick/CandlestickUpdate"); +Object.defineProperty(exports, "CandlestickUpdate", { enumerable: true, get: function () { return CandlestickUpdate_1.CandlestickUpdate; } }); +var ExchangeInfo_1 = require("./src/models/misc/ExchangeInfo"); +Object.defineProperty(exports, "ExchangeInfo", { enumerable: true, get: function () { return ExchangeInfo_1.ExchangeInfo; } }); +var LatestPrice_1 = require("./src/models/depth/LatestPrice"); +Object.defineProperty(exports, "LatestPrice", { enumerable: true, get: function () { return LatestPrice_1.LatestPrice; } }); +var Symbol_1 = require("./src/models/misc/Symbol"); +Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return Symbol_1.Symbol; } }); +var Ticker_1 = require("./src/models/ticker/Ticker"); +Object.defineProperty(exports, "Ticker", { enumerable: true, get: function () { return Ticker_1.Ticker; } }); +var TickerStatistics_1 = require("./src/models/ticker/TickerStatistics"); +Object.defineProperty(exports, "TickerStatistics", { enumerable: true, get: function () { return TickerStatistics_1.TickerStatistics; } }); +var Trade_1 = require("./src/models/trade/Trade"); +Object.defineProperty(exports, "Trade", { enumerable: true, get: function () { return Trade_1.Trade; } }); +var TradeUpdate_1 = require("./src/models/websocket/trade/TradeUpdate"); +Object.defineProperty(exports, "TradeUpdate", { enumerable: true, get: function () { return TradeUpdate_1.TradeUpdate; } }); +var BinanceApiClient_1 = require("./src/BinanceApiClient"); +Object.defineProperty(exports, "BinanceApiClient", { enumerable: true, get: function () { return BinanceApiClient_1.BinanceApiClient; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map new file mode 100644 index 0000000..887b498 --- /dev/null +++ b/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,uEAAsE;AAA7D,0HAAA,mBAAmB,OAAA;AAC5B,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,0GAAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,mEAAkE;AAAzD,sHAAA,iBAAiB,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AAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,gGAAA,MAAM,OAAA;AACf,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,yEAAwE;AAA/D,oHAAA,gBAAgB,OAAA;AACzB,kDAAiD;AAAxC,8FAAA,KAAK,OAAA;AACd,wEAAuE;AAA9D,0GAAA,WAAW,OAAA;AAEpB,2DAA0D;AAAjD,oHAAA,gBAAgB,OAAA"} \ No newline at end of file diff --git a/build/src/BinanceApiClient.js b/build/src/BinanceApiClient.js new file mode 100644 index 0000000..6bbc791 --- /dev/null +++ b/build/src/BinanceApiClient.js @@ -0,0 +1,563 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BinanceApiClient = void 0; +const AuthenticationMethod_1 = require("./enums/AuthenticationMethod"); +const ApiVersion_1 = require("./enums/ApiVersion"); +const CryptoJs = require("crypto-js"); +const HttpMethod_1 = require("./enums/HttpMethod"); +const AuthenticationError_1 = require("./errors/AuthenticationError"); +const request = require("request-promise"); +const Path = require("path"); +const util_1 = require("util"); +const url_1 = require("url"); +const OrderBook_1 = require("./models/depth/OrderBook"); +const ApiError_1 = require("./errors/ApiError"); +const Order_1 = require("./models/order/Order"); +const Candlestick_1 = require("./models/candlestick/Candlestick"); +const TickerStatistics_1 = require("./models/ticker/TickerStatistics"); +const LatestPrice_1 = require("./models/depth/LatestPrice"); +const Ticker_1 = require("./models/ticker/Ticker"); +const OrderSide_1 = require("./enums/OrderSide"); +const OrderType_1 = require("./enums/OrderType"); +const TimeInForce_1 = require("./enums/TimeInForce"); +const OrderAcknowledgement_1 = require("./models/order/OrderAcknowledgement"); +const CanceledOrderData_1 = require("./models/order/CanceledOrderData"); +const AccountData_1 = require("./models/account/AccountData"); +const Trade_1 = require("./models/trade/Trade"); +const WebSocket = require("ws"); +const OrderBookUpdate_1 = require("./models/websocket/depth/OrderBookUpdate"); +const CandlestickUpdate_1 = require("./models/websocket/candlestick/CandlestickUpdate"); +const TradeUpdate_1 = require("./models/websocket/trade/TradeUpdate"); +const AccountUpdate_1 = require("./models/websocket/account/AccountUpdate"); +const OrderUpdate_1 = require("./models/websocket/order/OrderUpdate"); +const ExchangeInfo_1 = require("./models/misc/ExchangeInfo"); +const ResponseType_1 = require("./enums/ResponseType"); +const OrderResult_1 = require("./models/order/OrderResult"); +const OrderFull_1 = require("./models/order/OrderFull"); +const websocket_heartbeats_1 = require("websocket-heartbeats"); +/** + * Represents a single Binance API client. + */ +class BinanceApiClient { + /** + * Initializes a new Binance API client. + * + * @param apiKey The personal account API key. + * @param apiSecret The personal account API secret. + */ + constructor(apiKey, apiSecret) { + BinanceApiClient.API_KEY = apiKey; + BinanceApiClient.API_SECRET = apiSecret; + } + /** + * Interface to the "GET v1/ping" Binance's API operation. + */ + ping() { + return __awaiter(this, void 0, void 0, function* () { + yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ping", AuthenticationMethod_1.AuthenticationMethod.NONE); + }); + } + getExchangeInfo() { + return __awaiter(this, void 0, void 0, function* () { + return new ExchangeInfo_1.ExchangeInfo(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "exchangeInfo", AuthenticationMethod_1.AuthenticationMethod.NONE)); + }); + } + /** + * Interface to the "GET v1/time" Binance's API operation. + * + * @returns The Binance's server time. + */ + getServerTime() { + return __awaiter(this, void 0, void 0, function* () { + return new Date((yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "time", AuthenticationMethod_1.AuthenticationMethod.NONE)).serverTime); + }); + } + /** + * Interface to the "GET v1/depth" Binance's API operation. + * + * @param symbol The symbol for which we want to retrieve the order book. + * @param limit The maximum number of orders in the returned order book. + * + * @returns The order book respecting the given constraints. + */ + getOrderBook(symbol, limit) { + return __awaiter(this, void 0, void 0, function* () { + return new OrderBook_1.OrderBook(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "depth", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol], ["limit", limit])); + }); + } + /** + * Interface to the "GET v1/klines" Binance's API operation. Get + * candlestick bars for the specified symbol, respecting + * all the other given constraints. Candlesticks are uniquely + * identified by their opening time. + * + * @param symbol The symbol for which we want to retrieve the + * candlesticks. + * @param interval The interval which the requested candlesticks refer to. + * @param limit The maximum number of candlesticks returned. + * @param startTime The time from which the candlesticks are returned. + * @param endTime The time until which the candlesticks are returned. + * + * @returns A candlesticks array respecting the given constraints. + */ + getCandlesticks(symbol, interval, limit, startTime, endTime) { + return __awaiter(this, void 0, void 0, function* () { + const candlesticksJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "klines", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol], ["interval", interval], ["limit", limit], ["startTime", startTime], ["endTime", endTime]); + const candlesticks = []; + for (const candlestickJson of candlesticksJson) { + candlesticks.push(new Candlestick_1.Candlestick(candlestickJson)); + } + return candlesticks; + }); + } + /** + * Interface to the "GET v1/ticker/24hr" Binance's API operation. + * Get last 24 hours price change statistics. + * + * @param symbol The symbol for which we want to retrieve the + * last day ticker statistics. + * + * @returns The last 24-hour ticker statistics. + */ + getLastDayTickerStatistics(symbol) { + return __awaiter(this, void 0, void 0, function* () { + return new TickerStatistics_1.TickerStatistics(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/24hr", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol])); + }); + } + /** + * Interface to the "GET v1/ticker/allPrices" Binance's API operation. + * Get the latest price for all symbols. + * + * @returns A latest prices array for all the symbols. + */ + getLatestPrices() { + return __awaiter(this, void 0, void 0, function* () { + const latestPricesJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/allPrices", AuthenticationMethod_1.AuthenticationMethod.NONE); + const latestPrices = []; + for (const latestPriceJson of latestPricesJson) { + latestPrices.push(new LatestPrice_1.LatestPrice(latestPriceJson)); + } + return latestPrices; + }); + } + /** + * Interface to the "GET v1/ticker/allBookTickers" Binance's API operation. + * Get the best price/quantity in the order book for all symbols. + * + * @returns The best price/quantity in the order book for all symbols. + */ + getTickers() { + return __awaiter(this, void 0, void 0, function* () { + const tickersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/allBookTickers", AuthenticationMethod_1.AuthenticationMethod.NONE); + const tickers = []; + for (const tickerJson of tickersJson) { + tickers.push(new Ticker_1.Ticker(tickerJson)); + } + return tickers; + }); + } + /** + * Interface to the "POST v3/order" Binance's API operation. Places a new order + * respecting the given constraints. + * + * @param symbol The market on which the order is to be placed. + * @param side Whether the order is a buy or sell. + * @param type Whether the order is at limit or market. + * @param timeInForce Whether the time in force should be GTC or IOC. + * @param quantity The quantity of assets that is to be moved. + * @param price The price at which the order should be filled. + * @param clientOrderId A unique ID associated with the order + * (automatically generated if not sent). + * @param stopPrice The price at which a stop order should be filled. + * @param icebergQuantity Only used with iceberg orders. + * @param responseType Set the response JSON. ACK, RESULT, or FULL; default: RESULT. + * + * @returns The just-placed order data. + */ + placeOrder(symbol, side, type, timeInForce, quantity, price, clientOrderId, stopPrice, icebergQuantity, responseType) { + return __awaiter(this, void 0, void 0, function* () { + const jsonResponse = yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["side", OrderSide_1.OrderSide[side]], ["type", OrderType_1.OrderType[type]], [ + "timeInForce", + type === OrderType_1.OrderType.MARKET || type === OrderType_1.OrderType.STOP_LOSS + ? null + : TimeInForce_1.TimeInForce[timeInForce] + ], ["quantity", quantity], [ + "price", + type === OrderType_1.OrderType.MARKET || type === OrderType_1.OrderType.STOP_LOSS + ? null + : price + ], ["newClientOrderId", clientOrderId], ["stopPrice", stopPrice], ["icebergQty", icebergQuantity], [ + "newOrderRespType", + util_1.isNullOrUndefined(responseType) + ? null + : ResponseType_1.ResponseType[responseType] + ]); + switch (responseType) { + case ResponseType_1.ResponseType.RESULT: { + return new OrderResult_1.OrderResult(jsonResponse); + } + case ResponseType_1.ResponseType.FULL: { + return new OrderFull_1.OrderFull(jsonResponse); + } + default: { + return new OrderAcknowledgement_1.OrderAcknowledgement(jsonResponse); + } + } + }); + } + /** + * Interface to the "POST v3/order/test" Binance's API operation. Places a new + * test order respecting the given constraints. + * + * @param symbol The market on which the order is to be placed. + * @param side Whether the order is a buy or sell. + * @param type Whether the order is at limit or market. + * @param timeInForce Whether the time in force should be GTC or IOC. + * @param quantity The quantity of assets that is to be moved. + * @param price The price at which the order should be filled. + * @param clientId A unique ID associated with the order. + * (automatically generated if not sent). + * @param stopPrice The price at which a stop order should be filled. + * @param icebergQuantity Only used with iceberg orders. + * @param timeout The request validity maximum time frame + * (defaults to 5000 ms). + */ + testOrder(symbol, side, type, timeInForce, quantity, price, clientId, stopPrice, icebergQuantity, timeout) { + return __awaiter(this, void 0, void 0, function* () { + yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V3, "order/test", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["side", OrderSide_1.OrderSide[side]], ["type", OrderType_1.OrderType[type]], ["timeInForce", TimeInForce_1.TimeInForce[timeInForce]], ["quantity", quantity], ["price", price], ["newClientOrderId", clientId], ["stopPrice", stopPrice], ["icebergQty", icebergQuantity], ["recvWindow", timeout]); + }); + } + /** + * Interface to the "GET v3/order" Binance's API operation. Gets a + * placed order detail given some constraints. + * + * @param symbol The market on which the order was originally placed. + * @param id The wanted order ID. + * @param clientId The wanted client given order ID (its description). + * @param timeout The request validity maximum time frame + * (defaults to 5000 ms). + * + * @return The placed order detail respecting the given constraints. + */ + getOrder(symbol, id, clientId, timeout) { + return __awaiter(this, void 0, void 0, function* () { + return new Order_1.Order(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["origClientOrderId", clientId], ["recvWindow", timeout])); + }); + } + /** + * Interface to the "DEconstE v3/order" Binance's API operation. + * Cancels a previously placed order. + * + * @param symbol The market on which the order was originally placed. + * @param id The wanted order ID. + * @param oldClientId The pre-cancel client given order ID (its description). + * @param newClientId The post-cancel order ID (automatically generated if not passed). + * @param timeout The request validity maximum time frame + * (defaults to 5000 ms). + * + * @return The just-canceled order data. + */ + cancelOrder(symbol, id, oldClientId, newClientId, timeout) { + return __awaiter(this, void 0, void 0, function* () { + return new CanceledOrderData_1.CanceledOrderData(yield this.makeRequest(HttpMethod_1.HttpMethod.DELETE, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["origClientOrderId", oldClientId], ["newClientOrderId", newClientId], ["recvWindow", timeout])); + }); + } + /** + * Interface to the "GET v3/openOrders" Binance's API operation. + * + * @param market The symbol for which we want to retrieve the open orders (if any). + * @param timeout The request validity maximum time frame (defaults to 5000 ms). + * + * @returns An array representing all of the account's open orders. + */ + getOpenOrders(market, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const openOrdersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "openOrders", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", market], ["recvWindow", timeout]); + const openOrders = []; + for (const openOrderJson of openOrdersJson) { + openOrders.push(new Order_1.Order(openOrderJson)); + } + return openOrders; + }); + } + /** + * Interface to the "GET v3/allOrders" Binance's API operation. Get all account + * orders (active, canceled, or filled). + * + * @param symbol The symbol for which we want to retrieve the orders. + * @param id The order ID from which we want to retrieve the orders + * (if set, the API will retrieve the orders with an ID greater + * or equal to the one specified, otherwise the most recent orders). + * @param limit The maximum number of returned orders. + * @param timeout The request validity maximum time frame (defaults to 5000 ms). + * + * @returns An array representing all of the account's orders in every state. + */ + getOrders(symbol, id, limit, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const ordersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "allOrders", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["limit", limit], ["recvWindow", timeout]); + const orders = []; + for (const orderJson of ordersJson) { + orders.push(new Order_1.Order(orderJson)); + } + return orders; + }); + } + /** + * Interface to the "GET v3/account" Binance's API operation. Get current + * account information. + * + * @param timeout The request validity maximum time frame (defaults to 5000 ms). + * + * @returns The current account information. + */ + getAccountData(timeout) { + return __awaiter(this, void 0, void 0, function* () { + return new AccountData_1.AccountData(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "account", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["recvWindow", timeout])); + }); + } + /** + * Interface to the "GET v3/myTrades" Binance's API operation. Get trades for + * a specific account and symbol. + * + * @param symbol The market on which the trades were originally executed. + * @param limit The maximum number of returned trades. + * @param fromId The trade's ID to start fetching from. If not given, the + * API will retrieve the most recent trades first. + * @param timeout The request validity maximum time frame (defaults to 5000 ms). + * + * @returns The account's trade list respecting the given constraints. + */ + getTrades(symbol, limit, fromId, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const tradesJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "myTrades", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["limit", limit], ["fromId", fromId], ["recvWindow", timeout]); + const trades = []; + for (const tradeJson of tradesJson) { + trades.push(new Trade_1.Trade(tradeJson)); + } + return trades; + }); + } + /** + * Interface to the "POST v1/userDataStream" Binance's API operation. + * Initializes a new data stream. + * + * @returns A listen key to be passed as a parameter when starting a + * new data stream. + */ + openUserStream() { + return __awaiter(this, void 0, void 0, function* () { + return (yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY)).listenKey; + }); + } + /** + * Interface to the "PUT v1/userDataStream" Binance's API operation. + * Pings a user data stream in order to prevent a time out. + * + * @param streamId A string representing the stream's ID + * (returned by [[openUserStream]]). + */ + keepAliveUserStream(streamId) { + return __awaiter(this, void 0, void 0, function* () { + yield this.makeRequest(HttpMethod_1.HttpMethod.PUT, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY, ["listenKey", streamId]); + }); + } + /** + * Interface to the "DEconstE v1/userDataStream" Binance's API operation. + * Closes out a user data stream. + * + * @param streamId A string representing the stream's ID + * (returned by [[openUserStream]]). + */ + closeUserStream(streamId) { + return __awaiter(this, void 0, void 0, function* () { + yield this.makeRequest(HttpMethod_1.HttpMethod.DELETE, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY, ["listenKey", streamId]); + }); + } + /** + * Initializes a web socket data stream that gives us information about a + * single symbol's order book updates. Stream keepalive is performed through + * [[keepAliveUserStream]] following the rules described + * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) + * + * @param symbol The symbol of which we want to get the order book updates. + * @param onUpdate A function to be called when a new update is received. + * @param connectionTimeout Timeout based on which the web socket connection is + * considered to be broken based on a heartbeat monitor. + * @param onLostConnection A callback to be invoked when the web socket connection + * is detected as broken. + */ + monitorOrderBook(symbol, onUpdate, connectionTimeout, onLostConnection) { + const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + symbol.toLowerCase() + "@depth", { perMessageDeflate: false }); + new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) + ? BinanceApiClient.DEFAULT_WS_TIMEOUT + : connectionTimeout, onLostConnection).handle(); + websocket.on("message", (data) => { + onUpdate(new OrderBookUpdate_1.OrderBookUpdate(JSON.parse(data))); + }); + } + /** + * Initializes a web socket data stream that gives us information about + * Kline/candlestick updates. Stream keepalive is performed through + * [[keepAliveUserStream]] following the rules described + * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) + * + * @param symbol The symbol of which we want to get the candlestick updates. + * @param interval The interval to which the requested candlestick updates + * refer to. + * @param onUpdate A function to be called when a new update is received. + * @param connectionTimeout Timeout based on which the web socket connection is + * considered to be broken based on a heartbeat monitor. + * @param onLostConnection A callback to be invoked when the web socket connection + * is detected as broken. + */ + monitorCandlesticks(symbol, interval, onUpdate, connectionTimeout, onLostConnection) { + return __awaiter(this, void 0, void 0, function* () { + const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + + symbol.toLowerCase() + + "@kline_" + + interval, { perMessageDeflate: false }); + new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) + ? BinanceApiClient.DEFAULT_WS_TIMEOUT + : connectionTimeout, onLostConnection).handle(); + websocket.on("message", (data) => { + onUpdate(new CandlestickUpdate_1.CandlestickUpdate(JSON.parse(data))); + }); + }); + } + /** + * Initializes a web socket data stream that gives us information about + * trade updates. Stream keepalive is performed through + * [[keepAliveUserStream]] following the rules described + * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) + * + * @param symbol The symbol of which we want to get the trade updates. + * @param onUpdate A function to be called when a new update is received. + * @param connectionTimeout Timeout based on which the web socket connection is + * considered to be broken based on a heartbeat monitor. + * @param onLostConnection A callback to be invoked when the web socket connection + * is detected as broken. + */ + monitorTrades(symbol, onUpdate, connectionTimeout, onLostConnection) { + const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + symbol.toLowerCase() + "@aggTrade", { perMessageDeflate: false }); + new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) + ? BinanceApiClient.DEFAULT_WS_TIMEOUT + : connectionTimeout, onLostConnection).handle(); + websocket.on("message", (data) => { + onUpdate(new TradeUpdate_1.TradeUpdate(JSON.parse(data))); + }); + } + /** + * Initializes a web socket data stream that gives us information about + * the personal account updates. Stream keepalive is performed through + * [[keepAliveUserStream]] following the rules described + * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/user-data-stream.md) + * + * @param listenKey The listen key returned when a user data stream gets + * initialized by [[openUserStream]]. + * @param onUpdate A function to be called when a new update is received. + * @param connectionTimeout Timeout based on which the web socket connection is + * considered to be broken based on a heartbeat monitor. + * @param onLostConnection A callback to be invoked when the web socket connection + * is detected as broken. + */ + monitorUser(listenKey, onUpdate, connectionTimeout, onLostConnection) { + const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + listenKey, { perMessageDeflate: false }); + new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) + ? BinanceApiClient.DEFAULT_WS_TIMEOUT + : connectionTimeout, onLostConnection).handle(); + websocket.on("message", (data) => { + const jsonData = JSON.parse(data); + switch (jsonData.e) { + case "outboundAccountInfo": { + onUpdate(new AccountUpdate_1.AccountUpdate(jsonData)); + break; + } + case "executionReport": { + onUpdate(new OrderUpdate_1.OrderUpdate(jsonData)); + break; + } + } + }); + } + /** + * Utility method that sets up and sends a request to the Binance's API, handling + * the authentication through the API key and API secret parameters possibly given + * when instantiating the client itself. + * + * @param httpMethod The HTTP method through which the specified API is accessed. + * @param accessedResource The Binance's API resource that we would like to access. + * @param apiVersion The API version at which the wanted resource can be accessed. + * @param requiredAuthentication The authentication type required in order to access the + * specified resource. + * @param parameters The parameters which the accessed resource may use in order to + * give us the expected result. + * + * @returns Either the promise of the Binance's API JSON response, or the + * JSON response if using the await construct. + */ + makeRequest(httpMethod, apiVersion, accessedResource, requiredAuthentication, ...parameters) { + return __awaiter(this, void 0, void 0, function* () { + const apiUrl = new url_1.URL(Path.join("api", apiVersion, accessedResource), "https://api.binance.com"); + for (const parameter of parameters) { + if (util_1.isNullOrUndefined(parameter[1])) { + continue; + } + apiUrl.searchParams.append(parameter[0], parameter[1].toString()); + } + const headers = this.setupAuthentication(httpMethod, apiUrl, requiredAuthentication); + try { + return yield request({ + method: HttpMethod_1.HttpMethod[httpMethod], + url: apiUrl.href, + headers: headers, + json: true + }); + } + catch (error) { + throw new ApiError_1.ApiError(error.error.code, error.error.msg); + } + }); + } + /** + * Utility method setting up the request in order to handle Binance's various + * authentication methods. + * + * @param httpMethod The HTTP method used to access the wanted resource + * (mainly used for error logging purposes). + * @param apiUrl The URL at which the wanted resource can be accessed. + * @param authenticationMethod The authentication method through which the wanted + * resource can be accessed through the specified URL. + */ + setupAuthentication(httpMethod, apiUrl, authenticationMethod) { + const headers = {}; + if (authenticationMethod === AuthenticationMethod_1.AuthenticationMethod.NONE) { + return; + } + if (util_1.isNullOrUndefined(BinanceApiClient.API_KEY)) { + throw new AuthenticationError_1.AuthenticationError(httpMethod, apiUrl, authenticationMethod); + } + headers["X-MBX-APIKEY"] = BinanceApiClient.API_KEY; + if (authenticationMethod === AuthenticationMethod_1.AuthenticationMethod.SIGNED) { + if (util_1.isNullOrUndefined(BinanceApiClient.API_SECRET)) { + throw new AuthenticationError_1.AuthenticationError(httpMethod, apiUrl, authenticationMethod); + } + apiUrl.searchParams.append("timestamp", new Date().getTime().toString()); + apiUrl.searchParams.append("signature", CryptoJs.HmacSHA256(apiUrl.searchParams.toString(), BinanceApiClient.API_SECRET).toString()); + } + return headers; + } +} +exports.BinanceApiClient = BinanceApiClient; +BinanceApiClient.WS_BASE_URL = "wss://stream.binance.com:9443/ws/"; +BinanceApiClient.DEFAULT_WS_TIMEOUT = 60000; +//# sourceMappingURL=BinanceApiClient.js.map \ No newline at end of file diff --git a/build/src/BinanceApiClient.js.map b/build/src/BinanceApiClient.js.map new file mode 100644 index 0000000..48078e2 --- /dev/null +++ b/build/src/BinanceApiClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BinanceApiClient.js","sourceRoot":"","sources":["../../src/BinanceApiClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAoE;AACpE,mDAAgD;AAChD,sCAAsC;AACtC,mDAAgD;AAChD,sEAAmE;AACnE,2CAA2C;AAC3C,6BAA6B;AAC7B,+BAAyC;AACzC,6BAA0B;AAC1B,wDAAqD;AACrD,gDAA6C;AAC7C,gDAA6C;AAE7C,kEAA+D;AAC/D,uEAAoE;AACpE,4DAAyD;AACzD,mDAAgD;AAChD,iDAA8C;AAC9C,iDAA8C;AAC9C,qDAAkD;AAClD,8EAA2E;AAC3E,wEAAqE;AACrE,8DAA2D;AAC3D,gDAA6C;AAC7C,gCAAgC;AAChC,8EAA2E;AAC3E,wFAAqF;AACrF,sEAAmE;AACnE,4EAAyE;AACzE,sEAAmE;AACnE,6DAA0D;AAC1D,uDAAoD;AACpD,4DAAyD;AACzD,wDAAqD;AACrD,+DAAwD;AAExD;;GAEG;AACH,MAAa,gBAAgB;IAQzB;;;;;OAKG;IACH,YAAY,MAAe,EAAE,SAAkB;QAC3C,gBAAgB,CAAC,OAAO,GAAG,MAAM,CAAC;QAClC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAC;IAC5C,CAAC;IAED;;OAEG;IACU,IAAI;;YACb,MAAM,IAAI,CAAC,WAAW,CAClB,uBAAU,CAAC,GAAG,EACd,uBAAU,CAAC,EAAE,EACb,MAAM,EACN,2CAAoB,CAAC,IAAI,CAC5B,CAAC;QACN,CAAC;KAAA;IAEY,eAAe;;YACxB,OAAO,IAAI,2BAAY,CACnB,MAAM,IAAI,CAAC,WAAW,CAClB,uBAAU,CAAC,GAAG,EACd,uBAAU,CAAC,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,CACf,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EAC9B,gBAAgB,CAAC,UAAU,CAC9B,CAAC,QAAQ,EAAE,CACf,CAAC;SACL;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;;AAhzBL,4CAizBC;AAhzB2B,4BAAW,GAC/B,mCAAmC,CAAC;AAChB,mCAAkB,GAAW,KAAK,CAAC"} \ No newline at end of file diff --git a/build/src/enums/ApiVersion.js b/build/src/enums/ApiVersion.js new file mode 100644 index 0000000..6e0edb5 --- /dev/null +++ b/build/src/enums/ApiVersion.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApiVersion = void 0; +/** + * Represents a single API version. + */ +var ApiVersion; +(function (ApiVersion) { + ApiVersion["V1"] = "v1"; + ApiVersion["V2"] = "v2"; + ApiVersion["V3"] = "v3"; +})(ApiVersion = exports.ApiVersion || (exports.ApiVersion = {})); +//# sourceMappingURL=ApiVersion.js.map \ No newline at end of file diff --git a/build/src/enums/ApiVersion.js.map b/build/src/enums/ApiVersion.js.map new file mode 100644 index 0000000..5b3b192 --- /dev/null +++ b/build/src/enums/ApiVersion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApiVersion.js","sourceRoot":"","sources":["../../../src/enums/ApiVersion.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,uBAAS,CAAA;IACT,uBAAS,CAAA;IACT,uBAAS,CAAA;AACX,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB"} \ No newline at end of file diff --git a/build/src/enums/AuthenticationMethod.js b/build/src/enums/AuthenticationMethod.js new file mode 100644 index 0000000..0b60dba --- /dev/null +++ b/build/src/enums/AuthenticationMethod.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AuthenticationMethod = void 0; +/** + * Represents a single API authentication method. + */ +var AuthenticationMethod; +(function (AuthenticationMethod) { + AuthenticationMethod[AuthenticationMethod["NONE"] = 0] = "NONE"; + AuthenticationMethod[AuthenticationMethod["API_KEY"] = 1] = "API_KEY"; + AuthenticationMethod[AuthenticationMethod["SIGNED"] = 2] = "SIGNED"; +})(AuthenticationMethod = exports.AuthenticationMethod || (exports.AuthenticationMethod = {})); +//# sourceMappingURL=AuthenticationMethod.js.map \ No newline at end of file diff --git a/build/src/enums/AuthenticationMethod.js.map b/build/src/enums/AuthenticationMethod.js.map new file mode 100644 index 0000000..1983f50 --- /dev/null +++ b/build/src/enums/AuthenticationMethod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AuthenticationMethod.js","sourceRoot":"","sources":["../../../src/enums/AuthenticationMethod.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,+DAAI,CAAA;IACJ,qEAAO,CAAA;IACP,mEAAM,CAAA;AACR,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"} \ No newline at end of file diff --git a/build/src/enums/CandlestickInterval.js b/build/src/enums/CandlestickInterval.js new file mode 100644 index 0000000..4b590b8 --- /dev/null +++ b/build/src/enums/CandlestickInterval.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CandlestickInterval = void 0; +/** + * Represents a single candlestick interval. + */ +var CandlestickInterval; +(function (CandlestickInterval) { + CandlestickInterval["ONE_MINUTE"] = "1m"; + CandlestickInterval["THREE_MINUTES"] = "3m"; + CandlestickInterval["FIVE_MINUTES"] = "5m"; + CandlestickInterval["FIFTEEN_MINUTES"] = "15m"; + CandlestickInterval["THIRTY_MINUTES"] = "30m"; + CandlestickInterval["ONE_HOUR"] = "1h"; + CandlestickInterval["TWO_HOURS"] = "2h"; + CandlestickInterval["FOUR_HOURS"] = "4h"; + CandlestickInterval["SIX_HOURS"] = "6h"; + CandlestickInterval["EIGHT_HOURS"] = "8h"; + CandlestickInterval["TWELVE_HOURS"] = "12h"; + CandlestickInterval["ONE_DAY"] = "1d"; + CandlestickInterval["THREE_DAYS"] = "3d"; + CandlestickInterval["ONE_WEEK"] = "1w"; + CandlestickInterval["ONE_MONTH"] = "1M"; +})(CandlestickInterval = exports.CandlestickInterval || (exports.CandlestickInterval = {})); +//# sourceMappingURL=CandlestickInterval.js.map \ No newline at end of file diff --git a/build/src/enums/CandlestickInterval.js.map b/build/src/enums/CandlestickInterval.js.map new file mode 100644 index 0000000..3ac44a4 --- /dev/null +++ b/build/src/enums/CandlestickInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CandlestickInterval.js","sourceRoot":"","sources":["../../../src/enums/CandlestickInterval.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,mBAgBX;AAhBD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,2CAAoB,CAAA;IACpB,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;IACvB,6CAAsB,CAAA;IACtB,sCAAe,CAAA;IACf,uCAAgB,CAAA;IAChB,wCAAiB,CAAA;IACjB,uCAAgB,CAAA;IAChB,yCAAkB,CAAA;IAClB,2CAAoB,CAAA;IACpB,qCAAc,CAAA;IACd,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,uCAAgB,CAAA;AAClB,CAAC,EAhBW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAgB9B"} \ No newline at end of file diff --git a/build/src/enums/FilterType.js b/build/src/enums/FilterType.js new file mode 100644 index 0000000..c21280a --- /dev/null +++ b/build/src/enums/FilterType.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FilterType = void 0; +/** + * Represents a single filter type. + */ +var FilterType; +(function (FilterType) { + FilterType[FilterType["PRICE_FILTER"] = 0] = "PRICE_FILTER"; + FilterType[FilterType["LOT_SIZE"] = 1] = "LOT_SIZE"; + FilterType[FilterType["MIN_NOTIONAL"] = 2] = "MIN_NOTIONAL"; + FilterType[FilterType["MAX_NUM_ORDERS"] = 3] = "MAX_NUM_ORDERS"; + FilterType[FilterType["MAX_ALGO_ORDERS"] = 4] = "MAX_ALGO_ORDERS"; + FilterType[FilterType["EXCHANGE_MAX_NUM_ORDERS"] = 5] = "EXCHANGE_MAX_NUM_ORDERS"; + FilterType[FilterType["EXCHANGE_MAX_ALGO_ORDERS"] = 6] = "EXCHANGE_MAX_ALGO_ORDERS"; +})(FilterType = exports.FilterType || (exports.FilterType = {})); +//# sourceMappingURL=FilterType.js.map \ No newline at end of file diff --git a/build/src/enums/FilterType.js.map b/build/src/enums/FilterType.js.map new file mode 100644 index 0000000..84db53f --- /dev/null +++ b/build/src/enums/FilterType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FilterType.js","sourceRoot":"","sources":["../../../src/enums/FilterType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,2DAAY,CAAA;IACZ,mDAAQ,CAAA;IACR,2DAAY,CAAA;IACZ,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,iFAAuB,CAAA;IACvB,mFAAwB,CAAA;AAC1B,CAAC,EARW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAQrB"} \ No newline at end of file diff --git a/build/src/enums/HttpMethod.js b/build/src/enums/HttpMethod.js new file mode 100644 index 0000000..a1d7344 --- /dev/null +++ b/build/src/enums/HttpMethod.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpMethod = void 0; +/** + * Represents a single HTTP method. + */ +var HttpMethod; +(function (HttpMethod) { + HttpMethod[HttpMethod["GET"] = 0] = "GET"; + HttpMethod[HttpMethod["POST"] = 1] = "POST"; + HttpMethod[HttpMethod["PUT"] = 2] = "PUT"; + HttpMethod[HttpMethod["DELETE"] = 3] = "DELETE"; +})(HttpMethod = exports.HttpMethod || (exports.HttpMethod = {})); +//# sourceMappingURL=HttpMethod.js.map \ No newline at end of file diff --git a/build/src/enums/HttpMethod.js.map b/build/src/enums/HttpMethod.js.map new file mode 100644 index 0000000..7bb905d --- /dev/null +++ b/build/src/enums/HttpMethod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HttpMethod.js","sourceRoot":"","sources":["../../../src/enums/HttpMethod.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yCAAG,CAAA;IACH,2CAAI,CAAA;IACJ,yCAAG,CAAA;IACH,+CAAM,CAAA;AACR,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"} \ No newline at end of file diff --git a/build/src/enums/OrderExecutionStatus.js b/build/src/enums/OrderExecutionStatus.js new file mode 100644 index 0000000..f53e7b5 --- /dev/null +++ b/build/src/enums/OrderExecutionStatus.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderExecutionStatus = void 0; +/** + * Represents a single order execution status. + */ +var OrderExecutionStatus; +(function (OrderExecutionStatus) { + OrderExecutionStatus[OrderExecutionStatus["NEW"] = 0] = "NEW"; + OrderExecutionStatus[OrderExecutionStatus["CANCELED"] = 1] = "CANCELED"; + OrderExecutionStatus[OrderExecutionStatus["REPLACED"] = 2] = "REPLACED"; + OrderExecutionStatus[OrderExecutionStatus["REJECTED"] = 3] = "REJECTED"; + OrderExecutionStatus[OrderExecutionStatus["TRADE"] = 4] = "TRADE"; + OrderExecutionStatus[OrderExecutionStatus["EXPIRED"] = 5] = "EXPIRED"; +})(OrderExecutionStatus = exports.OrderExecutionStatus || (exports.OrderExecutionStatus = {})); +//# sourceMappingURL=OrderExecutionStatus.js.map \ No newline at end of file diff --git a/build/src/enums/OrderExecutionStatus.js.map b/build/src/enums/OrderExecutionStatus.js.map new file mode 100644 index 0000000..5335a22 --- /dev/null +++ b/build/src/enums/OrderExecutionStatus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderExecutionStatus.js","sourceRoot":"","sources":["../../../src/enums/OrderExecutionStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,6DAAG,CAAA;IACH,uEAAQ,CAAA;IACR,uEAAQ,CAAA;IACR,uEAAQ,CAAA;IACR,iEAAK,CAAA;IACL,qEAAO,CAAA;AACT,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"} \ No newline at end of file diff --git a/build/src/enums/OrderRejectionMotive.js b/build/src/enums/OrderRejectionMotive.js new file mode 100644 index 0000000..dd7671c --- /dev/null +++ b/build/src/enums/OrderRejectionMotive.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderRejectionMotive = void 0; +/** + * Represents a single order rejection motive. + */ +var OrderRejectionMotive; +(function (OrderRejectionMotive) { + OrderRejectionMotive[OrderRejectionMotive["NONE"] = 0] = "NONE"; + OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_INSTRUMENT"] = 1] = "UNKNOWN_INSTRUMENT"; + OrderRejectionMotive[OrderRejectionMotive["MARKET_CLOSED"] = 2] = "MARKET_CLOSED"; + OrderRejectionMotive[OrderRejectionMotive["PRICE_QTY_EXCEED_HARD_LIMITS"] = 3] = "PRICE_QTY_EXCEED_HARD_LIMITS"; + OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_ORDER"] = 4] = "UNKNOWN_ORDER"; + OrderRejectionMotive[OrderRejectionMotive["DUPLICATE_ORDER"] = 5] = "DUPLICATE_ORDER"; + OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_ACCOUNT"] = 6] = "UNKNOWN_ACCOUNT"; + OrderRejectionMotive[OrderRejectionMotive["INSUFFICIENT_BALANCE"] = 7] = "INSUFFICIENT_BALANCE"; + OrderRejectionMotive[OrderRejectionMotive["ACCOUNT_INACTIVE"] = 8] = "ACCOUNT_INACTIVE"; + OrderRejectionMotive[OrderRejectionMotive["ACCOUNT_CANNOT_SETTLE"] = 9] = "ACCOUNT_CANNOT_SETTLE"; +})(OrderRejectionMotive = exports.OrderRejectionMotive || (exports.OrderRejectionMotive = {})); +//# sourceMappingURL=OrderRejectionMotive.js.map \ No newline at end of file diff --git a/build/src/enums/OrderRejectionMotive.js.map b/build/src/enums/OrderRejectionMotive.js.map new file mode 100644 index 0000000..3e5c92e --- /dev/null +++ b/build/src/enums/OrderRejectionMotive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderRejectionMotive.js","sourceRoot":"","sources":["../../../src/enums/OrderRejectionMotive.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,+DAAI,CAAA;IACJ,2FAAkB,CAAA;IAClB,iFAAa,CAAA;IACb,+GAA4B,CAAA;IAC5B,iFAAa,CAAA;IACb,qFAAe,CAAA;IACf,qFAAe,CAAA;IACf,+FAAoB,CAAA;IACpB,uFAAgB,CAAA;IAChB,iGAAqB,CAAA;AACvB,CAAC,EAXW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAW/B"} \ No newline at end of file diff --git a/build/src/enums/OrderSide.js b/build/src/enums/OrderSide.js new file mode 100644 index 0000000..d235164 --- /dev/null +++ b/build/src/enums/OrderSide.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderSide = void 0; +/** + * Represents a single order side. + */ +var OrderSide; +(function (OrderSide) { + OrderSide[OrderSide["BUY"] = 0] = "BUY"; + OrderSide[OrderSide["SELL"] = 1] = "SELL"; +})(OrderSide = exports.OrderSide || (exports.OrderSide = {})); +//# sourceMappingURL=OrderSide.js.map \ No newline at end of file diff --git a/build/src/enums/OrderSide.js.map b/build/src/enums/OrderSide.js.map new file mode 100644 index 0000000..ec0e8ad --- /dev/null +++ b/build/src/enums/OrderSide.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderSide.js","sourceRoot":"","sources":["../../../src/enums/OrderSide.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,yCAAI,CAAA;AACN,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"} \ No newline at end of file diff --git a/build/src/enums/OrderStatus.js b/build/src/enums/OrderStatus.js new file mode 100644 index 0000000..94da694 --- /dev/null +++ b/build/src/enums/OrderStatus.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderStatus = void 0; +/** + * Represents a single order status. + */ +var OrderStatus; +(function (OrderStatus) { + OrderStatus[OrderStatus["NEW"] = 0] = "NEW"; + OrderStatus[OrderStatus["PARTIALLY_FILLED"] = 1] = "PARTIALLY_FILLED"; + OrderStatus[OrderStatus["FILLED"] = 2] = "FILLED"; + OrderStatus[OrderStatus["CANCELED"] = 3] = "CANCELED"; + OrderStatus[OrderStatus["PENDING_CANCEL"] = 4] = "PENDING_CANCEL"; + OrderStatus[OrderStatus["REJECTED"] = 5] = "REJECTED"; + OrderStatus[OrderStatus["EXPIRED"] = 6] = "EXPIRED"; +})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); +//# sourceMappingURL=OrderStatus.js.map \ No newline at end of file diff --git a/build/src/enums/OrderStatus.js.map b/build/src/enums/OrderStatus.js.map new file mode 100644 index 0000000..85dcc1d --- /dev/null +++ b/build/src/enums/OrderStatus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderStatus.js","sourceRoot":"","sources":["../../../src/enums/OrderStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,2CAAG,CAAA;IACH,qEAAgB,CAAA;IAChB,iDAAM,CAAA;IACN,qDAAQ,CAAA;IACR,iEAAc,CAAA;IACd,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACT,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB"} \ No newline at end of file diff --git a/build/src/enums/OrderType.js b/build/src/enums/OrderType.js new file mode 100644 index 0000000..58a9956 --- /dev/null +++ b/build/src/enums/OrderType.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderType = void 0; +/** + * Represents a single order type. + */ +var OrderType; +(function (OrderType) { + OrderType[OrderType["LIMIT"] = 0] = "LIMIT"; + OrderType[OrderType["MARKET"] = 1] = "MARKET"; + OrderType[OrderType["STOP_LOSS"] = 2] = "STOP_LOSS"; + OrderType[OrderType["STOP_LOSS_LIMIT"] = 3] = "STOP_LOSS_LIMIT"; + OrderType[OrderType["TAKE_PROFIT"] = 4] = "TAKE_PROFIT"; + OrderType[OrderType["TAKE_PROFIT_LIMIT"] = 5] = "TAKE_PROFIT_LIMIT"; + OrderType[OrderType["LIMIT_MAKER"] = 6] = "LIMIT_MAKER"; +})(OrderType = exports.OrderType || (exports.OrderType = {})); +//# sourceMappingURL=OrderType.js.map \ No newline at end of file diff --git a/build/src/enums/OrderType.js.map b/build/src/enums/OrderType.js.map new file mode 100644 index 0000000..01be6a8 --- /dev/null +++ b/build/src/enums/OrderType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderType.js","sourceRoot":"","sources":["../../../src/enums/OrderType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,2CAAK,CAAA;IACL,6CAAM,CAAA;IACN,mDAAS,CAAA;IACT,+DAAe,CAAA;IACf,uDAAW,CAAA;IACX,mEAAiB,CAAA;IACjB,uDAAW,CAAA;AACb,CAAC,EARW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAQpB"} \ No newline at end of file diff --git a/build/src/enums/RateLimitInterval.js b/build/src/enums/RateLimitInterval.js new file mode 100644 index 0000000..4521198 --- /dev/null +++ b/build/src/enums/RateLimitInterval.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RateLimitInterval = void 0; +var RateLimitInterval; +(function (RateLimitInterval) { + RateLimitInterval[RateLimitInterval["SECOND"] = 0] = "SECOND"; + RateLimitInterval[RateLimitInterval["MINUTE"] = 1] = "MINUTE"; + RateLimitInterval[RateLimitInterval["DAY"] = 2] = "DAY"; +})(RateLimitInterval = exports.RateLimitInterval || (exports.RateLimitInterval = {})); +//# sourceMappingURL=RateLimitInterval.js.map \ No newline at end of file diff --git a/build/src/enums/RateLimitInterval.js.map b/build/src/enums/RateLimitInterval.js.map new file mode 100644 index 0000000..702506b --- /dev/null +++ b/build/src/enums/RateLimitInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateLimitInterval.js","sourceRoot":"","sources":["../../../src/enums/RateLimitInterval.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAM,CAAA;IACN,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"} \ No newline at end of file diff --git a/build/src/enums/RateLimitType.js b/build/src/enums/RateLimitType.js new file mode 100644 index 0000000..ead8844 --- /dev/null +++ b/build/src/enums/RateLimitType.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RateLimitType = void 0; +/** + * Represents a single rate limit type. + */ +var RateLimitType; +(function (RateLimitType) { + RateLimitType[RateLimitType["REQUESTS"] = 0] = "REQUESTS"; + RateLimitType[RateLimitType["ORDERS"] = 1] = "ORDERS"; +})(RateLimitType = exports.RateLimitType || (exports.RateLimitType = {})); +//# sourceMappingURL=RateLimitType.js.map \ No newline at end of file diff --git a/build/src/enums/RateLimitType.js.map b/build/src/enums/RateLimitType.js.map new file mode 100644 index 0000000..f18b03b --- /dev/null +++ b/build/src/enums/RateLimitType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateLimitType.js","sourceRoot":"","sources":["../../../src/enums/RateLimitType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,yDAAQ,CAAA;IACR,qDAAM,CAAA;AACR,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"} \ No newline at end of file diff --git a/build/src/enums/ResponseType.js b/build/src/enums/ResponseType.js new file mode 100644 index 0000000..d4f24f1 --- /dev/null +++ b/build/src/enums/ResponseType.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponseType = void 0; +/** + * Represents a single response type. + */ +var ResponseType; +(function (ResponseType) { + ResponseType[ResponseType["ACKNOWLEDGEMENT"] = 0] = "ACKNOWLEDGEMENT"; + ResponseType[ResponseType["RESULT"] = 1] = "RESULT"; + ResponseType[ResponseType["FULL"] = 2] = "FULL"; +})(ResponseType = exports.ResponseType || (exports.ResponseType = {})); +//# sourceMappingURL=ResponseType.js.map \ No newline at end of file diff --git a/build/src/enums/ResponseType.js.map b/build/src/enums/ResponseType.js.map new file mode 100644 index 0000000..29759cc --- /dev/null +++ b/build/src/enums/ResponseType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ResponseType.js","sourceRoot":"","sources":["../../../src/enums/ResponseType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,qEAAe,CAAA;IACf,mDAAM,CAAA;IACN,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"} \ No newline at end of file diff --git a/build/src/enums/SymbolStatus.js b/build/src/enums/SymbolStatus.js new file mode 100644 index 0000000..ced5a3e --- /dev/null +++ b/build/src/enums/SymbolStatus.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SymbolStatus = void 0; +/** + * Represents a single symbol status. + */ +var SymbolStatus; +(function (SymbolStatus) { + SymbolStatus[SymbolStatus["PRE_TRADING"] = 0] = "PRE_TRADING"; + SymbolStatus[SymbolStatus["TRADING"] = 1] = "TRADING"; + SymbolStatus[SymbolStatus["POST_TRADING"] = 2] = "POST_TRADING"; + SymbolStatus[SymbolStatus["END_OF_DAY"] = 3] = "END_OF_DAY"; + SymbolStatus[SymbolStatus["HALT"] = 4] = "HALT"; + SymbolStatus[SymbolStatus["AUCTION_MATCH"] = 5] = "AUCTION_MATCH"; + SymbolStatus[SymbolStatus["BREAK"] = 6] = "BREAK"; +})(SymbolStatus = exports.SymbolStatus || (exports.SymbolStatus = {})); +//# sourceMappingURL=SymbolStatus.js.map \ No newline at end of file diff --git a/build/src/enums/SymbolStatus.js.map b/build/src/enums/SymbolStatus.js.map new file mode 100644 index 0000000..6681c3a --- /dev/null +++ b/build/src/enums/SymbolStatus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SymbolStatus.js","sourceRoot":"","sources":["../../../src/enums/SymbolStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,6DAAW,CAAA;IACX,qDAAO,CAAA;IACP,+DAAY,CAAA;IACZ,2DAAU,CAAA;IACV,+CAAI,CAAA;IACJ,iEAAa,CAAA;IACb,iDAAK,CAAA;AACP,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB"} \ No newline at end of file diff --git a/build/src/enums/SymbolType.js b/build/src/enums/SymbolType.js new file mode 100644 index 0000000..ff19284 --- /dev/null +++ b/build/src/enums/SymbolType.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SymbolType = void 0; +/** + * Represents a single symbol type. + */ +var SymbolType; +(function (SymbolType) { + SymbolType[SymbolType["SPOT"] = 0] = "SPOT"; +})(SymbolType = exports.SymbolType || (exports.SymbolType = {})); +//# sourceMappingURL=SymbolType.js.map \ No newline at end of file diff --git a/build/src/enums/SymbolType.js.map b/build/src/enums/SymbolType.js.map new file mode 100644 index 0000000..122e9c3 --- /dev/null +++ b/build/src/enums/SymbolType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SymbolType.js","sourceRoot":"","sources":["../../../src/enums/SymbolType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,2CAAI,CAAA;AACN,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB"} \ No newline at end of file diff --git a/build/src/enums/TimeInForce.js b/build/src/enums/TimeInForce.js new file mode 100644 index 0000000..7c0aaad --- /dev/null +++ b/build/src/enums/TimeInForce.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimeInForce = void 0; +/** + * Represents a single time in force. + */ +var TimeInForce; +(function (TimeInForce) { + TimeInForce[TimeInForce["GTC"] = 0] = "GTC"; + TimeInForce[TimeInForce["IOC"] = 1] = "IOC"; + TimeInForce[TimeInForce["FOK"] = 2] = "FOK"; +})(TimeInForce = exports.TimeInForce || (exports.TimeInForce = {})); +//# sourceMappingURL=TimeInForce.js.map \ No newline at end of file diff --git a/build/src/enums/TimeInForce.js.map b/build/src/enums/TimeInForce.js.map new file mode 100644 index 0000000..125d370 --- /dev/null +++ b/build/src/enums/TimeInForce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TimeInForce.js","sourceRoot":"","sources":["../../../src/enums/TimeInForce.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,2CAAG,CAAA;IACH,2CAAG,CAAA;IACH,2CAAG,CAAA;AACL,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"} \ No newline at end of file diff --git a/build/src/errors/ApiError.js b/build/src/errors/ApiError.js new file mode 100644 index 0000000..53726d6 --- /dev/null +++ b/build/src/errors/ApiError.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApiError = void 0; +/** + * Thrown when Binance's API response is identified as an error. + * Both code and message are taken from the response message itself + * and are returned from the client directly from Binance, without + * alterations. + */ +class ApiError extends Error { + constructor(code, message) { + super("Error code: " + code + ", message: " + message); + } +} +exports.ApiError = ApiError; +//# sourceMappingURL=ApiError.js.map \ No newline at end of file diff --git a/build/src/errors/ApiError.js.map b/build/src/errors/ApiError.js.map new file mode 100644 index 0000000..9359d42 --- /dev/null +++ b/build/src/errors/ApiError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["../../../src/errors/ApiError.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAa,QAAS,SAAQ,KAAK;IACjC,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,cAAc,GAAG,IAAI,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAJD,4BAIC"} \ No newline at end of file diff --git a/build/src/errors/AuthenticationError.js b/build/src/errors/AuthenticationError.js new file mode 100644 index 0000000..a5cf7f9 --- /dev/null +++ b/build/src/errors/AuthenticationError.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AuthenticationError = void 0; +const AuthenticationMethod_1 = require("../enums/AuthenticationMethod"); +const HttpMethod_1 = require("../enums/HttpMethod"); +/** + * Thrown when the API key, API secret or both parameters are found to be + * null or undefined, but are needed in order to set up the request to access + * a specific resource. + */ +class AuthenticationError extends Error { + constructor(httpMethod, apiUrl, requiredAuthentication) { + super("Endpoint [ " + + HttpMethod_1.HttpMethod[httpMethod] + + " ]@[ " + + apiUrl.href.split("?")[0] + + " ] requires " + + "an API key " + + (requiredAuthentication == AuthenticationMethod_1.AuthenticationMethod.SIGNED + ? "and API secret " + : "") + + "in order to be accessed"); + } +} +exports.AuthenticationError = AuthenticationError; +//# sourceMappingURL=AuthenticationError.js.map \ No newline at end of file diff --git a/build/src/errors/AuthenticationError.js.map b/build/src/errors/AuthenticationError.js.map new file mode 100644 index 0000000..628aaf7 --- /dev/null +++ b/build/src/errors/AuthenticationError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AuthenticationError.js","sourceRoot":"","sources":["../../../src/errors/AuthenticationError.ts"],"names":[],"mappings":";;;AAAA,wEAAqE;AACrE,oDAAiD;AAGjD;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YACE,UAAsB,EACtB,MAAW,EACX,sBAA4C;QAE5C,KAAK,CACH,aAAa;YACX,uBAAU,CAAC,UAAU,CAAC;YACtB,OAAO;YACP,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACzB,cAAc;YACd,aAAa;YACb,CAAC,sBAAsB,IAAI,2CAAoB,CAAC,MAAM;gBACpD,CAAC,CAAC,iBAAiB;gBACnB,CAAC,CAAC,EAAE,CAAC;YACP,yBAAyB,CAC5B,CAAC;IACJ,CAAC;CACF;AAnBD,kDAmBC"} \ No newline at end of file diff --git a/build/src/models/account/AccountData.js b/build/src/models/account/AccountData.js new file mode 100644 index 0000000..bbdb4fc --- /dev/null +++ b/build/src/models/account/AccountData.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountData = void 0; +/** + * Represents a single account data + */ +const Balance_1 = require("./Balance"); +class AccountData { + constructor(json) { + this._makerCommission = json.makerCommission; + this._takerCommission = json.takerCommission; + this._buyerCommission = json.buyerCommission; + this._sellerCommission = json.sellerCommission; + this._canTrade = json.canTrade; + this._canWithdraw = json.canWithdraw; + this._canDeposit = json.canDeposit; + this._balances = []; + for (const balanceJson of json.balances) { + this._balances.push(new Balance_1.Balance(balanceJson)); + } + } + get makerCommission() { + return this._makerCommission; + } + set makerCommission(value) { + this._makerCommission = value; + } + get takerCommission() { + return this._takerCommission; + } + set takerCommission(value) { + this._takerCommission = value; + } + get buyerCommission() { + return this._buyerCommission; + } + set buyerCommission(value) { + this._buyerCommission = value; + } + get sellerCommission() { + return this._sellerCommission; + } + set sellerCommission(value) { + this._sellerCommission = value; + } + get canTrade() { + return this._canTrade; + } + set canTrade(value) { + this._canTrade = value; + } + get canWithdraw() { + return this._canWithdraw; + } + set canWithdraw(value) { + this._canWithdraw = value; + } + get canDeposit() { + return this._canDeposit; + } + set canDeposit(value) { + this._canDeposit = value; + } + get balances() { + return this._balances; + } + set balances(value) { + this._balances = value; + } +} +exports.AccountData = AccountData; +//# sourceMappingURL=AccountData.js.map \ No newline at end of file diff --git a/build/src/models/account/AccountData.js.map b/build/src/models/account/AccountData.js.map new file mode 100644 index 0000000..3ee15d8 --- /dev/null +++ b/build/src/models/account/AccountData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountData.js","sourceRoot":"","sources":["../../../../src/models/account/AccountData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,uCAAoC;AAEpC,MAAa,WAAW;IAUpB,YAAY,IAAS;QACjB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAEnC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,QAAQ,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC;SACjD;IACL,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,IAAI,gBAAgB,CAAC,KAAa;QAC9B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAc;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAC,KAAc;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAc;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AAxFD,kCAwFC"} \ No newline at end of file diff --git a/build/src/models/account/Balance.js b/build/src/models/account/Balance.js new file mode 100644 index 0000000..73b2e8c --- /dev/null +++ b/build/src/models/account/Balance.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Balance = void 0; +/** + * Represents a single balance. + */ +class Balance { + constructor(json) { + this._asset = json.asset || json.a; + this._available = json.free || json.available || json.f; + this._locked = json.locked || json.l; + } + get asset() { + return this._asset; + } + set asset(value) { + this._asset = value; + } + get available() { + return this._available; + } + set available(value) { + this._available = value; + } + get locked() { + return this._locked; + } + set locked(value) { + this._locked = value; + } +} +exports.Balance = Balance; +//# sourceMappingURL=Balance.js.map \ No newline at end of file diff --git a/build/src/models/account/Balance.js.map b/build/src/models/account/Balance.js.map new file mode 100644 index 0000000..db81cdf --- /dev/null +++ b/build/src/models/account/Balance.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Balance.js","sourceRoot":"","sources":["../../../../src/models/account/Balance.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,OAAO;IAOhB,YAAa,IAAS;QAElB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;IAEzC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAa;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;CAEJ;AAvCD,0BAuCC"} \ No newline at end of file diff --git a/build/src/models/candlestick/Candlestick.js b/build/src/models/candlestick/Candlestick.js new file mode 100644 index 0000000..9a8423d --- /dev/null +++ b/build/src/models/candlestick/Candlestick.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Candlestick = void 0; +/** + * Represents a single candlestick. + */ +class Candlestick { + constructor(json) { + this._openingTime = new Date(json[0]); + this._openingPrice = json[1]; + this._highestPrice = json[2]; + this._lowestPrice = json[3]; + this._closurePrice = json[4]; + this._baseAssetVolume = json[5]; + this._closureTime = new Date(json[6]); + this._quoteAssetVolume = json[7]; + this._tradesCount = json[8]; + this._boughtBaseAssetVolume = json[9]; + this._boughtQuoteAssetVolume = json[10]; + } + get openingTime() { + return this._openingTime; + } + set openingTime(value) { + this._openingTime = value; + } + get openingPrice() { + return this._openingPrice; + } + set openingPrice(value) { + this._openingPrice = value; + } + get highestPrice() { + return this._highestPrice; + } + set highestPrice(value) { + this._highestPrice = value; + } + get lowestPrice() { + return this._lowestPrice; + } + set lowestPrice(value) { + this._lowestPrice = value; + } + get closurePrice() { + return this._closurePrice; + } + set closurePrice(value) { + this._closurePrice = value; + } + get baseAssetVolume() { + return this._baseAssetVolume; + } + set baseAssetVolume(value) { + this._baseAssetVolume = value; + } + get closureTime() { + return this._closureTime; + } + set closureTime(value) { + this._closureTime = value; + } + get quoteAssetVolume() { + return this._quoteAssetVolume; + } + set quoteAssetVolume(value) { + this._quoteAssetVolume = value; + } + get tradesCount() { + return this._tradesCount; + } + set tradesCount(value) { + this._tradesCount = value; + } + get boughtBaseAssetVolume() { + return this._boughtBaseAssetVolume; + } + set boughtBaseAssetVolume(value) { + this._boughtBaseAssetVolume = value; + } + get boughtQuoteAssetVolume() { + return this._boughtQuoteAssetVolume; + } + set boughtQuoteAssetVolume(value) { + this._boughtQuoteAssetVolume = value; + } +} +exports.Candlestick = Candlestick; +//# sourceMappingURL=Candlestick.js.map \ No newline at end of file diff --git a/build/src/models/candlestick/Candlestick.js.map b/build/src/models/candlestick/Candlestick.js.map new file mode 100644 index 0000000..4288abf --- /dev/null +++ b/build/src/models/candlestick/Candlestick.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Candlestick.js","sourceRoot":"","sources":["../../../../src/models/candlestick/Candlestick.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAcpB,YAAa,IAAS;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAE,CAAC,CAAE,CAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAE,CAAC,CAAE,CAAE,CAAC;QAC1C,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC9B,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QACxC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAE,EAAE,CAAE,CAAC;IAE9C,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAW;QACxB,IAAI,CAAC,YAAY,GAAG,KA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,CAAC;IAED,IAAI,qBAAqB;QACrB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACvC,CAAC;IAED,IAAI,qBAAqB,CAAE,KAAa;QACpC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACxC,CAAC;IAED,IAAI,sBAAsB;QACtB,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACxC,CAAC;IAED,IAAI,sBAAsB,CAAE,KAAa;QACrC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACzC,CAAC;CAEJ;AAtHD,kCAsHC"} \ No newline at end of file diff --git a/build/src/models/depth/LatestPrice.js b/build/src/models/depth/LatestPrice.js new file mode 100644 index 0000000..9ad358e --- /dev/null +++ b/build/src/models/depth/LatestPrice.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LatestPrice = void 0; +/** + * Represents a single latest price for a particular symbol. + */ +class LatestPrice { + constructor(json) { + this._symbol = json.symbol; + this._price = json.price; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } +} +exports.LatestPrice = LatestPrice; +//# sourceMappingURL=LatestPrice.js.map \ No newline at end of file diff --git a/build/src/models/depth/LatestPrice.js.map b/build/src/models/depth/LatestPrice.js.map new file mode 100644 index 0000000..28c42cf --- /dev/null +++ b/build/src/models/depth/LatestPrice.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LatestPrice.js","sourceRoot":"","sources":["../../../../src/models/depth/LatestPrice.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAKpB,YAAa,IAAS;QAClB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AA1BD,kCA0BC"} \ No newline at end of file diff --git a/build/src/models/depth/OrderBook.js b/build/src/models/depth/OrderBook.js new file mode 100644 index 0000000..129162f --- /dev/null +++ b/build/src/models/depth/OrderBook.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderBook = void 0; +const PlacedOrder_1 = require("../order/PlacedOrder"); +/** + * Represents a single order book. + */ +class OrderBook { + constructor(json) { + this._asks = []; + for (const askJson of json.asks) { + this._asks.push(new PlacedOrder_1.PlacedOrder(askJson)); + } + this._bids = []; + for (const bidJson of json.bids) { + this._bids.push(new PlacedOrder_1.PlacedOrder(bidJson)); + } + } + get bids() { + return this._bids; + } + set bids(value) { + this._bids = value; + } + get asks() { + return this._asks; + } + set asks(value) { + this._asks = value; + } +} +exports.OrderBook = OrderBook; +//# sourceMappingURL=OrderBook.js.map \ No newline at end of file diff --git a/build/src/models/depth/OrderBook.js.map b/build/src/models/depth/OrderBook.js.map new file mode 100644 index 0000000..77f7e11 --- /dev/null +++ b/build/src/models/depth/OrderBook.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderBook.js","sourceRoot":"","sources":["../../../../src/models/depth/OrderBook.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD;;GAEG;AACH,MAAa,SAAS;IAIlB,YAAY,IAAS;QACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;QAED,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;IACL,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AA/BD,8BA+BC"} \ No newline at end of file diff --git a/build/src/models/filter/LotSizeFilter.js b/build/src/models/filter/LotSizeFilter.js new file mode 100644 index 0000000..bd8851b --- /dev/null +++ b/build/src/models/filter/LotSizeFilter.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LotSizeFilter = void 0; +/** + * Represents a single lot size filter. + */ +class LotSizeFilter { + constructor(json) { + this._minimumQuantity = json.minQty; + this._maximumQuantity = json.maxQty; + this._stepSize = json.stepSize; + } + get minimumQuantity() { + return this._minimumQuantity; + } + set minimumQuantity(value) { + this._minimumQuantity = value; + } + get maximumQuantity() { + return this._maximumQuantity; + } + set maximumQuantity(value) { + this._maximumQuantity = value; + } + get stepSize() { + return this._stepSize; + } + set stepSize(value) { + this._stepSize = value; + } +} +exports.LotSizeFilter = LotSizeFilter; +//# sourceMappingURL=LotSizeFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/LotSizeFilter.js.map b/build/src/models/filter/LotSizeFilter.js.map new file mode 100644 index 0000000..6673432 --- /dev/null +++ b/build/src/models/filter/LotSizeFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LotSizeFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/LotSizeFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,aAAa;IAMtB,YAAa,IAAS;QAElB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEnC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAtCD,sCAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/MaxAlgoOrdersFilter.js b/build/src/models/filter/MaxAlgoOrdersFilter.js new file mode 100644 index 0000000..5c5eaeb --- /dev/null +++ b/build/src/models/filter/MaxAlgoOrdersFilter.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MaxAlgoOrdersFilter = void 0; +/** + * Represents a single maximum algo order number filter. + */ +class MaxAlgoOrdersFilter { + constructor(json) { + this._value = json.limit; + } + get value() { + return this._value; + } + set value(value) { + this._value = value; + } +} +exports.MaxAlgoOrdersFilter = MaxAlgoOrdersFilter; +//# sourceMappingURL=MaxAlgoOrdersFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MaxAlgoOrdersFilter.js.map b/build/src/models/filter/MaxAlgoOrdersFilter.js.map new file mode 100644 index 0000000..ee13b99 --- /dev/null +++ b/build/src/models/filter/MaxAlgoOrdersFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MaxAlgoOrdersFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MaxAlgoOrdersFilter.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,mBAAmB;IAI5B,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,kDAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/MaxOrdersFilter.js b/build/src/models/filter/MaxOrdersFilter.js new file mode 100644 index 0000000..3c652f3 --- /dev/null +++ b/build/src/models/filter/MaxOrdersFilter.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MaxOrdersFilter = void 0; +/** + * Represents a single maximum order number filter. + */ +class MaxOrdersFilter { + constructor(json) { + this._value = json.limit; + } + get value() { + return this._value; + } + set value(value) { + this._value = value; + } +} +exports.MaxOrdersFilter = MaxOrdersFilter; +//# sourceMappingURL=MaxOrdersFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MaxOrdersFilter.js.map b/build/src/models/filter/MaxOrdersFilter.js.map new file mode 100644 index 0000000..9fe5b5f --- /dev/null +++ b/build/src/models/filter/MaxOrdersFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MaxOrdersFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MaxOrdersFilter.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,eAAe;IAIxB,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,0CAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/MinimumNotionalFilter.js b/build/src/models/filter/MinimumNotionalFilter.js new file mode 100644 index 0000000..f878c3d --- /dev/null +++ b/build/src/models/filter/MinimumNotionalFilter.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MinimumNotionalFilter = void 0; +/** + * Represents a single minimum notional filter. + */ +class MinimumNotionalFilter { + constructor(json) { + this._value = json.minNotional; + } + get value() { + return this._value; + } + set value(value) { + this._value = value; + } +} +exports.MinimumNotionalFilter = MinimumNotionalFilter; +//# sourceMappingURL=MinimumNotionalFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MinimumNotionalFilter.js.map b/build/src/models/filter/MinimumNotionalFilter.js.map new file mode 100644 index 0000000..b735496 --- /dev/null +++ b/build/src/models/filter/MinimumNotionalFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MinimumNotionalFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MinimumNotionalFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,qBAAqB;IAI9B,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;IACnC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,sDAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/PriceFilter.js b/build/src/models/filter/PriceFilter.js new file mode 100644 index 0000000..d0a8492 --- /dev/null +++ b/build/src/models/filter/PriceFilter.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PriceFilter = void 0; +/** + * Represents a single price filter. + */ +class PriceFilter { + constructor(json) { + this._minimumPrice = json.minPrice; + this._maximumPrice = json.maxPrice; + this._tickSize = json.tickSize; + } + get minimumPrice() { + return this._minimumPrice; + } + set minimumPrice(value) { + this._minimumPrice = value; + } + get maximumPrice() { + return this._maximumPrice; + } + set maximumPrice(value) { + this._maximumPrice = value; + } + get tickSize() { + return this._tickSize; + } + set tickSize(value) { + this._tickSize = value; + } +} +exports.PriceFilter = PriceFilter; +//# sourceMappingURL=PriceFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/PriceFilter.js.map b/build/src/models/filter/PriceFilter.js.map new file mode 100644 index 0000000..bf827c8 --- /dev/null +++ b/build/src/models/filter/PriceFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PriceFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/PriceFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,WAAW;IAMpB,YAAa,IAAS;QAElB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEnC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY,CAAE,KAAa;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY,CAAE,KAAa;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAtCD,kCAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/RateLimit.js b/build/src/models/filter/RateLimit.js new file mode 100644 index 0000000..0adad9c --- /dev/null +++ b/build/src/models/filter/RateLimit.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RateLimit = void 0; +const RateLimitType_1 = require("../../enums/RateLimitType"); +const RateLimitInterval_1 = require("../../enums/RateLimitInterval"); +class RateLimit { + constructor(json) { + this._type = RateLimitType_1.RateLimitType[json.rateLimitType]; + this._interval = RateLimitInterval_1.RateLimitInterval[json.interval]; + this._value = json.limit; + } + get type() { + return this._type; + } + set type(value) { + this._type = value; + } + get interval() { + return this._interval; + } + set interval(value) { + this._interval = value; + } + get value() { + return this._value; + } + set value(value) { + this._value = value; + } +} +exports.RateLimit = RateLimit; +//# sourceMappingURL=RateLimit.js.map \ No newline at end of file diff --git a/build/src/models/filter/RateLimit.js.map b/build/src/models/filter/RateLimit.js.map new file mode 100644 index 0000000..8215767 --- /dev/null +++ b/build/src/models/filter/RateLimit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateLimit.js","sourceRoot":"","sources":["../../../../src/models/filter/RateLimit.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,qEAAkE;AAElE,MAAa,SAAS;IAMlB,YAAa,IAAS;QAElB,IAAI,CAAC,KAAK,GAAG,6BAAa,CAAE,IAAI,CAAC,aAAuB,CAAE,CAAC;QAC3D,IAAI,CAAC,SAAS,GAAG,qCAAiB,CAAE,IAAI,CAAC,QAAkB,CAAE,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAE7B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAE,KAAoB;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAtCD,8BAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/abstraction/ExchangeFilter.js b/build/src/models/filter/abstraction/ExchangeFilter.js new file mode 100644 index 0000000..3d40167 --- /dev/null +++ b/build/src/models/filter/abstraction/ExchangeFilter.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ExchangeFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/abstraction/ExchangeFilter.js.map b/build/src/models/filter/abstraction/ExchangeFilter.js.map new file mode 100644 index 0000000..4d0476c --- /dev/null +++ b/build/src/models/filter/abstraction/ExchangeFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExchangeFilter.js","sourceRoot":"","sources":["../../../../../src/models/filter/abstraction/ExchangeFilter.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/build/src/models/filter/abstraction/SymbolFilter.js b/build/src/models/filter/abstraction/SymbolFilter.js new file mode 100644 index 0000000..fdadd9a --- /dev/null +++ b/build/src/models/filter/abstraction/SymbolFilter.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=SymbolFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/abstraction/SymbolFilter.js.map b/build/src/models/filter/abstraction/SymbolFilter.js.map new file mode 100644 index 0000000..2faffd3 --- /dev/null +++ b/build/src/models/filter/abstraction/SymbolFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SymbolFilter.js","sourceRoot":"","sources":["../../../../../src/models/filter/abstraction/SymbolFilter.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/build/src/models/misc/ExchangeInfo.js b/build/src/models/misc/ExchangeInfo.js new file mode 100644 index 0000000..267419e --- /dev/null +++ b/build/src/models/misc/ExchangeInfo.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExchangeInfo = void 0; +const RateLimit_1 = require("../filter/RateLimit"); +const Symbol_1 = require("./Symbol"); +const FilterType_1 = require("../../enums/FilterType"); +const MaxOrdersFilter_1 = require("../filter/MaxOrdersFilter"); +const MaxAlgoOrdersFilter_1 = require("../filter/MaxAlgoOrdersFilter"); +/** + * Represents a single exchange info. + */ +class ExchangeInfo { + constructor(json) { + this._timezone = json.timezone; + this._serverTime = new Date(json.serverTime); + this._rateLimits = []; + for (const jsonRateLimit of json.rateLimits) { + this._rateLimits.push(new RateLimit_1.RateLimit(jsonRateLimit)); + } + this._filters = []; + for (const jsonFilter of json.exchangeFilters) { + let filter; + switch (FilterType_1.FilterType[jsonFilter.filterType]) { + case FilterType_1.FilterType.EXCHANGE_MAX_NUM_ORDERS: { + filter = new MaxOrdersFilter_1.MaxOrdersFilter(jsonFilter); + break; + } + case FilterType_1.FilterType.EXCHANGE_MAX_ALGO_ORDERS: { + filter = new MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter(jsonFilter); + break; + } + default: { + filter = null; + } + } + this._filters.push(filter); + } + this._symbols = []; + for (const jsonSymbol of json.symbols) { + this._symbols.push(new Symbol_1.Symbol(jsonSymbol)); + } + } + get timezone() { + return this._timezone; + } + set timezone(value) { + this._timezone = value; + } + get serverTime() { + return this._serverTime; + } + set serverTime(value) { + this._serverTime = value; + } + get rateLimits() { + return this._rateLimits; + } + set rateLimits(value) { + this._rateLimits = value; + } + get filters() { + return this._filters; + } + set filters(value) { + this._filters = value; + } + get symbols() { + return this._symbols; + } + set symbols(value) { + this._symbols = value; + } +} +exports.ExchangeInfo = ExchangeInfo; +//# sourceMappingURL=ExchangeInfo.js.map \ No newline at end of file diff --git a/build/src/models/misc/ExchangeInfo.js.map b/build/src/models/misc/ExchangeInfo.js.map new file mode 100644 index 0000000..81e41e1 --- /dev/null +++ b/build/src/models/misc/ExchangeInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExchangeInfo.js","sourceRoot":"","sources":["../../../../src/models/misc/ExchangeInfo.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,qCAAkC;AAClC,uDAAoD;AAEpD,+DAA4D;AAC5D,uEAAoE;AAEpE;;GAEG;AACH,MAAa,YAAY;IAOrB,YAAY,IAAS;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAE7C,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,KAAK,MAAM,aAAa,IAAI,IAAI,CAAC,UAAU,EAAE;YACzC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,qBAAS,CAAC,aAAa,CAAC,CAAC,CAAC;SACvD;QAED,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,eAAe,EAAE;YAC3C,IAAI,MAAsB,CAAC;YAC3B,QAAQ,uBAAU,CAAC,UAAU,CAAC,UAAoB,CAAC,EAAE;gBACjD,KAAK,uBAAU,CAAC,uBAAuB,CAAC,CAAC;oBACrC,MAAM,GAAG,IAAI,iCAAe,CAAC,UAAU,CAAC,CAAC;oBACzC,MAAM;iBACT;gBACD,KAAK,uBAAU,CAAC,wBAAwB,CAAC,CAAC;oBACtC,MAAM,GAAG,IAAI,yCAAmB,CAAC,UAAU,CAAC,CAAC;oBAC7C,MAAM;iBACT;gBACD,OAAO,CAAC,CAAC;oBACL,MAAM,GAAG,IAAI,CAAC;iBACjB;aACJ;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;QAED,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,eAAM,CAAC,UAAU,CAAC,CAAC,CAAC;SAC9C;IACL,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAa;QACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAW;QACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAkB;QAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAuB;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAe;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACJ;AAhFD,oCAgFC"} \ No newline at end of file diff --git a/build/src/models/misc/Symbol.js b/build/src/models/misc/Symbol.js new file mode 100644 index 0000000..4b7e7c1 --- /dev/null +++ b/build/src/models/misc/Symbol.js @@ -0,0 +1,112 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Symbol = void 0; +const SymbolStatus_1 = require("../../enums/SymbolStatus"); +const OrderType_1 = require("../../enums/OrderType"); +const PriceFilter_1 = require("../filter/PriceFilter"); +const FilterType_1 = require("../../enums/FilterType"); +const LotSizeFilter_1 = require("../filter/LotSizeFilter"); +const MinimumNotionalFilter_1 = require("../filter/MinimumNotionalFilter"); +const MaxOrdersFilter_1 = require("../filter/MaxOrdersFilter"); +const MaxAlgoOrdersFilter_1 = require("../filter/MaxAlgoOrdersFilter"); +/** + * Represents a single symbol. + */ +class Symbol { + constructor(json) { + this._name = json.symbol; + this._status = SymbolStatus_1.SymbolStatus[json.status]; + this._baseAsset = json.baseAsset; + this._baseAssetPrecision = json.baseAssetPrecision; + this._quoteAsset = json.quoteAsset; + this._quoteAssetPrecision = json.quotePrecision; + this._icebergAllowed = json.icebergAllowed; + this._orderTypes = []; + for (const orderType of json.orderTypes) { + this._orderTypes.push(OrderType_1.OrderType[orderType]); + } + this._filters = []; + for (const jsonFilter of json.filters) { + let filter; + switch (FilterType_1.FilterType[jsonFilter.filterType]) { + case FilterType_1.FilterType.PRICE_FILTER: { + filter = new PriceFilter_1.PriceFilter(jsonFilter); + break; + } + case FilterType_1.FilterType.LOT_SIZE: { + filter = new LotSizeFilter_1.LotSizeFilter(jsonFilter); + break; + } + case FilterType_1.FilterType.MIN_NOTIONAL: { + filter = new MinimumNotionalFilter_1.MinimumNotionalFilter(jsonFilter); + break; + } + case FilterType_1.FilterType.MAX_NUM_ORDERS: { + filter = new MaxOrdersFilter_1.MaxOrdersFilter(jsonFilter); + break; + } + case FilterType_1.FilterType.MAX_ALGO_ORDERS: { + filter = new MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter(jsonFilter); + break; + } + } + this._filters.push(filter); + } + } + get name() { + return this._name; + } + set name(value) { + this._name = value; + } + get status() { + return this._status; + } + set status(value) { + this._status = value; + } + get baseAsset() { + return this._baseAsset; + } + set baseAsset(value) { + this._baseAsset = value; + } + get baseAssetPrecision() { + return this._baseAssetPrecision; + } + set baseAssetPrecision(value) { + this._baseAssetPrecision = value; + } + get quoteAsset() { + return this._quoteAsset; + } + set quoteAsset(value) { + this._quoteAsset = value; + } + get quoteAssetPrecision() { + return this._quoteAssetPrecision; + } + set quoteAssetPrecision(value) { + this._quoteAssetPrecision = value; + } + get orderTypes() { + return this._orderTypes; + } + set orderTypes(value) { + this._orderTypes = value; + } + get icebergAllowed() { + return this._icebergAllowed; + } + set icebergAllowed(value) { + this._icebergAllowed = value; + } + get filters() { + return this._filters; + } + set filters(value) { + this._filters = value; + } +} +exports.Symbol = Symbol; +//# sourceMappingURL=Symbol.js.map \ No newline at end of file diff --git a/build/src/models/misc/Symbol.js.map b/build/src/models/misc/Symbol.js.map new file mode 100644 index 0000000..8d0448f --- /dev/null +++ b/build/src/models/misc/Symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Symbol.js","sourceRoot":"","sources":["../../../../src/models/misc/Symbol.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,qDAAkD;AAClD,uDAAoD;AACpD,uDAAoD;AACpD,2DAAwD;AACxD,2EAAwE;AACxE,+DAA4D;AAC5D,uEAAoE;AAGpE;;GAEG;AACH,MAAa,MAAM;IAWf,YAAY,IAAS;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,2BAAY,CAAC,IAAI,CAAC,MAAmC,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,eAAe,G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} \ No newline at end of file diff --git a/build/src/models/order/CanceledOrderData.js b/build/src/models/order/CanceledOrderData.js new file mode 100644 index 0000000..a30f5ed --- /dev/null +++ b/build/src/models/order/CanceledOrderData.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CanceledOrderData = void 0; +/** + * Represents a single canceled order data. + */ +class CanceledOrderData { + constructor(json) { + this._symbol = json.symbol; + this._id = json.orderId; + this._oldclientId = json.origClientOrderId; + this._clientId = json.clientOrderId; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get oldclientId() { + return this._oldclientId; + } + set oldclientId(value) { + this._oldclientId = value; + } + get clientId() { + return this._clientId; + } + set clientId(value) { + this._clientId = value; + } +} +exports.CanceledOrderData = CanceledOrderData; +//# sourceMappingURL=CanceledOrderData.js.map \ No newline at end of file diff --git a/build/src/models/order/CanceledOrderData.js.map b/build/src/models/order/CanceledOrderData.js.map new file mode 100644 index 0000000..f5872b0 --- /dev/null +++ b/build/src/models/order/CanceledOrderData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CanceledOrderData.js","sourceRoot":"","sources":["../../../../src/models/order/CanceledOrderData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,iBAAiB;IAO1B,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;IAExC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAE,KAAa;QACjB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAhDD,8CAgDC"} \ No newline at end of file diff --git a/build/src/models/order/Order.js b/build/src/models/order/Order.js new file mode 100644 index 0000000..c10f204 --- /dev/null +++ b/build/src/models/order/Order.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Order = void 0; +const OrderStatus_1 = require("../../enums/OrderStatus"); +const TimeInForce_1 = require("../../enums/TimeInForce"); +const OrderType_1 = require("../../enums/OrderType"); +const OrderSide_1 = require("../../enums/OrderSide"); +/** + * Represents a single open order. + */ +class Order { + constructor(json) { + this._symbol = json.symbol; + this._id = json.orderId; + this._clientId = json.clientOrderId; + this._price = json.price; + this._originalQuantity = json.origQty; + this._executedQuantity = json.executedQty; + this._status = OrderStatus_1.OrderStatus[json.status]; + this._timeInForce = + TimeInForce_1.TimeInForce[json.timeInForce]; + this._type = OrderType_1.OrderType[json.type]; + this._side = OrderSide_1.OrderSide[json.side]; + this._stopPrice = json.stopPrice; + this._icebergQuantity = json.icebergQty; + this._timestamp = new Date(json.time); + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get clientId() { + return this._clientId; + } + set clientId(value) { + this._clientId = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get originalQuantity() { + return this._originalQuantity; + } + set originalQuantity(value) { + this._originalQuantity = value; + } + get executedQuantity() { + return this._executedQuantity; + } + set executedQuantity(value) { + this._executedQuantity = value; + } + get status() { + return this._status; + } + set status(value) { + this._status = value; + } + get timeInForce() { + return this._timeInForce; + } + set timeInForce(value) { + this._timeInForce = value; + } + get type() { + return this._type; + } + set type(value) { + this._type = value; + } + get side() { + return this._side; + } + set side(value) { + this._side = value; + } + get stopPrice() { + return this._stopPrice; + } + set stopPrice(value) { + this._stopPrice = value; + } + get icebergQuantity() { + return this._icebergQuantity; + } + set icebergQuantity(value) { + this._icebergQuantity = value; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } +} +exports.Order = Order; +//# sourceMappingURL=Order.js.map \ No newline at end of file diff --git a/build/src/models/order/Order.js.map b/build/src/models/order/Order.js.map new file mode 100644 index 0000000..5d0fb55 --- /dev/null +++ b/build/src/models/order/Order.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Order.js","sourceRoot":"","sources":["../../../../src/models/order/Order.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AACtD,yDAAsD;AACtD,qDAAkD;AAClD,qDAAkD;AAElD;;GAEG;AACH,MAAa,KAAK;IAed,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,yBAAW,CAAC,IAAI,CAAC,MAAkC,CAAC,CAAC;QACpE,IAAI,CAAC,YAAY;YACb,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BAAgB,CAAC,KAAa;QAC9B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAkB;QACzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAC,KAAkB;QAC9B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAa;QACvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAW;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CACJ;AAvID,sBAuIC"} \ No newline at end of file diff --git a/build/src/models/order/OrderAcknowledgement.js b/build/src/models/order/OrderAcknowledgement.js new file mode 100644 index 0000000..91641bf --- /dev/null +++ b/build/src/models/order/OrderAcknowledgement.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderAcknowledgement = void 0; +/** + * Represents a single placed order data. + */ +class OrderAcknowledgement { + constructor(json) { + this._symbol = json.symbol; + this._id = json.orderId; + this._clientId = json.clientOrderId; + this._timestamp = new Date(json.transactTime); + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get clientId() { + return this._clientId; + } + set clientId(value) { + this._clientId = value; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } +} +exports.OrderAcknowledgement = OrderAcknowledgement; +//# sourceMappingURL=OrderAcknowledgement.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderAcknowledgement.js.map b/build/src/models/order/OrderAcknowledgement.js.map new file mode 100644 index 0000000..66adbce --- /dev/null +++ b/build/src/models/order/OrderAcknowledgement.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderAcknowledgement.js","sourceRoot":"","sources":["../../../../src/models/order/OrderAcknowledgement.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,oBAAoB;IAO7B,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,YAAY,CAAE,CAAC;IAEpD,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAE,KAAa;QACjB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAW;QACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CAEJ;AAhDD,oDAgDC"} \ No newline at end of file diff --git a/build/src/models/order/OrderFull.js b/build/src/models/order/OrderFull.js new file mode 100644 index 0000000..74df78a --- /dev/null +++ b/build/src/models/order/OrderFull.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderFull = void 0; +const OrderResult_1 = require("./OrderResult"); +const PlacedOrderFill_1 = require("./PlacedOrderFill"); +class OrderFull { + constructor(json) { + this._result = new OrderResult_1.OrderResult(json); + this._fills = []; + for (const jsonFill of json.fills) { + this._fills.push(new PlacedOrderFill_1.PlacedOrderFill(jsonFill)); + } + } + get result() { + return this._result; + } + set result(value) { + this._result = value; + } + get fills() { + return this._fills; + } + set fills(value) { + this._fills = value; + } +} +exports.OrderFull = OrderFull; +//# sourceMappingURL=OrderFull.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderFull.js.map b/build/src/models/order/OrderFull.js.map new file mode 100644 index 0000000..037f071 --- /dev/null +++ b/build/src/models/order/OrderFull.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderFull.js","sourceRoot":"","sources":["../../../../src/models/order/OrderFull.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD,MAAa,SAAS;IAIlB,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,KAAK,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;SACnD;IACL,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAkB;QACzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAC,KAAwB;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CACJ;AA5BD,8BA4BC"} \ No newline at end of file diff --git a/build/src/models/order/OrderResult.js b/build/src/models/order/OrderResult.js new file mode 100644 index 0000000..b3c0f95 --- /dev/null +++ b/build/src/models/order/OrderResult.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderResult = void 0; +const OrderStatus_1 = require("../../enums/OrderStatus"); +const TimeInForce_1 = require("../../enums/TimeInForce"); +const OrderType_1 = require("../../enums/OrderType"); +const OrderSide_1 = require("../../enums/OrderSide"); +class OrderResult { + constructor(json) { + this._symbol = json.symbol; + this._orderId = json.orderId; + this._clientOrderId = json.clientOrderId; + this._timestamp = new Date(json.transactTime); + this._price = json.price; + this._originalQuantity = json.origQty; + this._executedQuantity = json.executedQty; + this._status = OrderStatus_1.OrderStatus[json.status]; + this._timeInForce = + TimeInForce_1.TimeInForce[json.timeInForce]; + this._type = OrderType_1.OrderType[json.type]; + this._side = OrderSide_1.OrderSide[json.side]; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get orderId() { + return this._orderId; + } + set orderId(value) { + this._orderId = value; + } + get clientOrderId() { + return this._clientOrderId; + } + set clientOrderId(value) { + this._clientOrderId = value; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get originalQuantity() { + return this._originalQuantity; + } + set originalQuantity(value) { + this._originalQuantity = value; + } + get executedQuantity() { + return this._executedQuantity; + } + set executedQuantity(value) { + this._executedQuantity = value; + } + get status() { + return this._status; + } + set status(value) { + this._status = value; + } + get timeInForce() { + return this._timeInForce; + } + set timeInForce(value) { + this._timeInForce = value; + } + get type() { + return this._type; + } + set type(value) { + this._type = value; + } + get side() { + return this._side; + } + set side(value) { + this._side = value; + } +} +exports.OrderResult = OrderResult; +//# sourceMappingURL=OrderResult.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderResult.js.map b/build/src/models/order/OrderResult.js.map new file mode 100644 index 0000000..4c0b08e --- /dev/null +++ b/build/src/models/order/OrderResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderResult.js","sourceRoot":"","sources":["../../../../src/models/order/OrderResult.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AACtD,yDAAsD;AACtD,qDAAkD;AAClD,qDAAkD;AAElD,MAAa,WAAW;IAapB,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,yBAAW,CAAC,I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CAAC;IAED,IAAI,gBAAgB,CAAC,KAAa;QAC9B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAkB;QACzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAC,KAAkB;QAC9B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AAnHD,kCAmHC"} \ No newline at end of file diff --git a/build/src/models/order/PlacedOrder.js b/build/src/models/order/PlacedOrder.js new file mode 100644 index 0000000..c638a40 --- /dev/null +++ b/build/src/models/order/PlacedOrder.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PlacedOrder = void 0; +/** + * Represents a single already placed order. + */ +class PlacedOrder { + constructor(json) { + this._price = json[0]; + this._quantity = json[1]; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get quantity() { + return this._quantity; + } + set quantity(value) { + this._quantity = value; + } +} +exports.PlacedOrder = PlacedOrder; +//# sourceMappingURL=PlacedOrder.js.map \ No newline at end of file diff --git a/build/src/models/order/PlacedOrder.js.map b/build/src/models/order/PlacedOrder.js.map new file mode 100644 index 0000000..308bbc6 --- /dev/null +++ b/build/src/models/order/PlacedOrder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlacedOrder.js","sourceRoot":"","sources":["../../../../src/models/order/PlacedOrder.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAKpB,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AA1BD,kCA0BC"} \ No newline at end of file diff --git a/build/src/models/order/PlacedOrderFill.js b/build/src/models/order/PlacedOrderFill.js new file mode 100644 index 0000000..302de0e --- /dev/null +++ b/build/src/models/order/PlacedOrderFill.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PlacedOrderFill = void 0; +/** + * Represents a single placed order fill. + */ +class PlacedOrderFill { + constructor(json) { + this._quantity = json.qty; + this._price = json.price; + this._commission = json.commission; + this._commissionAsset = json.commissionAsset; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get quantity() { + return this._quantity; + } + set quantity(value) { + this._quantity = value; + } + get commission() { + return this._commission; + } + set commission(value) { + this._commission = value; + } + get commissionAsset() { + return this._commissionAsset; + } + set commissionAsset(value) { + this._commissionAsset = value; + } +} +exports.PlacedOrderFill = PlacedOrderFill; +//# sourceMappingURL=PlacedOrderFill.js.map \ No newline at end of file diff --git a/build/src/models/order/PlacedOrderFill.js.map b/build/src/models/order/PlacedOrderFill.js.map new file mode 100644 index 0000000..1747259 --- /dev/null +++ b/build/src/models/order/PlacedOrderFill.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlacedOrderFill.js","sourceRoot":"","sources":["../../../../src/models/order/PlacedOrderFill.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,eAAe;IAOxB,YAAa,IAAS;QAElB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;IAEjD,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAE,KAAa;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;CAEJ;AAhDD,0CAgDC"} \ No newline at end of file diff --git a/build/src/models/ticker/Ticker.js b/build/src/models/ticker/Ticker.js new file mode 100644 index 0000000..ba555f9 --- /dev/null +++ b/build/src/models/ticker/Ticker.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Ticker = void 0; +/** + * Represents a single ticker. + */ +class Ticker { + constructor(json) { + this._symbol = json.symbol; + this._bidPrice = json.bidPrice; + this._bidQuantity = json.bidQty; + this._askPrice = json.askPrice; + this._askQuantity = json.askQty; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get bidPrice() { + return this._bidPrice; + } + set bidPrice(value) { + this._bidPrice = value; + } + get bidQuantity() { + return this._bidQuantity; + } + set bidQuantity(value) { + this._bidQuantity = value; + } + get askPrice() { + return this._askPrice; + } + set askPrice(value) { + this._askPrice = value; + } + get askQuantity() { + return this._askQuantity; + } + set askQuantity(value) { + this._askQuantity = value; + } +} +exports.Ticker = Ticker; +//# sourceMappingURL=Ticker.js.map \ No newline at end of file diff --git a/build/src/models/ticker/Ticker.js.map b/build/src/models/ticker/Ticker.js.map new file mode 100644 index 0000000..23a4482 --- /dev/null +++ b/build/src/models/ticker/Ticker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Ticker.js","sourceRoot":"","sources":["../../../../src/models/ticker/Ticker.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,MAAM;IAQf,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;IAEpC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;CAEJ;AA1DD,wBA0DC"} \ No newline at end of file diff --git a/build/src/models/ticker/TickerStatistics.js b/build/src/models/ticker/TickerStatistics.js new file mode 100644 index 0000000..4fbb824 --- /dev/null +++ b/build/src/models/ticker/TickerStatistics.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TickerStatistics = void 0; +/** + * Represents a single 24-hr ticker statistics collection. + */ +class TickerStatistics { + constructor(json) { + this._priceChange = json.priceChange; + this._priceChangePercentage = json.priceChangePercent; + this._weightedAveragePrice = json.weightedAvgPrice; + this._previousClosurePrice = json.prevClosePrice; + this._lastPrice = json.lastPrice; + this._bidPrice = json.bidPrice; + this._askPrice = json.askPrice; + this._openingPrice = json.openPrice; + this._highestPrice = json.highPrice; + this._lowestPrice = json.lowPrice; + this._volume = json.volume; + this._openingTime = new Date(json.openTime); + this._closureTime = new Date(json.closeTime); + this._firstTradeId = json.firstId; + this._lastTradeId = json.lastId; + this._tradesCount = json.count; + } + get priceChange() { + return this._priceChange; + } + set priceChange(value) { + this._priceChange = value; + } + get priceChangePercentage() { + return this._priceChangePercentage; + } + set priceChangePercentage(value) { + this._priceChangePercentage = value; + } + get weightedAveragePrice() { + return this._weightedAveragePrice; + } + set weightedAveragePrice(value) { + this._weightedAveragePrice = value; + } + get previousClosurePrice() { + return this._previousClosurePrice; + } + set previousClosurePrice(value) { + this._previousClosurePrice = value; + } + get lastPrice() { + return this._lastPrice; + } + set lastPrice(value) { + this._lastPrice = value; + } + get bidPrice() { + return this._bidPrice; + } + set bidPrice(value) { + this._bidPrice = value; + } + get askPrice() { + return this._askPrice; + } + set askPrice(value) { + this._askPrice = value; + } + get openingPrice() { + return this._openingPrice; + } + set openingPrice(value) { + this._openingPrice = value; + } + get highestPrice() { + return this._highestPrice; + } + set highestPrice(value) { + this._highestPrice = value; + } + get lowestPrice() { + return this._lowestPrice; + } + set lowestPrice(value) { + this._lowestPrice = value; + } + get volume() { + return this._volume; + } + set volume(value) { + this._volume = value; + } + get openingTime() { + return this._openingTime; + } + set openingTime(value) { + this._openingTime = value; + } + get closureTime() { + return this._closureTime; + } + set closureTime(value) { + this._closureTime = value; + } + get firstTradeId() { + return this._firstTradeId; + } + set firstTradeId(value) { + this._firstTradeId = value; + } + get lastTradeId() { + return this._lastTradeId; + } + set lastTradeId(value) { + this._lastTradeId = value; + } + get tradesCount() { + return this._tradesCount; + } + set tradesCount(value) { + this._tradesCount = value; + } +} +exports.TickerStatistics = TickerStatistics; +//# sourceMappingURL=TickerStatistics.js.map \ No newline at end of file diff --git a/build/src/models/ticker/TickerStatistics.js.map b/build/src/models/ticker/TickerStatistics.js.map new file mode 100644 index 0000000..991e95e --- /dev/null +++ b/build/src/models/ticker/TickerStatistics.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TickerStatistics.js","sourceRoot":"","sources":["../../../../src/models/ticker/TickerStatistics.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,gBAAgB;IAmBzB,YAAa,IAAS;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;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,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAW;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAW;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY,CAAE,KAAa;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;CAEJ;AAxKD,4CAwKC"} \ No newline at end of file diff --git a/build/src/models/trade/Trade.js b/build/src/models/trade/Trade.js new file mode 100644 index 0000000..313a83a --- /dev/null +++ b/build/src/models/trade/Trade.js @@ -0,0 +1,82 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Trade = void 0; +/** + * Represents a single trade. + */ +class Trade { + constructor(json) { + this._id = json.id; + this._orderId = json.orderId; + this._price = json.price; + this._quantity = json.qty; + this._commission = json.commission; + this._commissionAsset = json.commissionAsset; + this._timestamp = new Date(json.time); + this._buyer = json.isBuyer; + this._maker = json.isMaker; + this._bestMatch = json.isBestMatch; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get orderId() { + return this._orderId; + } + set orderId(value) { + this._orderId = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get quantity() { + return this._quantity; + } + set quantity(value) { + this._quantity = value; + } + get commission() { + return this._commission; + } + set commission(value) { + this._commission = value; + } + get commissionAsset() { + return this._commissionAsset; + } + set commissionAsset(value) { + this._commissionAsset = value; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get buyer() { + return this._buyer; + } + set buyer(value) { + this._buyer = value; + } + get maker() { + return this._maker; + } + set maker(value) { + this._maker = value; + } + get bestMatch() { + return this._bestMatch; + } + set bestMatch(value) { + this._bestMatch = value; + } +} +exports.Trade = Trade; +//# sourceMappingURL=Trade.js.map \ No newline at end of file diff --git a/build/src/models/trade/Trade.js.map b/build/src/models/trade/Trade.js.map new file mode 100644 index 0000000..434715e --- /dev/null +++ b/build/src/models/trade/Trade.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Trade.js","sourceRoot":"","sources":["../../../../src/models/trade/Trade.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,KAAK;IAad,YAAa,IAAS;QAElB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,IAAI,CAAE,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;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C;IAED,IAAI,KAAK,CAAE,KAAc;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAc;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAc;QACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CAEJ;AA5GD,sBA4GC"} \ No newline at end of file diff --git a/build/src/models/websocket/account/AccountUpdate.js b/build/src/models/websocket/account/AccountUpdate.js new file mode 100644 index 0000000..bf1b179 --- /dev/null +++ b/build/src/models/websocket/account/AccountUpdate.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountUpdate = void 0; +/** + * Represents a single account update. + */ +const Balance_1 = require("../../account/Balance"); +class AccountUpdate { + constructor(json) { + this._timestamp = new Date(json.E); + this._balances = []; + for (const balanceJson of json.B) { + this._balances.push(new Balance_1.Balance(balanceJson)); + } + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get balances() { + return this._balances; + } + set balances(value) { + this._balances = value; + } +} +exports.AccountUpdate = AccountUpdate; +//# sourceMappingURL=AccountUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/account/AccountUpdate.js.map b/build/src/models/websocket/account/AccountUpdate.js.map new file mode 100644 index 0000000..92c6f1f --- /dev/null +++ b/build/src/models/websocket/account/AccountUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/account/AccountUpdate.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mDAAgD;AAEhD,MAAa,aAAa;IAItB,YAAY,IAAS;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEnC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,CAAC,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC;SACjD;IACL,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAW;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AA5BD,sCA4BC"} \ No newline at end of file diff --git a/build/src/models/websocket/candlestick/CandlestickUpdate.js b/build/src/models/websocket/candlestick/CandlestickUpdate.js new file mode 100644 index 0000000..c62f6d2 --- /dev/null +++ b/build/src/models/websocket/candlestick/CandlestickUpdate.js @@ -0,0 +1,138 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CandlestickUpdate = void 0; +/** + * Represents a single candlestick update. + */ +class CandlestickUpdate { + constructor(json) { + this._timestamp = new Date(json.E); + this._symbol = json.s; + this._openingTime = new Date(json.k.t); + this._openingPrice = json.k.o; + this._highestPrice = json.k.h; + this._lowestPrice = json.k.l; + this._closurePrice = json.k.c; + this._baseAssetVolume = json.k.v; + this._closureTime = new Date(json.k.T); + this._quoteAssetVolume = json.k.q; + this._tradesCount = json.k.n; + this._boughtBaseAssetVolume = json.k.V; + this._boughtQuoteAssetVolume = json.k.Q; + this._firstTradeId = json.k.f; + this._lastTradeId = json.k.L; + this._interval = json.k.i; + this._final = json.k.x; + this._activeBuyVolume = json.k.V; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get openingTime() { + return this._openingTime; + } + set openingTime(value) { + this._openingTime = value; + } + get openingPrice() { + return this._openingPrice; + } + set openingPrice(value) { + this._openingPrice = value; + } + get highestPrice() { + return this._highestPrice; + } + set highestPrice(value) { + this._highestPrice = value; + } + get lowestPrice() { + return this._lowestPrice; + } + set lowestPrice(value) { + this._lowestPrice = value; + } + get closurePrice() { + return this._closurePrice; + } + set closurePrice(value) { + this._closurePrice = value; + } + get baseAssetVolume() { + return this._baseAssetVolume; + } + set baseAssetVolume(value) { + this._baseAssetVolume = value; + } + get closureTime() { + return this._closureTime; + } + set closureTime(value) { + this._closureTime = value; + } + get quoteAssetVolume() { + return this._quoteAssetVolume; + } + set quoteAssetVolume(value) { + this._quoteAssetVolume = value; + } + get tradesCount() { + return this._tradesCount; + } + set tradesCount(value) { + this._tradesCount = value; + } + get boughtBaseAssetVolume() { + return this._boughtBaseAssetVolume; + } + set boughtBaseAssetVolume(value) { + this._boughtBaseAssetVolume = value; + } + get boughtQuoteAssetVolume() { + return this._boughtQuoteAssetVolume; + } + set boughtQuoteAssetVolume(value) { + this._boughtQuoteAssetVolume = value; + } + get firstTradeId() { + return this._firstTradeId; + } + set firstTradeId(value) { + this._firstTradeId = value; + } + get lastTradeId() { + return this._lastTradeId; + } + set lastTradeId(value) { + this._lastTradeId = value; + } + get interval() { + return this._interval; + } + set interval(value) { + this._interval = value; + } + get final() { + return this._final; + } + set final(value) { + this._final = value; + } + get activeBuyVolume() { + return this._activeBuyVolume; + } + set activeBuyVolume(value) { + this._activeBuyVolume = value; + } +} +exports.CandlestickUpdate = CandlestickUpdate; +//# sourceMappingURL=CandlestickUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/candlestick/CandlestickUpdate.js.map b/build/src/models/websocket/candlestick/CandlestickUpdate.js.map new file mode 100644 index 0000000..67f6afe --- /dev/null +++ b/build/src/models/websocket/candlestick/CandlestickUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CandlestickUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/candlestick/CandlestickUpdate.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,iBAAiB;IAqB1B,YAAa,IAAS;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;QACzC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,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Aa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAA0B;QACpC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAc;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;CAEJ;AA5LD,8CA4LC"} \ No newline at end of file diff --git a/build/src/models/websocket/depth/OrderBookUpdate.js b/build/src/models/websocket/depth/OrderBookUpdate.js new file mode 100644 index 0000000..f2d2049 --- /dev/null +++ b/build/src/models/websocket/depth/OrderBookUpdate.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderBookUpdate = void 0; +const PlacedOrder_1 = require("../../order/PlacedOrder"); +/** + * Represents a single order book update. + */ +class OrderBookUpdate { + constructor(json) { + this._timestamp = new Date(json.E); + this._symbol = json.s; + this._id = json.u; + this._asks = []; + for (const askJson of json.a) { + this._asks.push(new PlacedOrder_1.PlacedOrder(askJson)); + } + this._bids = []; + for (const bidJson of json.b) { + this._bids.push(new PlacedOrder_1.PlacedOrder(bidJson)); + } + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get asks() { + return this._asks; + } + set asks(value) { + this._asks = value; + } + get bids() { + return this._bids; + } + set bids(value) { + this._bids = value; + } +} +exports.OrderBookUpdate = OrderBookUpdate; +//# sourceMappingURL=OrderBookUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/depth/OrderBookUpdate.js.map b/build/src/models/websocket/depth/OrderBookUpdate.js.map new file mode 100644 index 0000000..aa5f092 --- /dev/null +++ b/build/src/models/websocket/depth/OrderBookUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderBookUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/depth/OrderBookUpdate.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAEtD;;GAEG;AACH,MAAa,eAAe;IAOxB,YAAY,IAAS;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;QAElB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,CAAC,EAAE;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;QAED,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,CAAC,EAAE;YAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;IACL,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAW;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAC,KAAa;QAChB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AA9DD,0CA8DC"} \ No newline at end of file diff --git a/build/src/models/websocket/order/OrderUpdate.js b/build/src/models/websocket/order/OrderUpdate.js new file mode 100644 index 0000000..9fc7766 --- /dev/null +++ b/build/src/models/websocket/order/OrderUpdate.js @@ -0,0 +1,129 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OrderUpdate = void 0; +const OrderSide_1 = require("../../../enums/OrderSide"); +const OrderType_1 = require("../../../enums/OrderType"); +const TimeInForce_1 = require("../../../enums/TimeInForce"); +const OrderExecutionStatus_1 = require("../../../enums/OrderExecutionStatus"); +const OrderStatus_1 = require("../../../enums/OrderStatus"); +const OrderRejectionMotive_1 = require("../../../enums/OrderRejectionMotive"); +class OrderUpdate { + constructor(json) { + this._timestamp = new Date(json.E); + this._symbol = json.s; + this._newClientId = json.c; + this._side = OrderSide_1.OrderSide[json.S]; + this._type = OrderType_1.OrderType[json.o]; + this._timeInForce = TimeInForce_1.TimeInForce[json.f]; + this._quantity = parseFloat(json.q); + this._price = parseFloat(json.p); + this._executionStatus = + OrderExecutionStatus_1.OrderExecutionStatus[json.x]; + this._status = OrderStatus_1.OrderStatus[json.X]; + this._rejectionMotive = + OrderRejectionMotive_1.OrderRejectionMotive[json.r]; + this._id = json.i; + this._lastFilledTradePrice = parseFloat(json.L); + this._lastExecutedQuantity = parseFloat(json.l); + this._cumulativeFilledQuantity = parseFloat(json.z); + this._placedAt = new Date(json.T); + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get newClientId() { + return this._newClientId; + } + set newClientId(value) { + this._newClientId = value; + } + get side() { + return this._side; + } + set side(value) { + this._side = value; + } + get type() { + return this._type; + } + set type(value) { + this._type = value; + } + get timeInForce() { + return this._timeInForce; + } + set timeInForce(value) { + this._timeInForce = value; + } + get quantity() { + return this._quantity; + } + set quantity(value) { + this._quantity = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get executionStatus() { + return this._executionStatus; + } + set executionStatus(value) { + this._executionStatus = value; + } + get status() { + return this._status; + } + set status(value) { + this._status = value; + } + get rejectionMotive() { + return this._rejectionMotive; + } + set rejectionMotive(value) { + this._rejectionMotive = value; + } + get id() { + return this._id; + } + set id(value) { + this._id = value; + } + get lastFilledTradePrice() { + return this._lastFilledTradePrice; + } + set lastFilledTradePrice(value) { + this._lastFilledTradePrice = value; + } + get lastExecutedQuantity() { + return this._lastExecutedQuantity; + } + set lastExecutedQuantity(value) { + this._lastExecutedQuantity = value; + } + get cumulativeFilledQuantity() { + return this._cumulativeFilledQuantity; + } + set cumulativeFilledQuantity(value) { + this._cumulativeFilledQuantity = value; + } + get placedAt() { + return this._placedAt; + } + set placedAt(value) { + this._placedAt = value; + } +} +exports.OrderUpdate = OrderUpdate; +//# sourceMappingURL=OrderUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/order/OrderUpdate.js.map b/build/src/models/websocket/order/OrderUpdate.js.map new file mode 100644 index 0000000..e876f46 --- /dev/null +++ b/build/src/models/websocket/order/OrderUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OrderUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket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AAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AAtKD,kCAsKC"} \ No newline at end of file diff --git a/build/src/models/websocket/trade/TradeUpdate.js b/build/src/models/websocket/trade/TradeUpdate.js new file mode 100644 index 0000000..555315d --- /dev/null +++ b/build/src/models/websocket/trade/TradeUpdate.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TradeUpdate = void 0; +/** + * Represents a single trade update. + */ +class TradeUpdate { + constructor(json) { + this._timestamp = new Date(json.E); + this._symbol = json.s; + this._aggregatedId = json.a; + this._price = json.p; + this._quantity = json.q; + this._firstBreakdownId = json.f; + this._lastBreakdownId = json.l; + this._placedAt = new Date(json.T); + this._buyerMaker = json.m; + } + get timestamp() { + return this._timestamp; + } + set timestamp(value) { + this._timestamp = value; + } + get symbol() { + return this._symbol; + } + set symbol(value) { + this._symbol = value; + } + get aggregatedId() { + return this._aggregatedId; + } + set aggregatedId(value) { + this._aggregatedId = value; + } + get price() { + return this._price; + } + set price(value) { + this._price = value; + } + get quantity() { + return this._quantity; + } + set quantity(value) { + this._quantity = value; + } + get firstBreakdownId() { + return this._firstBreakdownId; + } + set firstBreakdownId(value) { + this._firstBreakdownId = value; + } + get lastBreakdownId() { + return this._lastBreakdownId; + } + set lastBreakdownId(value) { + this._lastBreakdownId = value; + } + get placedAt() { + return this._placedAt; + } + set placedAt(value) { + this._placedAt = value; + } + get buyerMaker() { + return this._buyerMaker; + } + set buyerMaker(value) { + this._buyerMaker = value; + } +} +exports.TradeUpdate = TradeUpdate; +//# sourceMappingURL=TradeUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/trade/TradeUpdate.js.map b/build/src/models/websocket/trade/TradeUpdate.js.map new file mode 100644 index 0000000..10eca01 --- /dev/null +++ b/build/src/models/websocket/trade/TradeUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TradeUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/trade/TradeUpdate.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AAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,IAAI,gBAAgB,CAAE,KAAa;QAC/B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAW;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAE,KAAc;QAC1B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;CAEJ;AAlGD,kCAkGC"} \ No newline at end of file From e75f518fea66b91eb964eb5523e40e678f91d17e Mon Sep 17 00:00:00 2001 From: "stepan.murenets" Date: Wed, 10 Feb 2021 00:37:06 +0300 Subject: [PATCH 3/3] moved npm run build to postinstall + fixed gitignore --- .gitignore | 4 +- build/index.js | 90 --- build/index.js.map | 1 - build/src/BinanceApiClient.js | 563 ------------------ build/src/BinanceApiClient.js.map | 1 - build/src/enums/ApiVersion.js | 13 - build/src/enums/ApiVersion.js.map | 1 - build/src/enums/AuthenticationMethod.js | 13 - build/src/enums/AuthenticationMethod.js.map | 1 - build/src/enums/CandlestickInterval.js | 25 - build/src/enums/CandlestickInterval.js.map | 1 - build/src/enums/FilterType.js | 17 - build/src/enums/FilterType.js.map | 1 - build/src/enums/HttpMethod.js | 14 - build/src/enums/HttpMethod.js.map | 1 - build/src/enums/OrderExecutionStatus.js | 16 - build/src/enums/OrderExecutionStatus.js.map | 1 - build/src/enums/OrderRejectionMotive.js | 20 - build/src/enums/OrderRejectionMotive.js.map | 1 - build/src/enums/OrderSide.js | 12 - build/src/enums/OrderSide.js.map | 1 - build/src/enums/OrderStatus.js | 17 - build/src/enums/OrderStatus.js.map | 1 - build/src/enums/OrderType.js | 17 - build/src/enums/OrderType.js.map | 1 - build/src/enums/RateLimitInterval.js | 10 - build/src/enums/RateLimitInterval.js.map | 1 - build/src/enums/RateLimitType.js | 12 - build/src/enums/RateLimitType.js.map | 1 - build/src/enums/ResponseType.js | 13 - build/src/enums/ResponseType.js.map | 1 - build/src/enums/SymbolStatus.js | 17 - build/src/enums/SymbolStatus.js.map | 1 - build/src/enums/SymbolType.js | 11 - build/src/enums/SymbolType.js.map | 1 - build/src/enums/TimeInForce.js | 13 - build/src/enums/TimeInForce.js.map | 1 - build/src/errors/ApiError.js | 16 - build/src/errors/ApiError.js.map | 1 - build/src/errors/AuthenticationError.js | 26 - build/src/errors/AuthenticationError.js.map | 1 - build/src/models/account/AccountData.js | 72 --- build/src/models/account/AccountData.js.map | 1 - build/src/models/account/Balance.js | 33 - build/src/models/account/Balance.js.map | 1 - build/src/models/candlestick/Candlestick.js | 89 --- .../src/models/candlestick/Candlestick.js.map | 1 - build/src/models/depth/LatestPrice.js | 26 - build/src/models/depth/LatestPrice.js.map | 1 - build/src/models/depth/OrderBook.js | 33 - build/src/models/depth/OrderBook.js.map | 1 - build/src/models/filter/LotSizeFilter.js | 33 - build/src/models/filter/LotSizeFilter.js.map | 1 - .../src/models/filter/MaxAlgoOrdersFilter.js | 19 - .../models/filter/MaxAlgoOrdersFilter.js.map | 1 - build/src/models/filter/MaxOrdersFilter.js | 19 - .../src/models/filter/MaxOrdersFilter.js.map | 1 - .../models/filter/MinimumNotionalFilter.js | 19 - .../filter/MinimumNotionalFilter.js.map | 1 - build/src/models/filter/PriceFilter.js | 33 - build/src/models/filter/PriceFilter.js.map | 1 - build/src/models/filter/RateLimit.js | 32 - build/src/models/filter/RateLimit.js.map | 1 - .../filter/abstraction/ExchangeFilter.js | 3 - .../filter/abstraction/ExchangeFilter.js.map | 1 - .../models/filter/abstraction/SymbolFilter.js | 3 - .../filter/abstraction/SymbolFilter.js.map | 1 - build/src/models/misc/ExchangeInfo.js | 75 --- build/src/models/misc/ExchangeInfo.js.map | 1 - build/src/models/misc/Symbol.js | 112 ---- build/src/models/misc/Symbol.js.map | 1 - build/src/models/order/CanceledOrderData.js | 40 -- .../src/models/order/CanceledOrderData.js.map | 1 - build/src/models/order/Order.js | 108 ---- build/src/models/order/Order.js.map | 1 - .../src/models/order/OrderAcknowledgement.js | 40 -- .../models/order/OrderAcknowledgement.js.map | 1 - build/src/models/order/OrderFull.js | 28 - build/src/models/order/OrderFull.js.map | 1 - build/src/models/order/OrderResult.js | 91 --- build/src/models/order/OrderResult.js.map | 1 - build/src/models/order/PlacedOrder.js | 26 - build/src/models/order/PlacedOrder.js.map | 1 - build/src/models/order/PlacedOrderFill.js | 40 -- build/src/models/order/PlacedOrderFill.js.map | 1 - build/src/models/ticker/Ticker.js | 47 -- build/src/models/ticker/Ticker.js.map | 1 - build/src/models/ticker/TickerStatistics.js | 124 ---- .../src/models/ticker/TickerStatistics.js.map | 1 - build/src/models/trade/Trade.js | 82 --- build/src/models/trade/Trade.js.map | 1 - .../models/websocket/account/AccountUpdate.js | 30 - .../websocket/account/AccountUpdate.js.map | 1 - .../candlestick/CandlestickUpdate.js | 138 ----- .../candlestick/CandlestickUpdate.js.map | 1 - .../models/websocket/depth/OrderBookUpdate.js | 54 -- .../websocket/depth/OrderBookUpdate.js.map | 1 - .../src/models/websocket/order/OrderUpdate.js | 129 ---- .../models/websocket/order/OrderUpdate.js.map | 1 - .../src/models/websocket/trade/TradeUpdate.js | 75 --- .../models/websocket/trade/TradeUpdate.js.map | 1 - package.json | 2 +- 102 files changed, 3 insertions(+), 2641 deletions(-) delete mode 100644 build/index.js delete mode 100644 build/index.js.map delete mode 100644 build/src/BinanceApiClient.js delete mode 100644 build/src/BinanceApiClient.js.map delete mode 100644 build/src/enums/ApiVersion.js delete mode 100644 build/src/enums/ApiVersion.js.map delete mode 100644 build/src/enums/AuthenticationMethod.js delete mode 100644 build/src/enums/AuthenticationMethod.js.map delete mode 100644 build/src/enums/CandlestickInterval.js delete mode 100644 build/src/enums/CandlestickInterval.js.map delete mode 100644 build/src/enums/FilterType.js delete mode 100644 build/src/enums/FilterType.js.map delete mode 100644 build/src/enums/HttpMethod.js delete mode 100644 build/src/enums/HttpMethod.js.map delete mode 100644 build/src/enums/OrderExecutionStatus.js delete mode 100644 build/src/enums/OrderExecutionStatus.js.map delete mode 100644 build/src/enums/OrderRejectionMotive.js delete mode 100644 build/src/enums/OrderRejectionMotive.js.map delete mode 100644 build/src/enums/OrderSide.js delete mode 100644 build/src/enums/OrderSide.js.map delete mode 100644 build/src/enums/OrderStatus.js delete mode 100644 build/src/enums/OrderStatus.js.map delete mode 100644 build/src/enums/OrderType.js delete mode 100644 build/src/enums/OrderType.js.map delete mode 100644 build/src/enums/RateLimitInterval.js delete mode 100644 build/src/enums/RateLimitInterval.js.map delete mode 100644 build/src/enums/RateLimitType.js delete mode 100644 build/src/enums/RateLimitType.js.map delete mode 100644 build/src/enums/ResponseType.js delete mode 100644 build/src/enums/ResponseType.js.map delete mode 100644 build/src/enums/SymbolStatus.js delete mode 100644 build/src/enums/SymbolStatus.js.map delete mode 100644 build/src/enums/SymbolType.js delete mode 100644 build/src/enums/SymbolType.js.map delete mode 100644 build/src/enums/TimeInForce.js delete mode 100644 build/src/enums/TimeInForce.js.map delete mode 100644 build/src/errors/ApiError.js delete mode 100644 build/src/errors/ApiError.js.map delete mode 100644 build/src/errors/AuthenticationError.js delete mode 100644 build/src/errors/AuthenticationError.js.map delete mode 100644 build/src/models/account/AccountData.js delete mode 100644 build/src/models/account/AccountData.js.map delete mode 100644 build/src/models/account/Balance.js delete mode 100644 build/src/models/account/Balance.js.map delete mode 100644 build/src/models/candlestick/Candlestick.js delete mode 100644 build/src/models/candlestick/Candlestick.js.map delete mode 100644 build/src/models/depth/LatestPrice.js delete mode 100644 build/src/models/depth/LatestPrice.js.map delete mode 100644 build/src/models/depth/OrderBook.js delete mode 100644 build/src/models/depth/OrderBook.js.map delete mode 100644 build/src/models/filter/LotSizeFilter.js delete mode 100644 build/src/models/filter/LotSizeFilter.js.map delete mode 100644 build/src/models/filter/MaxAlgoOrdersFilter.js delete mode 100644 build/src/models/filter/MaxAlgoOrdersFilter.js.map delete mode 100644 build/src/models/filter/MaxOrdersFilter.js delete mode 100644 build/src/models/filter/MaxOrdersFilter.js.map delete mode 100644 build/src/models/filter/MinimumNotionalFilter.js delete mode 100644 build/src/models/filter/MinimumNotionalFilter.js.map delete mode 100644 build/src/models/filter/PriceFilter.js delete mode 100644 build/src/models/filter/PriceFilter.js.map delete mode 100644 build/src/models/filter/RateLimit.js delete mode 100644 build/src/models/filter/RateLimit.js.map delete mode 100644 build/src/models/filter/abstraction/ExchangeFilter.js delete mode 100644 build/src/models/filter/abstraction/ExchangeFilter.js.map delete mode 100644 build/src/models/filter/abstraction/SymbolFilter.js delete mode 100644 build/src/models/filter/abstraction/SymbolFilter.js.map delete mode 100644 build/src/models/misc/ExchangeInfo.js delete mode 100644 build/src/models/misc/ExchangeInfo.js.map delete mode 100644 build/src/models/misc/Symbol.js delete mode 100644 build/src/models/misc/Symbol.js.map delete mode 100644 build/src/models/order/CanceledOrderData.js delete mode 100644 build/src/models/order/CanceledOrderData.js.map delete mode 100644 build/src/models/order/Order.js delete mode 100644 build/src/models/order/Order.js.map delete mode 100644 build/src/models/order/OrderAcknowledgement.js delete mode 100644 build/src/models/order/OrderAcknowledgement.js.map delete mode 100644 build/src/models/order/OrderFull.js delete mode 100644 build/src/models/order/OrderFull.js.map delete mode 100644 build/src/models/order/OrderResult.js delete mode 100644 build/src/models/order/OrderResult.js.map delete mode 100644 build/src/models/order/PlacedOrder.js delete mode 100644 build/src/models/order/PlacedOrder.js.map delete mode 100644 build/src/models/order/PlacedOrderFill.js delete mode 100644 build/src/models/order/PlacedOrderFill.js.map delete mode 100644 build/src/models/ticker/Ticker.js delete mode 100644 build/src/models/ticker/Ticker.js.map delete mode 100644 build/src/models/ticker/TickerStatistics.js delete mode 100644 build/src/models/ticker/TickerStatistics.js.map delete mode 100644 build/src/models/trade/Trade.js delete mode 100644 build/src/models/trade/Trade.js.map delete mode 100644 build/src/models/websocket/account/AccountUpdate.js delete mode 100644 build/src/models/websocket/account/AccountUpdate.js.map delete mode 100644 build/src/models/websocket/candlestick/CandlestickUpdate.js delete mode 100644 build/src/models/websocket/candlestick/CandlestickUpdate.js.map delete mode 100644 build/src/models/websocket/depth/OrderBookUpdate.js delete mode 100644 build/src/models/websocket/depth/OrderBookUpdate.js.map delete mode 100644 build/src/models/websocket/order/OrderUpdate.js delete mode 100644 build/src/models/websocket/order/OrderUpdate.js.map delete mode 100644 build/src/models/websocket/trade/TradeUpdate.js delete mode 100644 build/src/models/websocket/trade/TradeUpdate.js.map diff --git a/.gitignore b/.gitignore index a35c328..1609414 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ bower_components .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) -# build/Release +build/Release # Dependency directories node_modules/ @@ -59,7 +59,7 @@ typings/ .env # Build output -# build +build ### JetBrains # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm diff --git a/build/index.js b/build/index.js deleted file mode 100644 index 825cc7e..0000000 --- a/build/index.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BinanceApiClient = exports.TradeUpdate = exports.Trade = exports.TickerStatistics = exports.Ticker = exports.Symbol = exports.LatestPrice = exports.ExchangeInfo = exports.CandlestickUpdate = exports.Candlestick = exports.Balance = exports.AccountUpdate = exports.AccountData = exports.PlacedOrderFill = exports.PlacedOrder = exports.OrderUpdate = exports.OrderResult = exports.OrderFull = exports.OrderBookUpdate = exports.OrderBook = exports.OrderAcknowledgement = exports.Order = exports.CanceledOrderData = exports.RateLimit = exports.PriceFilter = exports.MinimumNotionalFilter = exports.MaxOrdersFilter = exports.MaxAlgoOrdersFilter = exports.LotSizeFilter = exports.AuthenticationError = exports.ApiError = exports.TimeInForce = exports.SymbolType = exports.SymbolStatus = exports.ResponseType = exports.RateLimitType = exports.RateLimitInterval = exports.OrderType = exports.OrderStatus = exports.OrderSide = exports.OrderRejectionMotive = exports.OrderExecutionStatus = exports.CandlestickInterval = void 0; -var CandlestickInterval_1 = require("./src/enums/CandlestickInterval"); -Object.defineProperty(exports, "CandlestickInterval", { enumerable: true, get: function () { return CandlestickInterval_1.CandlestickInterval; } }); -var OrderExecutionStatus_1 = require("./src/enums/OrderExecutionStatus"); -Object.defineProperty(exports, "OrderExecutionStatus", { enumerable: true, get: function () { return OrderExecutionStatus_1.OrderExecutionStatus; } }); -var OrderRejectionMotive_1 = require("./src/enums/OrderRejectionMotive"); -Object.defineProperty(exports, "OrderRejectionMotive", { enumerable: true, get: function () { return OrderRejectionMotive_1.OrderRejectionMotive; } }); -var OrderSide_1 = require("./src/enums/OrderSide"); -Object.defineProperty(exports, "OrderSide", { enumerable: true, get: function () { return OrderSide_1.OrderSide; } }); -var OrderStatus_1 = require("./src/enums/OrderStatus"); -Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return OrderStatus_1.OrderStatus; } }); -var OrderType_1 = require("./src/enums/OrderType"); -Object.defineProperty(exports, "OrderType", { enumerable: true, get: function () { return OrderType_1.OrderType; } }); -var RateLimitInterval_1 = require("./src/enums/RateLimitInterval"); -Object.defineProperty(exports, "RateLimitInterval", { enumerable: true, get: function () { return RateLimitInterval_1.RateLimitInterval; } }); -var RateLimitType_1 = require("./src/enums/RateLimitType"); -Object.defineProperty(exports, "RateLimitType", { enumerable: true, get: function () { return RateLimitType_1.RateLimitType; } }); -var ResponseType_1 = require("./src/enums/ResponseType"); -Object.defineProperty(exports, "ResponseType", { enumerable: true, get: function () { return ResponseType_1.ResponseType; } }); -var SymbolStatus_1 = require("./src/enums/SymbolStatus"); -Object.defineProperty(exports, "SymbolStatus", { enumerable: true, get: function () { return SymbolStatus_1.SymbolStatus; } }); -var SymbolType_1 = require("./src/enums/SymbolType"); -Object.defineProperty(exports, "SymbolType", { enumerable: true, get: function () { return SymbolType_1.SymbolType; } }); -var TimeInForce_1 = require("./src/enums/TimeInForce"); -Object.defineProperty(exports, "TimeInForce", { enumerable: true, get: function () { return TimeInForce_1.TimeInForce; } }); -var ApiError_1 = require("./src/errors/ApiError"); -Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } }); -var AuthenticationError_1 = require("./src/errors/AuthenticationError"); -Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return AuthenticationError_1.AuthenticationError; } }); -var LotSizeFilter_1 = require("./src/models/filter/LotSizeFilter"); -Object.defineProperty(exports, "LotSizeFilter", { enumerable: true, get: function () { return LotSizeFilter_1.LotSizeFilter; } }); -var MaxAlgoOrdersFilter_1 = require("./src/models/filter/MaxAlgoOrdersFilter"); -Object.defineProperty(exports, "MaxAlgoOrdersFilter", { enumerable: true, get: function () { return MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter; } }); -var MaxOrdersFilter_1 = require("./src/models/filter/MaxOrdersFilter"); -Object.defineProperty(exports, "MaxOrdersFilter", { enumerable: true, get: function () { return MaxOrdersFilter_1.MaxOrdersFilter; } }); -var MinimumNotionalFilter_1 = require("./src/models/filter/MinimumNotionalFilter"); -Object.defineProperty(exports, "MinimumNotionalFilter", { enumerable: true, get: function () { return MinimumNotionalFilter_1.MinimumNotionalFilter; } }); -var PriceFilter_1 = require("./src/models/filter/PriceFilter"); -Object.defineProperty(exports, "PriceFilter", { enumerable: true, get: function () { return PriceFilter_1.PriceFilter; } }); -var RateLimit_1 = require("./src/models/filter/RateLimit"); -Object.defineProperty(exports, "RateLimit", { enumerable: true, get: function () { return RateLimit_1.RateLimit; } }); -var CanceledOrderData_1 = require("./src/models/order/CanceledOrderData"); -Object.defineProperty(exports, "CanceledOrderData", { enumerable: true, get: function () { return CanceledOrderData_1.CanceledOrderData; } }); -var Order_1 = require("./src/models/order/Order"); -Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return Order_1.Order; } }); -var OrderAcknowledgement_1 = require("./src/models/order/OrderAcknowledgement"); -Object.defineProperty(exports, "OrderAcknowledgement", { enumerable: true, get: function () { return OrderAcknowledgement_1.OrderAcknowledgement; } }); -var OrderBook_1 = require("./src/models/depth/OrderBook"); -Object.defineProperty(exports, "OrderBook", { enumerable: true, get: function () { return OrderBook_1.OrderBook; } }); -var OrderBookUpdate_1 = require("./src/models/websocket/depth/OrderBookUpdate"); -Object.defineProperty(exports, "OrderBookUpdate", { enumerable: true, get: function () { return OrderBookUpdate_1.OrderBookUpdate; } }); -var OrderFull_1 = require("./src/models/order/OrderFull"); -Object.defineProperty(exports, "OrderFull", { enumerable: true, get: function () { return OrderFull_1.OrderFull; } }); -var OrderResult_1 = require("./src/models/order/OrderResult"); -Object.defineProperty(exports, "OrderResult", { enumerable: true, get: function () { return OrderResult_1.OrderResult; } }); -var OrderUpdate_1 = require("./src/models/websocket/order/OrderUpdate"); -Object.defineProperty(exports, "OrderUpdate", { enumerable: true, get: function () { return OrderUpdate_1.OrderUpdate; } }); -var PlacedOrder_1 = require("./src/models/order/PlacedOrder"); -Object.defineProperty(exports, "PlacedOrder", { enumerable: true, get: function () { return PlacedOrder_1.PlacedOrder; } }); -var PlacedOrderFill_1 = require("./src/models/order/PlacedOrderFill"); -Object.defineProperty(exports, "PlacedOrderFill", { enumerable: true, get: function () { return PlacedOrderFill_1.PlacedOrderFill; } }); -var AccountData_1 = require("./src/models/account/AccountData"); -Object.defineProperty(exports, "AccountData", { enumerable: true, get: function () { return AccountData_1.AccountData; } }); -var AccountUpdate_1 = require("./src/models/websocket/account/AccountUpdate"); -Object.defineProperty(exports, "AccountUpdate", { enumerable: true, get: function () { return AccountUpdate_1.AccountUpdate; } }); -var Balance_1 = require("./src/models/account/Balance"); -Object.defineProperty(exports, "Balance", { enumerable: true, get: function () { return Balance_1.Balance; } }); -var Candlestick_1 = require("./src/models/candlestick/Candlestick"); -Object.defineProperty(exports, "Candlestick", { enumerable: true, get: function () { return Candlestick_1.Candlestick; } }); -var CandlestickUpdate_1 = require("./src/models/websocket/candlestick/CandlestickUpdate"); -Object.defineProperty(exports, "CandlestickUpdate", { enumerable: true, get: function () { return CandlestickUpdate_1.CandlestickUpdate; } }); -var ExchangeInfo_1 = require("./src/models/misc/ExchangeInfo"); -Object.defineProperty(exports, "ExchangeInfo", { enumerable: true, get: function () { return ExchangeInfo_1.ExchangeInfo; } }); -var LatestPrice_1 = require("./src/models/depth/LatestPrice"); -Object.defineProperty(exports, "LatestPrice", { enumerable: true, get: function () { return LatestPrice_1.LatestPrice; } }); -var Symbol_1 = require("./src/models/misc/Symbol"); -Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return Symbol_1.Symbol; } }); -var Ticker_1 = require("./src/models/ticker/Ticker"); -Object.defineProperty(exports, "Ticker", { enumerable: true, get: function () { return Ticker_1.Ticker; } }); -var TickerStatistics_1 = require("./src/models/ticker/TickerStatistics"); -Object.defineProperty(exports, "TickerStatistics", { enumerable: true, get: function () { return TickerStatistics_1.TickerStatistics; } }); -var Trade_1 = require("./src/models/trade/Trade"); -Object.defineProperty(exports, "Trade", { enumerable: true, get: function () { return Trade_1.Trade; } }); -var TradeUpdate_1 = require("./src/models/websocket/trade/TradeUpdate"); -Object.defineProperty(exports, "TradeUpdate", { enumerable: true, get: function () { return TradeUpdate_1.TradeUpdate; } }); -var BinanceApiClient_1 = require("./src/BinanceApiClient"); -Object.defineProperty(exports, "BinanceApiClient", { enumerable: true, get: function () { return BinanceApiClient_1.BinanceApiClient; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map deleted file mode 100644 index 887b498..0000000 --- a/build/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,uEAAsE;AAA7D,0HAAA,mBAAmB,OAAA;AAC5B,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,0GAAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,mEAAkE;AAAzD,sHAAA,iBAAiB,OAAA;AAC1B,2DAA0D;AAAjD,8GAAA,aAAa,OAAA;AACtB,yDAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,yDAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,qDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,0GAAA,WAAW,OAAA;AAEpB,kDAAiD;AAAxC,oGAAA,QAAQ,OAAA;AACjB,wEAAuE;AAA9D,0HAAA,mBAAmB,OAAA;AAI5B,mEAAkE;AAAzD,8GAAA,aAAa,OAAA;AACtB,+EAA8E;AAArE,0HAAA,mBAAmB,OAAA;AAC5B,uEAAsE;AAA7D,kHAAA,eAAe,OAAA;AACxB,mFAAkF;AAAzE,8HAAA,qBAAqB,OAAA;AAC9B,+DAA8D;AAArD,0GAAA,WAAW,OAAA;AACpB,2DAA0D;AAAjD,sGAAA,SAAS,OAAA;AAElB,0EAAyE;AAAhE,sHAAA,iBAAiB,OAAA;AAC1B,kDAAiD;AAAxC,8FAAA,KAAK,OAAA;AACd,gFAA+E;AAAtE,4HAAA,oBAAoB,OAAA;AAC7B,0DAAyD;AAAhD,sGAAA,SAAS,OAAA;AAClB,gFAA+E;AAAtE,kHAAA,eAAe,OAAA;AACxB,0DAAyD;AAAhD,sGAAA,SAAS,OAAA;AAClB,8DAA6D;AAApD,0GAAA,WAAW,OAAA;AACpB,wEAAuE;AAA9D,0GAAA,WAAW,OAAA;AACpB,8DAA6D;AAApD,0GAAA,WAAW,OAAA;AACpB,sEAAqE;AAA5D,kHAAA,eAAe,OAAA;AAExB,gEAA+D;AAAtD,0GAAA,WAAW,OAAA;AACpB,8EAA6E;AAApE,8GAAA,aAAa,OAAA;AACtB,wDAAuD;AAA9C,kGAAA,OAAO,OAAA;AAChB,oEAAmE;AAA1D,0GAAA,WAAW,OAAA;AACpB,0FAAyF;AAAhF,sHAAA,iBAAiB,OAAA;AAC1B,+DAA8D;AAArD,4GAAA,YAAY,OAAA;AACrB,8DAA6D;AAApD,0GAAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,gGAAA,MAAM,OAAA;AACf,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,yEAAwE;AAA/D,oHAAA,gBAAgB,OAAA;AACzB,kDAAiD;AAAxC,8FAAA,KAAK,OAAA;AACd,wEAAuE;AAA9D,0GAAA,WAAW,OAAA;AAEpB,2DAA0D;AAAjD,oHAAA,gBAAgB,OAAA"} \ No newline at end of file diff --git a/build/src/BinanceApiClient.js b/build/src/BinanceApiClient.js deleted file mode 100644 index 6bbc791..0000000 --- a/build/src/BinanceApiClient.js +++ /dev/null @@ -1,563 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BinanceApiClient = void 0; -const AuthenticationMethod_1 = require("./enums/AuthenticationMethod"); -const ApiVersion_1 = require("./enums/ApiVersion"); -const CryptoJs = require("crypto-js"); -const HttpMethod_1 = require("./enums/HttpMethod"); -const AuthenticationError_1 = require("./errors/AuthenticationError"); -const request = require("request-promise"); -const Path = require("path"); -const util_1 = require("util"); -const url_1 = require("url"); -const OrderBook_1 = require("./models/depth/OrderBook"); -const ApiError_1 = require("./errors/ApiError"); -const Order_1 = require("./models/order/Order"); -const Candlestick_1 = require("./models/candlestick/Candlestick"); -const TickerStatistics_1 = require("./models/ticker/TickerStatistics"); -const LatestPrice_1 = require("./models/depth/LatestPrice"); -const Ticker_1 = require("./models/ticker/Ticker"); -const OrderSide_1 = require("./enums/OrderSide"); -const OrderType_1 = require("./enums/OrderType"); -const TimeInForce_1 = require("./enums/TimeInForce"); -const OrderAcknowledgement_1 = require("./models/order/OrderAcknowledgement"); -const CanceledOrderData_1 = require("./models/order/CanceledOrderData"); -const AccountData_1 = require("./models/account/AccountData"); -const Trade_1 = require("./models/trade/Trade"); -const WebSocket = require("ws"); -const OrderBookUpdate_1 = require("./models/websocket/depth/OrderBookUpdate"); -const CandlestickUpdate_1 = require("./models/websocket/candlestick/CandlestickUpdate"); -const TradeUpdate_1 = require("./models/websocket/trade/TradeUpdate"); -const AccountUpdate_1 = require("./models/websocket/account/AccountUpdate"); -const OrderUpdate_1 = require("./models/websocket/order/OrderUpdate"); -const ExchangeInfo_1 = require("./models/misc/ExchangeInfo"); -const ResponseType_1 = require("./enums/ResponseType"); -const OrderResult_1 = require("./models/order/OrderResult"); -const OrderFull_1 = require("./models/order/OrderFull"); -const websocket_heartbeats_1 = require("websocket-heartbeats"); -/** - * Represents a single Binance API client. - */ -class BinanceApiClient { - /** - * Initializes a new Binance API client. - * - * @param apiKey The personal account API key. - * @param apiSecret The personal account API secret. - */ - constructor(apiKey, apiSecret) { - BinanceApiClient.API_KEY = apiKey; - BinanceApiClient.API_SECRET = apiSecret; - } - /** - * Interface to the "GET v1/ping" Binance's API operation. - */ - ping() { - return __awaiter(this, void 0, void 0, function* () { - yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ping", AuthenticationMethod_1.AuthenticationMethod.NONE); - }); - } - getExchangeInfo() { - return __awaiter(this, void 0, void 0, function* () { - return new ExchangeInfo_1.ExchangeInfo(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "exchangeInfo", AuthenticationMethod_1.AuthenticationMethod.NONE)); - }); - } - /** - * Interface to the "GET v1/time" Binance's API operation. - * - * @returns The Binance's server time. - */ - getServerTime() { - return __awaiter(this, void 0, void 0, function* () { - return new Date((yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "time", AuthenticationMethod_1.AuthenticationMethod.NONE)).serverTime); - }); - } - /** - * Interface to the "GET v1/depth" Binance's API operation. - * - * @param symbol The symbol for which we want to retrieve the order book. - * @param limit The maximum number of orders in the returned order book. - * - * @returns The order book respecting the given constraints. - */ - getOrderBook(symbol, limit) { - return __awaiter(this, void 0, void 0, function* () { - return new OrderBook_1.OrderBook(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "depth", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol], ["limit", limit])); - }); - } - /** - * Interface to the "GET v1/klines" Binance's API operation. Get - * candlestick bars for the specified symbol, respecting - * all the other given constraints. Candlesticks are uniquely - * identified by their opening time. - * - * @param symbol The symbol for which we want to retrieve the - * candlesticks. - * @param interval The interval which the requested candlesticks refer to. - * @param limit The maximum number of candlesticks returned. - * @param startTime The time from which the candlesticks are returned. - * @param endTime The time until which the candlesticks are returned. - * - * @returns A candlesticks array respecting the given constraints. - */ - getCandlesticks(symbol, interval, limit, startTime, endTime) { - return __awaiter(this, void 0, void 0, function* () { - const candlesticksJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "klines", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol], ["interval", interval], ["limit", limit], ["startTime", startTime], ["endTime", endTime]); - const candlesticks = []; - for (const candlestickJson of candlesticksJson) { - candlesticks.push(new Candlestick_1.Candlestick(candlestickJson)); - } - return candlesticks; - }); - } - /** - * Interface to the "GET v1/ticker/24hr" Binance's API operation. - * Get last 24 hours price change statistics. - * - * @param symbol The symbol for which we want to retrieve the - * last day ticker statistics. - * - * @returns The last 24-hour ticker statistics. - */ - getLastDayTickerStatistics(symbol) { - return __awaiter(this, void 0, void 0, function* () { - return new TickerStatistics_1.TickerStatistics(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/24hr", AuthenticationMethod_1.AuthenticationMethod.NONE, ["symbol", symbol])); - }); - } - /** - * Interface to the "GET v1/ticker/allPrices" Binance's API operation. - * Get the latest price for all symbols. - * - * @returns A latest prices array for all the symbols. - */ - getLatestPrices() { - return __awaiter(this, void 0, void 0, function* () { - const latestPricesJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/allPrices", AuthenticationMethod_1.AuthenticationMethod.NONE); - const latestPrices = []; - for (const latestPriceJson of latestPricesJson) { - latestPrices.push(new LatestPrice_1.LatestPrice(latestPriceJson)); - } - return latestPrices; - }); - } - /** - * Interface to the "GET v1/ticker/allBookTickers" Binance's API operation. - * Get the best price/quantity in the order book for all symbols. - * - * @returns The best price/quantity in the order book for all symbols. - */ - getTickers() { - return __awaiter(this, void 0, void 0, function* () { - const tickersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V1, "ticker/allBookTickers", AuthenticationMethod_1.AuthenticationMethod.NONE); - const tickers = []; - for (const tickerJson of tickersJson) { - tickers.push(new Ticker_1.Ticker(tickerJson)); - } - return tickers; - }); - } - /** - * Interface to the "POST v3/order" Binance's API operation. Places a new order - * respecting the given constraints. - * - * @param symbol The market on which the order is to be placed. - * @param side Whether the order is a buy or sell. - * @param type Whether the order is at limit or market. - * @param timeInForce Whether the time in force should be GTC or IOC. - * @param quantity The quantity of assets that is to be moved. - * @param price The price at which the order should be filled. - * @param clientOrderId A unique ID associated with the order - * (automatically generated if not sent). - * @param stopPrice The price at which a stop order should be filled. - * @param icebergQuantity Only used with iceberg orders. - * @param responseType Set the response JSON. ACK, RESULT, or FULL; default: RESULT. - * - * @returns The just-placed order data. - */ - placeOrder(symbol, side, type, timeInForce, quantity, price, clientOrderId, stopPrice, icebergQuantity, responseType) { - return __awaiter(this, void 0, void 0, function* () { - const jsonResponse = yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["side", OrderSide_1.OrderSide[side]], ["type", OrderType_1.OrderType[type]], [ - "timeInForce", - type === OrderType_1.OrderType.MARKET || type === OrderType_1.OrderType.STOP_LOSS - ? null - : TimeInForce_1.TimeInForce[timeInForce] - ], ["quantity", quantity], [ - "price", - type === OrderType_1.OrderType.MARKET || type === OrderType_1.OrderType.STOP_LOSS - ? null - : price - ], ["newClientOrderId", clientOrderId], ["stopPrice", stopPrice], ["icebergQty", icebergQuantity], [ - "newOrderRespType", - util_1.isNullOrUndefined(responseType) - ? null - : ResponseType_1.ResponseType[responseType] - ]); - switch (responseType) { - case ResponseType_1.ResponseType.RESULT: { - return new OrderResult_1.OrderResult(jsonResponse); - } - case ResponseType_1.ResponseType.FULL: { - return new OrderFull_1.OrderFull(jsonResponse); - } - default: { - return new OrderAcknowledgement_1.OrderAcknowledgement(jsonResponse); - } - } - }); - } - /** - * Interface to the "POST v3/order/test" Binance's API operation. Places a new - * test order respecting the given constraints. - * - * @param symbol The market on which the order is to be placed. - * @param side Whether the order is a buy or sell. - * @param type Whether the order is at limit or market. - * @param timeInForce Whether the time in force should be GTC or IOC. - * @param quantity The quantity of assets that is to be moved. - * @param price The price at which the order should be filled. - * @param clientId A unique ID associated with the order. - * (automatically generated if not sent). - * @param stopPrice The price at which a stop order should be filled. - * @param icebergQuantity Only used with iceberg orders. - * @param timeout The request validity maximum time frame - * (defaults to 5000 ms). - */ - testOrder(symbol, side, type, timeInForce, quantity, price, clientId, stopPrice, icebergQuantity, timeout) { - return __awaiter(this, void 0, void 0, function* () { - yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V3, "order/test", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["side", OrderSide_1.OrderSide[side]], ["type", OrderType_1.OrderType[type]], ["timeInForce", TimeInForce_1.TimeInForce[timeInForce]], ["quantity", quantity], ["price", price], ["newClientOrderId", clientId], ["stopPrice", stopPrice], ["icebergQty", icebergQuantity], ["recvWindow", timeout]); - }); - } - /** - * Interface to the "GET v3/order" Binance's API operation. Gets a - * placed order detail given some constraints. - * - * @param symbol The market on which the order was originally placed. - * @param id The wanted order ID. - * @param clientId The wanted client given order ID (its description). - * @param timeout The request validity maximum time frame - * (defaults to 5000 ms). - * - * @return The placed order detail respecting the given constraints. - */ - getOrder(symbol, id, clientId, timeout) { - return __awaiter(this, void 0, void 0, function* () { - return new Order_1.Order(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["origClientOrderId", clientId], ["recvWindow", timeout])); - }); - } - /** - * Interface to the "DEconstE v3/order" Binance's API operation. - * Cancels a previously placed order. - * - * @param symbol The market on which the order was originally placed. - * @param id The wanted order ID. - * @param oldClientId The pre-cancel client given order ID (its description). - * @param newClientId The post-cancel order ID (automatically generated if not passed). - * @param timeout The request validity maximum time frame - * (defaults to 5000 ms). - * - * @return The just-canceled order data. - */ - cancelOrder(symbol, id, oldClientId, newClientId, timeout) { - return __awaiter(this, void 0, void 0, function* () { - return new CanceledOrderData_1.CanceledOrderData(yield this.makeRequest(HttpMethod_1.HttpMethod.DELETE, ApiVersion_1.ApiVersion.V3, "order", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["origClientOrderId", oldClientId], ["newClientOrderId", newClientId], ["recvWindow", timeout])); - }); - } - /** - * Interface to the "GET v3/openOrders" Binance's API operation. - * - * @param market The symbol for which we want to retrieve the open orders (if any). - * @param timeout The request validity maximum time frame (defaults to 5000 ms). - * - * @returns An array representing all of the account's open orders. - */ - getOpenOrders(market, timeout) { - return __awaiter(this, void 0, void 0, function* () { - const openOrdersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "openOrders", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", market], ["recvWindow", timeout]); - const openOrders = []; - for (const openOrderJson of openOrdersJson) { - openOrders.push(new Order_1.Order(openOrderJson)); - } - return openOrders; - }); - } - /** - * Interface to the "GET v3/allOrders" Binance's API operation. Get all account - * orders (active, canceled, or filled). - * - * @param symbol The symbol for which we want to retrieve the orders. - * @param id The order ID from which we want to retrieve the orders - * (if set, the API will retrieve the orders with an ID greater - * or equal to the one specified, otherwise the most recent orders). - * @param limit The maximum number of returned orders. - * @param timeout The request validity maximum time frame (defaults to 5000 ms). - * - * @returns An array representing all of the account's orders in every state. - */ - getOrders(symbol, id, limit, timeout) { - return __awaiter(this, void 0, void 0, function* () { - const ordersJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "allOrders", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["orderId", id], ["limit", limit], ["recvWindow", timeout]); - const orders = []; - for (const orderJson of ordersJson) { - orders.push(new Order_1.Order(orderJson)); - } - return orders; - }); - } - /** - * Interface to the "GET v3/account" Binance's API operation. Get current - * account information. - * - * @param timeout The request validity maximum time frame (defaults to 5000 ms). - * - * @returns The current account information. - */ - getAccountData(timeout) { - return __awaiter(this, void 0, void 0, function* () { - return new AccountData_1.AccountData(yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "account", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["recvWindow", timeout])); - }); - } - /** - * Interface to the "GET v3/myTrades" Binance's API operation. Get trades for - * a specific account and symbol. - * - * @param symbol The market on which the trades were originally executed. - * @param limit The maximum number of returned trades. - * @param fromId The trade's ID to start fetching from. If not given, the - * API will retrieve the most recent trades first. - * @param timeout The request validity maximum time frame (defaults to 5000 ms). - * - * @returns The account's trade list respecting the given constraints. - */ - getTrades(symbol, limit, fromId, timeout) { - return __awaiter(this, void 0, void 0, function* () { - const tradesJson = yield this.makeRequest(HttpMethod_1.HttpMethod.GET, ApiVersion_1.ApiVersion.V3, "myTrades", AuthenticationMethod_1.AuthenticationMethod.SIGNED, ["symbol", symbol], ["limit", limit], ["fromId", fromId], ["recvWindow", timeout]); - const trades = []; - for (const tradeJson of tradesJson) { - trades.push(new Trade_1.Trade(tradeJson)); - } - return trades; - }); - } - /** - * Interface to the "POST v1/userDataStream" Binance's API operation. - * Initializes a new data stream. - * - * @returns A listen key to be passed as a parameter when starting a - * new data stream. - */ - openUserStream() { - return __awaiter(this, void 0, void 0, function* () { - return (yield this.makeRequest(HttpMethod_1.HttpMethod.POST, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY)).listenKey; - }); - } - /** - * Interface to the "PUT v1/userDataStream" Binance's API operation. - * Pings a user data stream in order to prevent a time out. - * - * @param streamId A string representing the stream's ID - * (returned by [[openUserStream]]). - */ - keepAliveUserStream(streamId) { - return __awaiter(this, void 0, void 0, function* () { - yield this.makeRequest(HttpMethod_1.HttpMethod.PUT, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY, ["listenKey", streamId]); - }); - } - /** - * Interface to the "DEconstE v1/userDataStream" Binance's API operation. - * Closes out a user data stream. - * - * @param streamId A string representing the stream's ID - * (returned by [[openUserStream]]). - */ - closeUserStream(streamId) { - return __awaiter(this, void 0, void 0, function* () { - yield this.makeRequest(HttpMethod_1.HttpMethod.DELETE, ApiVersion_1.ApiVersion.V1, "userDataStream", AuthenticationMethod_1.AuthenticationMethod.API_KEY, ["listenKey", streamId]); - }); - } - /** - * Initializes a web socket data stream that gives us information about a - * single symbol's order book updates. Stream keepalive is performed through - * [[keepAliveUserStream]] following the rules described - * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) - * - * @param symbol The symbol of which we want to get the order book updates. - * @param onUpdate A function to be called when a new update is received. - * @param connectionTimeout Timeout based on which the web socket connection is - * considered to be broken based on a heartbeat monitor. - * @param onLostConnection A callback to be invoked when the web socket connection - * is detected as broken. - */ - monitorOrderBook(symbol, onUpdate, connectionTimeout, onLostConnection) { - const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + symbol.toLowerCase() + "@depth", { perMessageDeflate: false }); - new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) - ? BinanceApiClient.DEFAULT_WS_TIMEOUT - : connectionTimeout, onLostConnection).handle(); - websocket.on("message", (data) => { - onUpdate(new OrderBookUpdate_1.OrderBookUpdate(JSON.parse(data))); - }); - } - /** - * Initializes a web socket data stream that gives us information about - * Kline/candlestick updates. Stream keepalive is performed through - * [[keepAliveUserStream]] following the rules described - * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) - * - * @param symbol The symbol of which we want to get the candlestick updates. - * @param interval The interval to which the requested candlestick updates - * refer to. - * @param onUpdate A function to be called when a new update is received. - * @param connectionTimeout Timeout based on which the web socket connection is - * considered to be broken based on a heartbeat monitor. - * @param onLostConnection A callback to be invoked when the web socket connection - * is detected as broken. - */ - monitorCandlesticks(symbol, interval, onUpdate, connectionTimeout, onLostConnection) { - return __awaiter(this, void 0, void 0, function* () { - const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + - symbol.toLowerCase() + - "@kline_" + - interval, { perMessageDeflate: false }); - new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) - ? BinanceApiClient.DEFAULT_WS_TIMEOUT - : connectionTimeout, onLostConnection).handle(); - websocket.on("message", (data) => { - onUpdate(new CandlestickUpdate_1.CandlestickUpdate(JSON.parse(data))); - }); - }); - } - /** - * Initializes a web socket data stream that gives us information about - * trade updates. Stream keepalive is performed through - * [[keepAliveUserStream]] following the rules described - * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md) - * - * @param symbol The symbol of which we want to get the trade updates. - * @param onUpdate A function to be called when a new update is received. - * @param connectionTimeout Timeout based on which the web socket connection is - * considered to be broken based on a heartbeat monitor. - * @param onLostConnection A callback to be invoked when the web socket connection - * is detected as broken. - */ - monitorTrades(symbol, onUpdate, connectionTimeout, onLostConnection) { - const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + symbol.toLowerCase() + "@aggTrade", { perMessageDeflate: false }); - new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) - ? BinanceApiClient.DEFAULT_WS_TIMEOUT - : connectionTimeout, onLostConnection).handle(); - websocket.on("message", (data) => { - onUpdate(new TradeUpdate_1.TradeUpdate(JSON.parse(data))); - }); - } - /** - * Initializes a web socket data stream that gives us information about - * the personal account updates. Stream keepalive is performed through - * [[keepAliveUserStream]] following the rules described - * [here](https://github.com/binance-exchange/binance-official-api-docs/blob/master/user-data-stream.md) - * - * @param listenKey The listen key returned when a user data stream gets - * initialized by [[openUserStream]]. - * @param onUpdate A function to be called when a new update is received. - * @param connectionTimeout Timeout based on which the web socket connection is - * considered to be broken based on a heartbeat monitor. - * @param onLostConnection A callback to be invoked when the web socket connection - * is detected as broken. - */ - monitorUser(listenKey, onUpdate, connectionTimeout, onLostConnection) { - const websocket = new WebSocket(BinanceApiClient.WS_BASE_URL + listenKey, { perMessageDeflate: false }); - new websocket_heartbeats_1.HeartbeatHandler(websocket, util_1.isNullOrUndefined(connectionTimeout) - ? BinanceApiClient.DEFAULT_WS_TIMEOUT - : connectionTimeout, onLostConnection).handle(); - websocket.on("message", (data) => { - const jsonData = JSON.parse(data); - switch (jsonData.e) { - case "outboundAccountInfo": { - onUpdate(new AccountUpdate_1.AccountUpdate(jsonData)); - break; - } - case "executionReport": { - onUpdate(new OrderUpdate_1.OrderUpdate(jsonData)); - break; - } - } - }); - } - /** - * Utility method that sets up and sends a request to the Binance's API, handling - * the authentication through the API key and API secret parameters possibly given - * when instantiating the client itself. - * - * @param httpMethod The HTTP method through which the specified API is accessed. - * @param accessedResource The Binance's API resource that we would like to access. - * @param apiVersion The API version at which the wanted resource can be accessed. - * @param requiredAuthentication The authentication type required in order to access the - * specified resource. - * @param parameters The parameters which the accessed resource may use in order to - * give us the expected result. - * - * @returns Either the promise of the Binance's API JSON response, or the - * JSON response if using the await construct. - */ - makeRequest(httpMethod, apiVersion, accessedResource, requiredAuthentication, ...parameters) { - return __awaiter(this, void 0, void 0, function* () { - const apiUrl = new url_1.URL(Path.join("api", apiVersion, accessedResource), "https://api.binance.com"); - for (const parameter of parameters) { - if (util_1.isNullOrUndefined(parameter[1])) { - continue; - } - apiUrl.searchParams.append(parameter[0], parameter[1].toString()); - } - const headers = this.setupAuthentication(httpMethod, apiUrl, requiredAuthentication); - try { - return yield request({ - method: HttpMethod_1.HttpMethod[httpMethod], - url: apiUrl.href, - headers: headers, - json: true - }); - } - catch (error) { - throw new ApiError_1.ApiError(error.error.code, error.error.msg); - } - }); - } - /** - * Utility method setting up the request in order to handle Binance's various - * authentication methods. - * - * @param httpMethod The HTTP method used to access the wanted resource - * (mainly used for error logging purposes). - * @param apiUrl The URL at which the wanted resource can be accessed. - * @param authenticationMethod The authentication method through which the wanted - * resource can be accessed through the specified URL. - */ - setupAuthentication(httpMethod, apiUrl, authenticationMethod) { - const headers = {}; - if (authenticationMethod === AuthenticationMethod_1.AuthenticationMethod.NONE) { - return; - } - if (util_1.isNullOrUndefined(BinanceApiClient.API_KEY)) { - throw new AuthenticationError_1.AuthenticationError(httpMethod, apiUrl, authenticationMethod); - } - headers["X-MBX-APIKEY"] = BinanceApiClient.API_KEY; - if (authenticationMethod === AuthenticationMethod_1.AuthenticationMethod.SIGNED) { - if (util_1.isNullOrUndefined(BinanceApiClient.API_SECRET)) { - throw new AuthenticationError_1.AuthenticationError(httpMethod, apiUrl, authenticationMethod); - } - apiUrl.searchParams.append("timestamp", new Date().getTime().toString()); - apiUrl.searchParams.append("signature", CryptoJs.HmacSHA256(apiUrl.searchParams.toString(), BinanceApiClient.API_SECRET).toString()); - } - return headers; - } -} -exports.BinanceApiClient = BinanceApiClient; -BinanceApiClient.WS_BASE_URL = "wss://stream.binance.com:9443/ws/"; -BinanceApiClient.DEFAULT_WS_TIMEOUT = 60000; -//# sourceMappingURL=BinanceApiClient.js.map \ No newline at end of file diff --git a/build/src/BinanceApiClient.js.map b/build/src/BinanceApiClient.js.map deleted file mode 100644 index 48078e2..0000000 --- a/build/src/BinanceApiClient.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BinanceApiClient.js","sourceRoot":"","sources":["../../src/BinanceApiClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAoE;AACpE,mDAAgD;AAChD,sCAAsC;AACtC,mDAAgD;AAChD,sEAAmE;AACnE,2CAA2C;AAC3C,6BAA6B;AAC7B,+BAAyC;AACzC,6BAA0B;AAC1B,wDAAqD;AACrD,gDAA6C;AAC7C,gDAA6C;AAE7C,kEAA+D;AAC/D,uEAAoE;AACpE,4DAAyD;AACzD,mDAAgD;AAChD,iDAA8C;AAC9C,iDAA8C;AAC9C,qDAAkD;AAClD,8EAA2E;AAC3E,wEAAqE;AACrE,8DAA2D;AAC3D,gDAA6C;AAC7C,gCAAgC;AAChC,8EAA2E;AAC3E,wFAAqF;AACrF,sEAAmE;AACnE,4EAAyE;AACzE,sEAAmE;AACnE,6DAA0D;AAC1D,uDAAoD;AACpD,4DAAyD;AACzD,wDAAqD;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AAM,EACN,oBAAoB,CACvB,CAAC;SACL;QACD,OAAO,CAAC,cAAc,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC;QAEnD,IAAI,oBAAoB,KAAK,2CAAoB,CAAC,MAAM,EAAE;YACtD,IAAI,wBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE;gBAChD,MAAM,IAAI,yCAAmB,CACzB,UAAU,EACV,MAAM,EACN,oBAAoB,CACvB,CAAC;aACL;YACD,MAAM,CAAC,YAAY,CAAC,MAAM,CACtB,WAAW,EACX,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAClC,CAAC;YACF,MAAM,CAAC,YAAY,CAAC,MAAM,CACtB,WAAW,EACX,QAAQ,CAAC,UAAU,CACf,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EAC9B,gBAAgB,CAAC,UAAU,CAC9B,CAAC,QAAQ,EAAE,CACf,CAAC;SACL;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;;AAhzBL,4CAizBC;AAhzB2B,4BAAW,GAC/B,mCAAmC,CAAC;AAChB,mCAAkB,GAAW,KAAK,CAAC"} \ No newline at end of file diff --git a/build/src/enums/ApiVersion.js b/build/src/enums/ApiVersion.js deleted file mode 100644 index 6e0edb5..0000000 --- a/build/src/enums/ApiVersion.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ApiVersion = void 0; -/** - * Represents a single API version. - */ -var ApiVersion; -(function (ApiVersion) { - ApiVersion["V1"] = "v1"; - ApiVersion["V2"] = "v2"; - ApiVersion["V3"] = "v3"; -})(ApiVersion = exports.ApiVersion || (exports.ApiVersion = {})); -//# sourceMappingURL=ApiVersion.js.map \ No newline at end of file diff --git a/build/src/enums/ApiVersion.js.map b/build/src/enums/ApiVersion.js.map deleted file mode 100644 index 5b3b192..0000000 --- a/build/src/enums/ApiVersion.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ApiVersion.js","sourceRoot":"","sources":["../../../src/enums/ApiVersion.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,uBAAS,CAAA;IACT,uBAAS,CAAA;IACT,uBAAS,CAAA;AACX,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB"} \ No newline at end of file diff --git a/build/src/enums/AuthenticationMethod.js b/build/src/enums/AuthenticationMethod.js deleted file mode 100644 index 0b60dba..0000000 --- a/build/src/enums/AuthenticationMethod.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticationMethod = void 0; -/** - * Represents a single API authentication method. - */ -var AuthenticationMethod; -(function (AuthenticationMethod) { - AuthenticationMethod[AuthenticationMethod["NONE"] = 0] = "NONE"; - AuthenticationMethod[AuthenticationMethod["API_KEY"] = 1] = "API_KEY"; - AuthenticationMethod[AuthenticationMethod["SIGNED"] = 2] = "SIGNED"; -})(AuthenticationMethod = exports.AuthenticationMethod || (exports.AuthenticationMethod = {})); -//# sourceMappingURL=AuthenticationMethod.js.map \ No newline at end of file diff --git a/build/src/enums/AuthenticationMethod.js.map b/build/src/enums/AuthenticationMethod.js.map deleted file mode 100644 index 1983f50..0000000 --- a/build/src/enums/AuthenticationMethod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationMethod.js","sourceRoot":"","sources":["../../../src/enums/AuthenticationMethod.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,+DAAI,CAAA;IACJ,qEAAO,CAAA;IACP,mEAAM,CAAA;AACR,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B"} \ No newline at end of file diff --git a/build/src/enums/CandlestickInterval.js b/build/src/enums/CandlestickInterval.js deleted file mode 100644 index 4b590b8..0000000 --- a/build/src/enums/CandlestickInterval.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CandlestickInterval = void 0; -/** - * Represents a single candlestick interval. - */ -var CandlestickInterval; -(function (CandlestickInterval) { - CandlestickInterval["ONE_MINUTE"] = "1m"; - CandlestickInterval["THREE_MINUTES"] = "3m"; - CandlestickInterval["FIVE_MINUTES"] = "5m"; - CandlestickInterval["FIFTEEN_MINUTES"] = "15m"; - CandlestickInterval["THIRTY_MINUTES"] = "30m"; - CandlestickInterval["ONE_HOUR"] = "1h"; - CandlestickInterval["TWO_HOURS"] = "2h"; - CandlestickInterval["FOUR_HOURS"] = "4h"; - CandlestickInterval["SIX_HOURS"] = "6h"; - CandlestickInterval["EIGHT_HOURS"] = "8h"; - CandlestickInterval["TWELVE_HOURS"] = "12h"; - CandlestickInterval["ONE_DAY"] = "1d"; - CandlestickInterval["THREE_DAYS"] = "3d"; - CandlestickInterval["ONE_WEEK"] = "1w"; - CandlestickInterval["ONE_MONTH"] = "1M"; -})(CandlestickInterval = exports.CandlestickInterval || (exports.CandlestickInterval = {})); -//# sourceMappingURL=CandlestickInterval.js.map \ No newline at end of file diff --git a/build/src/enums/CandlestickInterval.js.map b/build/src/enums/CandlestickInterval.js.map deleted file mode 100644 index 3ac44a4..0000000 --- a/build/src/enums/CandlestickInterval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CandlestickInterval.js","sourceRoot":"","sources":["../../../src/enums/CandlestickInterval.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,mBAgBX;AAhBD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,2CAAoB,CAAA;IACpB,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;IACvB,6CAAsB,CAAA;IACtB,sCAAe,CAAA;IACf,uCAAgB,CAAA;IAChB,wCAAiB,CAAA;IACjB,uCAAgB,CAAA;IAChB,yCAAkB,CAAA;IAClB,2CAAoB,CAAA;IACpB,qCAAc,CAAA;IACd,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,uCAAgB,CAAA;AAClB,CAAC,EAhBW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAgB9B"} \ No newline at end of file diff --git a/build/src/enums/FilterType.js b/build/src/enums/FilterType.js deleted file mode 100644 index c21280a..0000000 --- a/build/src/enums/FilterType.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FilterType = void 0; -/** - * Represents a single filter type. - */ -var FilterType; -(function (FilterType) { - FilterType[FilterType["PRICE_FILTER"] = 0] = "PRICE_FILTER"; - FilterType[FilterType["LOT_SIZE"] = 1] = "LOT_SIZE"; - FilterType[FilterType["MIN_NOTIONAL"] = 2] = "MIN_NOTIONAL"; - FilterType[FilterType["MAX_NUM_ORDERS"] = 3] = "MAX_NUM_ORDERS"; - FilterType[FilterType["MAX_ALGO_ORDERS"] = 4] = "MAX_ALGO_ORDERS"; - FilterType[FilterType["EXCHANGE_MAX_NUM_ORDERS"] = 5] = "EXCHANGE_MAX_NUM_ORDERS"; - FilterType[FilterType["EXCHANGE_MAX_ALGO_ORDERS"] = 6] = "EXCHANGE_MAX_ALGO_ORDERS"; -})(FilterType = exports.FilterType || (exports.FilterType = {})); -//# sourceMappingURL=FilterType.js.map \ No newline at end of file diff --git a/build/src/enums/FilterType.js.map b/build/src/enums/FilterType.js.map deleted file mode 100644 index 84db53f..0000000 --- a/build/src/enums/FilterType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FilterType.js","sourceRoot":"","sources":["../../../src/enums/FilterType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,2DAAY,CAAA;IACZ,mDAAQ,CAAA;IACR,2DAAY,CAAA;IACZ,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,iFAAuB,CAAA;IACvB,mFAAwB,CAAA;AAC1B,CAAC,EARW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAQrB"} \ No newline at end of file diff --git a/build/src/enums/HttpMethod.js b/build/src/enums/HttpMethod.js deleted file mode 100644 index a1d7344..0000000 --- a/build/src/enums/HttpMethod.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpMethod = void 0; -/** - * Represents a single HTTP method. - */ -var HttpMethod; -(function (HttpMethod) { - HttpMethod[HttpMethod["GET"] = 0] = "GET"; - HttpMethod[HttpMethod["POST"] = 1] = "POST"; - HttpMethod[HttpMethod["PUT"] = 2] = "PUT"; - HttpMethod[HttpMethod["DELETE"] = 3] = "DELETE"; -})(HttpMethod = exports.HttpMethod || (exports.HttpMethod = {})); -//# sourceMappingURL=HttpMethod.js.map \ No newline at end of file diff --git a/build/src/enums/HttpMethod.js.map b/build/src/enums/HttpMethod.js.map deleted file mode 100644 index 7bb905d..0000000 --- a/build/src/enums/HttpMethod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HttpMethod.js","sourceRoot":"","sources":["../../../src/enums/HttpMethod.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yCAAG,CAAA;IACH,2CAAI,CAAA;IACJ,yCAAG,CAAA;IACH,+CAAM,CAAA;AACR,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"} \ No newline at end of file diff --git a/build/src/enums/OrderExecutionStatus.js b/build/src/enums/OrderExecutionStatus.js deleted file mode 100644 index f53e7b5..0000000 --- a/build/src/enums/OrderExecutionStatus.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderExecutionStatus = void 0; -/** - * Represents a single order execution status. - */ -var OrderExecutionStatus; -(function (OrderExecutionStatus) { - OrderExecutionStatus[OrderExecutionStatus["NEW"] = 0] = "NEW"; - OrderExecutionStatus[OrderExecutionStatus["CANCELED"] = 1] = "CANCELED"; - OrderExecutionStatus[OrderExecutionStatus["REPLACED"] = 2] = "REPLACED"; - OrderExecutionStatus[OrderExecutionStatus["REJECTED"] = 3] = "REJECTED"; - OrderExecutionStatus[OrderExecutionStatus["TRADE"] = 4] = "TRADE"; - OrderExecutionStatus[OrderExecutionStatus["EXPIRED"] = 5] = "EXPIRED"; -})(OrderExecutionStatus = exports.OrderExecutionStatus || (exports.OrderExecutionStatus = {})); -//# sourceMappingURL=OrderExecutionStatus.js.map \ No newline at end of file diff --git a/build/src/enums/OrderExecutionStatus.js.map b/build/src/enums/OrderExecutionStatus.js.map deleted file mode 100644 index 5335a22..0000000 --- a/build/src/enums/OrderExecutionStatus.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderExecutionStatus.js","sourceRoot":"","sources":["../../../src/enums/OrderExecutionStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,6DAAG,CAAA;IACH,uEAAQ,CAAA;IACR,uEAAQ,CAAA;IACR,uEAAQ,CAAA;IACR,iEAAK,CAAA;IACL,qEAAO,CAAA;AACT,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"} \ No newline at end of file diff --git a/build/src/enums/OrderRejectionMotive.js b/build/src/enums/OrderRejectionMotive.js deleted file mode 100644 index dd7671c..0000000 --- a/build/src/enums/OrderRejectionMotive.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderRejectionMotive = void 0; -/** - * Represents a single order rejection motive. - */ -var OrderRejectionMotive; -(function (OrderRejectionMotive) { - OrderRejectionMotive[OrderRejectionMotive["NONE"] = 0] = "NONE"; - OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_INSTRUMENT"] = 1] = "UNKNOWN_INSTRUMENT"; - OrderRejectionMotive[OrderRejectionMotive["MARKET_CLOSED"] = 2] = "MARKET_CLOSED"; - OrderRejectionMotive[OrderRejectionMotive["PRICE_QTY_EXCEED_HARD_LIMITS"] = 3] = "PRICE_QTY_EXCEED_HARD_LIMITS"; - OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_ORDER"] = 4] = "UNKNOWN_ORDER"; - OrderRejectionMotive[OrderRejectionMotive["DUPLICATE_ORDER"] = 5] = "DUPLICATE_ORDER"; - OrderRejectionMotive[OrderRejectionMotive["UNKNOWN_ACCOUNT"] = 6] = "UNKNOWN_ACCOUNT"; - OrderRejectionMotive[OrderRejectionMotive["INSUFFICIENT_BALANCE"] = 7] = "INSUFFICIENT_BALANCE"; - OrderRejectionMotive[OrderRejectionMotive["ACCOUNT_INACTIVE"] = 8] = "ACCOUNT_INACTIVE"; - OrderRejectionMotive[OrderRejectionMotive["ACCOUNT_CANNOT_SETTLE"] = 9] = "ACCOUNT_CANNOT_SETTLE"; -})(OrderRejectionMotive = exports.OrderRejectionMotive || (exports.OrderRejectionMotive = {})); -//# sourceMappingURL=OrderRejectionMotive.js.map \ No newline at end of file diff --git a/build/src/enums/OrderRejectionMotive.js.map b/build/src/enums/OrderRejectionMotive.js.map deleted file mode 100644 index 3e5c92e..0000000 --- a/build/src/enums/OrderRejectionMotive.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderRejectionMotive.js","sourceRoot":"","sources":["../../../src/enums/OrderRejectionMotive.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,+DAAI,CAAA;IACJ,2FAAkB,CAAA;IAClB,iFAAa,CAAA;IACb,+GAA4B,CAAA;IAC5B,iFAAa,CAAA;IACb,qFAAe,CAAA;IACf,qFAAe,CAAA;IACf,+FAAoB,CAAA;IACpB,uFAAgB,CAAA;IAChB,iGAAqB,CAAA;AACvB,CAAC,EAXW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAW/B"} \ No newline at end of file diff --git a/build/src/enums/OrderSide.js b/build/src/enums/OrderSide.js deleted file mode 100644 index d235164..0000000 --- a/build/src/enums/OrderSide.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderSide = void 0; -/** - * Represents a single order side. - */ -var OrderSide; -(function (OrderSide) { - OrderSide[OrderSide["BUY"] = 0] = "BUY"; - OrderSide[OrderSide["SELL"] = 1] = "SELL"; -})(OrderSide = exports.OrderSide || (exports.OrderSide = {})); -//# sourceMappingURL=OrderSide.js.map \ No newline at end of file diff --git a/build/src/enums/OrderSide.js.map b/build/src/enums/OrderSide.js.map deleted file mode 100644 index ec0e8ad..0000000 --- a/build/src/enums/OrderSide.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderSide.js","sourceRoot":"","sources":["../../../src/enums/OrderSide.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,yCAAI,CAAA;AACN,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"} \ No newline at end of file diff --git a/build/src/enums/OrderStatus.js b/build/src/enums/OrderStatus.js deleted file mode 100644 index 94da694..0000000 --- a/build/src/enums/OrderStatus.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderStatus = void 0; -/** - * Represents a single order status. - */ -var OrderStatus; -(function (OrderStatus) { - OrderStatus[OrderStatus["NEW"] = 0] = "NEW"; - OrderStatus[OrderStatus["PARTIALLY_FILLED"] = 1] = "PARTIALLY_FILLED"; - OrderStatus[OrderStatus["FILLED"] = 2] = "FILLED"; - OrderStatus[OrderStatus["CANCELED"] = 3] = "CANCELED"; - OrderStatus[OrderStatus["PENDING_CANCEL"] = 4] = "PENDING_CANCEL"; - OrderStatus[OrderStatus["REJECTED"] = 5] = "REJECTED"; - OrderStatus[OrderStatus["EXPIRED"] = 6] = "EXPIRED"; -})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); -//# sourceMappingURL=OrderStatus.js.map \ No newline at end of file diff --git a/build/src/enums/OrderStatus.js.map b/build/src/enums/OrderStatus.js.map deleted file mode 100644 index 85dcc1d..0000000 --- a/build/src/enums/OrderStatus.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderStatus.js","sourceRoot":"","sources":["../../../src/enums/OrderStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,2CAAG,CAAA;IACH,qEAAgB,CAAA;IAChB,iDAAM,CAAA;IACN,qDAAQ,CAAA;IACR,iEAAc,CAAA;IACd,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACT,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB"} \ No newline at end of file diff --git a/build/src/enums/OrderType.js b/build/src/enums/OrderType.js deleted file mode 100644 index 58a9956..0000000 --- a/build/src/enums/OrderType.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderType = void 0; -/** - * Represents a single order type. - */ -var OrderType; -(function (OrderType) { - OrderType[OrderType["LIMIT"] = 0] = "LIMIT"; - OrderType[OrderType["MARKET"] = 1] = "MARKET"; - OrderType[OrderType["STOP_LOSS"] = 2] = "STOP_LOSS"; - OrderType[OrderType["STOP_LOSS_LIMIT"] = 3] = "STOP_LOSS_LIMIT"; - OrderType[OrderType["TAKE_PROFIT"] = 4] = "TAKE_PROFIT"; - OrderType[OrderType["TAKE_PROFIT_LIMIT"] = 5] = "TAKE_PROFIT_LIMIT"; - OrderType[OrderType["LIMIT_MAKER"] = 6] = "LIMIT_MAKER"; -})(OrderType = exports.OrderType || (exports.OrderType = {})); -//# sourceMappingURL=OrderType.js.map \ No newline at end of file diff --git a/build/src/enums/OrderType.js.map b/build/src/enums/OrderType.js.map deleted file mode 100644 index 01be6a8..0000000 --- a/build/src/enums/OrderType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderType.js","sourceRoot":"","sources":["../../../src/enums/OrderType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,2CAAK,CAAA;IACL,6CAAM,CAAA;IACN,mDAAS,CAAA;IACT,+DAAe,CAAA;IACf,uDAAW,CAAA;IACX,mEAAiB,CAAA;IACjB,uDAAW,CAAA;AACb,CAAC,EARW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAQpB"} \ No newline at end of file diff --git a/build/src/enums/RateLimitInterval.js b/build/src/enums/RateLimitInterval.js deleted file mode 100644 index 4521198..0000000 --- a/build/src/enums/RateLimitInterval.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RateLimitInterval = void 0; -var RateLimitInterval; -(function (RateLimitInterval) { - RateLimitInterval[RateLimitInterval["SECOND"] = 0] = "SECOND"; - RateLimitInterval[RateLimitInterval["MINUTE"] = 1] = "MINUTE"; - RateLimitInterval[RateLimitInterval["DAY"] = 2] = "DAY"; -})(RateLimitInterval = exports.RateLimitInterval || (exports.RateLimitInterval = {})); -//# sourceMappingURL=RateLimitInterval.js.map \ No newline at end of file diff --git a/build/src/enums/RateLimitInterval.js.map b/build/src/enums/RateLimitInterval.js.map deleted file mode 100644 index 702506b..0000000 --- a/build/src/enums/RateLimitInterval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RateLimitInterval.js","sourceRoot":"","sources":["../../../src/enums/RateLimitInterval.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,6DAAM,CAAA;IACN,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"} \ No newline at end of file diff --git a/build/src/enums/RateLimitType.js b/build/src/enums/RateLimitType.js deleted file mode 100644 index ead8844..0000000 --- a/build/src/enums/RateLimitType.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RateLimitType = void 0; -/** - * Represents a single rate limit type. - */ -var RateLimitType; -(function (RateLimitType) { - RateLimitType[RateLimitType["REQUESTS"] = 0] = "REQUESTS"; - RateLimitType[RateLimitType["ORDERS"] = 1] = "ORDERS"; -})(RateLimitType = exports.RateLimitType || (exports.RateLimitType = {})); -//# sourceMappingURL=RateLimitType.js.map \ No newline at end of file diff --git a/build/src/enums/RateLimitType.js.map b/build/src/enums/RateLimitType.js.map deleted file mode 100644 index f18b03b..0000000 --- a/build/src/enums/RateLimitType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RateLimitType.js","sourceRoot":"","sources":["../../../src/enums/RateLimitType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,yDAAQ,CAAA;IACR,qDAAM,CAAA;AACR,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"} \ No newline at end of file diff --git a/build/src/enums/ResponseType.js b/build/src/enums/ResponseType.js deleted file mode 100644 index d4f24f1..0000000 --- a/build/src/enums/ResponseType.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseType = void 0; -/** - * Represents a single response type. - */ -var ResponseType; -(function (ResponseType) { - ResponseType[ResponseType["ACKNOWLEDGEMENT"] = 0] = "ACKNOWLEDGEMENT"; - ResponseType[ResponseType["RESULT"] = 1] = "RESULT"; - ResponseType[ResponseType["FULL"] = 2] = "FULL"; -})(ResponseType = exports.ResponseType || (exports.ResponseType = {})); -//# sourceMappingURL=ResponseType.js.map \ No newline at end of file diff --git a/build/src/enums/ResponseType.js.map b/build/src/enums/ResponseType.js.map deleted file mode 100644 index 29759cc..0000000 --- a/build/src/enums/ResponseType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResponseType.js","sourceRoot":"","sources":["../../../src/enums/ResponseType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,qEAAe,CAAA;IACf,mDAAM,CAAA;IACN,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"} \ No newline at end of file diff --git a/build/src/enums/SymbolStatus.js b/build/src/enums/SymbolStatus.js deleted file mode 100644 index ced5a3e..0000000 --- a/build/src/enums/SymbolStatus.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SymbolStatus = void 0; -/** - * Represents a single symbol status. - */ -var SymbolStatus; -(function (SymbolStatus) { - SymbolStatus[SymbolStatus["PRE_TRADING"] = 0] = "PRE_TRADING"; - SymbolStatus[SymbolStatus["TRADING"] = 1] = "TRADING"; - SymbolStatus[SymbolStatus["POST_TRADING"] = 2] = "POST_TRADING"; - SymbolStatus[SymbolStatus["END_OF_DAY"] = 3] = "END_OF_DAY"; - SymbolStatus[SymbolStatus["HALT"] = 4] = "HALT"; - SymbolStatus[SymbolStatus["AUCTION_MATCH"] = 5] = "AUCTION_MATCH"; - SymbolStatus[SymbolStatus["BREAK"] = 6] = "BREAK"; -})(SymbolStatus = exports.SymbolStatus || (exports.SymbolStatus = {})); -//# sourceMappingURL=SymbolStatus.js.map \ No newline at end of file diff --git a/build/src/enums/SymbolStatus.js.map b/build/src/enums/SymbolStatus.js.map deleted file mode 100644 index 6681c3a..0000000 --- a/build/src/enums/SymbolStatus.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SymbolStatus.js","sourceRoot":"","sources":["../../../src/enums/SymbolStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,6DAAW,CAAA;IACX,qDAAO,CAAA;IACP,+DAAY,CAAA;IACZ,2DAAU,CAAA;IACV,+CAAI,CAAA;IACJ,iEAAa,CAAA;IACb,iDAAK,CAAA;AACP,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB"} \ No newline at end of file diff --git a/build/src/enums/SymbolType.js b/build/src/enums/SymbolType.js deleted file mode 100644 index ff19284..0000000 --- a/build/src/enums/SymbolType.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SymbolType = void 0; -/** - * Represents a single symbol type. - */ -var SymbolType; -(function (SymbolType) { - SymbolType[SymbolType["SPOT"] = 0] = "SPOT"; -})(SymbolType = exports.SymbolType || (exports.SymbolType = {})); -//# sourceMappingURL=SymbolType.js.map \ No newline at end of file diff --git a/build/src/enums/SymbolType.js.map b/build/src/enums/SymbolType.js.map deleted file mode 100644 index 122e9c3..0000000 --- a/build/src/enums/SymbolType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SymbolType.js","sourceRoot":"","sources":["../../../src/enums/SymbolType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,2CAAI,CAAA;AACN,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB"} \ No newline at end of file diff --git a/build/src/enums/TimeInForce.js b/build/src/enums/TimeInForce.js deleted file mode 100644 index 7c0aaad..0000000 --- a/build/src/enums/TimeInForce.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimeInForce = void 0; -/** - * Represents a single time in force. - */ -var TimeInForce; -(function (TimeInForce) { - TimeInForce[TimeInForce["GTC"] = 0] = "GTC"; - TimeInForce[TimeInForce["IOC"] = 1] = "IOC"; - TimeInForce[TimeInForce["FOK"] = 2] = "FOK"; -})(TimeInForce = exports.TimeInForce || (exports.TimeInForce = {})); -//# sourceMappingURL=TimeInForce.js.map \ No newline at end of file diff --git a/build/src/enums/TimeInForce.js.map b/build/src/enums/TimeInForce.js.map deleted file mode 100644 index 125d370..0000000 --- a/build/src/enums/TimeInForce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimeInForce.js","sourceRoot":"","sources":["../../../src/enums/TimeInForce.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,2CAAG,CAAA;IACH,2CAAG,CAAA;IACH,2CAAG,CAAA;AACL,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"} \ No newline at end of file diff --git a/build/src/errors/ApiError.js b/build/src/errors/ApiError.js deleted file mode 100644 index 53726d6..0000000 --- a/build/src/errors/ApiError.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ApiError = void 0; -/** - * Thrown when Binance's API response is identified as an error. - * Both code and message are taken from the response message itself - * and are returned from the client directly from Binance, without - * alterations. - */ -class ApiError extends Error { - constructor(code, message) { - super("Error code: " + code + ", message: " + message); - } -} -exports.ApiError = ApiError; -//# sourceMappingURL=ApiError.js.map \ No newline at end of file diff --git a/build/src/errors/ApiError.js.map b/build/src/errors/ApiError.js.map deleted file mode 100644 index 9359d42..0000000 --- a/build/src/errors/ApiError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["../../../src/errors/ApiError.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAa,QAAS,SAAQ,KAAK;IACjC,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,cAAc,GAAG,IAAI,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAJD,4BAIC"} \ No newline at end of file diff --git a/build/src/errors/AuthenticationError.js b/build/src/errors/AuthenticationError.js deleted file mode 100644 index a5cf7f9..0000000 --- a/build/src/errors/AuthenticationError.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticationError = void 0; -const AuthenticationMethod_1 = require("../enums/AuthenticationMethod"); -const HttpMethod_1 = require("../enums/HttpMethod"); -/** - * Thrown when the API key, API secret or both parameters are found to be - * null or undefined, but are needed in order to set up the request to access - * a specific resource. - */ -class AuthenticationError extends Error { - constructor(httpMethod, apiUrl, requiredAuthentication) { - super("Endpoint [ " + - HttpMethod_1.HttpMethod[httpMethod] + - " ]@[ " + - apiUrl.href.split("?")[0] + - " ] requires " + - "an API key " + - (requiredAuthentication == AuthenticationMethod_1.AuthenticationMethod.SIGNED - ? "and API secret " - : "") + - "in order to be accessed"); - } -} -exports.AuthenticationError = AuthenticationError; -//# sourceMappingURL=AuthenticationError.js.map \ No newline at end of file diff --git a/build/src/errors/AuthenticationError.js.map b/build/src/errors/AuthenticationError.js.map deleted file mode 100644 index 628aaf7..0000000 --- a/build/src/errors/AuthenticationError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthenticationError.js","sourceRoot":"","sources":["../../../src/errors/AuthenticationError.ts"],"names":[],"mappings":";;;AAAA,wEAAqE;AACrE,oDAAiD;AAGjD;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YACE,UAAsB,EACtB,MAAW,EACX,sBAA4C;QAE5C,KAAK,CACH,aAAa;YACX,uBAAU,CAAC,UAAU,CAAC;YACtB,OAAO;YACP,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACzB,cAAc;YACd,aAAa;YACb,CAAC,sBAAsB,IAAI,2CAAoB,CAAC,MAAM;gBACpD,CAAC,CAAC,iBAAiB;gBACnB,CAAC,CAAC,EAAE,CAAC;YACP,yBAAyB,CAC5B,CAAC;IACJ,CAAC;CACF;AAnBD,kDAmBC"} \ No newline at end of file diff --git a/build/src/models/account/AccountData.js b/build/src/models/account/AccountData.js deleted file mode 100644 index bbdb4fc..0000000 --- a/build/src/models/account/AccountData.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AccountData = void 0; -/** - * Represents a single account data - */ -const Balance_1 = require("./Balance"); -class AccountData { - constructor(json) { - this._makerCommission = json.makerCommission; - this._takerCommission = json.takerCommission; - this._buyerCommission = json.buyerCommission; - this._sellerCommission = json.sellerCommission; - this._canTrade = json.canTrade; - this._canWithdraw = json.canWithdraw; - this._canDeposit = json.canDeposit; - this._balances = []; - for (const balanceJson of json.balances) { - this._balances.push(new Balance_1.Balance(balanceJson)); - } - } - get makerCommission() { - return this._makerCommission; - } - set makerCommission(value) { - this._makerCommission = value; - } - get takerCommission() { - return this._takerCommission; - } - set takerCommission(value) { - this._takerCommission = value; - } - get buyerCommission() { - return this._buyerCommission; - } - set buyerCommission(value) { - this._buyerCommission = value; - } - get sellerCommission() { - return this._sellerCommission; - } - set sellerCommission(value) { - this._sellerCommission = value; - } - get canTrade() { - return this._canTrade; - } - set canTrade(value) { - this._canTrade = value; - } - get canWithdraw() { - return this._canWithdraw; - } - set canWithdraw(value) { - this._canWithdraw = value; - } - get canDeposit() { - return this._canDeposit; - } - set canDeposit(value) { - this._canDeposit = value; - } - get balances() { - return this._balances; - } - set balances(value) { - this._balances = value; - } -} -exports.AccountData = AccountData; -//# sourceMappingURL=AccountData.js.map \ No newline at end of file diff --git a/build/src/models/account/AccountData.js.map b/build/src/models/account/AccountData.js.map deleted file mode 100644 index 3ee15d8..0000000 --- a/build/src/models/account/AccountData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountData.js","sourceRoot":"","sources":["../../../../src/models/account/AccountData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,uCAAoC;AAEpC,MAAa,WAAW;IAUpB,YAAY,IAAS;QACjB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,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G,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAC,KAAc;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAc;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AAxFD,kCAwFC"} \ No newline at end of file diff --git a/build/src/models/account/Balance.js b/build/src/models/account/Balance.js deleted file mode 100644 index 73b2e8c..0000000 --- a/build/src/models/account/Balance.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Balance = void 0; -/** - * Represents a single balance. - */ -class Balance { - constructor(json) { - this._asset = json.asset || json.a; - this._available = json.free || json.available || json.f; - this._locked = json.locked || json.l; - } - get asset() { - return this._asset; - } - set asset(value) { - this._asset = value; - } - get available() { - return this._available; - } - set available(value) { - this._available = value; - } - get locked() { - return this._locked; - } - set locked(value) { - this._locked = value; - } -} -exports.Balance = Balance; -//# sourceMappingURL=Balance.js.map \ No newline at end of file diff --git a/build/src/models/account/Balance.js.map b/build/src/models/account/Balance.js.map deleted file mode 100644 index db81cdf..0000000 --- a/build/src/models/account/Balance.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Balance.js","sourceRoot":"","sources":["../../../../src/models/account/Balance.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,OAAO;IAOhB,YAAa,IAAS;QAElB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;IAEzC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAa;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;CAEJ;AAvCD,0BAuCC"} \ No newline at end of file diff --git a/build/src/models/candlestick/Candlestick.js b/build/src/models/candlestick/Candlestick.js deleted file mode 100644 index 9a8423d..0000000 --- a/build/src/models/candlestick/Candlestick.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Candlestick = void 0; -/** - * Represents a single candlestick. - */ -class Candlestick { - constructor(json) { - this._openingTime = new Date(json[0]); - this._openingPrice = json[1]; - this._highestPrice = json[2]; - this._lowestPrice = json[3]; - this._closurePrice = json[4]; - this._baseAssetVolume = json[5]; - this._closureTime = new Date(json[6]); - this._quoteAssetVolume = json[7]; - this._tradesCount = json[8]; - this._boughtBaseAssetVolume = json[9]; - this._boughtQuoteAssetVolume = json[10]; - } - get openingTime() { - return this._openingTime; - } - set openingTime(value) { - this._openingTime = value; - } - get openingPrice() { - return this._openingPrice; - } - set openingPrice(value) { - this._openingPrice = value; - } - get highestPrice() { - return this._highestPrice; - } - set highestPrice(value) { - this._highestPrice = value; - } - get lowestPrice() { - return this._lowestPrice; - } - set lowestPrice(value) { - this._lowestPrice = value; - } - get closurePrice() { - return this._closurePrice; - } - set closurePrice(value) { - this._closurePrice = value; - } - get baseAssetVolume() { - return this._baseAssetVolume; - } - set baseAssetVolume(value) { - this._baseAssetVolume = value; - } - get closureTime() { - return this._closureTime; - } - set closureTime(value) { - this._closureTime = value; - } - get quoteAssetVolume() { - return this._quoteAssetVolume; - } - set quoteAssetVolume(value) { - this._quoteAssetVolume = value; - } - get tradesCount() { - return this._tradesCount; - } - set tradesCount(value) { - this._tradesCount = value; - } - get boughtBaseAssetVolume() { - return this._boughtBaseAssetVolume; - } - set boughtBaseAssetVolume(value) { - this._boughtBaseAssetVolume = value; - } - get boughtQuoteAssetVolume() { - return this._boughtQuoteAssetVolume; - } - set boughtQuoteAssetVolume(value) { - this._boughtQuoteAssetVolume = value; - } -} -exports.Candlestick = Candlestick; -//# sourceMappingURL=Candlestick.js.map \ No newline at end of file diff --git a/build/src/models/candlestick/Candlestick.js.map b/build/src/models/candlestick/Candlestick.js.map deleted file mode 100644 index 4288abf..0000000 --- a/build/src/models/candlestick/Candlestick.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Candlestick.js","sourceRoot":"","sources":["../../../../src/models/candlestick/Candlestick.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAcpB,YAAa,IAAS;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAE,CAAC,CAAE,CAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QAC9B,IAAI,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ACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAW;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,IAAI,gBAAgB,CAAE,KAAa;QAC/B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,qBAAqB;QACrB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACvC,CAAC;IAED,IAAI,qBAAqB,CAAE,KAAa;QACpC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACxC,CAAC;IAED,IAAI,sBAAsB;QACtB,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACxC,CAAC;IAED,IAAI,sBAAsB,CAAE,KAAa;QACrC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACzC,CAAC;CAEJ;AAtHD,kCAsHC"} \ No newline at end of file diff --git a/build/src/models/depth/LatestPrice.js b/build/src/models/depth/LatestPrice.js deleted file mode 100644 index 9ad358e..0000000 --- a/build/src/models/depth/LatestPrice.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LatestPrice = void 0; -/** - * Represents a single latest price for a particular symbol. - */ -class LatestPrice { - constructor(json) { - this._symbol = json.symbol; - this._price = json.price; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } -} -exports.LatestPrice = LatestPrice; -//# sourceMappingURL=LatestPrice.js.map \ No newline at end of file diff --git a/build/src/models/depth/LatestPrice.js.map b/build/src/models/depth/LatestPrice.js.map deleted file mode 100644 index 28c42cf..0000000 --- a/build/src/models/depth/LatestPrice.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LatestPrice.js","sourceRoot":"","sources":["../../../../src/models/depth/LatestPrice.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAKpB,YAAa,IAAS;QAClB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AA1BD,kCA0BC"} \ No newline at end of file diff --git a/build/src/models/depth/OrderBook.js b/build/src/models/depth/OrderBook.js deleted file mode 100644 index 129162f..0000000 --- a/build/src/models/depth/OrderBook.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderBook = void 0; -const PlacedOrder_1 = require("../order/PlacedOrder"); -/** - * Represents a single order book. - */ -class OrderBook { - constructor(json) { - this._asks = []; - for (const askJson of json.asks) { - this._asks.push(new PlacedOrder_1.PlacedOrder(askJson)); - } - this._bids = []; - for (const bidJson of json.bids) { - this._bids.push(new PlacedOrder_1.PlacedOrder(bidJson)); - } - } - get bids() { - return this._bids; - } - set bids(value) { - this._bids = value; - } - get asks() { - return this._asks; - } - set asks(value) { - this._asks = value; - } -} -exports.OrderBook = OrderBook; -//# sourceMappingURL=OrderBook.js.map \ No newline at end of file diff --git a/build/src/models/depth/OrderBook.js.map b/build/src/models/depth/OrderBook.js.map deleted file mode 100644 index 77f7e11..0000000 --- a/build/src/models/depth/OrderBook.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderBook.js","sourceRoot":"","sources":["../../../../src/models/depth/OrderBook.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD;;GAEG;AACH,MAAa,SAAS;IAIlB,YAAY,IAAS;QACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;QAED,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7C;IACL,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoB;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AA/BD,8BA+BC"} \ No newline at end of file diff --git a/build/src/models/filter/LotSizeFilter.js b/build/src/models/filter/LotSizeFilter.js deleted file mode 100644 index bd8851b..0000000 --- a/build/src/models/filter/LotSizeFilter.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LotSizeFilter = void 0; -/** - * Represents a single lot size filter. - */ -class LotSizeFilter { - constructor(json) { - this._minimumQuantity = json.minQty; - this._maximumQuantity = json.maxQty; - this._stepSize = json.stepSize; - } - get minimumQuantity() { - return this._minimumQuantity; - } - set minimumQuantity(value) { - this._minimumQuantity = value; - } - get maximumQuantity() { - return this._maximumQuantity; - } - set maximumQuantity(value) { - this._maximumQuantity = value; - } - get stepSize() { - return this._stepSize; - } - set stepSize(value) { - this._stepSize = value; - } -} -exports.LotSizeFilter = LotSizeFilter; -//# sourceMappingURL=LotSizeFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/LotSizeFilter.js.map b/build/src/models/filter/LotSizeFilter.js.map deleted file mode 100644 index 6673432..0000000 --- a/build/src/models/filter/LotSizeFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LotSizeFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/LotSizeFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,aAAa;IAMtB,YAAa,IAAS;QAElB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEnC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAtCD,sCAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/MaxAlgoOrdersFilter.js b/build/src/models/filter/MaxAlgoOrdersFilter.js deleted file mode 100644 index 5c5eaeb..0000000 --- a/build/src/models/filter/MaxAlgoOrdersFilter.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MaxAlgoOrdersFilter = void 0; -/** - * Represents a single maximum algo order number filter. - */ -class MaxAlgoOrdersFilter { - constructor(json) { - this._value = json.limit; - } - get value() { - return this._value; - } - set value(value) { - this._value = value; - } -} -exports.MaxAlgoOrdersFilter = MaxAlgoOrdersFilter; -//# sourceMappingURL=MaxAlgoOrdersFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MaxAlgoOrdersFilter.js.map b/build/src/models/filter/MaxAlgoOrdersFilter.js.map deleted file mode 100644 index ee13b99..0000000 --- a/build/src/models/filter/MaxAlgoOrdersFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MaxAlgoOrdersFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MaxAlgoOrdersFilter.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,mBAAmB;IAI5B,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,kDAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/MaxOrdersFilter.js b/build/src/models/filter/MaxOrdersFilter.js deleted file mode 100644 index 3c652f3..0000000 --- a/build/src/models/filter/MaxOrdersFilter.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MaxOrdersFilter = void 0; -/** - * Represents a single maximum order number filter. - */ -class MaxOrdersFilter { - constructor(json) { - this._value = json.limit; - } - get value() { - return this._value; - } - set value(value) { - this._value = value; - } -} -exports.MaxOrdersFilter = MaxOrdersFilter; -//# sourceMappingURL=MaxOrdersFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MaxOrdersFilter.js.map b/build/src/models/filter/MaxOrdersFilter.js.map deleted file mode 100644 index 9fe5b5f..0000000 --- a/build/src/models/filter/MaxOrdersFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MaxOrdersFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MaxOrdersFilter.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,eAAe;IAIxB,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,0CAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/MinimumNotionalFilter.js b/build/src/models/filter/MinimumNotionalFilter.js deleted file mode 100644 index f878c3d..0000000 --- a/build/src/models/filter/MinimumNotionalFilter.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MinimumNotionalFilter = void 0; -/** - * Represents a single minimum notional filter. - */ -class MinimumNotionalFilter { - constructor(json) { - this._value = json.minNotional; - } - get value() { - return this._value; - } - set value(value) { - this._value = value; - } -} -exports.MinimumNotionalFilter = MinimumNotionalFilter; -//# sourceMappingURL=MinimumNotionalFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/MinimumNotionalFilter.js.map b/build/src/models/filter/MinimumNotionalFilter.js.map deleted file mode 100644 index b735496..0000000 --- a/build/src/models/filter/MinimumNotionalFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MinimumNotionalFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/MinimumNotionalFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,qBAAqB;IAI9B,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;IACnC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAhBD,sDAgBC"} \ No newline at end of file diff --git a/build/src/models/filter/PriceFilter.js b/build/src/models/filter/PriceFilter.js deleted file mode 100644 index d0a8492..0000000 --- a/build/src/models/filter/PriceFilter.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PriceFilter = void 0; -/** - * Represents a single price filter. - */ -class PriceFilter { - constructor(json) { - this._minimumPrice = json.minPrice; - this._maximumPrice = json.maxPrice; - this._tickSize = json.tickSize; - } - get minimumPrice() { - return this._minimumPrice; - } - set minimumPrice(value) { - this._minimumPrice = value; - } - get maximumPrice() { - return this._maximumPrice; - } - set maximumPrice(value) { - this._maximumPrice = value; - } - get tickSize() { - return this._tickSize; - } - set tickSize(value) { - this._tickSize = value; - } -} -exports.PriceFilter = PriceFilter; -//# sourceMappingURL=PriceFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/PriceFilter.js.map b/build/src/models/filter/PriceFilter.js.map deleted file mode 100644 index bf827c8..0000000 --- a/build/src/models/filter/PriceFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PriceFilter.js","sourceRoot":"","sources":["../../../../src/models/filter/PriceFilter.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,WAAW;IAMpB,YAAa,IAAS;QAElB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEnC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY,CAAE,KAAa;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,YAAY,CAAE,KAAa;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAtCD,kCAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/RateLimit.js b/build/src/models/filter/RateLimit.js deleted file mode 100644 index 0adad9c..0000000 --- a/build/src/models/filter/RateLimit.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RateLimit = void 0; -const RateLimitType_1 = require("../../enums/RateLimitType"); -const RateLimitInterval_1 = require("../../enums/RateLimitInterval"); -class RateLimit { - constructor(json) { - this._type = RateLimitType_1.RateLimitType[json.rateLimitType]; - this._interval = RateLimitInterval_1.RateLimitInterval[json.interval]; - this._value = json.limit; - } - get type() { - return this._type; - } - set type(value) { - this._type = value; - } - get interval() { - return this._interval; - } - set interval(value) { - this._interval = value; - } - get value() { - return this._value; - } - set value(value) { - this._value = value; - } -} -exports.RateLimit = RateLimit; -//# sourceMappingURL=RateLimit.js.map \ No newline at end of file diff --git a/build/src/models/filter/RateLimit.js.map b/build/src/models/filter/RateLimit.js.map deleted file mode 100644 index 8215767..0000000 --- a/build/src/models/filter/RateLimit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RateLimit.js","sourceRoot":"","sources":["../../../../src/models/filter/RateLimit.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,qEAAkE;AAElE,MAAa,SAAS;IAMlB,YAAa,IAAS;QAElB,IAAI,CAAC,KAAK,GAAG,6BAAa,CAAE,IAAI,CAAC,aAAuB,CAAE,CAAC;QAC3D,IAAI,CAAC,SAAS,GAAG,qCAAiB,CAAE,IAAI,CAAC,QAAkB,CAAE,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAE7B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAE,KAAoB;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CAEJ;AAtCD,8BAsCC"} \ No newline at end of file diff --git a/build/src/models/filter/abstraction/ExchangeFilter.js b/build/src/models/filter/abstraction/ExchangeFilter.js deleted file mode 100644 index 3d40167..0000000 --- a/build/src/models/filter/abstraction/ExchangeFilter.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ExchangeFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/abstraction/ExchangeFilter.js.map b/build/src/models/filter/abstraction/ExchangeFilter.js.map deleted file mode 100644 index 4d0476c..0000000 --- a/build/src/models/filter/abstraction/ExchangeFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExchangeFilter.js","sourceRoot":"","sources":["../../../../../src/models/filter/abstraction/ExchangeFilter.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/build/src/models/filter/abstraction/SymbolFilter.js b/build/src/models/filter/abstraction/SymbolFilter.js deleted file mode 100644 index fdadd9a..0000000 --- a/build/src/models/filter/abstraction/SymbolFilter.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SymbolFilter.js.map \ No newline at end of file diff --git a/build/src/models/filter/abstraction/SymbolFilter.js.map b/build/src/models/filter/abstraction/SymbolFilter.js.map deleted file mode 100644 index 2faffd3..0000000 --- a/build/src/models/filter/abstraction/SymbolFilter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SymbolFilter.js","sourceRoot":"","sources":["../../../../../src/models/filter/abstraction/SymbolFilter.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/build/src/models/misc/ExchangeInfo.js b/build/src/models/misc/ExchangeInfo.js deleted file mode 100644 index 267419e..0000000 --- a/build/src/models/misc/ExchangeInfo.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExchangeInfo = void 0; -const RateLimit_1 = require("../filter/RateLimit"); -const Symbol_1 = require("./Symbol"); -const FilterType_1 = require("../../enums/FilterType"); -const MaxOrdersFilter_1 = require("../filter/MaxOrdersFilter"); -const MaxAlgoOrdersFilter_1 = require("../filter/MaxAlgoOrdersFilter"); -/** - * Represents a single exchange info. - */ -class ExchangeInfo { - constructor(json) { - this._timezone = json.timezone; - this._serverTime = new Date(json.serverTime); - this._rateLimits = []; - for (const jsonRateLimit of json.rateLimits) { - this._rateLimits.push(new RateLimit_1.RateLimit(jsonRateLimit)); - } - this._filters = []; - for (const jsonFilter of json.exchangeFilters) { - let filter; - switch (FilterType_1.FilterType[jsonFilter.filterType]) { - case FilterType_1.FilterType.EXCHANGE_MAX_NUM_ORDERS: { - filter = new MaxOrdersFilter_1.MaxOrdersFilter(jsonFilter); - break; - } - case FilterType_1.FilterType.EXCHANGE_MAX_ALGO_ORDERS: { - filter = new MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter(jsonFilter); - break; - } - default: { - filter = null; - } - } - this._filters.push(filter); - } - this._symbols = []; - for (const jsonSymbol of json.symbols) { - this._symbols.push(new Symbol_1.Symbol(jsonSymbol)); - } - } - get timezone() { - return this._timezone; - } - set timezone(value) { - this._timezone = value; - } - get serverTime() { - return this._serverTime; - } - set serverTime(value) { - this._serverTime = value; - } - get rateLimits() { - return this._rateLimits; - } - set rateLimits(value) { - this._rateLimits = value; - } - get filters() { - return this._filters; - } - set filters(value) { - this._filters = value; - } - get symbols() { - return this._symbols; - } - set symbols(value) { - this._symbols = value; - } -} -exports.ExchangeInfo = ExchangeInfo; -//# sourceMappingURL=ExchangeInfo.js.map \ No newline at end of file diff --git a/build/src/models/misc/ExchangeInfo.js.map b/build/src/models/misc/ExchangeInfo.js.map deleted file mode 100644 index 81e41e1..0000000 --- a/build/src/models/misc/ExchangeInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExchangeInfo.js","sourceRoot":"","sources":["../../../../src/models/misc/ExchangeInfo.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,qCAAkC;AAClC,uDAAoD;AAEpD,+DAA4D;AAC5D,uEAAoE;AAEpE;;GAEG;AACH,MAAa,YAAY;IAOrB,YAAY,IAAS;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAA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AI,UAAU,CAAC,KAAW;QACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAkB;QAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAuB;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAe;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACJ;AAhFD,oCAgFC"} \ No newline at end of file diff --git a/build/src/models/misc/Symbol.js b/build/src/models/misc/Symbol.js deleted file mode 100644 index 4b7e7c1..0000000 --- a/build/src/models/misc/Symbol.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Symbol = void 0; -const SymbolStatus_1 = require("../../enums/SymbolStatus"); -const OrderType_1 = require("../../enums/OrderType"); -const PriceFilter_1 = require("../filter/PriceFilter"); -const FilterType_1 = require("../../enums/FilterType"); -const LotSizeFilter_1 = require("../filter/LotSizeFilter"); -const MinimumNotionalFilter_1 = require("../filter/MinimumNotionalFilter"); -const MaxOrdersFilter_1 = require("../filter/MaxOrdersFilter"); -const MaxAlgoOrdersFilter_1 = require("../filter/MaxAlgoOrdersFilter"); -/** - * Represents a single symbol. - */ -class Symbol { - constructor(json) { - this._name = json.symbol; - this._status = SymbolStatus_1.SymbolStatus[json.status]; - this._baseAsset = json.baseAsset; - this._baseAssetPrecision = json.baseAssetPrecision; - this._quoteAsset = json.quoteAsset; - this._quoteAssetPrecision = json.quotePrecision; - this._icebergAllowed = json.icebergAllowed; - this._orderTypes = []; - for (const orderType of json.orderTypes) { - this._orderTypes.push(OrderType_1.OrderType[orderType]); - } - this._filters = []; - for (const jsonFilter of json.filters) { - let filter; - switch (FilterType_1.FilterType[jsonFilter.filterType]) { - case FilterType_1.FilterType.PRICE_FILTER: { - filter = new PriceFilter_1.PriceFilter(jsonFilter); - break; - } - case FilterType_1.FilterType.LOT_SIZE: { - filter = new LotSizeFilter_1.LotSizeFilter(jsonFilter); - break; - } - case FilterType_1.FilterType.MIN_NOTIONAL: { - filter = new MinimumNotionalFilter_1.MinimumNotionalFilter(jsonFilter); - break; - } - case FilterType_1.FilterType.MAX_NUM_ORDERS: { - filter = new MaxOrdersFilter_1.MaxOrdersFilter(jsonFilter); - break; - } - case FilterType_1.FilterType.MAX_ALGO_ORDERS: { - filter = new MaxAlgoOrdersFilter_1.MaxAlgoOrdersFilter(jsonFilter); - break; - } - } - this._filters.push(filter); - } - } - get name() { - return this._name; - } - set name(value) { - this._name = value; - } - get status() { - return this._status; - } - set status(value) { - this._status = value; - } - get baseAsset() { - return this._baseAsset; - } - set baseAsset(value) { - this._baseAsset = value; - } - get baseAssetPrecision() { - return this._baseAssetPrecision; - } - set baseAssetPrecision(value) { - this._baseAssetPrecision = value; - } - get quoteAsset() { - return this._quoteAsset; - } - set quoteAsset(value) { - this._quoteAsset = value; - } - get quoteAssetPrecision() { - return this._quoteAssetPrecision; - } - set quoteAssetPrecision(value) { - this._quoteAssetPrecision = value; - } - get orderTypes() { - return this._orderTypes; - } - set orderTypes(value) { - this._orderTypes = value; - } - get icebergAllowed() { - return this._icebergAllowed; - } - set icebergAllowed(value) { - this._icebergAllowed = value; - } - get filters() { - return this._filters; - } - set filters(value) { - this._filters = value; - } -} -exports.Symbol = Symbol; -//# sourceMappingURL=Symbol.js.map \ No newline at end of file diff --git a/build/src/models/misc/Symbol.js.map b/build/src/models/misc/Symbol.js.map deleted file mode 100644 index 8d0448f..0000000 --- a/build/src/models/misc/Symbol.js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CAAC;IAC7B,CAAC;IAED,IAAI,mBAAmB;QACnB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACrC,CAAC;IAED,IAAI,mBAAmB,CAAC,KAAa;QACjC,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;IACtC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAC,KAAkB;QAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,IAAI,cAAc,CAAC,KAAc;QAC7B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAqB;QAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACJ;AAjID,wBAiIC"} \ No newline at end of file diff --git a/build/src/models/order/CanceledOrderData.js b/build/src/models/order/CanceledOrderData.js deleted file mode 100644 index a30f5ed..0000000 --- a/build/src/models/order/CanceledOrderData.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CanceledOrderData = void 0; -/** - * Represents a single canceled order data. - */ -class CanceledOrderData { - constructor(json) { - this._symbol = json.symbol; - this._id = json.orderId; - this._oldclientId = json.origClientOrderId; - this._clientId = json.clientOrderId; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get oldclientId() { - return this._oldclientId; - } - set oldclientId(value) { - this._oldclientId = value; - } - get clientId() { - return this._clientId; - } - set clientId(value) { - this._clientId = value; - } -} -exports.CanceledOrderData = CanceledOrderData; -//# sourceMappingURL=CanceledOrderData.js.map \ No newline at end of file diff --git a/build/src/models/order/CanceledOrderData.js.map b/build/src/models/order/CanceledOrderData.js.map deleted file mode 100644 index f5872b0..0000000 --- a/build/src/models/order/CanceledOrderData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CanceledOrderData.js","sourceRoot":"","sources":["../../../../src/models/order/CanceledOrderData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,iBAAiB;IAO1B,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;IAExC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAE,KAAa;QACjB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AAhDD,8CAgDC"} \ No newline at end of file diff --git a/build/src/models/order/Order.js b/build/src/models/order/Order.js deleted file mode 100644 index c10f204..0000000 --- a/build/src/models/order/Order.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Order = void 0; -const OrderStatus_1 = require("../../enums/OrderStatus"); -const TimeInForce_1 = require("../../enums/TimeInForce"); -const OrderType_1 = require("../../enums/OrderType"); -const OrderSide_1 = require("../../enums/OrderSide"); -/** - * Represents a single open order. - */ -class Order { - constructor(json) { - this._symbol = json.symbol; - this._id = json.orderId; - this._clientId = json.clientOrderId; - this._price = json.price; - this._originalQuantity = json.origQty; - this._executedQuantity = json.executedQty; - this._status = OrderStatus_1.OrderStatus[json.status]; - this._timeInForce = - TimeInForce_1.TimeInForce[json.timeInForce]; - this._type = OrderType_1.OrderType[json.type]; - this._side = OrderSide_1.OrderSide[json.side]; - this._stopPrice = json.stopPrice; - this._icebergQuantity = json.icebergQty; - this._timestamp = new Date(json.time); - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get clientId() { - return this._clientId; - } - set clientId(value) { - this._clientId = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get originalQuantity() { - return this._originalQuantity; - } - set originalQuantity(value) { - this._originalQuantity = value; - } - get executedQuantity() { - return this._executedQuantity; - } - set executedQuantity(value) { - this._executedQuantity = value; - } - get status() { - return this._status; - } - set status(value) { - this._status = value; - } - get timeInForce() { - return this._timeInForce; - } - set timeInForce(value) { - this._timeInForce = value; - } - get type() { - return this._type; - } - set type(value) { - this._type = value; - } - get side() { - return this._side; - } - set side(value) { - this._side = value; - } - get stopPrice() { - return this._stopPrice; - } - set stopPrice(value) { - this._stopPrice = value; - } - get icebergQuantity() { - return this._icebergQuantity; - } - set icebergQuantity(value) { - this._icebergQuantity = value; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } -} -exports.Order = Order; -//# sourceMappingURL=Order.js.map \ No newline at end of file diff --git a/build/src/models/order/Order.js.map b/build/src/models/order/Order.js.map deleted file mode 100644 index 5d0fb55..0000000 --- a/build/src/models/order/Order.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Order.js","sourceRoot":"","sources":["../../../../src/models/order/Order.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AACtD,yDAAsD;AACtD,qDAAkD;AAClD,qDAAkD;AAElD;;GAEG;AACH,MAAa,KAAK;IAed,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,yBAAW,CAAC,IAAI,CAAC,MAAkC,CAAC,CAAC;QACpE,IAAI,CAAC,YAAY;YACb,yBAAW,CAAC,IAAI,CAAC,WAAuC,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,IAA8B,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,IAA8B,CAAC,CAAC;QAC5D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,I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AC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAa;QACvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAW;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CACJ;AAvID,sBAuIC"} \ No newline at end of file diff --git a/build/src/models/order/OrderAcknowledgement.js b/build/src/models/order/OrderAcknowledgement.js deleted file mode 100644 index 91641bf..0000000 --- a/build/src/models/order/OrderAcknowledgement.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderAcknowledgement = void 0; -/** - * Represents a single placed order data. - */ -class OrderAcknowledgement { - constructor(json) { - this._symbol = json.symbol; - this._id = json.orderId; - this._clientId = json.clientOrderId; - this._timestamp = new Date(json.transactTime); - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get clientId() { - return this._clientId; - } - set clientId(value) { - this._clientId = value; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } -} -exports.OrderAcknowledgement = OrderAcknowledgement; -//# sourceMappingURL=OrderAcknowledgement.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderAcknowledgement.js.map b/build/src/models/order/OrderAcknowledgement.js.map deleted file mode 100644 index 66adbce..0000000 --- a/build/src/models/order/OrderAcknowledgement.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderAcknowledgement.js","sourceRoot":"","sources":["../../../../src/models/order/OrderAcknowledgement.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,oBAAoB;IAO7B,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,YAAY,CAAE,CAAC;IAEpD,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAE,KAAa;QACjB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAW;QACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CAEJ;AAhDD,oDAgDC"} \ No newline at end of file diff --git a/build/src/models/order/OrderFull.js b/build/src/models/order/OrderFull.js deleted file mode 100644 index 74df78a..0000000 --- a/build/src/models/order/OrderFull.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderFull = void 0; -const OrderResult_1 = require("./OrderResult"); -const PlacedOrderFill_1 = require("./PlacedOrderFill"); -class OrderFull { - constructor(json) { - this._result = new OrderResult_1.OrderResult(json); - this._fills = []; - for (const jsonFill of json.fills) { - this._fills.push(new PlacedOrderFill_1.PlacedOrderFill(jsonFill)); - } - } - get result() { - return this._result; - } - set result(value) { - this._result = value; - } - get fills() { - return this._fills; - } - set fills(value) { - this._fills = value; - } -} -exports.OrderFull = OrderFull; -//# sourceMappingURL=OrderFull.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderFull.js.map b/build/src/models/order/OrderFull.js.map deleted file mode 100644 index 037f071..0000000 --- a/build/src/models/order/OrderFull.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderFull.js","sourceRoot":"","sources":["../../../../src/models/order/OrderFull.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD,MAAa,SAAS;IAIlB,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,KAAK,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;SACnD;IACL,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAkB;QACzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAC,KAAwB;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CACJ;AA5BD,8BA4BC"} \ No newline at end of file diff --git a/build/src/models/order/OrderResult.js b/build/src/models/order/OrderResult.js deleted file mode 100644 index b3c0f95..0000000 --- a/build/src/models/order/OrderResult.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderResult = void 0; -const OrderStatus_1 = require("../../enums/OrderStatus"); -const TimeInForce_1 = require("../../enums/TimeInForce"); -const OrderType_1 = require("../../enums/OrderType"); -const OrderSide_1 = require("../../enums/OrderSide"); -class OrderResult { - constructor(json) { - this._symbol = json.symbol; - this._orderId = json.orderId; - this._clientOrderId = json.clientOrderId; - this._timestamp = new Date(json.transactTime); - this._price = json.price; - this._originalQuantity = json.origQty; - this._executedQuantity = json.executedQty; - this._status = OrderStatus_1.OrderStatus[json.status]; - this._timeInForce = - TimeInForce_1.TimeInForce[json.timeInForce]; - this._type = OrderType_1.OrderType[json.type]; - this._side = OrderSide_1.OrderSide[json.side]; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get orderId() { - return this._orderId; - } - set orderId(value) { - this._orderId = value; - } - get clientOrderId() { - return this._clientOrderId; - } - set clientOrderId(value) { - this._clientOrderId = value; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get originalQuantity() { - return this._originalQuantity; - } - set originalQuantity(value) { - this._originalQuantity = value; - } - get executedQuantity() { - return this._executedQuantity; - } - set executedQuantity(value) { - this._executedQuantity = value; - } - get status() { - return this._status; - } - set status(value) { - this._status = value; - } - get timeInForce() { - return this._timeInForce; - } - set timeInForce(value) { - this._timeInForce = value; - } - get type() { - return this._type; - } - set type(value) { - this._type = value; - } - get side() { - return this._side; - } - set side(value) { - this._side = value; - } -} -exports.OrderResult = OrderResult; -//# sourceMappingURL=OrderResult.js.map \ No newline at end of file diff --git a/build/src/models/order/OrderResult.js.map b/build/src/models/order/OrderResult.js.map deleted file mode 100644 index 4c0b08e..0000000 --- a/build/src/models/order/OrderResult.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderResult.js","sourceRoot":"","sources":["../../../../src/models/order/OrderResult.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AACtD,yDAAsD;AACtD,qDAAkD;AAClD,qDAAkD;AAElD,MAAa,WAAW;IAapB,YAAY,IAAS;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,yBAAW,CAAC,IAAI,CAAC,MAAkC,CAAC,CAAC;QACpE,IAAI,CAAC,YAAY;YACb,yBAAW,CAAC,IAAI,CAAC,WAAuC,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,IAA8B,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,IAA8B,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B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AI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAgB;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AAnHD,kCAmHC"} \ No newline at end of file diff --git a/build/src/models/order/PlacedOrder.js b/build/src/models/order/PlacedOrder.js deleted file mode 100644 index c638a40..0000000 --- a/build/src/models/order/PlacedOrder.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PlacedOrder = void 0; -/** - * Represents a single already placed order. - */ -class PlacedOrder { - constructor(json) { - this._price = json[0]; - this._quantity = json[1]; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get quantity() { - return this._quantity; - } - set quantity(value) { - this._quantity = value; - } -} -exports.PlacedOrder = PlacedOrder; -//# sourceMappingURL=PlacedOrder.js.map \ No newline at end of file diff --git a/build/src/models/order/PlacedOrder.js.map b/build/src/models/order/PlacedOrder.js.map deleted file mode 100644 index 308bbc6..0000000 --- a/build/src/models/order/PlacedOrder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PlacedOrder.js","sourceRoot":"","sources":["../../../../src/models/order/PlacedOrder.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAKpB,YAAa,IAAS;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAE,CAAC,CAAE,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CAEJ;AA1BD,kCA0BC"} \ No newline at end of file diff --git a/build/src/models/order/PlacedOrderFill.js b/build/src/models/order/PlacedOrderFill.js deleted file mode 100644 index 302de0e..0000000 --- a/build/src/models/order/PlacedOrderFill.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PlacedOrderFill = void 0; -/** - * Represents a single placed order fill. - */ -class PlacedOrderFill { - constructor(json) { - this._quantity = json.qty; - this._price = json.price; - this._commission = json.commission; - this._commissionAsset = json.commissionAsset; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get quantity() { - return this._quantity; - } - set quantity(value) { - this._quantity = value; - } - get commission() { - return this._commission; - } - set commission(value) { - this._commission = value; - } - get commissionAsset() { - return this._commissionAsset; - } - set commissionAsset(value) { - this._commissionAsset = value; - } -} -exports.PlacedOrderFill = PlacedOrderFill; -//# sourceMappingURL=PlacedOrderFill.js.map \ No newline at end of file diff --git a/build/src/models/order/PlacedOrderFill.js.map b/build/src/models/order/PlacedOrderFill.js.map deleted file mode 100644 index 1747259..0000000 --- a/build/src/models/order/PlacedOrderFill.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PlacedOrderFill.js","sourceRoot":"","sources":["../../../../src/models/order/PlacedOrderFill.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,eAAe;IAOxB,YAAa,IAAS;QAElB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;IAEjD,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAE,KAAa;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;CAEJ;AAhDD,0CAgDC"} \ No newline at end of file diff --git a/build/src/models/ticker/Ticker.js b/build/src/models/ticker/Ticker.js deleted file mode 100644 index ba555f9..0000000 --- a/build/src/models/ticker/Ticker.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Ticker = void 0; -/** - * Represents a single ticker. - */ -class Ticker { - constructor(json) { - this._symbol = json.symbol; - this._bidPrice = json.bidPrice; - this._bidQuantity = json.bidQty; - this._askPrice = json.askPrice; - this._askQuantity = json.askQty; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get bidPrice() { - return this._bidPrice; - } - set bidPrice(value) { - this._bidPrice = value; - } - get bidQuantity() { - return this._bidQuantity; - } - set bidQuantity(value) { - this._bidQuantity = value; - } - get askPrice() { - return this._askPrice; - } - set askPrice(value) { - this._askPrice = value; - } - get askQuantity() { - return this._askQuantity; - } - set askQuantity(value) { - this._askQuantity = value; - } -} -exports.Ticker = Ticker; -//# sourceMappingURL=Ticker.js.map \ No newline at end of file diff --git a/build/src/models/ticker/Ticker.js.map b/build/src/models/ticker/Ticker.js.map deleted file mode 100644 index 23a4482..0000000 --- a/build/src/models/ticker/Ticker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Ticker.js","sourceRoot":"","sources":["../../../../src/models/ticker/Ticker.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,MAAM;IAQf,YAAa,IAAS;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;IAEpC,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAE,KAAa;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;CAEJ;AA1DD,wBA0DC"} \ No newline at end of file diff --git a/build/src/models/ticker/TickerStatistics.js b/build/src/models/ticker/TickerStatistics.js deleted file mode 100644 index 4fbb824..0000000 --- a/build/src/models/ticker/TickerStatistics.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TickerStatistics = void 0; -/** - * Represents a single 24-hr ticker statistics collection. - */ -class TickerStatistics { - constructor(json) { - this._priceChange = json.priceChange; - this._priceChangePercentage = json.priceChangePercent; - this._weightedAveragePrice = json.weightedAvgPrice; - this._previousClosurePrice = json.prevClosePrice; - this._lastPrice = json.lastPrice; - this._bidPrice = json.bidPrice; - this._askPrice = json.askPrice; - this._openingPrice = json.openPrice; - this._highestPrice = json.highPrice; - this._lowestPrice = json.lowPrice; - this._volume = json.volume; - this._openingTime = new Date(json.openTime); - this._closureTime = new Date(json.closeTime); - this._firstTradeId = json.firstId; - this._lastTradeId = json.lastId; - this._tradesCount = json.count; - } - get priceChange() { - return this._priceChange; - } - set priceChange(value) { - this._priceChange = value; - } - get priceChangePercentage() { - return this._priceChangePercentage; - } - set priceChangePercentage(value) { - this._priceChangePercentage = value; - } - get weightedAveragePrice() { - return this._weightedAveragePrice; - } - set weightedAveragePrice(value) { - this._weightedAveragePrice = value; - } - get previousClosurePrice() { - return this._previousClosurePrice; - } - set previousClosurePrice(value) { - this._previousClosurePrice = value; - } - get lastPrice() { - return this._lastPrice; - } - set lastPrice(value) { - this._lastPrice = value; - } - get bidPrice() { - return this._bidPrice; - } - set bidPrice(value) { - this._bidPrice = value; - } - get askPrice() { - return this._askPrice; - } - set askPrice(value) { - this._askPrice = value; - } - get openingPrice() { - return this._openingPrice; - } - set openingPrice(value) { - this._openingPrice = value; - } - get highestPrice() { - return this._highestPrice; - } - set highestPrice(value) { - this._highestPrice = value; - } - get lowestPrice() { - return this._lowestPrice; - } - set lowestPrice(value) { - this._lowestPrice = value; - } - get volume() { - return this._volume; - } - set volume(value) { - this._volume = value; - } - get openingTime() { - return this._openingTime; - } - set openingTime(value) { - this._openingTime = value; - } - get closureTime() { - return this._closureTime; - } - set closureTime(value) { - this._closureTime = value; - } - get firstTradeId() { - return this._firstTradeId; - } - set firstTradeId(value) { - this._firstTradeId = value; - } - get lastTradeId() { - return this._lastTradeId; - } - set lastTradeId(value) { - this._lastTradeId = value; - } - get tradesCount() { - return this._tradesCount; - } - set tradesCount(value) { - this._tradesCount = value; - } -} -exports.TickerStatistics = TickerStatistics; -//# sourceMappingURL=TickerStatistics.js.map \ No newline at end of file diff --git a/build/src/models/ticker/TickerStatistics.js.map b/build/src/models/ticker/TickerStatistics.js.map deleted file mode 100644 index 991e95e..0000000 --- a/build/src/models/ticker/TickerStatistics.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TickerStatistics.js","sourceRoot":"","sources":["../../../../src/models/ticker/TickerStatistics.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,gBAAgB;IAmBzB,YAAa,IAAS;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACtD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACnD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,IA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,CAAC;IAC/B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,CAAE,KAAa;QAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;CAEJ;AAxKD,4CAwKC"} \ No newline at end of file diff --git a/build/src/models/trade/Trade.js b/build/src/models/trade/Trade.js deleted file mode 100644 index 313a83a..0000000 --- a/build/src/models/trade/Trade.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Trade = void 0; -/** - * Represents a single trade. - */ -class Trade { - constructor(json) { - this._id = json.id; - this._orderId = json.orderId; - this._price = json.price; - this._quantity = json.qty; - this._commission = json.commission; - this._commissionAsset = json.commissionAsset; - this._timestamp = new Date(json.time); - this._buyer = json.isBuyer; - this._maker = json.isMaker; - this._bestMatch = json.isBestMatch; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get orderId() { - return this._orderId; - } - set orderId(value) { - this._orderId = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get quantity() { - return this._quantity; - } - set quantity(value) { - this._quantity = value; - } - get commission() { - return this._commission; - } - set commission(value) { - this._commission = value; - } - get commissionAsset() { - return this._commissionAsset; - } - set commissionAsset(value) { - this._commissionAsset = value; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get buyer() { - return this._buyer; - } - set buyer(value) { - this._buyer = value; - } - get maker() { - return this._maker; - } - set maker(value) { - this._maker = value; - } - get bestMatch() { - return this._bestMatch; - } - set bestMatch(value) { - this._bestMatch = value; - } -} -exports.Trade = Trade; -//# sourceMappingURL=Trade.js.map \ No newline at end of file diff --git a/build/src/models/trade/Trade.js.map b/build/src/models/trade/Trade.js.map deleted file mode 100644 index 434715e..0000000 --- a/build/src/models/trade/Trade.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Trade.js","sourceRoot":"","sources":["../../../../src/models/trade/Trade.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,KAAK;IAad,YAAa,IAAS;QAElB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,IAAI,CAAE,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;IAEvC,CAAC;IAED,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAE,KAAa;QACjB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAE,KAAa;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAa;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAa;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAE,KAAa;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,eAAe,CAAE,KAAa;QAC9B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAW;QACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAc;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAE,KAAc;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAE,KAAc;QACzB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;CAEJ;AA5GD,sBA4GC"} \ No newline at end of file diff --git a/build/src/models/websocket/account/AccountUpdate.js b/build/src/models/websocket/account/AccountUpdate.js deleted file mode 100644 index bf1b179..0000000 --- a/build/src/models/websocket/account/AccountUpdate.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AccountUpdate = void 0; -/** - * Represents a single account update. - */ -const Balance_1 = require("../../account/Balance"); -class AccountUpdate { - constructor(json) { - this._timestamp = new Date(json.E); - this._balances = []; - for (const balanceJson of json.B) { - this._balances.push(new Balance_1.Balance(balanceJson)); - } - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get balances() { - return this._balances; - } - set balances(value) { - this._balances = value; - } -} -exports.AccountUpdate = AccountUpdate; -//# sourceMappingURL=AccountUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/account/AccountUpdate.js.map b/build/src/models/websocket/account/AccountUpdate.js.map deleted file mode 100644 index 92c6f1f..0000000 --- a/build/src/models/websocket/account/AccountUpdate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AccountUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/account/AccountUpdate.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mDAAgD;AAEhD,MAAa,aAAa;IAItB,YAAY,IAAS;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEnC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,CAAC,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC;SACjD;IACL,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,KAAW;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AA5BD,sCA4BC"} \ No newline at end of file diff --git a/build/src/models/websocket/candlestick/CandlestickUpdate.js b/build/src/models/websocket/candlestick/CandlestickUpdate.js deleted file mode 100644 index c62f6d2..0000000 --- a/build/src/models/websocket/candlestick/CandlestickUpdate.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CandlestickUpdate = void 0; -/** - * Represents a single candlestick update. - */ -class CandlestickUpdate { - constructor(json) { - this._timestamp = new Date(json.E); - this._symbol = json.s; - this._openingTime = new Date(json.k.t); - this._openingPrice = json.k.o; - this._highestPrice = json.k.h; - this._lowestPrice = json.k.l; - this._closurePrice = json.k.c; - this._baseAssetVolume = json.k.v; - this._closureTime = new Date(json.k.T); - this._quoteAssetVolume = json.k.q; - this._tradesCount = json.k.n; - this._boughtBaseAssetVolume = json.k.V; - this._boughtQuoteAssetVolume = json.k.Q; - this._firstTradeId = json.k.f; - this._lastTradeId = json.k.L; - this._interval = json.k.i; - this._final = json.k.x; - this._activeBuyVolume = json.k.V; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get openingTime() { - return this._openingTime; - } - set openingTime(value) { - this._openingTime = value; - } - get openingPrice() { - return this._openingPrice; - } - set openingPrice(value) { - this._openingPrice = value; - } - get highestPrice() { - return this._highestPrice; - } - set highestPrice(value) { - this._highestPrice = value; - } - get lowestPrice() { - return this._lowestPrice; - } - set lowestPrice(value) { - this._lowestPrice = value; - } - get closurePrice() { - return this._closurePrice; - } - set closurePrice(value) { - this._closurePrice = value; - } - get baseAssetVolume() { - return this._baseAssetVolume; - } - set baseAssetVolume(value) { - this._baseAssetVolume = value; - } - get closureTime() { - return this._closureTime; - } - set closureTime(value) { - this._closureTime = value; - } - get quoteAssetVolume() { - return this._quoteAssetVolume; - } - set quoteAssetVolume(value) { - this._quoteAssetVolume = value; - } - get tradesCount() { - return this._tradesCount; - } - set tradesCount(value) { - this._tradesCount = value; - } - get boughtBaseAssetVolume() { - return this._boughtBaseAssetVolume; - } - set boughtBaseAssetVolume(value) { - this._boughtBaseAssetVolume = value; - } - get boughtQuoteAssetVolume() { - return this._boughtQuoteAssetVolume; - } - set boughtQuoteAssetVolume(value) { - this._boughtQuoteAssetVolume = value; - } - get firstTradeId() { - return this._firstTradeId; - } - set firstTradeId(value) { - this._firstTradeId = value; - } - get lastTradeId() { - return this._lastTradeId; - } - set lastTradeId(value) { - this._lastTradeId = value; - } - get interval() { - return this._interval; - } - set interval(value) { - this._interval = value; - } - get final() { - return this._final; - } - set final(value) { - this._final = value; - } - get activeBuyVolume() { - return this._activeBuyVolume; - } - set activeBuyVolume(value) { - this._activeBuyVolume = value; - } -} -exports.CandlestickUpdate = CandlestickUpdate; -//# sourceMappingURL=CandlestickUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/candlestick/CandlestickUpdate.js.map b/build/src/models/websocket/candlestick/CandlestickUpdate.js.map deleted file mode 100644 index 67f6afe..0000000 --- a/build/src/models/websocket/candlestick/CandlestickUpdate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CandlestickUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/candlestick/CandlestickUpdate.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,iBAAiB;IAqB1B,YAAa,IAAS;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,aAAa,GA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A5LD,8CA4LC"} \ No newline at end of file diff --git a/build/src/models/websocket/depth/OrderBookUpdate.js b/build/src/models/websocket/depth/OrderBookUpdate.js deleted file mode 100644 index f2d2049..0000000 --- a/build/src/models/websocket/depth/OrderBookUpdate.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderBookUpdate = void 0; -const PlacedOrder_1 = require("../../order/PlacedOrder"); -/** - * Represents a single order book update. - */ -class OrderBookUpdate { - constructor(json) { - this._timestamp = new Date(json.E); - this._symbol = json.s; - this._id = json.u; - this._asks = []; - for (const askJson of json.a) { - this._asks.push(new PlacedOrder_1.PlacedOrder(askJson)); - } - this._bids = []; - for (const bidJson of json.b) { - this._bids.push(new PlacedOrder_1.PlacedOrder(bidJson)); - } - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get asks() { - return this._asks; - } - set asks(value) { - this._asks = value; - } - get bids() { - return this._bids; - } - set bids(value) { - this._bids = value; - } -} -exports.OrderBookUpdate = OrderBookUpdate; -//# sourceMappingURL=OrderBookUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/depth/OrderBookUpdate.js.map b/build/src/models/websocket/depth/OrderBookUpdate.js.map deleted file mode 100644 index aa5f092..0000000 --- a/build/src/models/websocket/depth/OrderBookUpdate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderBookUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/depth/OrderBookUpdate.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAEtD;;GAEG;AACH,MAAa,eAAe;IAOxB,YAAY,IAAS;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC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models/websocket/order/OrderUpdate.js b/build/src/models/websocket/order/OrderUpdate.js deleted file mode 100644 index 9fc7766..0000000 --- a/build/src/models/websocket/order/OrderUpdate.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderUpdate = void 0; -const OrderSide_1 = require("../../../enums/OrderSide"); -const OrderType_1 = require("../../../enums/OrderType"); -const TimeInForce_1 = require("../../../enums/TimeInForce"); -const OrderExecutionStatus_1 = require("../../../enums/OrderExecutionStatus"); -const OrderStatus_1 = require("../../../enums/OrderStatus"); -const OrderRejectionMotive_1 = require("../../../enums/OrderRejectionMotive"); -class OrderUpdate { - constructor(json) { - this._timestamp = new Date(json.E); - this._symbol = json.s; - this._newClientId = json.c; - this._side = OrderSide_1.OrderSide[json.S]; - this._type = OrderType_1.OrderType[json.o]; - this._timeInForce = TimeInForce_1.TimeInForce[json.f]; - this._quantity = parseFloat(json.q); - this._price = parseFloat(json.p); - this._executionStatus = - OrderExecutionStatus_1.OrderExecutionStatus[json.x]; - this._status = OrderStatus_1.OrderStatus[json.X]; - this._rejectionMotive = - OrderRejectionMotive_1.OrderRejectionMotive[json.r]; - this._id = json.i; - this._lastFilledTradePrice = parseFloat(json.L); - this._lastExecutedQuantity = parseFloat(json.l); - this._cumulativeFilledQuantity = parseFloat(json.z); - this._placedAt = new Date(json.T); - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get newClientId() { - return this._newClientId; - } - set newClientId(value) { - this._newClientId = value; - } - get side() { - return this._side; - } - set side(value) { - this._side = value; - } - get type() { - return this._type; - } - set type(value) { - this._type = value; - } - get timeInForce() { - return this._timeInForce; - } - set timeInForce(value) { - this._timeInForce = value; - } - get quantity() { - return this._quantity; - } - set quantity(value) { - this._quantity = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get executionStatus() { - return this._executionStatus; - } - set executionStatus(value) { - this._executionStatus = value; - } - get status() { - return this._status; - } - set status(value) { - this._status = value; - } - get rejectionMotive() { - return this._rejectionMotive; - } - set rejectionMotive(value) { - this._rejectionMotive = value; - } - get id() { - return this._id; - } - set id(value) { - this._id = value; - } - get lastFilledTradePrice() { - return this._lastFilledTradePrice; - } - set lastFilledTradePrice(value) { - this._lastFilledTradePrice = value; - } - get lastExecutedQuantity() { - return this._lastExecutedQuantity; - } - set lastExecutedQuantity(value) { - this._lastExecutedQuantity = value; - } - get cumulativeFilledQuantity() { - return this._cumulativeFilledQuantity; - } - set cumulativeFilledQuantity(value) { - this._cumulativeFilledQuantity = value; - } - get placedAt() { - return this._placedAt; - } - set placedAt(value) { - this._placedAt = value; - } -} -exports.OrderUpdate = OrderUpdate; -//# sourceMappingURL=OrderUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/order/OrderUpdate.js.map b/build/src/models/websocket/order/OrderUpdate.js.map deleted file mode 100644 index e876f46..0000000 --- a/build/src/models/websocket/order/OrderUpdate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrderUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/order/OrderUpdate.ts"],"names":[],"mappings":";;;AAAA,wDAAqD;AACrD,wDAAqD;AACrD,4DAAyD;AACzD,8EAA2E;AAC3E,4DAAyD;AACzD,8EAA2E;AAE3E,MAAa,WAAW;IAkBpB,YAAY,IAAS;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,CAA2B,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,GAAG,qBAAS,CAAC,IAAI,CAAC,CAA2B,CAAC,CAAC;QACzD,IAAI,CAAC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E;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,IAAI,EAAE,CAAC,KAAa;QAChB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,oBAAoB;QACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED,IAAI,oBAAoB,CAAC,KAAa;QAClC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACvC,CAAC;IAED,IAAI,oBAAoB;QACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED,IAAI,oBAAoB,CAAC,KAAa;QAClC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACvC,CAAC;IAED,IAAI,wBAAwB;QACxB,OAAO,IAAI,CAAC,yBAAyB,CAAC;IAC1C,CAAC;IAED,IAAI,wBAAwB,CAAC,KAAa;QACtC,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAW;QACpB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ;AAtKD,kCAsKC"} \ No newline at end of file diff --git a/build/src/models/websocket/trade/TradeUpdate.js b/build/src/models/websocket/trade/TradeUpdate.js deleted file mode 100644 index 555315d..0000000 --- a/build/src/models/websocket/trade/TradeUpdate.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TradeUpdate = void 0; -/** - * Represents a single trade update. - */ -class TradeUpdate { - constructor(json) { - this._timestamp = new Date(json.E); - this._symbol = json.s; - this._aggregatedId = json.a; - this._price = json.p; - this._quantity = json.q; - this._firstBreakdownId = json.f; - this._lastBreakdownId = json.l; - this._placedAt = new Date(json.T); - this._buyerMaker = json.m; - } - get timestamp() { - return this._timestamp; - } - set timestamp(value) { - this._timestamp = value; - } - get symbol() { - return this._symbol; - } - set symbol(value) { - this._symbol = value; - } - get aggregatedId() { - return this._aggregatedId; - } - set aggregatedId(value) { - this._aggregatedId = value; - } - get price() { - return this._price; - } - set price(value) { - this._price = value; - } - get quantity() { - return this._quantity; - } - set quantity(value) { - this._quantity = value; - } - get firstBreakdownId() { - return this._firstBreakdownId; - } - set firstBreakdownId(value) { - this._firstBreakdownId = value; - } - get lastBreakdownId() { - return this._lastBreakdownId; - } - set lastBreakdownId(value) { - this._lastBreakdownId = value; - } - get placedAt() { - return this._placedAt; - } - set placedAt(value) { - this._placedAt = value; - } - get buyerMaker() { - return this._buyerMaker; - } - set buyerMaker(value) { - this._buyerMaker = value; - } -} -exports.TradeUpdate = TradeUpdate; -//# sourceMappingURL=TradeUpdate.js.map \ No newline at end of file diff --git a/build/src/models/websocket/trade/TradeUpdate.js.map b/build/src/models/websocket/trade/TradeUpdate.js.map deleted file mode 100644 index 10eca01..0000000 --- a/build/src/models/websocket/trade/TradeUpdate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TradeUpdate.js","sourceRoot":"","sources":["../../../../../src/models/websocket/trade/TradeUpdate.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,WAAW;IAYpB,YAAa,IAAS;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAE,IAAI,CAAC,CAAC,CAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;QACxB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG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B,CAAC;IAED,IAAI,QAAQ,CAAE,KAAW;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU,CAAE,KAAc;QAC1B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;CAEJ;AAlGD,kCAkGC"} \ No newline at end of file diff --git a/package.json b/package.json index 1952135..24485aa 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "lint:commit-message": "commitlint -e", "lint": "yarn lint:code && yarn lint:prettier", "prettify": "yarn lint:prettier --write", - "prepublishOnly": "npm run build" + "postinstall": "npm run build" }, "repository": { "type": "git",