├── .classpath ├── .gitattributes ├── .gitignore ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs └── org.eclipse.m2e.core.prefs ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── pom.xml ├── src ├── main │ └── java │ │ └── fr │ │ └── rowlaxx │ │ └── binanceapi │ │ ├── api │ │ ├── Api.java │ │ ├── ApiImplementer.java │ │ ├── Platform.java │ │ ├── Protocol.java │ │ ├── coinm │ │ │ ├── CoinmAPI.java │ │ │ ├── CoinmMarketDataAPI.java │ │ │ └── CoinmTradeAPI.java │ │ ├── options │ │ │ ├── OptionsAPI.java │ │ │ ├── OptionsQuotingAPI.java │ │ │ └── OptionsTradeAPI.java │ │ ├── spot │ │ │ ├── BLVTAPI.java │ │ │ ├── BLVTHttpAPI.java │ │ │ ├── BLVTStreamAPI.java │ │ │ ├── BSwapAPI.java │ │ │ ├── C2CAPI.java │ │ │ ├── ConvertAPI.java │ │ │ ├── CryptoLoansAPI.java │ │ │ ├── FiatAPI.java │ │ │ ├── FuturesAPI.java │ │ │ ├── FuturesAlgoAPI.java │ │ │ ├── GiftcardAPI.java │ │ │ ├── MarginAPI.java │ │ │ ├── MarginTradeAPI.java │ │ │ ├── MiningAPI.java │ │ │ ├── NFTAPI.java │ │ │ ├── PayAPI.java │ │ │ ├── PortfolioMarginApi.java │ │ │ ├── RebateAPI.java │ │ │ ├── SavingsAPI.java │ │ │ ├── SpotAPI.java │ │ │ ├── SpotMarketDataAPI.java │ │ │ ├── SpotMarketStreamAPI.java │ │ │ ├── SpotTradeAPI.java │ │ │ ├── SpotUserStreamAPI.java │ │ │ ├── StakingAPI.java │ │ │ ├── SubAccountAPI.java │ │ │ └── WalletAPI.java │ │ └── usdm │ │ │ ├── UsdmAPI.java │ │ │ ├── UsdmMarketDataAPI.java │ │ │ ├── UsdmMarketStreamAPI.java │ │ │ └── UsdmTradeAPI.java │ │ ├── client │ │ ├── BinanceClient.java │ │ ├── BinanceClientImpl.java │ │ ├── BinanceCredenticals.java │ │ ├── http │ │ │ ├── ApiEndpoint.java │ │ │ ├── ApiEndpointUtils.java │ │ │ ├── BaseEndpoint.java │ │ │ ├── BaseEndpointResolver.java │ │ │ ├── BaseEndpoints.java │ │ │ ├── BinanceAutoHttpRequest.java │ │ │ ├── BinanceHttpClient.java │ │ │ ├── BinanceHttpRequest.java │ │ │ ├── DontSend.java │ │ │ ├── ParameterValue.java │ │ │ ├── Parameters.java │ │ │ ├── RedirectResponse.java │ │ │ └── SimpleBinanceHttpClient.java │ │ └── websocket │ │ │ ├── BinanceWebSocket.java │ │ │ ├── BinanceWebSocketPool.java │ │ │ ├── OnJson.java │ │ │ ├── ResponseProcessorThread.java │ │ │ ├── SocketCheckerThread.java │ │ │ ├── StreamAPI.java │ │ │ ├── UserStreamAPI.java │ │ │ ├── UserStreamAPIThread.java │ │ │ └── WebSocketListener.java │ │ ├── core │ │ ├── Asset.java │ │ ├── Basic2OrderRequest.java │ │ ├── BasicCandlestick.java │ │ ├── BasicOrder.java │ │ ├── BasicOrderRequest.java │ │ ├── BookTicker.java │ │ ├── Candlestick.java │ │ ├── CompressedTrade.java │ │ ├── DepositAddress.java │ │ ├── Intervals.java │ │ ├── MiniTicker.java │ │ ├── NewOrderRequest.java │ │ ├── OcoOrder.java │ │ ├── Order.java │ │ ├── OrderBook.java │ │ ├── OrderRequest.java │ │ ├── OrderResponseTypes.java │ │ ├── OrderSides.java │ │ ├── OrderStatus.java │ │ ├── OrderTypes.java │ │ ├── SideableTrade.java │ │ ├── SimpleOrder.java │ │ ├── SimpleOrderStatus.java │ │ ├── SymbolPriceTicker.java │ │ ├── TickerStatistics.java │ │ ├── TimeInForce.java │ │ ├── Trade.java │ │ ├── UserAsset.java │ │ ├── blvt │ │ │ ├── Basket.java │ │ │ ├── BasketStream.java │ │ │ ├── BlvtCandlestick.java │ │ │ ├── BlvtInfo.java │ │ │ ├── BlvtInfoStream.java │ │ │ ├── BlvtTrade.java │ │ │ ├── BlvtTradeRecord.java │ │ │ ├── BlvtTradeResponse.java │ │ │ ├── BlvtTradeStatus.java │ │ │ ├── BlvtUserLimit.java │ │ │ ├── Redemption.java │ │ │ ├── RedemptionRecord.java │ │ │ ├── Subscribtion.java │ │ │ └── SubscriptionRecord.java │ │ ├── bswap │ │ │ ├── AbstractQuote.java │ │ │ ├── AddLiquidityPreview.java │ │ │ ├── AssetConfigure.java │ │ │ ├── ClaimRecord.java │ │ │ ├── LiquidityOperationRecord.java │ │ │ ├── LiquidityOperationStatus.java │ │ │ ├── LiquidityOperationTypes.java │ │ │ ├── LiquidityOperations.java │ │ │ ├── LiquidityPreview.java │ │ │ ├── PoolConfigure.java │ │ │ ├── PoolLiquidity.java │ │ │ ├── RequestQuote.java │ │ │ ├── SwapPool.java │ │ │ ├── SwapRecord.java │ │ │ └── UnclaimedRewards.java │ │ ├── c2c │ │ │ └── C2CTradeRecord.java │ │ ├── coinm │ │ │ ├── marketdata │ │ │ │ ├── Basis.java │ │ │ │ ├── CoinmCandlestick.java │ │ │ │ ├── CoinmExchangeInformation.java │ │ │ │ ├── CoinmLongShortAccountRatio.java │ │ │ │ ├── CoinmLongShortPositionRatio.java │ │ │ │ ├── CoinmOpenInterest.java │ │ │ │ ├── CoinmOpenInterestStatistics.java │ │ │ │ ├── CoinmOrderBookTicker.java │ │ │ │ ├── CoinmSymbol.java │ │ │ │ ├── CoinmSymbolPriceTicker.java │ │ │ │ ├── CoinmTakerVolume.java │ │ │ │ ├── CoinmTickerStatistics.java │ │ │ │ └── CoinmTrade.java │ │ │ └── trade │ │ │ │ ├── CoinmAccountBalance.java │ │ │ │ ├── CoinmAccountInformation.java │ │ │ │ ├── CoinmAccountPosition.java │ │ │ │ ├── CoinmAccountTrade.java │ │ │ │ ├── CoinmForceOrder.java │ │ │ │ ├── CoinmOrder.java │ │ │ │ ├── ModifyOrderRequest.java │ │ │ │ └── OrderModifyRecord.java │ │ ├── convert │ │ │ └── ConvertRecord.java │ │ ├── cryptoloans │ │ │ ├── CryptoLoansTypes.java │ │ │ └── IncomeRecord.java │ │ ├── exchangeinfos │ │ │ ├── ExchangeInformation.java │ │ │ ├── Filter.java │ │ │ ├── Filters.java │ │ │ ├── RateLimit.java │ │ │ ├── RateLimitIntervals.java │ │ │ ├── RateLimitTypes.java │ │ │ ├── SimpleExchangeInformation.java │ │ │ ├── SimpleSymbol.java │ │ │ ├── Symbol.java │ │ │ └── filters │ │ │ │ ├── ExchangeMaxNumAlgoOrdersFilter.java │ │ │ │ ├── ExchangeMaxNumOrdersFilter.java │ │ │ │ ├── IcebergPartsFilter.java │ │ │ │ ├── LotSizeFilter.java │ │ │ │ ├── MarketLotSizeFilter.java │ │ │ │ ├── MaxNumAlgoOrdersFilter.java │ │ │ │ ├── MaxNumIcebergOrdersFilter.java │ │ │ │ ├── MaxNumOrdersFilter.java │ │ │ │ ├── MaxPositionFilter.java │ │ │ │ ├── MinNotionalFilter.java │ │ │ │ ├── PercentPriceBySideFilter.java │ │ │ │ ├── PercentPriceFilter.java │ │ │ │ ├── PriceFilter.java │ │ │ │ └── TrailingStopFilter.java │ │ ├── fiat │ │ │ ├── FiatPaymentRecord.java │ │ │ ├── FiatTransfer.java │ │ │ └── FiatTransferRecord.java │ │ ├── futures │ │ │ ├── Adjustment.java │ │ │ ├── AdjustmentRecord.java │ │ │ ├── Borrow.java │ │ │ ├── BorrowRecord.java │ │ │ ├── CrossCollateral.java │ │ │ ├── CrossCollateralInformation.java │ │ │ ├── CrossCollateralLiquidationRecord.java │ │ │ ├── CrossCollateralWallet.java │ │ │ ├── Directions.java │ │ │ ├── FuturesInterestRecord.java │ │ │ ├── MaxAmount.java │ │ │ ├── Repay.java │ │ │ ├── RepayLimit.java │ │ │ ├── RepayQuote.java │ │ │ ├── RepayRecord.java │ │ │ ├── marketdata │ │ │ │ ├── AccountLongShortRatio.java │ │ │ │ ├── ContractStatus.java │ │ │ │ ├── ContractTypes.java │ │ │ │ ├── FundingRate.java │ │ │ │ ├── FutureSymbol.java │ │ │ │ ├── LongShortRatio.java │ │ │ │ ├── OpenInterest.java │ │ │ │ ├── OpenInterestStatistics.java │ │ │ │ ├── Period.java │ │ │ │ ├── PositionLongShortRatio.java │ │ │ │ ├── PremiumIndex.java │ │ │ │ ├── PremiumIndexCandlestick.java │ │ │ │ ├── UnderlyingSubTypes.java │ │ │ │ └── UnderlyingTypes.java │ │ │ ├── marketstream │ │ │ │ └── MarkPrice.java │ │ │ └── trade │ │ │ │ ├── ADLQuantile.java │ │ │ │ ├── AutoCloseTypes.java │ │ │ │ ├── Bracket.java │ │ │ │ ├── Brackets.java │ │ │ │ ├── ForceOrder.java │ │ │ │ ├── FutureAccountAsset.java │ │ │ │ ├── FutureAccountBalance.java │ │ │ │ ├── FutureAccountInformation.java │ │ │ │ ├── FutureAccountPosition.java │ │ │ │ ├── FutureAccountTrade.java │ │ │ │ ├── FutureIncomeRecord.java │ │ │ │ ├── FutureOrder.java │ │ │ │ ├── FutureOrderRequest.java │ │ │ │ ├── FutureOrderTypes.java │ │ │ │ ├── IncomeTypes.java │ │ │ │ ├── MarginChangeRecord.java │ │ │ │ ├── MarginTypes.java │ │ │ │ ├── PositionInformation.java │ │ │ │ ├── PositionSides.java │ │ │ │ ├── UserCommissionRate.java │ │ │ │ └── WorkingType.java │ │ ├── futuresalgo │ │ │ ├── AlgoStatus.java │ │ │ ├── AlgoTypes.java │ │ │ ├── FuturesAlgoOrderRequest.java │ │ │ ├── TwapOrderRequest.java │ │ │ ├── Urgency.java │ │ │ ├── VPOrder.java │ │ │ ├── VPOrderRequest.java │ │ │ └── VPSubOrder.java │ │ ├── giftcard │ │ │ ├── Giftcard.java │ │ │ ├── GiftcardRedemption.java │ │ │ └── GiftcardVerification.java │ │ ├── margin │ │ │ ├── BNBBurnStatus.java │ │ │ ├── BaseQuoteAsset.java │ │ │ ├── CrossFeeData.java │ │ │ ├── CrossMarginAccount.java │ │ │ ├── CrossTransferRecord.java │ │ │ ├── Fee.java │ │ │ ├── ForceLiquidationRecord.java │ │ │ ├── IsolatedAccountLimit.java │ │ │ ├── IsolatedFeeData.java │ │ │ ├── IsolatedMarginAccount.java │ │ │ ├── IsolatedMarginSymbol.java │ │ │ ├── IsolatedMarginTransferRecord.java │ │ │ ├── IsolatedTier.java │ │ │ ├── LoanRecord.java │ │ │ ├── MarginAsset.java │ │ │ ├── MarginInterestRate.java │ │ │ ├── MarginInterestRecord.java │ │ │ ├── MarginOCOOrder.java │ │ │ ├── MarginOCOOrderRequest.java │ │ │ ├── MarginOrder.java │ │ │ ├── MarginOrderCountUsage.java │ │ │ ├── MarginOrderRequest.java │ │ │ ├── MarginPair.java │ │ │ ├── MarginTrade.java │ │ │ ├── MarginUserAsset.java │ │ │ ├── MaxBorrow.java │ │ │ ├── PriceIndex.java │ │ │ ├── Record.java │ │ │ ├── RepayRecord.java │ │ │ ├── SideEffectType.java │ │ │ └── TransferRecord.java │ │ ├── mining │ │ │ ├── AccountEarning.java │ │ │ ├── AccountProfit.java │ │ │ ├── Algorithm.java │ │ │ ├── CoinName.java │ │ │ ├── ConfigDetail.java │ │ │ ├── HashrateData.java │ │ │ ├── MinerDetail.java │ │ │ ├── MiningStatistics.java │ │ │ ├── Profit.java │ │ │ ├── ProfitTransferDetail.java │ │ │ ├── UserStatistics.java │ │ │ ├── UserStatisticsRecord.java │ │ │ └── WorkerData.java │ │ ├── nft │ │ │ ├── NFT.java │ │ │ ├── NFTOrderType.java │ │ │ ├── NFTTransactionRecord.java │ │ │ ├── NFTTransferRecord.java │ │ │ └── NFTWithdrawRecord.java │ │ ├── options │ │ │ ├── quoting │ │ │ │ ├── ExerciceRecord.java │ │ │ │ ├── LatestMarkPrice.java │ │ │ │ ├── LatestPrice.java │ │ │ │ ├── OptionAsset.java │ │ │ │ ├── OptionCandlestick.java │ │ │ │ ├── OptionContract.java │ │ │ │ ├── OptionExchangeInformation.java │ │ │ │ ├── OptionSymbol.java │ │ │ │ ├── OptionTrade.java │ │ │ │ └── OptionTradingPair.java │ │ │ └── trade │ │ │ │ ├── AccountAsset.java │ │ │ │ ├── FundingFlow.java │ │ │ │ ├── FundsTransferTypes.java │ │ │ │ ├── OptionContractTypes.java │ │ │ │ ├── OptionHolding.java │ │ │ │ ├── OptionOrder.java │ │ │ │ ├── OptionOrderRequest.java │ │ │ │ ├── OptionOrderStatus.java │ │ │ │ ├── OptionOrderTypes.java │ │ │ │ └── OptionUserTrade.java │ │ ├── pay │ │ │ ├── Fund.java │ │ │ ├── PayRecord.java │ │ │ └── PayTypes.java │ │ ├── portfoliomargin │ │ │ ├── AccountStatus.java │ │ │ └── PortfolioMargin.java │ │ ├── rebate │ │ │ └── RebateRecord.java │ │ ├── savings │ │ │ ├── DailyPosition.java │ │ │ ├── FixedPosition.java │ │ │ ├── FixedProduct.java │ │ │ ├── FixedTypes.java │ │ │ ├── FlexiblePosition.java │ │ │ ├── FlexibleProduct.java │ │ │ ├── LendingAccount.java │ │ │ ├── LendingTypes.java │ │ │ ├── PositionAmount.java │ │ │ ├── PurchaseRecord.java │ │ │ ├── Quota.java │ │ │ ├── RedemptionQuota.java │ │ │ ├── RedemptionRecord.java │ │ │ ├── SavingsInterestRecord.java │ │ │ ├── SavingsPositionStatus.java │ │ │ ├── SavingsRedemptionType.java │ │ │ ├── SavingsSortBy.java │ │ │ └── SavingsStatus.java │ │ ├── spot │ │ │ ├── marketdata │ │ │ │ ├── CurrentAveragePrice.java │ │ │ │ ├── Permissions.java │ │ │ │ ├── SpotExchangeInformation.java │ │ │ │ ├── SpotSymbol.java │ │ │ │ ├── SpotSymbolStatus.java │ │ │ │ ├── SpotTickerStatistics.java │ │ │ │ └── SpotTrade.java │ │ │ ├── marketstream │ │ │ │ ├── SpotStreamCandlestick.java │ │ │ │ └── SpotStreamTrade.java │ │ │ ├── trade │ │ │ │ ├── AccountInformation.java │ │ │ │ ├── Fill.java │ │ │ │ ├── OrderLimit.java │ │ │ │ ├── SpotAccountTrade.java │ │ │ │ ├── SpotOCOOrder.java │ │ │ │ ├── SpotOCOOrderRequest.java │ │ │ │ ├── SpotOrder.java │ │ │ │ ├── SpotOrderRequest.java │ │ │ │ └── SpotOrderTypes.java │ │ │ └── userstream │ │ │ │ ├── BalanceUpdate.java │ │ │ │ ├── ExecutionTypes.java │ │ │ │ └── OrderUpdate.java │ │ ├── staking │ │ │ ├── StakingLeftQuota.java │ │ │ ├── StakingPosition.java │ │ │ ├── StakingProduct.java │ │ │ ├── StakingProducts.java │ │ │ ├── StakingRecord.java │ │ │ └── TxnTypes.java │ │ ├── subaccount │ │ │ ├── AccountTypes.java │ │ │ ├── AssetTransfer.java │ │ │ ├── AssetTransferResult.java │ │ │ ├── FuturesAsset.java │ │ │ ├── FuturesDetail.java │ │ │ ├── FuturesSummary.java │ │ │ ├── FuturesType.java │ │ │ ├── FuturesUserAsset.java │ │ │ ├── IPRestriction.java │ │ │ ├── ManagedAsset.java │ │ │ ├── MarginCoeffVo.java │ │ │ ├── MarginDetail.java │ │ │ ├── MarginSummary.java │ │ │ ├── MarginTotal.java │ │ │ ├── PositionRisk.java │ │ │ ├── SpotAsset.java │ │ │ ├── SpotAssetsSummary.java │ │ │ ├── SubAccount.java │ │ │ ├── SubAccountStatus.java │ │ │ ├── SubAccountTransfer.java │ │ │ ├── SubaccountTransferHistoryRequest.java │ │ │ ├── TransferStatus.java │ │ │ └── UniversalTransfer.java │ │ ├── usdm │ │ │ ├── marketdata │ │ │ │ ├── AssetIndex.java │ │ │ │ ├── BaseAsset.java │ │ │ │ ├── CompositeIndex.java │ │ │ │ ├── UsdmAsset.java │ │ │ │ ├── UsdmExchangeInformation.java │ │ │ │ ├── UsdmFuturesType.java │ │ │ │ ├── UsdmLongShortAccountRatio.java │ │ │ │ ├── UsdmLongShortPositionRatio.java │ │ │ │ ├── UsdmOpenInterestStatistics.java │ │ │ │ ├── UsdmSymbol.java │ │ │ │ ├── UsdmTakerVolume.java │ │ │ │ ├── UsdmTickerStatistics.java │ │ │ │ └── UsdmTrade.java │ │ │ └── trade │ │ │ │ ├── UsdmAccountAsset.java │ │ │ │ ├── UsdmAccountBalance.java │ │ │ │ ├── UsdmAccountInformation.java │ │ │ │ ├── UsdmAccountPosition.java │ │ │ │ ├── UsdmAccountTrade.java │ │ │ │ ├── UsdmForceOrder.java │ │ │ │ ├── UsdmIndicator.java │ │ │ │ ├── UsdmIndicators.java │ │ │ │ └── UsdmOrder.java │ │ └── wallet │ │ │ ├── APIKeyPermission.java │ │ │ ├── AccountAPITradingStatus.java │ │ │ ├── AccountSnapshot.java │ │ │ ├── AccountSnapshotTypes.java │ │ │ ├── AssetDetail.java │ │ │ ├── AssetDividend.java │ │ │ ├── BNBConvertableAsset.java │ │ │ ├── CoinInformation.java │ │ │ ├── Deposit.java │ │ │ ├── DustTransfer.java │ │ │ ├── DustTransferDetails.java │ │ │ ├── DustTransferRecord.java │ │ │ ├── FundingWallet.java │ │ │ ├── FutureAsset.java │ │ │ ├── FuturesAccountSnapshot.java │ │ │ ├── Indicator.java │ │ │ ├── Indicators.java │ │ │ ├── MarginAccountSnapshot.java │ │ │ ├── Network.java │ │ │ ├── Position.java │ │ │ ├── SpotAccountSnapshot.java │ │ │ ├── SystemStatus.java │ │ │ ├── TradeFee.java │ │ │ ├── Transfer.java │ │ │ ├── TransferHistoryRequest.java │ │ │ ├── TransferType.java │ │ │ ├── TriggerConditions.java │ │ │ ├── UniversalTransfer.java │ │ │ ├── UniversalTransferHistoryRequest.java │ │ │ ├── UniversalTransferRequest.java │ │ │ ├── UniversalTransferTypes.java │ │ │ ├── Withdraw.java │ │ │ └── WithdrawRequest.java │ │ ├── exceptions │ │ ├── ApiEndpointException.java │ │ ├── BinanceAPIException.java │ │ ├── BinanceAutoHttpRequestException.java │ │ ├── BinanceClientImplementerException.java │ │ ├── BinanceException.java │ │ ├── BinanceHttpClientException.java │ │ ├── BinanceHttpRequestException.java │ │ ├── BinanceWebSocketException.java │ │ └── FilterInstanciationException.java │ │ └── utils │ │ └── IOUtils.java └── test │ └── java │ └── fr │ └── rowlaxx │ └── binanceapi │ ├── .gitignore │ └── Test.java └── target └── test-classes └── fr └── rowlaxx └── binanceapi └── .gitignore /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | /target/ 25 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Binance API 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | 25 | 1647648795980 26 | 27 | 30 28 | 29 | org.eclipse.core.resources.regexFilterMatcher 30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=17 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 15 | org.eclipse.jdt.core.compiler.processAnnotations=disabled 16 | org.eclipse.jdt.core.compiler.release=disabled 17 | org.eclipse.jdt.core.compiler.source=17 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/Api.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api; 2 | 3 | public interface Api { 4 | 5 | public Platform getApiPlatform(); 6 | public Protocol getApiProtocol(); 7 | 8 | public static interface Spot extends Api { 9 | @Override 10 | default Platform getApiPlatform() { 11 | return Platform.SPOT; 12 | } 13 | } 14 | 15 | public static interface Usdm extends Api { 16 | @Override 17 | default Platform getApiPlatform() { 18 | return Platform.USDM; 19 | } 20 | } 21 | 22 | public static interface Coinm extends Api { 23 | @Override 24 | default Platform getApiPlatform() { 25 | return Platform.COINM; 26 | } 27 | } 28 | 29 | public static interface Options extends Api { 30 | @Override 31 | default Platform getApiPlatform() { 32 | return Platform.OPTIONS; 33 | } 34 | } 35 | 36 | public static interface Https extends Api { 37 | @Override 38 | default Protocol getApiProtocol() { 39 | return Protocol.HTTPS; 40 | } 41 | } 42 | 43 | public static interface WebSocket extends Api{ 44 | @Override 45 | default Protocol getApiProtocol() { 46 | return Protocol.WEBSOCKET; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/Platform.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api; 2 | 3 | public enum Platform { 4 | 5 | SPOT, 6 | USDM, 7 | COINM, 8 | OPTIONS; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/Protocol.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api; 2 | 3 | public enum Protocol { 4 | 5 | WEBSOCKET, 6 | HTTPS 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/coinm/CoinmAPI.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api.coinm; 2 | 3 | import java.util.Objects; 4 | 5 | import fr.rowlaxx.binanceapi.api.ApiImplementer; 6 | import fr.rowlaxx.binanceapi.client.BinanceClient; 7 | 8 | public final class CoinmAPI { 9 | 10 | //Variables 11 | private final BinanceClient client; 12 | 13 | private CoinmMarketDataAPI market; 14 | private CoinmTradeAPI trade; 15 | 16 | //Constructeurs 17 | public CoinmAPI(BinanceClient client) { 18 | this.client = Objects.requireNonNull(client, "client may not be null."); 19 | } 20 | 21 | //Methodes 22 | public CoinmMarketDataAPI market() { 23 | if (market == null) 24 | market = ApiImplementer.implementz(CoinmMarketDataAPI.class, client); 25 | return market; 26 | } 27 | 28 | public CoinmTradeAPI trade() { 29 | if (trade == null) 30 | trade = ApiImplementer.implementz(CoinmTradeAPI.class, client); 31 | return trade; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/options/OptionsAPI.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api.options; 2 | 3 | import java.util.Objects; 4 | 5 | import fr.rowlaxx.binanceapi.api.ApiImplementer; 6 | import fr.rowlaxx.binanceapi.client.BinanceClient; 7 | 8 | public final class OptionsAPI { 9 | 10 | //Variables 11 | private final BinanceClient client; 12 | 13 | private OptionsQuotingAPI quoting; 14 | private OptionsTradeAPI trade; 15 | 16 | //Constructeurs 17 | public OptionsAPI(BinanceClient client) { 18 | this.client = Objects.requireNonNull(client, "client may not be null."); 19 | } 20 | 21 | //Methodes 22 | public OptionsQuotingAPI quoting() { 23 | if (quoting == null) 24 | quoting = ApiImplementer.implementz(OptionsQuotingAPI.class, client); 25 | return quoting; 26 | } 27 | 28 | public OptionsTradeAPI trade() { 29 | if (trade == null) 30 | trade = ApiImplementer.implementz(OptionsTradeAPI.class, client); 31 | return trade; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/spot/BLVTAPI.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api.spot; 2 | 3 | import java.util.Objects; 4 | 5 | import fr.rowlaxx.binanceapi.api.ApiImplementer; 6 | import fr.rowlaxx.binanceapi.client.BinanceClient; 7 | 8 | public class BLVTAPI { 9 | 10 | //Variables 11 | private final BinanceClient client; 12 | 13 | private BLVTHttpAPI http = null; 14 | private BLVTStreamAPI stream = null; 15 | 16 | //Constructeurs 17 | public BLVTAPI(BinanceClient client) { 18 | this.client = Objects.requireNonNull(client, "client may not be null."); 19 | } 20 | 21 | //Methodes 22 | public BLVTHttpAPI http() { 23 | if (http == null) 24 | http = ApiImplementer.implementz(BLVTHttpAPI.class, client); 25 | return http; 26 | } 27 | 28 | public BLVTStreamAPI stream() { 29 | if (stream == null) 30 | stream = new BLVTStreamAPI(); 31 | return stream; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/spot/PortfolioMarginApi.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api.spot; 2 | 3 | import fr.rowlaxx.binanceapi.api.Api; 4 | import fr.rowlaxx.binanceapi.client.http.ApiEndpoint; 5 | import fr.rowlaxx.binanceapi.client.http.BaseEndpoints; 6 | import fr.rowlaxx.binanceapi.core.portfoliomargin.PortfolioMargin; 7 | import fr.rowlaxx.binanceapi.client.http.BinanceHttpRequest.Method; 8 | 9 | /** 10 | * @version 2022-04-20 11 | * @author Théo 12 | * @see https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-endpoints 13 | */ 14 | public interface PortfolioMarginApi extends Api.Https, Api.Spot { 15 | 16 | //Get Portfolio Margin Account Info (USER_DATA) 17 | @ApiEndpoint( 18 | needSignature = true, 19 | baseEndpoint = BaseEndpoints.SPOT, 20 | endpoint = "sapi/v1/portfolio/account", 21 | method = Method.GET, 22 | parameters = {}, 23 | mandatory = {} 24 | ) 25 | public PortfolioMargin getPortfolio(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/api/usdm/UsdmAPI.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.api.usdm; 2 | 3 | import java.util.Objects; 4 | 5 | import fr.rowlaxx.binanceapi.api.ApiImplementer; 6 | import fr.rowlaxx.binanceapi.client.BinanceClient; 7 | 8 | public final class UsdmAPI { 9 | 10 | //Variables 11 | private final BinanceClient client; 12 | 13 | private UsdmMarketDataAPI market; 14 | private UsdmTradeAPI trade; 15 | private UsdmMarketStreamAPI marketstream; 16 | 17 | //Constructeurs 18 | public UsdmAPI(BinanceClient client) { 19 | this.client = Objects.requireNonNull(client, "client may not be null."); 20 | } 21 | 22 | //Methodes 23 | public UsdmMarketDataAPI market() { 24 | if (market == null) 25 | market = ApiImplementer.implementz(UsdmMarketDataAPI.class, client); 26 | return market; 27 | } 28 | 29 | public UsdmTradeAPI trade() { 30 | if (trade == null) 31 | trade = ApiImplementer.implementz(UsdmTradeAPI.class, client); 32 | return trade; 33 | } 34 | 35 | public UsdmMarketStreamAPI marketstream() { 36 | if (marketstream == null) 37 | marketstream = new UsdmMarketStreamAPI(); 38 | return marketstream; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/http/ApiEndpoint.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.http; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface ApiEndpoint { 12 | 13 | public String endpoint(); 14 | public BaseEndpoints baseEndpoint(); 15 | public String[] customBaseEndpoint() default {}; 16 | public BinanceHttpRequest.Method method(); 17 | public boolean needSignature(); 18 | public Parameters[] parameters(); 19 | public boolean[] mandatory(); 20 | public String[] defaultValues() default {}; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/http/BaseEndpoints.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.http; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | public enum BaseEndpoints { 8 | 9 | SPOT("https://api.binance.com", "https://api1.binance.com", "https://api2.binance.com", "https://api3.binance.com"), 10 | FUTURE_USD("https://fapi.binance.com"), 11 | FUTURE_COIN("https://dapi.binance.com"), 12 | VANILLA("https://vapi.binance.com"), 13 | CUSTOM; 14 | 15 | //Variables 16 | private final List urls; 17 | 18 | //Constructeurs 19 | private BaseEndpoints(String... urls) { 20 | final ArrayList array = new ArrayList<>(); 21 | for (String s : urls) 22 | array.add(s); 23 | this.urls = Collections.unmodifiableList(array); 24 | } 25 | 26 | //Getters 27 | public List getUrls() { 28 | return urls; 29 | } 30 | 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/http/DontSend.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.http; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(FIELD) 11 | public @interface DontSend {} -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/http/ParameterValue.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.http; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(FIELD) 11 | public @interface ParameterValue { 12 | 13 | public Parameters parameter(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/http/RedirectResponse.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.http; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | @Retention(RUNTIME) 10 | @Target(METHOD) 11 | public @interface RedirectResponse { 12 | 13 | public String path(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/websocket/OnJson.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.websocket; 2 | 3 | import org.json.JSONObject; 4 | 5 | public interface OnJson { 6 | 7 | public void onJson(JSONObject json); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/websocket/ResponseProcessorThread.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.websocket; 2 | 3 | import java.util.Objects; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class ResponseProcessorThread extends Thread { 8 | 9 | //Variables 10 | private final BinanceWebSocketPool pool; 11 | private boolean running; 12 | 13 | //Constructeus 14 | public ResponseProcessorThread(BinanceWebSocketPool pool) { 15 | this.pool = Objects.requireNonNull(pool, "pool may not be null."); 16 | } 17 | 18 | @Override 19 | public void run() { 20 | running = true; 21 | JSONObject json; 22 | try { 23 | while(running) { 24 | json = pool.nextResponse(); 25 | for (OnJson event : pool.getOnJsonEvents()) 26 | try{ 27 | event.onJson(json); 28 | }catch(Exception e) { 29 | e.printStackTrace(); 30 | } 31 | } 32 | }catch(InterruptedException e) { 33 | return; 34 | } 35 | } 36 | 37 | @Override 38 | public void interrupt() { 39 | this.running = false; 40 | super.interrupt(); 41 | try { 42 | this.join(); 43 | } catch (InterruptedException e) { 44 | e.printStackTrace(); 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/websocket/SocketCheckerThread.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.websocket; 2 | 3 | import java.util.Objects; 4 | 5 | public class SocketCheckerThread extends Thread { 6 | 7 | //Variables 8 | private final BinanceWebSocketPool pool; 9 | private boolean running; 10 | 11 | //Constructeurs 12 | public SocketCheckerThread(BinanceWebSocketPool pool) { 13 | this.pool = Objects.requireNonNull(pool, "pool may not be null."); 14 | } 15 | 16 | @Override 17 | public void run() { 18 | running = true; 19 | try { 20 | while (running) { 21 | pool.checkSockets(); 22 | Thread.sleep(2000); 23 | } 24 | }catch(InterruptedException e) { 25 | return; 26 | } 27 | } 28 | 29 | @Override 30 | public void interrupt() { 31 | running = false; 32 | super.interrupt(); 33 | try { 34 | this.join(); 35 | } catch (InterruptedException e) { 36 | e.printStackTrace(); 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/client/websocket/UserStreamAPIThread.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.client.websocket; 2 | 3 | import java.util.Objects; 4 | 5 | public class UserStreamAPIThread extends Thread { 6 | 7 | //Variables 8 | private final UserStreamAPI stream; 9 | private volatile boolean running = false; 10 | 11 | //Constructeurs 12 | public UserStreamAPIThread(UserStreamAPI stream) { 13 | this.stream = Objects.requireNonNull(stream, "stream may not be null."); 14 | } 15 | 16 | //Methodes 17 | @Override 18 | public void run() { 19 | running = true; 20 | while (running) 21 | try { 22 | Thread.sleep(5*60*1000); 23 | stream.updateListenKey(); 24 | } catch (InterruptedException e) {} 25 | } 26 | 27 | @Override 28 | public void interrupt() { 29 | this.running = false; 30 | super.interrupt(); 31 | try { 32 | this.join(); 33 | } catch (InterruptedException e) {} 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/Asset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class Asset extends JsavonObject { 9 | private static final long serialVersionUID = -8246393742905404438L; 10 | 11 | //Variables 12 | @JOValue(key = {"asset", "a"}) 13 | private String asset; 14 | @JOValue(key = {"free", "f"}) 15 | private double free; 16 | @JOValue(key = {"locked", "l"}) 17 | private double locked; 18 | 19 | //Constructeurs 20 | public Asset(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | //Getters 25 | public final String getAsset() { 26 | return this.asset; 27 | } 28 | 29 | public final double getFree() { 30 | return this.free; 31 | } 32 | 33 | public final double getLocked() { 34 | return this.locked; 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/Basic2OrderRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public class Basic2OrderRequest extends BasicOrderRequest { 4 | 5 | //Builder 6 | @SuppressWarnings("unchecked") 7 | protected static class Builder, B extends Builder> extends BasicOrderRequest.Builder { 8 | 9 | //Constructeurs 10 | protected Builder(R request) { 11 | super(request); 12 | } 13 | 14 | //Setters 15 | public final B setStopPrice(Double stopPrice) { 16 | ((Basic2OrderRequest)request()).stopPrice = stopPrice; 17 | return (B) this; 18 | } 19 | 20 | public final B setNewClientOrderId(String newClientOrderId) { 21 | ((Basic2OrderRequest)request()).newClientOrderId = newClientOrderId; 22 | return (B) this; 23 | } 24 | } 25 | 26 | //Constructeurs 27 | protected Basic2OrderRequest() {} 28 | 29 | //Variables 30 | private String newClientOrderId; 31 | private Double stopPrice; 32 | 33 | //Getters 34 | public final String getNewClientOrderId() { 35 | return newClientOrderId; 36 | } 37 | 38 | public final Double getStopPrice() { 39 | return stopPrice; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/BasicOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.annotations.JOValue; 6 | 7 | public class BasicOrder extends Order { 8 | private static final long serialVersionUID = -1507195026482848443L; 9 | 10 | //Variables 11 | @JOValue(mandatory = false) 12 | private double origQty; 13 | @JOValue(mandatory = false) 14 | private Long time; 15 | @JOValue(mandatory = false) 16 | private Double stopPrice; 17 | 18 | 19 | //Constructeurs 20 | public BasicOrder(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | //Getters 25 | public final double getOrigQty() { 26 | return origQty; 27 | } 28 | 29 | public final Double getStopPrice() { 30 | return stopPrice; 31 | } 32 | 33 | public final Long getTime() { 34 | return time; 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/CompressedTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.annotations.JOValue; 6 | 7 | public class CompressedTrade extends SideableTrade { 8 | private static final long serialVersionUID = 8527421398690357381L; 9 | 10 | //Variables 11 | @JOValue(key = "f") 12 | private long firstTradeId; 13 | @JOValue(key = "l") 14 | private long lastTradeId; 15 | 16 | //Constructeurs 17 | public CompressedTrade(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final long getFirstTradeId() { 23 | return firstTradeId; 24 | } 25 | 26 | public final long getLastTradeId() { 27 | return lastTradeId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/DepositAddress.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class DepositAddress extends JsavonObject { 8 | private static final long serialVersionUID = 5872502337723190174L; 9 | 10 | //Variables 11 | private String address; 12 | private String coin; 13 | private String tag; 14 | private String url; 15 | 16 | //Constructeurs 17 | public DepositAddress(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getAddress() { 23 | return this.address; 24 | } 25 | 26 | public final String getCoin() { 27 | return this.coin; 28 | } 29 | 30 | public final String getTag() { 31 | return this.tag; 32 | } 33 | 34 | public final String getUrl() { 35 | return this.url; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/MiniTicker.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | import fr.rowlaxx.jsavon.annotations.JOValue; 5 | 6 | public class MiniTicker extends JsavonObject { 7 | private static final long serialVersionUID = -1160108214836138288L; 8 | 9 | //Variables 10 | @JOValue(key = "s") 11 | private String symbol; 12 | @JOValue(key = "c") 13 | private double close; 14 | @JOValue(key = "o") 15 | private double open; 16 | @JOValue(key = "h") 17 | private double high; 18 | @JOValue(key = "l") 19 | private double low; 20 | @JOValue(key = "v") 21 | private double volume; 22 | @JOValue(key = "q") 23 | private double quoteAssetVolume; 24 | 25 | //Getters 26 | public double getClose() { 27 | return close; 28 | } 29 | 30 | public double getHigh() { 31 | return high; 32 | } 33 | 34 | public double getLow() { 35 | return low; 36 | } 37 | 38 | public double getOpen() { 39 | return open; 40 | } 41 | 42 | public double getQuoteAssetVolume() { 43 | return quoteAssetVolume; 44 | } 45 | 46 | public String getSymbol() { 47 | return symbol; 48 | } 49 | 50 | public double getVolume() { 51 | return volume; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/OrderResponseTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public enum OrderResponseTypes { 4 | 5 | ACK, 6 | RESULT, 7 | FULL 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/OrderSides.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import fr.rowlaxx.convertutils.annotations.EnumMatcher; 4 | 5 | public enum OrderSides { 6 | 7 | @EnumMatcher(possibleMatchs = {"BUY", "1"}, caseSensitiv = false) 8 | BUY, 9 | @EnumMatcher(possibleMatchs = {"SELL", "-1"}, caseSensitiv = false) 10 | SELL 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/OrderStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public enum OrderStatus implements SimpleOrderStatus { 4 | 5 | NEW, 6 | PARTIALLY_FILLED, 7 | FILLED, 8 | CANCELED, 9 | PENDING_CANCEL, 10 | REJECTED, 11 | EXPIRED 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/OrderTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public interface OrderTypes {} 4 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/SideableTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.annotations.JOValue; 6 | 7 | public class SideableTrade extends Trade { 8 | private static final long serialVersionUID = -4799770263609131397L; 9 | 10 | //Variables 11 | @JOValue(key = { "isBuyerMaker", "m" }) 12 | private boolean isBuyerMaker; 13 | 14 | //Constructeurs 15 | public SideableTrade(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final boolean isBuyerMaker() { 21 | return isBuyerMaker; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/SimpleOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class SimpleOrder extends JsavonObject { 9 | private static final long serialVersionUID = 1492707707138253457L; 10 | 11 | //Variables 12 | private String symbol; 13 | @JOValue(key = { "orderId", "id" }) private long orderId; 14 | private String clientOrderId; 15 | 16 | //Constructeurs 17 | public SimpleOrder(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getClientOrderId() { 23 | return clientOrderId; 24 | } 25 | 26 | public final long getOrderId() { 27 | return orderId; 28 | } 29 | 30 | public final String getSymbol() { 31 | return symbol; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/SimpleOrderStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public interface SimpleOrderStatus { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/SymbolPriceTicker.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class SymbolPriceTicker extends JsavonObject { 9 | private static final long serialVersionUID = -2096759154175062669L; 10 | 11 | //Variables 12 | private double price; 13 | private String symbol; 14 | @JOValue(mandatory = false) private Long time; 15 | 16 | //Constructeurs 17 | public SymbolPriceTicker(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getPrice() { 23 | return this.price; 24 | } 25 | 26 | public final Long getTime() { 27 | return time; 28 | } 29 | 30 | public final String getSymbol() { 31 | return this.symbol; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/TimeInForce.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | public enum TimeInForce { 4 | 5 | GTC, 6 | IOC, 7 | FOK, 8 | GTX 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/Trade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class Trade extends JsavonObject { 9 | private static final long serialVersionUID = 3119645480784672286L; 10 | 11 | //Variables 12 | @JOValue(key = {"id", "t", "a"}) 13 | private long id; 14 | @JOValue(key = {"isBestMatch", "M"}, mandatory = false) 15 | private Boolean isBestMatch; 16 | @JOValue(key = {"price", "p"}) 17 | private double price; 18 | @JOValue(key = {"qty", "q", "quantity"}) 19 | private double qty; 20 | @JOValue(key = {"time", "T", "createDate"}) 21 | private long time; 22 | 23 | //Constructeurs 24 | public Trade(JSONObject json) { 25 | super(json); 26 | } 27 | 28 | //Getters 29 | public final long getId() { 30 | return this.id; 31 | } 32 | 33 | public final Boolean isBestMatch() { 34 | return this.isBestMatch; 35 | } 36 | 37 | public final double getPrice() { 38 | return this.price; 39 | } 40 | 41 | public final double getQuantity() { 42 | return this.qty; 43 | } 44 | 45 | public final long getTime() { 46 | return this.time; 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/UserAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class UserAsset extends Asset { 6 | private static final long serialVersionUID = -7794836890023245527L; 7 | 8 | //Variables 9 | private double borrowed; 10 | private double interest; 11 | private double netAsset; 12 | 13 | //Constructeurs 14 | public UserAsset(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final double getInterest() { 20 | return this.interest; 21 | } 22 | 23 | public final double getNetAsset() { 24 | return this.netAsset; 25 | } 26 | 27 | public final double getBorrowed() { 28 | return this.borrowed; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/Basket.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Basket extends JsavonObject { 8 | private static final long serialVersionUID = -8127523780594862991L; 9 | 10 | //Variables 11 | private double amount; 12 | private double notionalValue; 13 | private String symbol; 14 | 15 | //Constructeurs 16 | public Basket(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getAmount() { 22 | return this.amount; 23 | } 24 | 25 | public final double getNotionalValue() { 26 | return this.notionalValue; 27 | } 28 | 29 | public final String getSymbol() { 30 | return this.symbol; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BasketStream.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | import fr.rowlaxx.jsavon.annotations.JOValue; 5 | 6 | public class BasketStream extends JsavonObject { 7 | private static final long serialVersionUID = 8309375304903539339L; 8 | 9 | //Variables 10 | @JOValue(key = "s") 11 | private String symbol; 12 | @JOValue(key = "n") 13 | private double position; 14 | 15 | //Getters 16 | public double getPosition() { 17 | return position; 18 | } 19 | 20 | public String getSymbol() { 21 | return symbol; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BlvtTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | abstract class BlvtTrade extends JsavonObject { 8 | private static final long serialVersionUID = -4004343023477677130L; 9 | 10 | //Variables 11 | private int id; 12 | private double amount; 13 | private long timestamp; 14 | private String tokenName; 15 | 16 | //Constructeurs 17 | public BlvtTrade(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final int getId() { 23 | return this.id; 24 | } 25 | 26 | public final long getTimestamp() { 27 | return this.timestamp; 28 | } 29 | 30 | public final String getTokenName() { 31 | return this.tokenName; 32 | } 33 | 34 | public final double getAmount() { 35 | return this.amount; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BlvtTradeRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | abstract class BlvtTradeRecord extends BlvtTrade { 6 | private static final long serialVersionUID = 3536947889599077905L; 7 | 8 | //Variables 9 | private double nav; 10 | private double fee; 11 | 12 | //Constructeurs 13 | public BlvtTradeRecord(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | //Getters 18 | public final double getFee() { 19 | return this.fee; 20 | } 21 | 22 | public final double getNav() { 23 | return this.nav; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BlvtTradeResponse.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | abstract class BlvtTradeResponse extends BlvtTrade { 6 | private static final long serialVersionUID = -7024310745427081093L; 7 | 8 | //Variables 9 | private BlvtTradeStatus status; 10 | 11 | //Constructeurs 12 | public BlvtTradeResponse(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final BlvtTradeStatus getStatus() { 18 | return this.status; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BlvtTradeStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import fr.rowlaxx.convertutils.annotations.EnumMatcher; 4 | 5 | public enum BlvtTradeStatus { 6 | 7 | @EnumMatcher(possibleMatchs = "S") 8 | SUCCESS, 9 | @EnumMatcher(possibleMatchs = "P") 10 | PENDING, 11 | @EnumMatcher(possibleMatchs = "F") 12 | FAILED 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/BlvtUserLimit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class BlvtUserLimit extends JsavonObject { 8 | private static final long serialVersionUID = -2251796388307172118L; 9 | 10 | //Variables 11 | private String tokenName; 12 | private double userDailyTotalPurchaseLimit; 13 | private double userDailyTotalRedeemLimit; 14 | 15 | //Constructeurs 16 | public BlvtUserLimit(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final String getTokenName() { 22 | return this.tokenName; 23 | } 24 | 25 | public final double getUserDailyTotalPurchaseLimit() { 26 | return this.userDailyTotalPurchaseLimit; 27 | } 28 | 29 | public final double getUserDailyTotalRedeemLimit() { 30 | return this.userDailyTotalRedeemLimit; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/Redemption.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class Redemption extends BlvtTradeResponse { 6 | private static final long serialVersionUID = 1168056846971310548L; 7 | 8 | //Variables 9 | private double redeemAmount; 10 | 11 | //Constructeurs 12 | public Redemption(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getRedeemAmount() { 18 | return this.redeemAmount; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/RedemptionRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class RedemptionRecord extends BlvtTradeRecord { 6 | private static final long serialVersionUID = -9132339903872967879L; 7 | 8 | //Variables 9 | private double netProceed; 10 | 11 | //Constructeurs 12 | public RedemptionRecord(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getNetProceed() { 18 | return this.netProceed; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/Subscribtion.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class Subscribtion extends BlvtTradeResponse { 6 | private static final long serialVersionUID = -8113383206439744L; 7 | 8 | //Variables 9 | private double cost; 10 | 11 | //Constructeurs 12 | public Subscribtion(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getCost() { 18 | return this.cost; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/blvt/SubscriptionRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.blvt; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class SubscriptionRecord extends BlvtTradeRecord { 6 | private static final long serialVersionUID = -82454539513053661L; 7 | 8 | //Variables 9 | private double totalCharge; 10 | 11 | //Constructeurs 12 | public SubscriptionRecord(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getTotalCharge() { 18 | return this.totalCharge; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/AbstractQuote.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | abstract class AbstractQuote extends JsavonObject { 8 | private static final long serialVersionUID = 7423377929078996586L; 9 | 10 | //Variables 11 | private String baseAsset; 12 | private int fee; 13 | private double price; 14 | private String quoteAsset; 15 | private double slippage; 16 | 17 | //Constructeurs 18 | public AbstractQuote(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final String getBaseAsset() { 24 | return this.baseAsset; 25 | } 26 | 27 | public final int getFee() { 28 | return this.fee; 29 | } 30 | 31 | public final double getPrice() { 32 | return this.price; 33 | } 34 | 35 | public final String getQuoteAsset() { 36 | return this.quoteAsset; 37 | } 38 | 39 | public final double getSlippage() { 40 | return this.slippage; 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/AddLiquidityPreview.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class AddLiquidityPreview extends LiquidityPreview { 6 | private static final long serialVersionUID = 7515721475951777627L; 7 | 8 | //Variables 9 | private double share; 10 | 11 | //Constructeurs 12 | public AddLiquidityPreview(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getShare() { 18 | return share; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/AssetConfigure.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class AssetConfigure extends JsavonObject { 8 | private static final long serialVersionUID = -2889642633793927927L; 9 | 10 | //Variables 11 | private double minAdd, maxAdd, minSwap, maxSwap; 12 | 13 | //Constructeurs 14 | public AssetConfigure(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final double getMaxAdd() { 20 | return maxAdd; 21 | } 22 | 23 | public final double getMaxSwap() { 24 | return maxSwap; 25 | } 26 | 27 | public final double getMinAdd() { 28 | return minAdd; 29 | } 30 | 31 | public final double getMinSwap() { 32 | return minSwap; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/ClaimRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class ClaimRecord extends JsavonObject { 8 | private static final long serialVersionUID = -1471380821308312579L; 9 | 10 | private int poolId; 11 | private String poolName; 12 | private String assetRewards; 13 | private long claimTime; 14 | private double claimAmount; 15 | private int status; 16 | 17 | public ClaimRecord(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | public final String getAssetRewards() { 22 | return assetRewards; 23 | } 24 | 25 | public final double getClaimAmount() { 26 | return claimAmount; 27 | } 28 | 29 | public final long getClaimTime() { 30 | return claimTime; 31 | } 32 | 33 | public final int getPoolId() { 34 | return poolId; 35 | } 36 | 37 | public final String getPoolName() { 38 | return poolName; 39 | } 40 | 41 | public final int getStatus() { 42 | return status; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/LiquidityOperationStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | public enum LiquidityOperationStatus { 4 | 5 | PENDING_FOR_SWAP(0), 6 | SUCCESS(1), 7 | FAILED(2); 8 | 9 | private int no; 10 | 11 | private LiquidityOperationStatus(int no) { 12 | this.no = no; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return String.valueOf(no); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/LiquidityOperationTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | public enum LiquidityOperationTypes { 4 | 5 | SINGLE, 6 | COMBINATION 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/LiquidityOperations.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | public enum LiquidityOperations { 4 | 5 | ADD, 6 | REMOVE 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/LiquidityPreview.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class LiquidityPreview extends AbstractQuote { 6 | private static final long serialVersionUID = 1286176776271836219L; 7 | 8 | //Variables 9 | private double quoteAmt; 10 | private double baseAmt; 11 | 12 | //Constructeurs 13 | public LiquidityPreview(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | //Getters 18 | public final double getBaseAmt() { 19 | return baseAmt; 20 | } 21 | 22 | public final double getQuoteAmt() { 23 | return quoteAmt; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/RequestQuote.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class RequestQuote extends AbstractQuote { 6 | private static final long serialVersionUID = 6165908770555428839L; 7 | 8 | //Variables 9 | private int baseQty; 10 | private int quoteQty; 11 | 12 | //Constructeurs 13 | public RequestQuote(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | //Getters 18 | public final int getBaseQty() { 19 | return this.baseQty; 20 | } 21 | 22 | public final int getQuoteQty() { 23 | return this.quoteQty; 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/SwapPool.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import java.util.List; 6 | 7 | import org.json.JSONObject; 8 | 9 | public class SwapPool extends JsavonObject { 10 | private static final long serialVersionUID = -8405819638278972559L; 11 | 12 | //Variables 13 | private List assets; 14 | private int poolId; 15 | private String poolName; 16 | 17 | //Constructeurs 18 | public SwapPool(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final List getAssets() { 24 | return this.assets; 25 | } 26 | 27 | public final int getPoolId() { 28 | return this.poolId; 29 | } 30 | 31 | public final String getPoolName() { 32 | return this.poolName; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/bswap/UnclaimedRewards.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.bswap; 2 | 3 | import java.util.Map; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | 9 | public class UnclaimedRewards extends JsavonObject { 10 | private static final long serialVersionUID = 8157765997464193278L; 11 | 12 | private Map totalUnclaimedRewards; 13 | private Map> details; 14 | 15 | public UnclaimedRewards(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | public final Map> getDetails() { 20 | return details; 21 | } 22 | 23 | public final Map getDetail(String poolName){ 24 | return details.get(poolName); 25 | } 26 | 27 | public final Map getTotalUnclaimedRewards() { 28 | return totalUnclaimedRewards; 29 | } 30 | 31 | public final Double getTotalUnclaimedReward(String asset) { 32 | return totalUnclaimedRewards.get(asset); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmExchangeInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.ExchangeInformation; 6 | 7 | public class CoinmExchangeInformation extends ExchangeInformation { 8 | private static final long serialVersionUID = -6353085621084475074L; 9 | 10 | //Constructeurs 11 | public CoinmExchangeInformation(JSONObject response) { 12 | super(response); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmLongShortAccountRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.AccountLongShortRatio; 6 | 7 | public class CoinmLongShortAccountRatio extends AccountLongShortRatio { 8 | private static final long serialVersionUID = -6845319456270373031L; 9 | 10 | private String pair; 11 | 12 | public CoinmLongShortAccountRatio(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getPair() { 17 | return pair; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmLongShortPositionRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.PositionLongShortRatio; 6 | 7 | public class CoinmLongShortPositionRatio extends PositionLongShortRatio { 8 | private static final long serialVersionUID = 4085955305907954426L; 9 | 10 | private String pair; 11 | 12 | public CoinmLongShortPositionRatio(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getPair() { 17 | return pair; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmOpenInterest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.marketdata.ContractTypes; 4 | import fr.rowlaxx.binanceapi.core.futures.marketdata.OpenInterest; 5 | 6 | import org.json.JSONObject; 7 | 8 | public class CoinmOpenInterest extends OpenInterest { 9 | private static final long serialVersionUID = -2417820515204406384L; 10 | 11 | //Variables 12 | private ContractTypes contractType; 13 | private String pair; 14 | 15 | //Constructeurs 16 | public CoinmOpenInterest(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final ContractTypes getContractType() { 22 | return this.contractType; 23 | } 24 | 25 | public final String getPair() { 26 | return this.pair; 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmOpenInterestStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.marketdata.OpenInterestStatistics; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class CoinmOpenInterestStatistics extends OpenInterestStatistics { 8 | private static final long serialVersionUID = -5295606786464625449L; 9 | 10 | //Variables 11 | private String contractType; 12 | private String pair; 13 | 14 | //Constructeurs 15 | public CoinmOpenInterestStatistics(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final String getContractType() { 21 | return this.contractType; 22 | } 23 | 24 | public final String getPair() { 25 | return this.pair; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmOrderBookTicker.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.BookTicker; 6 | 7 | public class CoinmOrderBookTicker extends BookTicker { 8 | private static final long serialVersionUID = 7479818087200748081L; 9 | 10 | private String pair; 11 | 12 | public CoinmOrderBookTicker(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getPair() { 17 | return pair; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmSymbol.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.FutureSymbol; 6 | 7 | public class CoinmSymbol extends FutureSymbol { 8 | private static final long serialVersionUID = 4912543539944543970L; 9 | 10 | //Variables 11 | private int equalQtyPrecision; 12 | private int contractSize; 13 | private int maxMoveOrderLimit; 14 | 15 | //Constructeurs 16 | public CoinmSymbol(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | //Getters 21 | public int getEqualQtyPrecision() { 22 | return equalQtyPrecision; 23 | } 24 | 25 | public int getContractSize() { 26 | return contractSize; 27 | } 28 | 29 | public int getMaxMoveOrderLimit() { 30 | return maxMoveOrderLimit; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmSymbolPriceTicker.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.SymbolPriceTicker; 6 | 7 | public class CoinmSymbolPriceTicker extends SymbolPriceTicker { 8 | private static final long serialVersionUID = -2092713189071626959L; 9 | 10 | private double ps; 11 | 12 | public CoinmSymbolPriceTicker(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public double getPs() { 17 | return ps; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmTickerStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.TickerStatistics; 6 | 7 | public abstract class CoinmTickerStatistics extends TickerStatistics { 8 | private static final long serialVersionUID = -5368170488593113954L; 9 | 10 | private String pair; 11 | private double baseVolume; 12 | 13 | public CoinmTickerStatistics(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | public final double getBaseVolume() { 18 | return baseVolume; 19 | } 20 | 21 | public final String getPair() { 22 | return pair; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/marketdata/CoinmTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.SideableTrade; 6 | 7 | public class CoinmTrade extends SideableTrade { 8 | private static final long serialVersionUID = -8087849406891656991L; 9 | 10 | private double baseQty; 11 | 12 | public CoinmTrade(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getBaseQty() { 17 | return baseQty; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmAccountBalance.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountBalance; 6 | 7 | public class CoinmAccountBalance extends FutureAccountBalance { 8 | private static final long serialVersionUID = -8650958641930178883L; 9 | 10 | private double withdrawAvailable; 11 | 12 | public CoinmAccountBalance(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getWithdrawAvailable() { 17 | return withdrawAvailable; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmAccountInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountAsset; 4 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountInformation; 5 | 6 | import org.json.JSONObject; 7 | 8 | public class CoinmAccountInformation extends FutureAccountInformation { 9 | private static final long serialVersionUID = 3177171119639825899L; 10 | 11 | //Constructeurs 12 | public CoinmAccountInformation(JSONObject json) { 13 | super(json); 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmAccountPosition.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountPosition; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class CoinmAccountPosition extends FutureAccountPosition { 8 | private static final long serialVersionUID = -6715634890222642316L; 9 | 10 | //Variables 11 | private double askNotional; 12 | private double bidNotional; 13 | private double maxNotional; 14 | 15 | //Constructeurs 16 | public CoinmAccountPosition(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getAskNotional() { 22 | return this.askNotional; 23 | } 24 | 25 | public final double getBidNotional() { 26 | return this.bidNotional; 27 | } 28 | 29 | public final double getMaxNotional() { 30 | return this.maxNotional; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmAccountTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountTrade; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class CoinmAccountTrade extends FutureAccountTrade { 8 | private static final long serialVersionUID = 1035784337305503446L; 9 | 10 | //Variables 11 | private double baseQty; 12 | private String marginAsset; 13 | private String pair; 14 | 15 | //Constructeurs 16 | public CoinmAccountTrade(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final String getMarginAsset() { 22 | return this.marginAsset; 23 | } 24 | 25 | public final String getPair() { 26 | return this.pair; 27 | } 28 | 29 | public final double getBaseQty() { 30 | return baseQty; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmForceOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.ForceOrder; 6 | 7 | public class CoinmForceOrder extends ForceOrder { 8 | private static final long serialVersionUID = -6504481957365884285L; 9 | 10 | private String pair; 11 | private double cumBase; 12 | private boolean priceProtect; 13 | 14 | public CoinmForceOrder(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | public final boolean isPriceProtect() { 19 | return priceProtect; 20 | } 21 | 22 | public final double getCumBase() { 23 | return cumBase; 24 | } 25 | 26 | public final String getPair() { 27 | return pair; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/coinm/trade/CoinmOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.coinm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureOrder; 6 | 7 | public class CoinmOrder extends FutureOrder { 8 | private static final long serialVersionUID = 4274208194826641865L; 9 | 10 | //Variables 11 | private double cumBase; 12 | private String pair; 13 | 14 | //Constructeurs 15 | public CoinmOrder(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final double getCumBase() { 21 | return cumBase; 22 | } 23 | 24 | public final String getPair() { 25 | return pair; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/cryptoloans/CryptoLoansTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.cryptoloans; 2 | 3 | public enum CryptoLoansTypes { 4 | 5 | borrowIn, 6 | collateralSpent, 7 | repayAmount, 8 | collateralReturn, 9 | addCollateral, 10 | removeCollateral, 11 | collateralReturnAfterLiquidation 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/cryptoloans/IncomeRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.cryptoloans; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class IncomeRecord extends JsavonObject { 8 | private static final long serialVersionUID = 4653353448979316259L; 9 | 10 | private String asset; 11 | private CryptoLoansTypes type; 12 | private double amount; 13 | private long timestamp; 14 | private long tranId; 15 | 16 | public IncomeRecord(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | public final double getAmount() { 21 | return amount; 22 | } 23 | 24 | public final String getAsset() { 25 | return asset; 26 | } 27 | 28 | public final long getTimestamp() { 29 | return timestamp; 30 | } 31 | 32 | public final long getTranId() { 33 | return tranId; 34 | } 35 | 36 | public final CryptoLoansTypes getType() { 37 | return type; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/RateLimit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class RateLimit extends JsavonObject { 8 | private static final long serialVersionUID = 6004306452814605389L; 9 | 10 | //Variables 11 | private int intervalNum; 12 | private int limit; 13 | private RateLimitIntervals interval; 14 | private RateLimitTypes rateLimitType; 15 | 16 | //Constructeurs 17 | public RateLimit(JSONObject response) { 18 | super(response); 19 | } 20 | 21 | //Getters 22 | public RateLimitIntervals getInterval() { 23 | return interval; 24 | } 25 | 26 | public int getIntervalNum() { 27 | return intervalNum; 28 | } 29 | 30 | public int getLimit() { 31 | return limit; 32 | } 33 | 34 | public RateLimitTypes getRateLimitType() { 35 | return rateLimitType; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/RateLimitIntervals.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos; 2 | 3 | public enum RateLimitIntervals { 4 | 5 | SECOND, 6 | MINUTE, 7 | DAY; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/RateLimitTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos; 2 | 3 | public enum RateLimitTypes { 4 | 5 | ORDERS, 6 | REQUEST_WEIGHT, 7 | RAW_REQUESTS; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/SimpleExchangeInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos; 2 | 3 | import java.util.Map; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | import fr.rowlaxx.jsavon.annotations.JOValue; 9 | 10 | public abstract class SimpleExchangeInformation extends JsavonObject { 11 | private static final long serialVersionUID = -7707306277131875272L; 12 | 13 | //Variables 14 | @JOValue(path = {"/", "/data/"}) 15 | private String timezone; 16 | @JOValue(path = {"/", "/data/"}) 17 | private long serverTime; 18 | 19 | //Constructeurs 20 | public SimpleExchangeInformation(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | //Méthodes abstraitesd 25 | public abstract Map getSymbols(); 26 | 27 | //Getters 28 | public String getTimezone() { 29 | return timezone; 30 | } 31 | 32 | public long getServerTime() { 33 | return serverTime; 34 | } 35 | 36 | public T getSymbol(String symbol) { 37 | return getSymbols().get(symbol); 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/Symbol.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos; 2 | 3 | import java.util.Set; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.binanceapi.core.OrderTypes; 8 | 9 | public abstract class Symbol extends SimpleSymbol { 10 | private static final long serialVersionUID = -2491528525290759925L; 11 | 12 | //Variables 13 | private String baseAsset; 14 | private int baseAssetPrecision; 15 | private int quotePrecision; 16 | private Set orderTypes; 17 | 18 | //Constructeurs 19 | public Symbol(JSONObject response) { 20 | super(response); 21 | } 22 | 23 | public String getBaseAsset() { 24 | return baseAsset; 25 | } 26 | 27 | public int getQuotePrecision() { 28 | return quotePrecision; 29 | } 30 | 31 | public int getBaseAssetPrecision() { 32 | return baseAssetPrecision; 33 | } 34 | 35 | public Set getOrderTypes() { 36 | return orderTypes; 37 | } 38 | 39 | public boolean hasOrderType(T orderType) { 40 | return orderTypes.contains(orderType); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/ExchangeMaxNumAlgoOrdersFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class ExchangeMaxNumAlgoOrdersFilter extends Filter { 8 | private static final long serialVersionUID = -5708475118928196546L; 9 | 10 | //Variables 11 | private int maxNumAlgoOrders; 12 | 13 | //Constructeurs 14 | public ExchangeMaxNumAlgoOrdersFilter(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public int getMaxNumAlgoOrders() { 20 | return maxNumAlgoOrders; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/ExchangeMaxNumOrdersFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class ExchangeMaxNumOrdersFilter extends Filter { 8 | private static final long serialVersionUID = 338992389513437314L; 9 | 10 | //Variables 11 | private int maxNumOrders; 12 | 13 | //Constructeurs 14 | public ExchangeMaxNumOrdersFilter(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public int getMaxNumOrders() { 20 | return maxNumOrders; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/IcebergPartsFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class IcebergPartsFilter extends Filter { 8 | private static final long serialVersionUID = -8589425863338007037L; 9 | 10 | //Variables 11 | private int limit; 12 | 13 | //Constructeurs 14 | public IcebergPartsFilter(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public int getLimit() { 20 | return limit; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/LotSizeFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class LotSizeFilter extends Filter { 8 | private static final long serialVersionUID = -2565960358312949329L; 9 | 10 | //Variables 11 | private double minQty; 12 | private double maxQty; 13 | private double stepSize; 14 | 15 | //Constructeurs 16 | public LotSizeFilter(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | //Getters 21 | public double getMinQty() { 22 | return minQty; 23 | } 24 | 25 | public double getMaxQty() { 26 | return maxQty; 27 | } 28 | 29 | public double getStepSize() { 30 | return stepSize; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MarketLotSizeFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class MarketLotSizeFilter extends Filter { 8 | private static final long serialVersionUID = 8424960315978402123L; 9 | 10 | //Variables 11 | private double minQty; 12 | private double maxQty; 13 | private double stepSize; 14 | 15 | //Constructeurs 16 | public MarketLotSizeFilter(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | //Getters 21 | public double getMinQty() { 22 | return minQty; 23 | } 24 | 25 | public double getMaxQty() { 26 | return maxQty; 27 | } 28 | 29 | public double getStepSize() { 30 | return stepSize; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MaxNumAlgoOrdersFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class MaxNumAlgoOrdersFilter extends Filter { 9 | private static final long serialVersionUID = -5831433014614011598L; 10 | 11 | //Variables 12 | @JOValue(key = {"maxNumAlgoOrders", "limit"}) private int maxNumAlgoOrders; 13 | 14 | //Constructeurs 15 | public MaxNumAlgoOrdersFilter(JSONObject response) { 16 | super(response); 17 | } 18 | 19 | //Getters 20 | public int getMaxNumAlgoOrders() { 21 | return maxNumAlgoOrders; 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MaxNumIcebergOrdersFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class MaxNumIcebergOrdersFilter extends Filter { 8 | private static final long serialVersionUID = -5344004179253185313L; 9 | 10 | //Variables 11 | private int maxNumIcebergOrders; 12 | 13 | //Constructeurs 14 | public MaxNumIcebergOrdersFilter(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public int getMaxNumIcebergOrders() { 20 | return maxNumIcebergOrders; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MaxNumOrdersFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class MaxNumOrdersFilter extends Filter { 9 | private static final long serialVersionUID = 850292844039211819L; 10 | 11 | //Variables 12 | @JOValue(key = {"maxNumOrders", "limit"}) private int maxNumOrders; 13 | 14 | //Constructeurs 15 | public MaxNumOrdersFilter(JSONObject response) { 16 | super(response); 17 | } 18 | 19 | //Getters 20 | public int getMaxNumOrders() { 21 | return maxNumOrders; 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MaxPositionFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class MaxPositionFilter extends Filter { 8 | private static final long serialVersionUID = 4409062075075074771L; 9 | 10 | //Variables 11 | private double maxPosition; 12 | 13 | //Constructeurs 14 | public MaxPositionFilter(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public double getMaxPosition() { 20 | return maxPosition; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/MinNotionalFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class MinNotionalFilter extends Filter { 9 | private static final long serialVersionUID = -1311500546629219225L; 10 | 11 | //Variables 12 | @JOValue(key = {"minNotional", "notional"}) private double minNotional; 13 | @JOValue(mandatory = false) private Boolean applyToMarket; 14 | @JOValue(mandatory = false) private Integer avgPriceMins; 15 | 16 | //Constructeurs 17 | public MinNotionalFilter(JSONObject response) { 18 | super(response); 19 | } 20 | 21 | //Getters 22 | public int getAvgPriceMins() { 23 | return avgPriceMins; 24 | } 25 | 26 | public double getMinNotional() { 27 | return minNotional; 28 | } 29 | 30 | public boolean getApplyToMarket() { 31 | return applyToMarket; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/PercentPriceBySideFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class PercentPriceBySideFilter extends Filter { 8 | private static final long serialVersionUID = -5941252554825429487L; 9 | 10 | private double bidMultiplierUp; 11 | private double bidMultiplierDown; 12 | private double askMultiplierUp; 13 | private double askMultiplierDown; 14 | private double avgPriceMins; 15 | 16 | public PercentPriceBySideFilter(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | public final double getAskMultiplierDown() { 21 | return askMultiplierDown; 22 | } 23 | 24 | public final double getAskMultiplierUp() { 25 | return askMultiplierUp; 26 | } 27 | 28 | public final double getAvgPriceMins() { 29 | return avgPriceMins; 30 | } 31 | 32 | public final double getBidMultiplierDown() { 33 | return bidMultiplierDown; 34 | } 35 | 36 | public final double getBidMultiplierUp() { 37 | return bidMultiplierUp; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/PercentPriceFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class PercentPriceFilter extends Filter { 9 | private static final long serialVersionUID = -8439783889456487614L; 10 | 11 | //Variables 12 | private double multiplierUp; 13 | private double multiplierDown; 14 | 15 | @JOValue(mandatory = false) 16 | private Integer avgPriceMins; 17 | @JOValue(mandatory = false) 18 | private Integer multiplierDecimal; 19 | 20 | //Constructeurs 21 | public PercentPriceFilter(JSONObject response) { 22 | super(response); 23 | } 24 | 25 | //Getters 26 | public double getMultiplierDown() { 27 | return multiplierDown; 28 | } 29 | 30 | public double getMultiplierUp() { 31 | return multiplierUp; 32 | } 33 | 34 | public int getMultiplierDecimal() { 35 | return multiplierDecimal; 36 | } 37 | 38 | public int getAvgPriceMins() { 39 | return avgPriceMins; 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/PriceFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class PriceFilter extends Filter { 8 | private static final long serialVersionUID = -5438080066960880647L; 9 | 10 | //Variables 11 | private double minPrice; 12 | private double maxPrice; 13 | private double tickSize; 14 | 15 | //Constructeurs 16 | public PriceFilter(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | //Getters 21 | public double getMinPrice() { 22 | return minPrice; 23 | } 24 | 25 | public double getMaxPrice() { 26 | return maxPrice; 27 | } 28 | 29 | public double getTickSize() { 30 | return tickSize; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/exchangeinfos/filters/TrailingStopFilter.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.exchangeinfos.filters; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.Filter; 6 | 7 | public class TrailingStopFilter extends Filter { 8 | private static final long serialVersionUID = 251607060890132932L; 9 | 10 | //Variables 11 | private double minTrailingAboveDelta; 12 | private double maxTrailingAboveDelta; 13 | private double minTrailingBelowDelta; 14 | private double maxTrailingBelowDelta; 15 | 16 | //Constructeurs 17 | public TrailingStopFilter(JSONObject response) { 18 | super(response); 19 | } 20 | 21 | //Getters 22 | public double getMaxTrailingAboveDelta() { 23 | return maxTrailingAboveDelta; 24 | } 25 | 26 | public double getMaxTrailingBelowDelta() { 27 | return maxTrailingBelowDelta; 28 | } 29 | 30 | public double getMinTrailingAboveDelta() { 31 | return minTrailingAboveDelta; 32 | } 33 | 34 | public double getMinTrailingBelowDelta() { 35 | return minTrailingBelowDelta; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/fiat/FiatPaymentRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.fiat; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class FiatPaymentRecord extends FiatTransfer { 6 | private static final long serialVersionUID = 4117718712797747189L; 7 | 8 | //Variables 9 | private String cryptoCurrency; 10 | private double obtainAmount; 11 | private double price; 12 | private double sourceAmount; 13 | 14 | //Constructeurs 15 | public FiatPaymentRecord(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final String getCryptoCurrency() { 21 | return this.cryptoCurrency; 22 | } 23 | 24 | public final double getObtainAmount() { 25 | return this.obtainAmount; 26 | } 27 | 28 | public final double getPrice() { 29 | return this.price; 30 | } 31 | 32 | public final double getSourceAmount() { 33 | return this.sourceAmount; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/fiat/FiatTransfer.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.fiat; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | abstract class FiatTransfer extends JsavonObject { 8 | private static final long serialVersionUID = 1851902082203737743L; 9 | 10 | //Variables 11 | private String orderNo; 12 | private String status; 13 | private double totalFee; 14 | private long updateTime; 15 | private long createTime; 16 | private String fiatCurrency; 17 | 18 | //Consrtucteurs 19 | public FiatTransfer(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final long getCreateTime() { 25 | return this.createTime; 26 | } 27 | 28 | public final String getFiatCurrency() { 29 | return this.fiatCurrency; 30 | } 31 | 32 | public final String getOrderNo() { 33 | return this.orderNo; 34 | } 35 | 36 | public final String getStatus() { 37 | return this.status; 38 | } 39 | 40 | public final double getTotalFee() { 41 | return this.totalFee; 42 | } 43 | 44 | public final long getUpdateTime() { 45 | return this.updateTime; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/fiat/FiatTransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.fiat; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class FiatTransferRecord extends FiatTransfer { 6 | private static final long serialVersionUID = 7805426192193016213L; 7 | 8 | //Variables 9 | private double amount; 10 | private double indicatedAmount; 11 | private String method; 12 | 13 | //Constructeurs 14 | public FiatTransferRecord(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final double getAmount() { 20 | return this.amount; 21 | } 22 | 23 | public final double getIndicatedAmount() { 24 | return this.indicatedAmount; 25 | } 26 | 27 | public final String getMethod() { 28 | return this.method; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/Adjustment.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class Adjustment extends JsavonObject { 9 | private static final long serialVersionUID = -7246380880745070984L; 10 | 11 | //Variables 12 | private double amount; 13 | private String collateralCoin; 14 | private Directions direction; 15 | @JOValue(mandatory = false) 16 | private String loanCoin; 17 | @JOValue(key = {"time", "adjustTime"}) 18 | private long time; 19 | 20 | //Constructeurs 21 | public Adjustment(JSONObject json) { 22 | super(json); 23 | } 24 | 25 | //Getters 26 | public final double getAmount() { 27 | return this.amount; 28 | } 29 | 30 | public final String getCollateralCoin() { 31 | return this.collateralCoin; 32 | } 33 | 34 | public final Directions getDirection() { 35 | return this.direction; 36 | } 37 | 38 | public final String getLoanCoin() { 39 | return this.loanCoin; 40 | } 41 | 42 | public final long getTime() { 43 | return this.time; 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/AdjustmentRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class AdjustmentRecord extends JsavonObject { 8 | private static final long serialVersionUID = -7808659684934114456L; 9 | 10 | //Variables 11 | private double afterCollateralRate; 12 | private String coin; 13 | private double preCollateralRate; 14 | private String status; 15 | 16 | //Constructeurs 17 | public AdjustmentRecord(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getAfterCollateralRate() { 23 | return this.afterCollateralRate; 24 | } 25 | 26 | public final String getCoin() { 27 | return this.coin; 28 | } 29 | 30 | public final double getPreCollateralRate() { 31 | return this.preCollateralRate; 32 | } 33 | 34 | public final String getStatus() { 35 | return this.status; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/BorrowRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.OrderStatus; 6 | 7 | public class BorrowRecord extends Borrow { 8 | private static final long serialVersionUID = -4593001988258598284L; 9 | 10 | //Variables 11 | private double collateralRate; 12 | private double leftTotal; 13 | private double leftPrincipal; 14 | private long deadLine; 15 | private OrderStatus orderStatus; 16 | 17 | //Constructeurs 18 | public BorrowRecord(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public double getCollateralRate() { 24 | return collateralRate; 25 | } 26 | 27 | public long getDeadLine() { 28 | return deadLine; 29 | } 30 | 31 | public double getLeftPrincipal() { 32 | return leftPrincipal; 33 | } 34 | 35 | public double getLeftTotal() { 36 | return leftTotal; 37 | } 38 | 39 | public OrderStatus getOrderStatus() { 40 | return orderStatus; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/Directions.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | public enum Directions { 4 | 5 | ADDITIONAL, 6 | REDUCED 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/MaxAmount.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class MaxAmount extends JsavonObject { 8 | private static final long serialVersionUID = -4481165629594289388L; 9 | 10 | //Variables 11 | private double maxInAmount; 12 | private double maxOutAmount; 13 | 14 | //Constructeurs 15 | public MaxAmount(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final double getMaxInAmount() { 21 | return this.maxInAmount; 22 | } 23 | 24 | public final double getMaxOutAmount() { 25 | return this.maxOutAmount; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/Repay.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Repay extends JsavonObject { 8 | private static final long serialVersionUID = 8493731377993148816L; 9 | 10 | //Variables 11 | private double amount; 12 | private String coin; 13 | private String collateralCoin; 14 | private long repayId; 15 | 16 | //Constructeurs 17 | public Repay(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getAmount() { 23 | return this.amount; 24 | } 25 | 26 | public final String getCoin() { 27 | return this.coin; 28 | } 29 | 30 | public final String getCollateralCoin() { 31 | return this.collateralCoin; 32 | } 33 | 34 | public final long getRepayId() { 35 | return this.repayId; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/RepayLimit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class RepayLimit extends JsavonObject { 8 | private static final long serialVersionUID = -3991816538323425562L; 9 | 10 | //Variables 11 | private String coin; 12 | private String collateralCoin; 13 | private int max; 14 | private int min; 15 | 16 | //Constructeurs 17 | public RepayLimit(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getCoin() { 23 | return this.coin; 24 | } 25 | 26 | public final String getCollateralCoin() { 27 | return this.collateralCoin; 28 | } 29 | 30 | public final int getMax() { 31 | return this.max; 32 | } 33 | 34 | public final int getMin() { 35 | return this.min; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/RepayQuote.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class RepayQuote extends JsavonObject { 8 | private static final long serialVersionUID = 560272868947843889L; 9 | 10 | //Variables 11 | private double amount; 12 | private String coin; 13 | private String collateralCoin; 14 | private String quoteId; 15 | 16 | //Constructeurs 17 | public RepayQuote(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getAmount() { 23 | return this.amount; 24 | } 25 | 26 | public final String getCoin() { 27 | return this.coin; 28 | } 29 | 30 | public final String getCollateralCoin() { 31 | return this.collateralCoin; 32 | } 33 | 34 | public final String getQuoteId() { 35 | return this.quoteId; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/AccountLongShortRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | public abstract class AccountLongShortRatio extends LongShortRatio { 6 | private static final long serialVersionUID = 6255899287145109805L; 7 | 8 | private double longAccount; 9 | private double shortAccount; 10 | 11 | public AccountLongShortRatio(JSONObject json) { 12 | super(json); 13 | } 14 | 15 | public final double getLongAccount() { 16 | return longAccount; 17 | } 18 | 19 | public final double getShortAccount() { 20 | return shortAccount; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/ContractStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | public enum ContractStatus { 4 | 5 | PENDING_TRADING, 6 | TRADING, 7 | PRE_DELIVERING, 8 | DELIVERING, 9 | DELIVERED, 10 | PRE_SETTLE, 11 | SETTLING, 12 | CLOSE 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/ContractTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | public enum ContractTypes { 4 | 5 | PERPETUAL, 6 | CURRENT_QUARTER, 7 | CURRENT_QUARTER_DELIVERING, // Invalid type, only used for DELIVERING status 8 | CURRENT_MONTH, 9 | NEXT_QUARTER, 10 | NEXT_QUARTER_DELIVERING, // Invalid type, only used for DELIVERING status 11 | NEXT_MONTH, 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/FundingRate.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class FundingRate extends JsavonObject { 8 | private static final long serialVersionUID = 2800204842078678946L; 9 | 10 | //Variables 11 | private double fundingRate; 12 | private long fundingTime; 13 | private String symbol; 14 | 15 | //Constructeurs 16 | public FundingRate(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getFundingRate() { 22 | return this.fundingRate; 23 | } 24 | 25 | public final long getFundingTime() { 26 | return this.fundingTime; 27 | } 28 | 29 | public final String getSymbol() { 30 | return this.symbol; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/LongShortRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public abstract class LongShortRatio extends JsavonObject { 8 | private static final long serialVersionUID = 966595479160773630L; 9 | 10 | private double longShortRatio; 11 | private long timestamp; 12 | 13 | //Constructeurs 14 | public LongShortRatio(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final double getLongShortRatio() { 20 | return this.longShortRatio; 21 | } 22 | 23 | public final long getTimestamp() { 24 | return this.timestamp; 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/OpenInterest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class OpenInterest extends JsavonObject { 8 | private static final long serialVersionUID = 7149810998832629854L; 9 | 10 | //Variables 11 | private double openInterest; 12 | private String symbol; 13 | private long time; 14 | 15 | //Constructeurs 16 | public OpenInterest(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getOpenInterest() { 22 | return this.openInterest; 23 | } 24 | 25 | public final String getSymbol() { 26 | return this.symbol; 27 | } 28 | 29 | public final long getTime() { 30 | return this.time; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/OpenInterestStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public abstract class OpenInterestStatistics extends JsavonObject { 8 | private static final long serialVersionUID = -4963549363210504657L; 9 | 10 | //Variables 11 | private double sumOpenInterest; 12 | private double sumOpenInterestValue; 13 | private long timestamp; 14 | 15 | //Constructeurs 16 | public OpenInterestStatistics(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getSumOpenInterest() { 22 | return this.sumOpenInterest; 23 | } 24 | 25 | public final double getSumOpenInterestValue() { 26 | return this.sumOpenInterestValue; 27 | } 28 | 29 | public final long getTimestamp() { 30 | return this.timestamp; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/Period.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | public enum Period { 4 | 5 | //Enumération 6 | MINUTE_5(5), 7 | MINUTE_15(15), 8 | MINUTE_30(30), 9 | HOUR_1(1*60), 10 | HOUR_2(2*60), 11 | HOUR_4(4*60), 12 | HOUR_6(6*60), 13 | HOUR_12(12*60), 14 | DAY_1(1*24*60); 15 | 16 | //Variables 17 | private final int minutes; 18 | 19 | //Constructeurs 20 | private Period(int minutes) { 21 | if (minutes <= 0) 22 | throw new IllegalArgumentException("minutes must be greater than 0."); 23 | this.minutes = minutes; 24 | } 25 | 26 | //Methodes 27 | public int getMinutes() { 28 | return minutes; 29 | } 30 | 31 | public int getHour() { 32 | return getMinutes()/60; 33 | } 34 | 35 | public int getDay() { 36 | return getHour()/24; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | if (getDay() > 0) 42 | return getDay() + "d"; 43 | if (getHour() > 0) 44 | return getHour() + "h"; 45 | return getMinutes() + "m"; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/PositionLongShortRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | public abstract class PositionLongShortRatio extends LongShortRatio { 6 | private static final long serialVersionUID = 6549125044867626209L; 7 | 8 | private double longPosition; 9 | private double shortPosition; 10 | 11 | public PositionLongShortRatio(JSONObject json) { 12 | super(json); 13 | } 14 | 15 | public final double getLongPosition() { 16 | return longPosition; 17 | } 18 | 19 | public final double getShortPosition() { 20 | return shortPosition; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/UnderlyingSubTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | import fr.rowlaxx.convertutils.annotations.EnumMatcher; 4 | 5 | public enum UnderlyingSubTypes { 6 | 7 | Storage, 8 | @EnumMatcher(possibleMatchs = {"DeFi", "DEFI"}) DeFi, 9 | NFT, 10 | PoW, 11 | @EnumMatcher(possibleMatchs = "Layer-1") Layer1, 12 | @EnumMatcher(possibleMatchs = "Layer-2") Layer2, 13 | Payment, 14 | Oracle, 15 | Privacy, 16 | CEX, 17 | DAO, 18 | DEX, 19 | Meme, 20 | Infrastructure, 21 | Metaverse, 22 | BUSD, 23 | Wallet, 24 | INDEX 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/marketdata/UnderlyingTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.marketdata; 2 | 3 | public enum UnderlyingTypes { 4 | 5 | INDEX, 6 | COIN; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/AutoCloseTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | public enum AutoCloseTypes { 4 | 5 | LIQUIDATION, 6 | ADL 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/Brackets.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | import java.util.List; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | import fr.rowlaxx.jsavon.annotations.JOValue; 9 | 10 | public class Brackets extends JsavonObject { 11 | private static final long serialVersionUID = -7470467385858834850L; 12 | 13 | @JOValue(mandatory = false) 14 | private String symbol; 15 | @JOValue(mandatory = false) 16 | private String pair; 17 | 18 | private List brackets; 19 | 20 | public Brackets(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | public String getPair() { 25 | return pair; 26 | } 27 | 28 | public String getSymbol() { 29 | return symbol; 30 | } 31 | 32 | public List getBrackets() { 33 | return brackets; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/FutureOrderTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.OrderTypes; 4 | 5 | public enum FutureOrderTypes implements OrderTypes { 6 | 7 | LIMIT, 8 | MARKET, 9 | STOP, 10 | STOP_MARKET, 11 | TAKE_PROFIT, 12 | TAKE_PROFIT_MARKET, 13 | TRAILING_STOP_MARKET 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/IncomeTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | public enum IncomeTypes { 4 | 5 | TRANSFER, 6 | WELCOME_BONUS, 7 | REALIZED_PNL, 8 | FUNDING_FEE, 9 | COMMISSION, 10 | INSURANCE_CLEAR, 11 | REFERRAL_KICKBACK, 12 | COMMISSION_REBATE, 13 | DELIVERED_SETTELMENT, 14 | COIN_SWAP_DEPOSIT, 15 | COIN_SWAP_WITHDRAW 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/MarginChangeRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class MarginChangeRecord extends JsavonObject { 8 | private static final long serialVersionUID = 2272843077467614310L; 9 | 10 | //Variables 11 | private double amount; 12 | private String asset; 13 | private PositionSides positionSide; 14 | private String symbol; 15 | private long time; 16 | private int type; 17 | 18 | //Constructeurs 19 | public MarginChangeRecord(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final double getAmount() { 25 | return this.amount; 26 | } 27 | 28 | public final String getAsset() { 29 | return this.asset; 30 | } 31 | 32 | public final PositionSides getPositionSide() { 33 | return this.positionSide; 34 | } 35 | 36 | public final String getSymbol() { 37 | return this.symbol; 38 | } 39 | 40 | public final long getTime() { 41 | return this.time; 42 | } 43 | 44 | public final int getType() { 45 | return this.type; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/MarginTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | public enum MarginTypes { 4 | 5 | CROSSED, 6 | ISOLATED; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/PositionSides.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | public enum PositionSides { 4 | 5 | BOTH, 6 | LONG, 7 | SHORT 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/UserCommissionRate.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class UserCommissionRate extends JsavonObject { 8 | private static final long serialVersionUID = -4679006262619240884L; 9 | 10 | //Variables 11 | private double makerCommissionRate; 12 | private String symbol; 13 | private double takerCommissionRate; 14 | 15 | //Constructeurs 16 | public UserCommissionRate(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getMakerCommissionRate() { 22 | return this.makerCommissionRate; 23 | } 24 | 25 | public final String getSymbol() { 26 | return this.symbol; 27 | } 28 | 29 | public final double getTakerCommissionRate() { 30 | return this.takerCommissionRate; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futures/trade/WorkingType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futures.trade; 2 | 3 | public enum WorkingType { 4 | 5 | MARK_PRICE, 6 | CONTRACT_PRICE; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futuresalgo/AlgoStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futuresalgo; 2 | 3 | public enum AlgoStatus { 4 | 5 | WORKING, 6 | CANCELLED, 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futuresalgo/AlgoTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futuresalgo; 2 | 3 | public enum AlgoTypes { 4 | 5 | VP; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futuresalgo/TwapOrderRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futuresalgo; 2 | 3 | public class TwapOrderRequest extends FuturesAlgoOrderRequest { 4 | 5 | //Methodes statiques 6 | public static Builder newBuilder() { 7 | return new Builder(); 8 | } 9 | 10 | //Builder 11 | public static class Builder extends BaseBuilder{ 12 | 13 | //Constructeurs 14 | private Builder() { 15 | super(new TwapOrderRequest()); 16 | } 17 | 18 | //Setters 19 | public Builder setUrgency(Long duration) { 20 | request().duration = duration; 21 | return this; 22 | } 23 | } 24 | 25 | //Variables 26 | private Long duration; 27 | 28 | //Getters 29 | public Long getDuration() { 30 | return duration; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futuresalgo/Urgency.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futuresalgo; 2 | 3 | public enum Urgency { 4 | 5 | LOW, 6 | MEDIUM, 7 | HIGH; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/futuresalgo/VPOrderRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.futuresalgo; 2 | 3 | public class VPOrderRequest extends FuturesAlgoOrderRequest { 4 | 5 | //Methodes statiques 6 | public static Builder newBuilder() { 7 | return new Builder(); 8 | } 9 | 10 | //Builder 11 | public static class Builder extends BaseBuilder{ 12 | 13 | //Constructeurs 14 | private Builder() { 15 | super(new VPOrderRequest()); 16 | } 17 | 18 | //Setters 19 | public Builder setUrgency(Urgency urgency) { 20 | request().urgency = urgency; 21 | return this; 22 | } 23 | } 24 | 25 | //Variables 26 | private Urgency urgency; 27 | 28 | //Getters 29 | public Urgency getUrgency() { 30 | return urgency; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/giftcard/Giftcard.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.giftcard; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Giftcard extends JsavonObject { 8 | private static final long serialVersionUID = -3653444793130782363L; 9 | 10 | private String code; 11 | private long referenceNo; 12 | 13 | public Giftcard(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | public final String getCode() { 18 | return code; 19 | } 20 | 21 | public final long getReferenceNo() { 22 | return referenceNo; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/giftcard/GiftcardRedemption.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.giftcard; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class GiftcardRedemption extends JsavonObject { 8 | private static final long serialVersionUID = -4450603006762914883L; 9 | 10 | private String token; 11 | private double amount; 12 | private long referenceNo; 13 | private long identityNo; 14 | 15 | public GiftcardRedemption(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | public final double getAmount() { 20 | return amount; 21 | } 22 | 23 | public final long getIdentityNo() { 24 | return identityNo; 25 | } 26 | 27 | public final long getReferenceNo() { 28 | return referenceNo; 29 | } 30 | 31 | public final String getToken() { 32 | return token; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/giftcard/GiftcardVerification.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.giftcard; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class GiftcardVerification extends JsavonObject { 8 | private static final long serialVersionUID = -4450603006762914883L; 9 | 10 | private String token; 11 | private double amount; 12 | private boolean valid; 13 | 14 | public GiftcardVerification(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | public final double getAmount() { 19 | return amount; 20 | } 21 | 22 | public final String getToken() { 23 | return token; 24 | } 25 | 26 | public final boolean isValid() { 27 | return valid; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/BNBBurnStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class BNBBurnStatus extends JsavonObject { 8 | private static final long serialVersionUID = -3363236296432911500L; 9 | 10 | //Variables 11 | private boolean interestBNBBurn; 12 | private boolean spotBNBBurn; 13 | 14 | //Constructeurs 15 | public BNBBurnStatus(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final boolean isInterestBNBBurn() { 21 | return this.interestBNBBurn; 22 | } 23 | 24 | public final boolean isSpotBNBBurn() { 25 | return this.spotBNBBurn; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/BaseQuoteAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.UserAsset; 6 | 7 | public class BaseQuoteAsset extends UserAsset { 8 | private static final long serialVersionUID = 7826057242384643028L; 9 | 10 | //Variables 11 | private boolean borrowEnabled; 12 | private double netAssetOfBtc; 13 | private boolean repayEnabled; 14 | private double totalAsset; 15 | 16 | //Constructeurs 17 | public BaseQuoteAsset(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getNetAssetOfBtc() { 23 | return netAssetOfBtc; 24 | } 25 | 26 | public final double getTotalAsset() { 27 | return totalAsset; 28 | } 29 | 30 | public final boolean isBorrowEnabled() { 31 | return borrowEnabled; 32 | } 33 | 34 | public final boolean isRepayEnabled() { 35 | return repayEnabled; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/CrossFeeData.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import java.util.Set; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class CrossFeeData extends Fee { 8 | private static final long serialVersionUID = -4561320026233915486L; 9 | 10 | private int vipLevel; 11 | private boolean transferIn; 12 | private boolean borrowable; 13 | private double yearlyInterest; 14 | private Set marginablePairs; 15 | 16 | public CrossFeeData(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | public Set getMarginablePairs() { 21 | return marginablePairs; 22 | } 23 | 24 | public int getVipLevel() { 25 | return vipLevel; 26 | } 27 | 28 | public double getYearlyInterest() { 29 | return yearlyInterest; 30 | } 31 | 32 | public boolean isBorrowable() { 33 | return borrowable; 34 | } 35 | 36 | public boolean transferIn() { 37 | return transferIn; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/CrossTransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class CrossTransferRecord extends TransferRecord { 6 | private static final long serialVersionUID = 2272958866909036635L; 7 | 8 | //Variables 9 | private String type; 10 | 11 | //Constructeurs 12 | public CrossTransferRecord(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final String getType() { 18 | return this.type; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/Fee.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Fee extends JsavonObject { 8 | private static final long serialVersionUID = -5265660577681727536L; 9 | 10 | private String coin; 11 | private double dailyInterest; 12 | private int borrowLimit; 13 | 14 | public Fee(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | public final int getBorrowLimit() { 19 | return borrowLimit; 20 | } 21 | 22 | public final String getCoin() { 23 | return coin; 24 | } 25 | 26 | public final double getDailyInterest() { 27 | return dailyInterest; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/IsolatedAccountLimit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class IsolatedAccountLimit extends JsavonObject { 8 | private static final long serialVersionUID = 2093223017861992923L; 9 | 10 | //Variables 11 | private int enabledAccount; 12 | private int maxAccount; 13 | 14 | //Constructeurs 15 | public IsolatedAccountLimit(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final int getEnabledAccount() { 21 | return this.enabledAccount; 22 | } 23 | 24 | public final int getMaxAccount() { 25 | return this.maxAccount; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/IsolatedFeeData.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import java.util.Map; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.convertutils.MapKey; 8 | import fr.rowlaxx.jsavon.JsavonObject; 9 | 10 | public class IsolatedFeeData extends JsavonObject { 11 | private static final long serialVersionUID = 1295526319247086528L; 12 | 13 | private int vipLevel; 14 | private String symbol; 15 | private int leverage; 16 | @MapKey(fieldName = "coin") private Map data; 17 | 18 | public IsolatedFeeData(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | public final Map getData() { 23 | return data; 24 | } 25 | 26 | public final int getLeverage() { 27 | return leverage; 28 | } 29 | 30 | public final String getSymbol() { 31 | return symbol; 32 | } 33 | 34 | public final int getVipLevel() { 35 | return vipLevel; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/IsolatedMarginSymbol.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class IsolatedMarginSymbol extends JsavonObject { 8 | private static final long serialVersionUID = 4571773304369949574L; 9 | 10 | //Variables 11 | private String base; 12 | private boolean isBuyAllowed; 13 | private boolean isMarginTrade; 14 | private boolean isSellAllowed; 15 | private String quote; 16 | private String symbol; 17 | 18 | //Constructeurs 19 | public IsolatedMarginSymbol(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final String getBase() { 25 | return this.base; 26 | } 27 | 28 | public final boolean isBuyAllowed() { 29 | return this.isBuyAllowed; 30 | } 31 | 32 | public final boolean isMarginTrade() { 33 | return this.isMarginTrade; 34 | } 35 | 36 | public final boolean isSellAllowed() { 37 | return this.isSellAllowed; 38 | } 39 | 40 | public final String getQuote() { 41 | return this.quote; 42 | } 43 | 44 | public final String getSymbol() { 45 | return this.symbol; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/IsolatedMarginTransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class IsolatedMarginTransferRecord extends TransferRecord { 6 | private static final long serialVersionUID = 4779714752784142470L; 7 | 8 | //Variables 9 | private String transFrom; 10 | private String transTo; 11 | 12 | //Constructeurs 13 | public IsolatedMarginTransferRecord(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | //Getters 18 | public final String getTransFrom() { 19 | return transFrom; 20 | } 21 | 22 | public final String getTransTo() { 23 | return transTo; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/LoanRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class LoanRecord extends Record { 6 | private static final long serialVersionUID = 5995803459195148862L; 7 | 8 | private String isolatedSymbol; 9 | private double principal; 10 | 11 | //Constructeurs 12 | public LoanRecord(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getIsolatedSymbol() { 17 | return this.isolatedSymbol; 18 | } 19 | 20 | public final double getPrincipal() { 21 | return this.principal; 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MarginAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class MarginAsset extends JsavonObject { 8 | private static final long serialVersionUID = -8493114889588569945L; 9 | 10 | //Variables 11 | private String assetFullName; 12 | private String assetName; 13 | private boolean isBorrowable; 14 | private boolean isMortgageable; 15 | private double userMinBorrow; 16 | private double userMinRepay; 17 | 18 | //Constructeurs 19 | public MarginAsset(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final String getAssetFullName() { 25 | return this.assetFullName; 26 | } 27 | 28 | public final String getAssetName() { 29 | return this.assetName; 30 | } 31 | 32 | public final boolean isBorrowable() { 33 | return this.isBorrowable; 34 | } 35 | 36 | public final boolean isMortgageable() { 37 | return this.isMortgageable; 38 | } 39 | 40 | public final double getUserMinBorrow() { 41 | return this.userMinBorrow; 42 | } 43 | 44 | public final double getUserMinRepay() { 45 | return this.userMinRepay; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MarginInterestRate.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class MarginInterestRate extends JsavonObject { 8 | private static final long serialVersionUID = 1064663157202373817L; 9 | 10 | //Variables 11 | private String asset; 12 | private double dailyInterestRate; 13 | private long timestamp; 14 | private int vipLevel; 15 | 16 | //Constructeurs 17 | public MarginInterestRate(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getAsset() { 23 | return this.asset; 24 | } 25 | 26 | public final double getDailyInterestRate() { 27 | return this.dailyInterestRate; 28 | } 29 | 30 | public final long getTimestamp() { 31 | return this.timestamp; 32 | } 33 | 34 | public final int getVipLevel() { 35 | return this.vipLevel; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MarginOCOOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import fr.rowlaxx.binanceapi.core.OcoOrder; 4 | import fr.rowlaxx.jsavon.annotations.JOValue; 5 | 6 | import org.json.JSONObject; 7 | 8 | public class MarginOCOOrder extends OcoOrder { 9 | private static final long serialVersionUID = -423159239247907955L; 10 | 11 | //Variables 12 | private boolean isIsolated; 13 | @JOValue(mandatory = false) 14 | private Double marginBuyBorrowAmount; 15 | @JOValue(mandatory = false) 16 | private String marginBuyBorrowAsset; 17 | 18 | //Constructeurs 19 | public MarginOCOOrder(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final boolean isIsolated() { 25 | return this.isIsolated; 26 | } 27 | 28 | public final Double getMarginBuyBorrowAmount() { 29 | return this.marginBuyBorrowAmount; 30 | } 31 | 32 | public final String getMarginBuyBorrowAsset() { 33 | return this.marginBuyBorrowAsset; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MarginOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.spot.trade.SpotOrder; 6 | 7 | public class MarginOrder extends SpotOrder { 8 | private static final long serialVersionUID = -7971537535231382670L; 9 | 10 | //Variables 11 | private boolean isIsolated; 12 | 13 | //Constructeurs 14 | public MarginOrder(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final boolean isIsolated() { 20 | return isIsolated; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MarginOrderCountUsage.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import fr.rowlaxx.binanceapi.core.exchangeinfos.RateLimitTypes; 4 | import fr.rowlaxx.jsavon.JsavonObject; 5 | 6 | public class MarginOrderCountUsage extends JsavonObject { 7 | private static final long serialVersionUID = -3666481347218858927L; 8 | 9 | //Variables 10 | private RateLimitTypes rateLimitTypes; 11 | private String interval; 12 | private int intervalNum; 13 | private int limit; 14 | private int count; 15 | 16 | //Getters 17 | public int getCount() { 18 | return count; 19 | } 20 | 21 | public String getInterval() { 22 | return interval; 23 | } 24 | 25 | public int getIntervalNum() { 26 | return intervalNum; 27 | } 28 | 29 | public int getLimit() { 30 | return limit; 31 | } 32 | 33 | public RateLimitTypes getRateLimitTypes() { 34 | return rateLimitTypes; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/MaxBorrow.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class MaxBorrow extends JsavonObject { 8 | private static final long serialVersionUID = -8490747344993137443L; 9 | 10 | //Variables 11 | private double amount; 12 | private int borrowLimit; 13 | 14 | //Constructeurs 15 | public MaxBorrow(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final double getAmount() { 21 | return this.amount; 22 | } 23 | 24 | public final int getBorrowLimit() { 25 | return this.borrowLimit; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/PriceIndex.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class PriceIndex extends JsavonObject { 8 | private static final long serialVersionUID = 2490542383016227502L; 9 | 10 | //Variables 11 | private long calcTime; 12 | private double price; 13 | private String symbol; 14 | 15 | //Constructeurs 16 | public PriceIndex(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final long getCalcTime() { 22 | return this.calcTime; 23 | } 24 | 25 | public final double getPrice() { 26 | return this.price; 27 | } 28 | 29 | public final String getSymbol() { 30 | return this.symbol; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/Record.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public abstract class Record extends JsavonObject { 8 | private static final long serialVersionUID = -8784541029843999344L; 9 | 10 | private String asset; 11 | private String status; 12 | private long timestamp; 13 | private long txId; 14 | 15 | public Record(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | public final String getAsset() { 20 | return this.asset; 21 | } 22 | 23 | public final String getStatus() { 24 | return this.status; 25 | } 26 | 27 | public final long getTimestamp() { 28 | return this.timestamp; 29 | } 30 | 31 | public final long getTxId() { 32 | return this.txId; 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/RepayRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class RepayRecord extends Record { 6 | private static final long serialVersionUID = -2983885789800198103L; 7 | 8 | //Variables 9 | private double amount; 10 | private String isolatedSymbol; 11 | private double principal; 12 | private double interest; 13 | 14 | //Constructeurs 15 | public RepayRecord(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final String getIsolatedSymbol() { 21 | return isolatedSymbol; 22 | } 23 | 24 | public final double getPrincipal() { 25 | return principal; 26 | } 27 | 28 | public final double getAmount() { 29 | return this.amount; 30 | } 31 | 32 | public final double getInterest() { 33 | return this.interest; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/SideEffectType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | public enum SideEffectType { 4 | 5 | NO_SIDE_EFFECT, 6 | MARGIN_BUY, 7 | AUTO_REPAY; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/margin/TransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.margin; 2 | 3 | import org.json.JSONObject; 4 | 5 | public abstract class TransferRecord extends Record { 6 | private static final long serialVersionUID = 4974505064584104434L; 7 | 8 | //Variables 9 | private double amount; 10 | 11 | //Constructeurs 12 | public TransferRecord(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | //Getters 17 | public final double getAmount() { 18 | return this.amount; 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/AccountEarning.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class AccountEarning extends JsavonObject { 8 | private static final long serialVersionUID = -8630222808232027375L; 9 | 10 | private String coinName; 11 | private int type; 12 | private long time; 13 | private long puid; 14 | private String subName; 15 | private double amount; 16 | 17 | public AccountEarning(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | public final double getAmount() { 22 | return amount; 23 | } 24 | 25 | public final String getCoinName() { 26 | return coinName; 27 | } 28 | 29 | public final long getPuid() { 30 | return puid; 31 | } 32 | 33 | public final String getSubName() { 34 | return subName; 35 | } 36 | 37 | public final long getTime() { 38 | return time; 39 | } 40 | 41 | public final int getType() { 42 | return type; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/AccountProfit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class AccountProfit extends Profit { 6 | private static final long serialVersionUID = -2079631857072927016L; 7 | 8 | //Variables 9 | private long dayHashRate; 10 | private Double hashTransfer; 11 | private Double transferAmount; 12 | 13 | //Constructeurs 14 | public AccountProfit(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final long getDayHashRate() { 20 | return this.dayHashRate; 21 | } 22 | 23 | public final Double getHashTransfer() { 24 | return this.hashTransfer; 25 | } 26 | 27 | public final Double getTransferAmount() { 28 | return this.transferAmount; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/Algorithm.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Algorithm extends JsavonObject { 8 | private static final long serialVersionUID = 6469494209005987883L; 9 | 10 | //Variables 11 | private int algoId; 12 | private String algoName; 13 | private int poolIndex; 14 | private String unit; 15 | 16 | //Constructeurs 17 | public Algorithm(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final int getAlgoId() { 23 | return this.algoId; 24 | } 25 | 26 | public final String getAlgoName() { 27 | return this.algoName; 28 | } 29 | 30 | public final int getPoolIndex() { 31 | return this.poolIndex; 32 | } 33 | 34 | public final String getUnit() { 35 | return this.unit; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/CoinName.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class CoinName extends JsavonObject { 8 | private static final long serialVersionUID = -7612386787136311987L; 9 | 10 | //Variables 11 | private int algoId; 12 | private String algoName; 13 | private int coinId; 14 | private String coinName; 15 | private int poolIndex; 16 | 17 | //Constructeurs 18 | public CoinName(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final int getAlgoId() { 24 | return this.algoId; 25 | } 26 | 27 | public final String getAlgoName() { 28 | return this.algoName; 29 | } 30 | 31 | public final int getCoinId() { 32 | return this.coinId; 33 | } 34 | 35 | public final String getCoinName() { 36 | return this.coinName; 37 | } 38 | 39 | public final int getPoolIndex() { 40 | return this.poolIndex; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/HashrateData.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class HashrateData extends JsavonObject { 8 | private static final long serialVersionUID = -2989768733168849142L; 9 | 10 | //Variables 11 | private int hashrate; 12 | private int reject; 13 | private long time; 14 | 15 | //Constructeurs 16 | public HashrateData(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final int getHashrate() { 22 | return this.hashrate; 23 | } 24 | 25 | public final int getReject() { 26 | return this.reject; 27 | } 28 | 29 | public final long getTime() { 30 | return this.time; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/MinerDetail.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import java.util.List; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | 9 | public class MinerDetail extends JsavonObject { 10 | private static final long serialVersionUID = 8342586463776910307L; 11 | 12 | //Variables 13 | private List hashrateDatas; 14 | private String type; 15 | private String workerName; 16 | 17 | //Constructeurs 18 | public MinerDetail(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final List getHashrateDatas() { 24 | return this.hashrateDatas; 25 | } 26 | 27 | public final String getType() { 28 | return this.type; 29 | } 30 | 31 | public final String getWorkerName() { 32 | return this.workerName; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/Profit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Profit extends JsavonObject { 8 | private static final long serialVersionUID = -6612554663600466638L; 9 | 10 | //Variables 11 | private String coinName; 12 | private double profitAmount; 13 | private int status; 14 | private long time; 15 | private int type; 16 | 17 | //Constructeurs 18 | public Profit(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final String getCoinName() { 24 | return this.coinName; 25 | } 26 | 27 | public final double getProfitAmount() { 28 | return this.profitAmount; 29 | } 30 | 31 | public final int getStatus() { 32 | return this.status; 33 | } 34 | 35 | public final long getTime() { 36 | return this.time; 37 | } 38 | 39 | public final int getType() { 40 | return this.type; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/UserStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import java.util.List; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | 9 | public class UserStatistics extends JsavonObject { 10 | private static final long serialVersionUID = -2423280816656980988L; 11 | 12 | //Variables 13 | private List list; 14 | private String type; 15 | private String userName; 16 | 17 | //Constructeurs 18 | public UserStatistics(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final List getList() { 24 | return this.list; 25 | } 26 | 27 | public final String getType() { 28 | return this.type; 29 | } 30 | 31 | public final String getUserName() { 32 | return this.userName; 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/mining/UserStatisticsRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.mining; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class UserStatisticsRecord extends JsavonObject { 8 | private static final long serialVersionUID = -2559045516902850133L; 9 | 10 | //Variables 11 | private double hashrate; 12 | private double reject; 13 | private long time; 14 | 15 | //Constructeurs 16 | public UserStatisticsRecord(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getHashrate() { 22 | return this.hashrate; 23 | } 24 | 25 | public final double getReject() { 26 | return this.reject; 27 | } 28 | 29 | public final long getTime() { 30 | return this.time; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/nft/NFT.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.nft; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class NFT extends JsavonObject { 8 | private static final long serialVersionUID = -430546438156789862L; 9 | 10 | private String network; 11 | private String contractAddress; 12 | private long tokenId; 13 | 14 | public NFT(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | public final String getContractAddress() { 19 | return contractAddress; 20 | } 21 | 22 | public final String getNetwork() { 23 | return network; 24 | } 25 | 26 | public final long getTokenId() { 27 | return tokenId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/nft/NFTOrderType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.nft; 2 | 3 | public enum NFTOrderType { 4 | 5 | PURCHASE(0), 6 | SELL(1), 7 | ROYALTY_INCOME(2), 8 | PRIMARY_MARKET_ORDER(3), 9 | MINT_FEE(4); 10 | 11 | private final int no; 12 | 13 | private NFTOrderType(int no) { 14 | this.no = no; 15 | } 16 | 17 | @Override 18 | public String toString() { 19 | return String.valueOf(no); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/nft/NFTTransactionRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.nft; 2 | 3 | import java.util.List; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | 9 | public class NFTTransactionRecord extends JsavonObject { 10 | private static final long serialVersionUID = -2252393257501747185L; 11 | 12 | private String orderNo; 13 | private long tradeTime; 14 | private double tradeAmount; 15 | private String tradeCurrency; 16 | private List tokens; 17 | 18 | public NFTTransactionRecord(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | public final String getOrderNo() { 23 | return orderNo; 24 | } 25 | 26 | public final List getTokens() { 27 | return tokens; 28 | } 29 | 30 | public final double getTradeAmount() { 31 | return tradeAmount; 32 | } 33 | 34 | public final String getTradeCurrency() { 35 | return tradeCurrency; 36 | } 37 | 38 | public final long getTradeTime() { 39 | return tradeTime; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/nft/NFTTransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.nft; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class NFTTransferRecord extends NFT { 6 | private static final long serialVersionUID = 4932200968346666228L; 7 | 8 | private long timestamp; 9 | private String txID; 10 | 11 | public NFTTransferRecord(JSONObject json) { 12 | super(json); 13 | } 14 | 15 | public final long getTimestamp() { 16 | return timestamp; 17 | } 18 | 19 | public final String getTxID() { 20 | return txID; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/nft/NFTWithdrawRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.nft; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class NFTWithdrawRecord extends NFTTransferRecord { 6 | private static final long serialVersionUID = 7268836427985670277L; 7 | 8 | private double fee; 9 | private String feeAsset; 10 | 11 | public NFTWithdrawRecord(JSONObject json) { 12 | super(json); 13 | } 14 | 15 | public final double getFee() { 16 | return fee; 17 | } 18 | 19 | public final String getFeeAsset() { 20 | return feeAsset; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/quoting/ExerciceRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.quoting; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class ExerciceRecord extends JsavonObject { 8 | private static final long serialVersionUID = -5634367769496203721L; 9 | 10 | private String symbol; 11 | private double strikePrice; 12 | private double realStrikePrice; 13 | private long expiryDate; 14 | private String strikeResult; 15 | 16 | public ExerciceRecord(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | public final long getExpiryDate() { 21 | return expiryDate; 22 | } 23 | 24 | public final double getRealStrikePrice() { 25 | return realStrikePrice; 26 | } 27 | 28 | public final double getStrikePrice() { 29 | return strikePrice; 30 | } 31 | 32 | public final String getStrikeResult() { 33 | return strikeResult; 34 | } 35 | 36 | public final String getSymbol() { 37 | return symbol; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/quoting/OptionAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.quoting; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class OptionAsset extends JsavonObject { 8 | private static final long serialVersionUID = -3751210553171232844L; 9 | 10 | //Variables 11 | private String name; 12 | private int id; 13 | 14 | //Constructeurs 15 | public OptionAsset(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public int getId() { 21 | return id; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/quoting/OptionContract.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.quoting; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class OptionContract extends JsavonObject { 8 | private static final long serialVersionUID = 3576080428835675889L; 9 | 10 | //Variables 11 | private String settleAsset, baseAsset, underlying, quoteAsset; 12 | private int id; 13 | 14 | //Constructeurs 15 | public OptionContract(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public String getBaseAsset() { 21 | return baseAsset; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public String getQuoteAsset() { 29 | return quoteAsset; 30 | } 31 | 32 | public String getSettleAsset() { 33 | return settleAsset; 34 | } 35 | 36 | public String getUnderlying() { 37 | return underlying; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/quoting/OptionExchangeInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.quoting; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.json.JSONObject; 7 | 8 | import fr.rowlaxx.binanceapi.core.exchangeinfos.SimpleExchangeInformation; 9 | import fr.rowlaxx.convertutils.MapKey; 10 | 11 | public class OptionExchangeInformation extends SimpleExchangeInformation { 12 | private static final long serialVersionUID = 8537806609654238210L; 13 | 14 | //Variables 15 | @MapKey(fieldName = "symbol") 16 | private Map optionSymbols; 17 | 18 | private List optionContracts; 19 | private List optionAssets; 20 | 21 | //Constructeurs 22 | public OptionExchangeInformation(JSONObject json) { 23 | super(json); 24 | } 25 | 26 | //Getters 27 | @Override 28 | public final Map getSymbols() { 29 | return optionSymbols; 30 | } 31 | 32 | public final List getOptionAssets() { 33 | return optionAssets; 34 | } 35 | 36 | public final List getOptionContracts() { 37 | return optionContracts; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/quoting/OptionTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.quoting; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.OrderSides; 6 | import fr.rowlaxx.binanceapi.core.Trade; 7 | import fr.rowlaxx.jsavon.annotations.JOValue; 8 | 9 | public class OptionTrade extends Trade { 10 | private static final long serialVersionUID = 1130823384919172576L; 11 | 12 | //Variables 13 | private OrderSides side; 14 | @JOValue(mandatory = false) private Double quoteQty; 15 | @JOValue(mandatory = false) private Long tradeId; 16 | 17 | //Constructeurs 18 | public OptionTrade(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final Double getQuoteQuantity() { 24 | return quoteQty; 25 | } 26 | 27 | public final OrderSides getSide() { 28 | return side; 29 | } 30 | 31 | public final Long getTradeId() { 32 | return tradeId; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/trade/FundingFlow.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.trade; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class FundingFlow extends JsavonObject { 8 | private static final long serialVersionUID = -6334321097254077700L; 9 | 10 | //Variables 11 | private double amount; 12 | private long createDate; 13 | private String currency; 14 | private long id; 15 | private String type; 16 | 17 | //Constructeurs 18 | public FundingFlow(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final double getAmount() { 24 | return this.amount; 25 | } 26 | 27 | public final long getCreateDate() { 28 | return this.createDate; 29 | } 30 | 31 | public final String getCurrency() { 32 | return this.currency; 33 | } 34 | 35 | public final long getId() { 36 | return this.id; 37 | } 38 | 39 | public final String getType() { 40 | return this.type; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/trade/FundsTransferTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.trade; 2 | 3 | public enum FundsTransferTypes { 4 | 5 | IN, OUT 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/trade/OptionContractTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.trade; 2 | 3 | public enum OptionContractTypes { 4 | 5 | CALL, 6 | PUT 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/trade/OptionOrderStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.SimpleOrderStatus; 4 | 5 | public enum OptionOrderStatus implements SimpleOrderStatus { 6 | 7 | RECEIVED(0), 8 | UNTRIGGERED(1), 9 | ACCEPTED(2), 10 | REJECTED(3), 11 | PARTIALLY_FILLED(4), 12 | FILLED(5), 13 | CANCELLING(6), 14 | CANCELLED(7); 15 | 16 | private int type; 17 | 18 | private OptionOrderStatus(int type) { 19 | this.type = type; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return String.valueOf(type); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/options/trade/OptionOrderTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.options.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.OrderTypes; 4 | 5 | public enum OptionOrderTypes implements OrderTypes { 6 | 7 | LIMIT, 8 | MARKET, 9 | REDUCING, 10 | REDUCED, 11 | LIQUIDATION; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/pay/Fund.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.pay; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Fund extends JsavonObject { 8 | private static final long serialVersionUID = 3647982529595321857L; 9 | 10 | private double amount; 11 | private String currency; 12 | 13 | public Fund(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | public final double getAmount() { 18 | return amount; 19 | } 20 | 21 | public final String getCurrency() { 22 | return currency; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/pay/PayTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.pay; 2 | 3 | public enum PayTypes { 4 | 5 | PAY, //(C2B Merchant Acquiring Payment), 6 | PAY_REFUND, //(C2B Merchant Acquiring Payment,refund), 7 | C2C, //(C2C Transfer Payment), 8 | CRYPTO_BOX, //(Crypto box), 9 | CRYPTO_BOX_RF, //(Crypto Box, refund), 10 | C2C_HOLDING, //(Transfer to new Binance user), 11 | C2C_HOLDING_RF, //(Transfer to new Binance user,refund), 12 | PAYOUT, //(B2C Disbursement Payment) 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/portfoliomargin/AccountStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.portfoliomargin; 2 | 3 | public enum AccountStatus { 4 | 5 | NORMAL, MARGIN_CALL, SUPPLY_MARGIN, REDUCE_ONLY, ACTIVE_LIQUIDATION, FORCE_LIQUIDATION, BANKRUPTED; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/portfoliomargin/PortfolioMargin.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.portfoliomargin; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | public class PortfolioMargin extends JsavonObject { 6 | private static final long serialVersionUID = -7944811103308672180L; 7 | 8 | //Variables 9 | private double uniMMR; 10 | private double accountEquity; 11 | private double accountMaintMargin; 12 | private AccountStatus accountStatus; 13 | 14 | //Getters 15 | public double getAccountEquity() { 16 | return accountEquity; 17 | } 18 | 19 | public double getAccountMaintMargin() { 20 | return accountMaintMargin; 21 | } 22 | 23 | public AccountStatus getAccountStatus() { 24 | return accountStatus; 25 | } 26 | 27 | public double getUniMMR() { 28 | return uniMMR; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/rebate/RebateRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.rebate; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class RebateRecord extends JsavonObject { 8 | private static final long serialVersionUID = -2933323015918824078L; 9 | 10 | private String asset; 11 | private int type; 12 | private double amount; 13 | private long updateTime; 14 | 15 | public RebateRecord(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | public final double getAmount() { 20 | return amount; 21 | } 22 | 23 | public final String getAsset() { 24 | return asset; 25 | } 26 | 27 | public final int getType() { 28 | return type; 29 | } 30 | 31 | public final long getUpdateTime() { 32 | return updateTime; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/DailyPosition.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class DailyPosition extends JsavonObject { 8 | private static final long serialVersionUID = 4389323164929333090L; 9 | 10 | //Variables 11 | private int dailyPurchaseId; 12 | private boolean success; 13 | private long time; 14 | 15 | //Constructeurs 16 | public DailyPosition(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final int getDailyPurchaseId() { 22 | return this.dailyPurchaseId; 23 | } 24 | 25 | public final boolean isSuccess() { 26 | return this.success; 27 | } 28 | 29 | public final long getTime() { 30 | return this.time; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/FixedTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum FixedTypes { 4 | 5 | ACTIVITY, 6 | CUSTOMIZED_FIXED; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/LendingTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum LendingTypes { 4 | 5 | DAILY, 6 | ACTIVITY, 7 | CUSTOMIZED_FIXED; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/PositionAmount.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class PositionAmount extends JsavonObject { 8 | private static final long serialVersionUID = -5545989450045049012L; 9 | 10 | //Variables 11 | private double amount; 12 | private double amountInBTC; 13 | private double amountInUSDT; 14 | private String asset; 15 | 16 | //Constructeurs 17 | public PositionAmount(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getAmount() { 23 | return this.amount; 24 | } 25 | 26 | public final double getAmountInBTC() { 27 | return this.amountInBTC; 28 | } 29 | 30 | public final double getAmountInUSDT() { 31 | return this.amountInUSDT; 32 | } 33 | 34 | public final String getAsset() { 35 | return this.asset; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/Quota.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Quota extends JsavonObject { 8 | private static final long serialVersionUID = 464566317675746179L; 9 | 10 | //Variables 11 | private String asset; 12 | private double leftQuota; 13 | 14 | //Constructeurs 15 | public Quota(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final String getAsset() { 21 | return this.asset; 22 | } 23 | 24 | public final double getLeftQuota() { 25 | return this.leftQuota; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/RedemptionQuota.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class RedemptionQuota extends Quota { 6 | private static final long serialVersionUID = -1595989675358798941L; 7 | 8 | //Variables 9 | private double dailyQuota; 10 | private double minRedemptionAmount; 11 | 12 | //Constructeurs 13 | public RedemptionQuota(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | //Getters 18 | public final double getDailyQuota() { 19 | return this.dailyQuota; 20 | } 21 | 22 | public final double getMinRedemptionAmount() { 23 | return this.minRedemptionAmount; 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/SavingsInterestRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class SavingsInterestRecord extends JsavonObject { 8 | private static final long serialVersionUID = -5042757535970999556L; 9 | 10 | //Variables 11 | private String asset; 12 | private double interest; 13 | private String lendingType; 14 | private String productName; 15 | private long time; 16 | 17 | //Constructeurs 18 | public SavingsInterestRecord(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final String getAsset() { 24 | return this.asset; 25 | } 26 | 27 | public final double getInterest() { 28 | return this.interest; 29 | } 30 | 31 | public final String getLendingType() { 32 | return this.lendingType; 33 | } 34 | 35 | public final String getProductName() { 36 | return this.productName; 37 | } 38 | 39 | public final long getTime() { 40 | return this.time; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/SavingsPositionStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum SavingsPositionStatus { 4 | 5 | HOLDING, 6 | REDEEMED; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/SavingsRedemptionType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum SavingsRedemptionType { 4 | 5 | FAST, 6 | NORMAL; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/SavingsSortBy.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum SavingsSortBy { 4 | 5 | START_TIME, 6 | LOT_SIZE, 7 | INTEREST_RATE, 8 | DURATION 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/savings/SavingsStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.savings; 2 | 3 | public enum SavingsStatus { 4 | 5 | ALL, 6 | SUBSCRIBABLE, 7 | UNSUBSCRIBABLE; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketdata/CurrentAveragePrice.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class CurrentAveragePrice extends JsavonObject { 8 | private static final long serialVersionUID = -1092219404614702932L; 9 | 10 | //Variables 11 | private int mins; 12 | private double price; 13 | 14 | //Constructeurs 15 | public CurrentAveragePrice(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final int getMins() { 21 | return this.mins; 22 | } 23 | 24 | public final double getPrice() { 25 | return this.price; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketdata/Permissions.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketdata; 2 | 3 | public enum Permissions { 4 | 5 | SPOT, 6 | MARGIN, 7 | LEVERAGED, 8 | TRD_GRP_003 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketdata/SpotExchangeInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.ExchangeInformation; 6 | 7 | public class SpotExchangeInformation extends ExchangeInformation { 8 | 9 | private static final long serialVersionUID = 2887969122906405748L; 10 | 11 | //Constructeurs 12 | public SpotExchangeInformation(JSONObject response) { 13 | super(response); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketdata/SpotSymbolStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketdata; 2 | 3 | public enum SpotSymbolStatus { 4 | 5 | PRE_TRADING, 6 | TRADING, 7 | POST_TRADING, 8 | END_OF_DAY, 9 | HALT, 10 | AUCTION_MATCH, 11 | BREAK; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketdata/SpotTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.SideableTrade; 6 | 7 | public class SpotTrade extends SideableTrade { 8 | private static final long serialVersionUID = -4504990920483257735L; 9 | 10 | //Variables 11 | private double quoteQty; 12 | 13 | //Constructeurs 14 | public SpotTrade(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final double getQuoteQty() { 20 | return this.quoteQty; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/marketstream/SpotStreamTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.marketstream; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.SideableTrade; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class SpotStreamTrade extends SideableTrade { 9 | private static final long serialVersionUID = -2572330113881257652L; 10 | 11 | //Variables 12 | @JOValue(key = "b") 13 | private long buyerOrderId; 14 | @JOValue(key = "a") 15 | private long sellerOrderId; 16 | 17 | //Constructeurs 18 | public SpotStreamTrade(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getter 23 | public long getBuyerOrderId() { 24 | return buyerOrderId; 25 | } 26 | 27 | public long getSellerOrderId() { 28 | return sellerOrderId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/trade/Fill.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class Fill extends JsavonObject { 8 | private static final long serialVersionUID = 1049772128120402411L; 9 | 10 | //Variables 11 | private double commission; 12 | private String commissionAsset; 13 | private double price; 14 | private double qty; 15 | 16 | //Constructeurs 17 | public Fill(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getCommission() { 23 | return this.commission; 24 | } 25 | 26 | public final String getCommissionAsset() { 27 | return this.commissionAsset; 28 | } 29 | 30 | public final double getPrice() { 31 | return this.price; 32 | } 33 | 34 | public final double getQty() { 35 | return this.qty; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/trade/OrderLimit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.exchangeinfos.RateLimit; 6 | 7 | public class OrderLimit extends RateLimit { 8 | private static final long serialVersionUID = -4588960052188889320L; 9 | 10 | private int count; 11 | 12 | public OrderLimit(JSONObject response) { 13 | super(response); 14 | } 15 | 16 | public int getCount() { 17 | return count; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/trade/SpotOCOOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.OcoOrder; 6 | 7 | public class SpotOCOOrder extends OcoOrder { 8 | private static final long serialVersionUID = -7948252563213144921L; 9 | 10 | //Constructeurs 11 | public SpotOCOOrder(JSONObject json) { 12 | super(json); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/trade/SpotOrderTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.OrderTypes; 4 | 5 | public enum SpotOrderTypes implements OrderTypes { 6 | 7 | LIMIT, 8 | MARKET, 9 | STOP_LOSS, 10 | STOP_LOSS_LIMIT, 11 | TAKE_PROFIT, 12 | TAKE_PROFIT_LIMIT, 13 | LIMIT_MAKER 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/userstream/BalanceUpdate.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.userstream; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | import fr.rowlaxx.jsavon.annotations.JOValue; 5 | 6 | public class BalanceUpdate extends JsavonObject { 7 | private static final long serialVersionUID = -1280235801416007207L; 8 | 9 | //Variables 10 | @JOValue(key = "a") 11 | private String asset; 12 | @JOValue(key = "d") 13 | private double balanceDelta; 14 | @JOValue(key = "T") 15 | private long clearTime; 16 | 17 | //Getters 18 | public String getAsset() { 19 | return asset; 20 | } 21 | 22 | public double getBalanceDelta() { 23 | return balanceDelta; 24 | } 25 | 26 | public long getClearTime() { 27 | return clearTime; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/spot/userstream/ExecutionTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.spot.userstream; 2 | 3 | public enum ExecutionTypes { 4 | 5 | NEW, CANCELED, REPLACED, REJECTED, TRADE, EXPIRED; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/staking/StakingLeftQuota.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.staking; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | public class StakingLeftQuota extends JsavonObject { 6 | private static final long serialVersionUID = -7246180991171016058L; 7 | 8 | //Variables 9 | private double leftPersonalQuote; 10 | 11 | //Getters 12 | public double getLeftPersonalQuote() { 13 | return leftPersonalQuote; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/staking/StakingProducts.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.staking; 2 | 3 | public enum StakingProducts { 4 | 5 | STAKING, 6 | F_DEFI, 7 | L_DEFI; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/staking/StakingRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.staking; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | public class StakingRecord extends JsavonObject { 6 | private static final long serialVersionUID = 7832697255871153941L; 7 | 8 | //Variables 9 | private int positionId; 10 | private long time; 11 | private String asset; 12 | private String project; 13 | private double amount; 14 | private int lockPeriod; 15 | private long deliverDate; 16 | private String type; 17 | private String status; 18 | 19 | //Getters 20 | public double getAmount() { 21 | return amount; 22 | } 23 | 24 | public String getAsset() { 25 | return asset; 26 | } 27 | 28 | public long getDeliverDate() { 29 | return deliverDate; 30 | } 31 | 32 | public int getLockPeriod() { 33 | return lockPeriod; 34 | } 35 | 36 | public int getPositionId() { 37 | return positionId; 38 | } 39 | 40 | public String getProject() { 41 | return project; 42 | } 43 | 44 | public String getStatus() { 45 | return status; 46 | } 47 | 48 | public long getTime() { 49 | return time; 50 | } 51 | 52 | public String getType() { 53 | return type; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/staking/TxnTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.staking; 2 | 3 | public enum TxnTypes { 4 | 5 | SUBSCRIPTION, 6 | REDEMPTION, 7 | INTEREST; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/AccountTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | public enum AccountTypes { 4 | 5 | SPOT, 6 | USDT_FUTURES, 7 | COIN_FUTURES, 8 | MARGIN, 9 | ISOLATED_MARGIN; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/AssetTransferResult.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class AssetTransferResult extends JsavonObject { 8 | private static final long serialVersionUID = -6087111270730674571L; 9 | 10 | //Variables 11 | private boolean success; 12 | private long txnId; 13 | 14 | //Constructeurs 15 | public AssetTransferResult(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final boolean isSuccess() { 21 | return this.success; 22 | } 23 | 24 | public final long getTxnId() { 25 | return this.txnId; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/FuturesType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | public enum FuturesType { 4 | 5 | USDM(1), 6 | COINM(2); 7 | 8 | private int type; 9 | 10 | private FuturesType(int type) { 11 | this.type = type; 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return String.valueOf(type); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/IPRestriction.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import java.util.List; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.jsavon.JsavonObject; 8 | import fr.rowlaxx.jsavon.annotations.JOValue; 9 | 10 | public class IPRestriction extends JsavonObject { 11 | private static final long serialVersionUID = -6945097062179656566L; 12 | 13 | private boolean ipRestrict; 14 | @JOValue(mandatory = false) private List ipList; 15 | private long updateTime; 16 | private String apiKey; 17 | 18 | public IPRestriction(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | public final boolean ipRestrict() { 23 | return ipRestrict; 24 | } 25 | 26 | public final String getApiKey() { 27 | return apiKey; 28 | } 29 | 30 | public final List getIpList() { 31 | return ipList; 32 | } 33 | 34 | public final long getUpdateTime() { 35 | return updateTime; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/ManagedAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class ManagedAsset extends JsavonObject { 8 | private static final long serialVersionUID = 5561401427903070214L; 9 | 10 | //Variables 11 | private int availableBalance; 12 | private int btcValue; 13 | private String coin; 14 | private int inOrder; 15 | private String name; 16 | private int totalBalance; 17 | 18 | //Constructeurs 19 | public ManagedAsset(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final int getAvailableBalance() { 25 | return this.availableBalance; 26 | } 27 | 28 | public final int getBtcValue() { 29 | return this.btcValue; 30 | } 31 | 32 | public final String getCoin() { 33 | return this.coin; 34 | } 35 | 36 | public final int getInOrder() { 37 | return this.inOrder; 38 | } 39 | 40 | public final String getName() { 41 | return this.name; 42 | } 43 | 44 | public final int getTotalBalance() { 45 | return this.totalBalance; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/MarginCoeffVo.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class MarginCoeffVo extends JsavonObject { 8 | private static final long serialVersionUID = 7646092115694863338L; 9 | 10 | //Variables 11 | private double forceLiquidationBar; 12 | private double marginCallBar; 13 | private double normalBar; 14 | 15 | //Constructeurs 16 | public MarginCoeffVo(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getForceLiquidationBar() { 22 | return this.forceLiquidationBar; 23 | } 24 | 25 | public final double getMarginCallBar() { 26 | return this.marginCallBar; 27 | } 28 | 29 | public final double getNormalBar() { 30 | return this.normalBar; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/MarginTotal.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class MarginTotal extends JsavonObject { 8 | private static final long serialVersionUID = -8919630971608785330L; 9 | 10 | //Variables 11 | private String email; 12 | private double totalAssetOfBtc; 13 | private double totalLiabilityOfBtc; 14 | private double totalNetAssetOfBtc; 15 | 16 | //Constructeurs 17 | public MarginTotal(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getEmail() { 23 | return this.email; 24 | } 25 | 26 | public final double getTotalAssetOfBtc() { 27 | return this.totalAssetOfBtc; 28 | } 29 | 30 | public final double getTotalLiabilityOfBtc() { 31 | return this.totalLiabilityOfBtc; 32 | } 33 | 34 | public final double getTotalNetAssetOfBtc() { 35 | return this.totalNetAssetOfBtc; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/SpotAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class SpotAsset extends JsavonObject { 8 | private static final long serialVersionUID = -7408480788983113547L; 9 | 10 | //Variables 11 | private String email; 12 | private double totalAsset; 13 | 14 | //Constructeurs 15 | public SpotAsset(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final String getEmail() { 21 | return this.email; 22 | } 23 | 24 | public final double getTotalAsset() { 25 | return this.totalAsset; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/SubAccount.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | public class SubAccount extends JsavonObject { 6 | private static final long serialVersionUID = 7666190389359963590L; 7 | 8 | //Variables 9 | private long createTime; 10 | private String email; 11 | private boolean isFreeze; 12 | private boolean isManagedSubAccount; 13 | private boolean isAssetManagementSubAccount; 14 | 15 | //Getters 16 | public final long getCreateTime() { 17 | return this.createTime; 18 | } 19 | 20 | public final String getEmail() { 21 | return this.email; 22 | } 23 | 24 | public final boolean isFreeze() { 25 | return this.isFreeze; 26 | } 27 | 28 | public final boolean isAssetManagementSubAccount() { 29 | return isAssetManagementSubAccount; 30 | } 31 | 32 | public final boolean isManagedSubAccount() { 33 | return isManagedSubAccount; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/SubaccountTransferHistoryRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | import fr.rowlaxx.binanceapi.core.wallet.TransferHistoryRequest; 4 | 5 | public class SubaccountTransferHistoryRequest extends TransferHistoryRequest { 6 | 7 | public String email; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/subaccount/TransferStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.subaccount; 2 | 3 | public enum TransferStatus { 4 | 5 | SUCCESS; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/BaseAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class BaseAsset extends JsavonObject { 8 | private static final long serialVersionUID = 7440401857273245878L; 9 | 10 | //Variables 11 | private String baseAsset; 12 | private String quoteAsset; 13 | private double weightInPercentage; 14 | private double weightInQuantity; 15 | 16 | //Constructeurs 17 | public BaseAsset(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final String getBaseAsset() { 23 | return this.baseAsset; 24 | } 25 | 26 | public final String getQuoteAsset() { 27 | return this.quoteAsset; 28 | } 29 | 30 | public final double getWeightInPercentage() { 31 | return this.weightInPercentage; 32 | } 33 | 34 | public final double getWeightInQuantity() { 35 | return this.weightInQuantity; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/CompositeIndex.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import java.util.List; 6 | 7 | import org.json.JSONObject; 8 | 9 | public class CompositeIndex extends JsavonObject { 10 | private static final long serialVersionUID = 3388436908607602299L; 11 | 12 | //Variables 13 | private List baseAssetList; 14 | private String component; 15 | private String symbol; 16 | private long time; 17 | 18 | //Constructeurs 19 | public CompositeIndex(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final List getBaseAssetList() { 25 | return this.baseAssetList; 26 | } 27 | 28 | public final String getComponent() { 29 | return this.component; 30 | } 31 | 32 | public final String getSymbol() { 33 | return this.symbol; 34 | } 35 | 36 | public final long getTime() { 37 | return this.time; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class UsdmAsset extends JsavonObject { 8 | private static final long serialVersionUID = -8867757164767750187L; 9 | 10 | //Variables 11 | private double autoAssetExchange; 12 | private String asset; 13 | private boolean marginAvailable; 14 | 15 | //Constructeurs 16 | public UsdmAsset(JSONObject response) { 17 | super(response); 18 | } 19 | 20 | //Getters 21 | public String getAsset() { 22 | return asset; 23 | } 24 | 25 | public double getAutoAssetExchange() { 26 | return autoAssetExchange; 27 | } 28 | 29 | public boolean isMarginAvailable() { 30 | return marginAvailable; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmExchangeInformation.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import java.util.Map; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.binanceapi.core.exchangeinfos.ExchangeInformation; 8 | import fr.rowlaxx.convertutils.MapKey; 9 | 10 | public class UsdmExchangeInformation extends ExchangeInformation { 11 | private static final long serialVersionUID = -5298506133872695636L; 12 | 13 | //Variables 14 | private UsdmFuturesType futuresType; 15 | 16 | @MapKey(fieldName = "asset") 17 | private Map assets; 18 | 19 | //Constructeurs 20 | public UsdmExchangeInformation(JSONObject response) { 21 | super(response); 22 | } 23 | 24 | //Getters 25 | public UsdmFuturesType getFuturesType() { 26 | return futuresType; 27 | } 28 | 29 | public Map getAssets() { 30 | return assets; 31 | } 32 | 33 | public UsdmAsset getAsset(String asset) { 34 | return assets.get(asset); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmFuturesType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | public enum UsdmFuturesType { 4 | 5 | U_MARGINED 6 | 7 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmLongShortAccountRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.AccountLongShortRatio; 6 | 7 | public class UsdmLongShortAccountRatio extends AccountLongShortRatio { 8 | private static final long serialVersionUID = -6845319456270373031L; 9 | 10 | private String symbol; 11 | 12 | public UsdmLongShortAccountRatio(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getSymbol() { 17 | return symbol; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmLongShortPositionRatio.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.PositionLongShortRatio; 6 | 7 | public class UsdmLongShortPositionRatio extends PositionLongShortRatio { 8 | private static final long serialVersionUID = 4085955305907954426L; 9 | 10 | private String symbol; 11 | 12 | public UsdmLongShortPositionRatio(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getSymbol() { 17 | return symbol; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmOpenInterestStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.OpenInterestStatistics; 6 | 7 | public class UsdmOpenInterestStatistics extends OpenInterestStatistics { 8 | private static final long serialVersionUID = -1335855950790727731L; 9 | 10 | private String symbol; 11 | 12 | public UsdmOpenInterestStatistics(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final String getSymbol() { 17 | return symbol; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmSymbol.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.marketdata.FutureSymbol; 6 | 7 | public class UsdmSymbol extends FutureSymbol { 8 | private static final long serialVersionUID = 2943141519225972622L; 9 | 10 | //Variables 11 | private int settlePlan; 12 | 13 | //Constructeurs 14 | public UsdmSymbol(JSONObject response) { 15 | super(response); 16 | } 17 | 18 | //Getters 19 | public int getSettlePlan() { 20 | return settlePlan; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmTakerVolume.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class UsdmTakerVolume extends JsavonObject { 8 | private static final long serialVersionUID = 7545690185322310608L; 9 | 10 | //Variables 11 | private double buySellRatio; 12 | private double buyVol; 13 | private double sellVol; 14 | private long timestamp; 15 | 16 | //Constructeurs 17 | public UsdmTakerVolume(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | //Getters 22 | public final double getBuySellRatio() { 23 | return this.buySellRatio; 24 | } 25 | 26 | public final double getBuyVol() { 27 | return this.buyVol; 28 | } 29 | 30 | public final double getSellVol() { 31 | return this.sellVol; 32 | } 33 | 34 | public final long getTimestamp() { 35 | return this.timestamp; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmTickerStatistics.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.TickerStatistics; 6 | 7 | public class UsdmTickerStatistics extends TickerStatistics { 8 | private static final long serialVersionUID = 68876222633377713L; 9 | 10 | private double quoteVolume; 11 | 12 | public UsdmTickerStatistics(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getQuoteVolume() { 17 | return quoteVolume; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/marketdata/UsdmTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.marketdata; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.SideableTrade; 6 | 7 | public class UsdmTrade extends SideableTrade { 8 | private static final long serialVersionUID = -8087849406891656991L; 9 | 10 | private double quoteQty; 11 | 12 | public UsdmTrade(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getQuoteQty() { 17 | return quoteQty; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmAccountAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountAsset; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class UsdmAccountAsset extends FutureAccountAsset { 8 | private static final long serialVersionUID = 4683143051533540722L; 9 | 10 | //Variables 11 | private boolean marginAvailable; 12 | private long updateTime; 13 | 14 | //Constructeurs 15 | public UsdmAccountAsset(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final boolean isMarginAvailable() { 21 | return this.marginAvailable; 22 | } 23 | 24 | public final long getUpdateTime() { 25 | return this.updateTime; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmAccountBalance.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountBalance; 6 | 7 | public class UsdmAccountBalance extends FutureAccountBalance { 8 | private static final long serialVersionUID = 2533175550617247574L; 9 | 10 | private double maxWithdrawAmount; 11 | private boolean marginAvailable; 12 | 13 | public UsdmAccountBalance(JSONObject json) { 14 | super(json); 15 | } 16 | 17 | public final double getMaxWithdrawAmount() { 18 | return maxWithdrawAmount; 19 | } 20 | 21 | public final boolean isMarginAvailable() { 22 | return marginAvailable; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmAccountPosition.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountPosition; 4 | 5 | import org.json.JSONObject; 6 | 7 | public class UsdmAccountPosition extends FutureAccountPosition { 8 | private static final long serialVersionUID = -9115702695146657492L; 9 | 10 | //Variables 11 | private int maxQty; 12 | 13 | //Constructeurs 14 | public UsdmAccountPosition(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final int getMaxQty() { 20 | return this.maxQty; 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmAccountTrade.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureAccountTrade; 6 | 7 | public class UsdmAccountTrade extends FutureAccountTrade { 8 | private static final long serialVersionUID = 9019521640803828806L; 9 | 10 | private double quoteQty; 11 | 12 | public UsdmAccountTrade(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getQuoteQty() { 17 | return quoteQty; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmForceOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.ForceOrder; 6 | 7 | public class UsdmForceOrder extends ForceOrder { 8 | private static final long serialVersionUID = -7760499883594639834L; 9 | 10 | private double cumQuote; 11 | 12 | public UsdmForceOrder(JSONObject json) { 13 | super(json); 14 | } 15 | 16 | public final double getCumQuote() { 17 | return cumQuote; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmIndicator.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.wallet.TriggerConditions; 6 | import fr.rowlaxx.jsavon.JsavonObject; 7 | 8 | public class UsdmIndicator extends JsavonObject { 9 | private static final long serialVersionUID = 983414546006114986L; 10 | 11 | private boolean isLocked; 12 | private long plannedRecoverTime; 13 | private TriggerConditions indicator; 14 | private double value; 15 | private double triggerValue; 16 | 17 | public UsdmIndicator(JSONObject json) { 18 | super(json); 19 | } 20 | 21 | public final boolean isLocked() { 22 | return isLocked; 23 | } 24 | 25 | public final TriggerConditions getIndicator() { 26 | return indicator; 27 | } 28 | 29 | public final long getPlannedRecoverTime() { 30 | return plannedRecoverTime; 31 | } 32 | 33 | public final double getTriggerValue() { 34 | return triggerValue; 35 | } 36 | 37 | public final double getValue() { 38 | return value; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/usdm/trade/UsdmOrder.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.usdm.trade; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.futures.trade.FutureOrder; 6 | 7 | public class UsdmOrder extends FutureOrder { 8 | private static final long serialVersionUID = 8553833220224624389L; 9 | 10 | //Variables 11 | private double cumQuote; 12 | 13 | //Constructeurs 14 | public UsdmOrder(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public double getCumQuote() { 20 | return cumQuote; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/AccountSnapshot.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public abstract class AccountSnapshot extends JsavonObject { 8 | private static final long serialVersionUID = -6025630785683454849L; 9 | 10 | //Variables 11 | private AccountSnapshotTypes type; 12 | private long updateTime; 13 | 14 | //Constructeurs 15 | public AccountSnapshot(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public final AccountSnapshotTypes getType() { 21 | return this.type; 22 | } 23 | 24 | public final long getUpdateTime() { 25 | return this.updateTime; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/AccountSnapshotTypes.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.convertutils.annotations.EnumMatcher; 4 | 5 | public enum AccountSnapshotTypes { 6 | 7 | @EnumMatcher(caseSensitiv = false) 8 | SPOT, 9 | @EnumMatcher(caseSensitiv = false) 10 | MARGIN, 11 | @EnumMatcher(caseSensitiv = false) 12 | FUTURES 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/AssetDetail.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class AssetDetail extends JsavonObject { 9 | private static final long serialVersionUID = 4486608431669298205L; 10 | 11 | //Variables 12 | private boolean depositStatus; 13 | @JOValue(mandatory = false) 14 | private String depositTip; 15 | private double minWithdrawAmount; 16 | private double withdrawFee; 17 | private boolean withdrawStatus; 18 | 19 | //Constructeurs 20 | public AssetDetail(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | //Getters 25 | public final boolean isDepositStatus() { 26 | return this.depositStatus; 27 | } 28 | 29 | public final String getDepositTip() { 30 | return this.depositTip; 31 | } 32 | 33 | public final double getMinWithdrawAmount() { 34 | return this.minWithdrawAmount; 35 | } 36 | 37 | public final double getWithdrawFee() { 38 | return this.withdrawFee; 39 | } 40 | 41 | public final boolean isWithdrawStatus() { 42 | return this.withdrawStatus; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/AssetDividend.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class AssetDividend extends JsavonObject { 8 | private static final long serialVersionUID = 1361082148735487294L; 9 | 10 | //Variables 11 | private double amount; 12 | private String asset; 13 | private long divTime; 14 | private String enInfo; 15 | private long tranId; 16 | 17 | //Constructeurs 18 | public AssetDividend(JSONObject json) { 19 | super(json); 20 | } 21 | 22 | //Getters 23 | public final double getAmount() { 24 | return this.amount; 25 | } 26 | 27 | public final String getAsset() { 28 | return this.asset; 29 | } 30 | 31 | public final long getDivTime() { 32 | return this.divTime; 33 | } 34 | 35 | public final String getEnInfo() { 36 | return this.enInfo; 37 | } 38 | 39 | public final long getTranId() { 40 | return this.tranId; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/BNBConvertableAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.jsavon.JsavonObject; 4 | 5 | public class BNBConvertableAsset extends JsavonObject { 6 | private static final long serialVersionUID = 7812963916227653894L; 7 | 8 | private String asset; 9 | private String assetFullName; 10 | private double amountFree; 11 | private double toBTC; 12 | private double toBNB; 13 | private double toBNBOffExchange; 14 | private double exchange; 15 | 16 | public final double getAmountFree() { 17 | return amountFree; 18 | } 19 | 20 | public final String getAsset() { 21 | return asset; 22 | } 23 | 24 | public final String getAssetFullName() { 25 | return assetFullName; 26 | } 27 | 28 | public final double getExchange() { 29 | return exchange; 30 | } 31 | 32 | public final double getToBNB() { 33 | return toBNB; 34 | } 35 | 36 | public final double getToBNBOffExchange() { 37 | return toBNBOffExchange; 38 | } 39 | 40 | public final double getToBTC() { 41 | return toBTC; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/Deposit.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class Deposit extends Transfer { 6 | private static final long serialVersionUID = -9056137050856856304L; 7 | 8 | //Variables 9 | private String addressTag; 10 | private String confirmTimes; 11 | private long insertTime; 12 | private String unlockConfirm; 13 | 14 | //Constructeurs 15 | public Deposit(JSONObject json) { 16 | super(TransferType.DEPOSIT, json); 17 | } 18 | 19 | //Getters 20 | public final String getAddressTag() { 21 | return this.addressTag; 22 | } 23 | 24 | public final String getConfirmTimes() { 25 | return this.confirmTimes; 26 | } 27 | 28 | public final long getInsertTime() { 29 | return this.insertTime; 30 | } 31 | 32 | public final String getUnlockConfirm() { 33 | return this.unlockConfirm; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/DustTransferDetails.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class DustTransferDetails extends JsavonObject { 8 | private static final long serialVersionUID = 6031548460637413849L; 9 | 10 | //Variables 11 | private double amount; 12 | private String fromAsset; 13 | private long operateTime; 14 | private double serviceChargeAmount; 15 | private long transId; 16 | private double transferedAmount; 17 | 18 | //Constructeurs 19 | public DustTransferDetails(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final double getAmount() { 25 | return this.amount; 26 | } 27 | 28 | public final String getFromAsset() { 29 | return this.fromAsset; 30 | } 31 | 32 | public final long getOperateTime() { 33 | return this.operateTime; 34 | } 35 | 36 | public final double getServiceChargeAmount() { 37 | return this.serviceChargeAmount; 38 | } 39 | 40 | public final long getTransId() { 41 | return this.transId; 42 | } 43 | 44 | public final double getTransferedAmount() { 45 | return this.transferedAmount; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/DustTransferRecord.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class DustTransferRecord extends DustTransfer { 6 | private static final long serialVersionUID = -9212844790854835722L; 7 | 8 | //Variables 9 | private String clientId; 10 | private long transId; 11 | private long operateTime; 12 | 13 | //Constructeurs 14 | public DustTransferRecord(JSONObject json) { 15 | super(json); 16 | } 17 | 18 | //Getters 19 | public final String getClientId() { 20 | return this.clientId; 21 | } 22 | 23 | public final long getTransId() { 24 | return this.transId; 25 | } 26 | 27 | public final long getOperateTime() { 28 | return this.operateTime; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/FundingWallet.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.binanceapi.core.Asset; 6 | 7 | public class FundingWallet extends Asset { 8 | private static final long serialVersionUID = -2635358054781207396L; 9 | 10 | //Variables 11 | private double btcValuation; 12 | private double freeze; 13 | private double withdrawing; 14 | 15 | //Constructeurs 16 | public FundingWallet(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getBtcValuation() { 22 | return this.btcValuation; 23 | } 24 | 25 | public final double getFreeze() { 26 | return this.freeze; 27 | } 28 | 29 | public final double getWithdrawing() { 30 | return this.withdrawing; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/FutureAsset.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class FutureAsset extends JsavonObject { 8 | private static final long serialVersionUID = -1699547811207275051L; 9 | 10 | //Variables 11 | private String asset; 12 | private double marginBalance; 13 | private double walletBalance; 14 | 15 | //Constructeurs 16 | public FutureAsset(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final String getAsset() { 22 | return this.asset; 23 | } 24 | 25 | public final double getMarginBalance() { 26 | return this.marginBalance; 27 | } 28 | 29 | public final double getWalletBalance() { 30 | return this.walletBalance; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/FuturesAccountSnapshot.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.convertutils.MapKey; 4 | import fr.rowlaxx.jsavon.annotations.JOValue; 5 | 6 | import java.util.Map; 7 | 8 | import org.json.JSONObject; 9 | 10 | public class FuturesAccountSnapshot extends AccountSnapshot { 11 | private static final long serialVersionUID = -2047109621919437595L; 12 | 13 | //Variables 14 | @MapKey(fieldName = "asset") 15 | @JOValue(path = "data") 16 | private Map assets; 17 | 18 | @JOValue(path = "data") 19 | @MapKey(fieldName = "symbol") 20 | private Map position; 21 | 22 | //Constructeurs 23 | public FuturesAccountSnapshot(JSONObject json) { 24 | super(json); 25 | } 26 | 27 | //Getters 28 | public final Map getAssets() { 29 | return this.assets; 30 | } 31 | 32 | public final FutureAsset getAsset(String asset) { 33 | return this.assets.get(asset); 34 | } 35 | 36 | public final Map getPosition() { 37 | return this.position; 38 | } 39 | 40 | public final Position getPosition(String symbol) { 41 | return this.position.get(symbol); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/Indicator.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class Indicator extends JsavonObject { 9 | private static final long serialVersionUID = -855231720584463981L; 10 | 11 | //Variables 12 | @JOValue(key = "c") 13 | private int count; 14 | @JOValue(key = "i") 15 | private TriggerConditions triggerCondition; 16 | @JOValue(key = "t") 17 | private double triggerValue; 18 | @JOValue(key = "v") 19 | private double currentValue; 20 | 21 | //Constructeurs 22 | public Indicator(JSONObject json) { 23 | super(json); 24 | } 25 | 26 | //Getters 27 | public final int getCount() { 28 | return this.count; 29 | } 30 | 31 | public final double getCurrentValue() { 32 | return this.currentValue; 33 | } 34 | 35 | public final TriggerConditions getTriggerCondition() { 36 | return this.triggerCondition; 37 | } 38 | 39 | public final double getTriggerValue() { 40 | return this.triggerValue; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/Position.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | import fr.rowlaxx.jsavon.annotations.JOValue; 7 | 8 | public class Position extends JsavonObject { 9 | private static final long serialVersionUID = -2121018695205256757L; 10 | 11 | //Variables 12 | private double entryPrice; 13 | @JOValue(mandatory = false) 14 | private Double markPrice; 15 | private double positionAmt; 16 | private String symbol; 17 | private double unRealizedProfit; 18 | 19 | //Constructeurs 20 | public Position(JSONObject json) { 21 | super(json); 22 | } 23 | 24 | //Getters 25 | public final double getEntryPrice() { 26 | return this.entryPrice; 27 | } 28 | 29 | public final double getMarkPrice() { 30 | return this.markPrice; 31 | } 32 | 33 | public final double getPositionAmt() { 34 | return this.positionAmt; 35 | } 36 | 37 | public final String getSymbol() { 38 | return this.symbol; 39 | } 40 | 41 | public final double getUnRealizedProfit() { 42 | return this.unRealizedProfit; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/SpotAccountSnapshot.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import java.util.Map; 4 | 5 | import org.json.JSONObject; 6 | 7 | import fr.rowlaxx.binanceapi.core.Asset; 8 | import fr.rowlaxx.convertutils.MapKey; 9 | import fr.rowlaxx.jsavon.annotations.JOValue; 10 | 11 | public class SpotAccountSnapshot extends AccountSnapshot { 12 | private static final long serialVersionUID = 1634716526563706889L; 13 | 14 | //Variables 15 | @JOValue(path = "data") 16 | private double totalAssetOfBtc; 17 | 18 | @JOValue(path = "data") 19 | @MapKey(fieldName = "asset") 20 | private Map balances; 21 | 22 | //Constructeurs 23 | public SpotAccountSnapshot(JSONObject json) { 24 | super(json); 25 | } 26 | 27 | //Getters 28 | public final double getTotalAssetOfBtc() { 29 | return totalAssetOfBtc; 30 | } 31 | 32 | public final Map getBalances() { 33 | return this.balances; 34 | } 35 | 36 | public final Asset getBalance(String asset) { 37 | return this.balances.get(asset); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/SystemStatus.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class SystemStatus extends JsavonObject { 8 | private static final long serialVersionUID = 6247232420296603354L; 9 | 10 | //Variables 11 | private String msg; 12 | private int status; 13 | 14 | //Constructeurs 15 | public SystemStatus(JSONObject json) { 16 | super(json); 17 | } 18 | 19 | //Getters 20 | public String getMsg() { 21 | return msg; 22 | } 23 | 24 | public int getStatus() { 25 | return status; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/TradeFee.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class TradeFee extends JsavonObject { 8 | private static final long serialVersionUID = 6412460026443809680L; 9 | 10 | //Variables 11 | private double makerCommission; 12 | private String symbol; 13 | private double takerCommission; 14 | 15 | //Constructeurs 16 | public TradeFee(JSONObject json) { 17 | super(json); 18 | } 19 | 20 | //Getters 21 | public final double getMakerCommission() { 22 | return this.makerCommission; 23 | } 24 | 25 | public final String getSymbol() { 26 | return this.symbol; 27 | } 28 | 29 | public final double getTakerCommission() { 30 | return this.takerCommission; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/TransferHistoryRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.binanceapi.client.http.BinanceAutoHttpRequest; 4 | 5 | public class TransferHistoryRequest extends BinanceAutoHttpRequest { 6 | 7 | public String coin; 8 | public Long startTime; 9 | public Long endTime; 10 | public Integer limit; 11 | public Integer offset; 12 | public Integer status; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/TransferType.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | public enum TransferType { 4 | 5 | WITHDRAW, 6 | DEPOSIT; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/TriggerConditions.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | public enum TriggerConditions { 4 | 5 | GCR, // GTC Cancellation Ratio (GCR) 6 | IFER, // IOC/FOK Expiration Ratio (IFER) 7 | UFR, // Unfilled Ratio (UFR) 8 | DR, // Dust Ratio (DR) 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/UniversalTransfer.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | import fr.rowlaxx.jsavon.JsavonObject; 6 | 7 | public class UniversalTransfer extends JsavonObject { 8 | private static final long serialVersionUID = 7540880462561445676L; 9 | 10 | //Variables 11 | private double amount; 12 | private String asset; 13 | private String status; 14 | private long timestamp; 15 | private long tranId; 16 | private String type; 17 | 18 | //Constructeurs 19 | public UniversalTransfer(JSONObject json) { 20 | super(json); 21 | } 22 | 23 | //Getters 24 | public final double getAmount() { 25 | return this.amount; 26 | } 27 | 28 | public final String getAsset() { 29 | return this.asset; 30 | } 31 | 32 | public final String getStatus() { 33 | return this.status; 34 | } 35 | 36 | public final long getTimestamp() { 37 | return this.timestamp; 38 | } 39 | 40 | public final long getTranId() { 41 | return this.tranId; 42 | } 43 | 44 | public final String getType() { 45 | return this.type; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/UniversalTransferHistoryRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.binanceapi.client.http.BinanceAutoHttpRequest; 4 | 5 | public class UniversalTransferHistoryRequest extends BinanceAutoHttpRequest { 6 | 7 | public UniversalTransferTypes type; 8 | public Long startTime; 9 | public Long endTime; 10 | public Integer current; 11 | public Integer size; 12 | public String fromSymbol; 13 | public String toSymbol; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/UniversalTransferRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.binanceapi.client.http.BinanceAutoHttpRequest; 4 | 5 | public class UniversalTransferRequest extends BinanceAutoHttpRequest { 6 | 7 | public UniversalTransferTypes type; 8 | public String asset; 9 | public double amount; 10 | public String fromSymbol; 11 | public String toSymbol; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/Withdraw.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class Withdraw extends Transfer { 6 | private static final long serialVersionUID = -8135940671960753253L; 7 | 8 | //Variables 9 | private String applyTime; 10 | private int confirmNo; 11 | private String id; 12 | private double transactionFee; 13 | private String withdrawOrderId; 14 | 15 | //Constructeurs 16 | public Withdraw(JSONObject json) { 17 | super(TransferType.WITHDRAW, json); 18 | } 19 | 20 | //Getters 21 | public final String getApplyTime() { 22 | return this.applyTime; 23 | } 24 | 25 | public final int getConfirmNo() { 26 | return this.confirmNo; 27 | } 28 | 29 | public final String getId() { 30 | return this.id; 31 | } 32 | 33 | public final double getTransactionFee() { 34 | return this.transactionFee; 35 | } 36 | 37 | public final String getWithdrawOrderId() { 38 | return this.withdrawOrderId; 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/core/wallet/WithdrawRequest.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.core.wallet; 2 | 3 | import fr.rowlaxx.binanceapi.client.http.BinanceAutoHttpRequest; 4 | 5 | public class WithdrawRequest extends BinanceAutoHttpRequest { 6 | 7 | public String coin; 8 | public String withdrawOrderId; 9 | public String network; 10 | public String address; 11 | public String addressTag; 12 | public Double amount; 13 | public Boolean transactionFeeFlag; 14 | public String name; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/ApiEndpointException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class ApiEndpointException extends BinanceException { 4 | private static final long serialVersionUID = 2954737147205046563L; 5 | 6 | public ApiEndpointException(String msg) { 7 | super(msg); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceAPIException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceAPIException extends BinanceException { 4 | private static final long serialVersionUID = 25661446321357741L; 5 | 6 | public BinanceAPIException(String msg) { 7 | super(msg); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceAutoHttpRequestException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceAutoHttpRequestException extends BinanceException { 4 | private static final long serialVersionUID = -5653935642362669487L; 5 | 6 | public BinanceAutoHttpRequestException(String msg) { 7 | super(msg); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceClientImplementerException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceClientImplementerException extends BinanceException { 4 | private static final long serialVersionUID = 2826521889271325006L; 5 | 6 | public BinanceClientImplementerException(String msg) { 7 | super(msg); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceException extends RuntimeException { 4 | private static final long serialVersionUID = -8315344501529412077L; 5 | 6 | //Constructeurs 7 | public BinanceException(String msg) { 8 | super(msg); 9 | } 10 | 11 | public BinanceException() { 12 | super(); 13 | } 14 | 15 | public BinanceException(Throwable cause) { 16 | super(cause); 17 | } 18 | 19 | public BinanceException(String msg, Throwable cause) { 20 | super(msg, cause); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceHttpClientException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceHttpClientException extends BinanceException { 4 | private static final long serialVersionUID = -7106592156821832037L; 5 | 6 | //Variables 7 | private final int code; 8 | 9 | //Constructeurs 10 | public BinanceHttpClientException(String msg, int code) { 11 | super(msg); 12 | this.code = code; 13 | } 14 | 15 | public BinanceHttpClientException(String msg) { 16 | this(msg, 0); 17 | } 18 | 19 | //Getter 20 | public int getCode() { 21 | return code; 22 | } 23 | 24 | @Override 25 | public String getMessage() { 26 | if (code == 0) 27 | return super.getMessage(); 28 | return "code=" + code + " : " + super.getMessage(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceHttpRequestException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceHttpRequestException extends BinanceException { 4 | private static final long serialVersionUID = -7383415533103681805L; 5 | 6 | //Constructeurs 7 | public BinanceHttpRequestException(String msg) { 8 | super(msg); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/BinanceWebSocketException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class BinanceWebSocketException extends BinanceException { 4 | private static final long serialVersionUID = 4588773260274532764L; 5 | 6 | public BinanceWebSocketException() { 7 | super(); 8 | } 9 | 10 | public BinanceWebSocketException(String msg, Throwable cause) { 11 | super(msg, cause); 12 | } 13 | 14 | public BinanceWebSocketException(String msg) { 15 | super(msg); 16 | } 17 | 18 | public BinanceWebSocketException(Throwable cause) { 19 | super(cause); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/fr/rowlaxx/binanceapi/exceptions/FilterInstanciationException.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi.exceptions; 2 | 3 | public class FilterInstanciationException extends BinanceException { 4 | 5 | private static final long serialVersionUID = -4273760847189549916L; 6 | 7 | public FilterInstanciationException(Throwable cause) { 8 | super(cause); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/test/java/fr/rowlaxx/binanceapi/.gitignore: -------------------------------------------------------------------------------- 1 | /ApiKeys.java 2 | /Secret.java 3 | -------------------------------------------------------------------------------- /src/test/java/fr/rowlaxx/binanceapi/Test.java: -------------------------------------------------------------------------------- 1 | package fr.rowlaxx.binanceapi; 2 | 3 | import java.io.IOException; 4 | import java.net.URISyntaxException; 5 | import java.util.concurrent.ExecutionException; 6 | 7 | import fr.rowlaxx.binanceapi.api.ApiImplementer; 8 | import fr.rowlaxx.binanceapi.client.BinanceClient; 9 | import fr.rowlaxx.binanceapi.core.usdm.marketdata.UsdmExchangeInformation; 10 | 11 | public class Test { 12 | 13 | private static BinanceClient client; 14 | 15 | public static void main(String[] args) throws IOException, InterruptedException, ExecutionException, URISyntaxException { 16 | client = BinanceClient.create(args[0], args[1]); 17 | 18 | ApiImplementer.DEBUG = true; 19 | 20 | client.coinm().market().getExchangeInformation(); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /target/test-classes/fr/rowlaxx/binanceapi/.gitignore: -------------------------------------------------------------------------------- 1 | /ApiKeys.java 2 | /Secret.java 3 | --------------------------------------------------------------------------------