@coinbase-sample/advanced-trade-sdk-ts 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +44 -0
- package/dist/model/Account.d.ts +80 -0
- package/dist/model/Account.js +21 -0
- package/dist/model/Address.d.ts +27 -0
- package/dist/model/Address.js +21 -0
- package/dist/model/AllocatePortfolioRequest.d.ts +37 -0
- package/dist/model/AllocatePortfolioRequest.js +21 -0
- package/dist/model/Allocation.d.ts +25 -0
- package/dist/model/Allocation.js +21 -0
- package/dist/model/AllocationLeg.d.ts +25 -0
- package/dist/model/AllocationLeg.js +21 -0
- package/dist/model/Amount.d.ts +29 -0
- package/dist/model/Amount.js +21 -0
- package/dist/model/ApplePay.d.ts +40 -0
- package/dist/model/ApplePay.js +21 -0
- package/dist/model/ApplePayBraintreeData.d.ts +23 -0
- package/dist/model/ApplePayBraintreeData.js +21 -0
- package/dist/model/Asset.d.ts +30 -0
- package/dist/model/Asset.js +21 -0
- package/dist/model/Balance.d.ts +32 -0
- package/dist/model/Balance.js +21 -0
- package/dist/model/BalancePair.d.ts +24 -0
- package/dist/model/BalancePair.js +21 -0
- package/dist/model/BankAccount.d.ts +25 -0
- package/dist/model/BankAccount.js +21 -0
- package/dist/model/BestBidAskGetProductBookConfig.d.ts +25 -0
- package/dist/model/BestBidAskGetProductBookConfig.js +21 -0
- package/dist/model/BlockchainAddress.d.ts +23 -0
- package/dist/model/BlockchainAddress.js +21 -0
- package/dist/model/BlockchainTransaction.d.ts +23 -0
- package/dist/model/BlockchainTransaction.js +21 -0
- package/dist/model/CTN.d.ts +22 -0
- package/dist/model/CTN.js +21 -0
- package/dist/model/CancelFCMSweepResponse.d.ts +22 -0
- package/dist/model/CancelFCMSweepResponse.js +21 -0
- package/dist/model/CancelOrderResponse.d.ts +34 -0
- package/dist/model/CancelOrderResponse.js +21 -0
- package/dist/model/CancelOrdersRequest.d.ts +25 -0
- package/dist/model/CancelOrdersRequest.js +21 -0
- package/dist/model/CancelOrdersResponse.d.ts +26 -0
- package/dist/model/CancelOrdersResponse.js +21 -0
- package/dist/model/Candle.d.ts +45 -0
- package/dist/model/Candle.js +21 -0
- package/dist/model/Candles.d.ts +23 -0
- package/dist/model/Candles.js +21 -0
- package/dist/model/Card.d.ts +46 -0
- package/dist/model/Card.js +21 -0
- package/dist/model/CardDob.d.ts +24 -0
- package/dist/model/CardDob.js +21 -0
- package/dist/model/Cbit.d.ts +22 -0
- package/dist/model/Cbit.js +21 -0
- package/dist/model/CheckoutPaymentLink.d.ts +22 -0
- package/dist/model/CheckoutPaymentLink.js +21 -0
- package/dist/model/ClosePositionRequest.d.ts +33 -0
- package/dist/model/ClosePositionRequest.js +21 -0
- package/dist/model/ClosePositionResponse.d.ts +34 -0
- package/dist/model/ClosePositionResponse.js +21 -0
- package/dist/model/CoinbaseAccount.d.ts +22 -0
- package/dist/model/CoinbaseAccount.js +21 -0
- package/dist/model/CommitConvertTradeRequest.d.ts +29 -0
- package/dist/model/CommitConvertTradeRequest.js +21 -0
- package/dist/model/CommitConvertTradeResponse.d.ts +23 -0
- package/dist/model/CommitConvertTradeResponse.js +21 -0
- package/dist/model/CreateConvertQuoteRequest.d.ts +38 -0
- package/dist/model/CreateConvertQuoteRequest.js +21 -0
- package/dist/model/CreateConvertQuoteResponse.d.ts +23 -0
- package/dist/model/CreateConvertQuoteResponse.js +21 -0
- package/dist/model/CreatePortfolioRequest.d.ts +25 -0
- package/dist/model/CreatePortfolioRequest.js +21 -0
- package/dist/model/CreatePortfolioResponse.d.ts +23 -0
- package/dist/model/CreatePortfolioResponse.js +21 -0
- package/dist/model/CustodialPool.d.ts +24 -0
- package/dist/model/CustodialPool.js +21 -0
- package/dist/model/DAppWalletAccount.d.ts +24 -0
- package/dist/model/DAppWalletAccount.js +21 -0
- package/dist/model/DAppWalletBlockchainAddress.d.ts +24 -0
- package/dist/model/DAppWalletBlockchainAddress.js +21 -0
- package/dist/model/DefaultAccount.d.ts +23 -0
- package/dist/model/DefaultAccount.js +21 -0
- package/dist/model/DenebIMPS.d.ts +30 -0
- package/dist/model/DenebIMPS.js +21 -0
- package/dist/model/DenebUPI.d.ts +29 -0
- package/dist/model/DenebUPI.js +21 -0
- package/dist/model/DerivativeSettlement.d.ts +25 -0
- package/dist/model/DerivativeSettlement.js +21 -0
- package/dist/model/DerivativeSettlementAccountSettlement.d.ts +33 -0
- package/dist/model/DerivativeSettlementAccountSettlement.js +21 -0
- package/dist/model/DerivativeSettlementEquityReset.d.ts +25 -0
- package/dist/model/DerivativeSettlementEquityReset.js +21 -0
- package/dist/model/DigitalWalletDetails.d.ts +23 -0
- package/dist/model/DigitalWalletDetails.js +21 -0
- package/dist/model/DirectDeposit.d.ts +22 -0
- package/dist/model/DirectDeposit.js +21 -0
- package/dist/model/Disclosure.d.ts +25 -0
- package/dist/model/Disclosure.js +21 -0
- package/dist/model/Edit.d.ts +30 -0
- package/dist/model/Edit.js +21 -0
- package/dist/model/EditOrderError.d.ts +25 -0
- package/dist/model/EditOrderError.js +21 -0
- package/dist/model/EditOrderErrorResponse.d.ts +30 -0
- package/dist/model/EditOrderErrorResponse.js +21 -0
- package/dist/model/EditOrderRequest.d.ts +33 -0
- package/dist/model/EditOrderRequest.js +21 -0
- package/dist/model/EditOrderResponse.d.ts +27 -0
- package/dist/model/EditOrderResponse.js +21 -0
- package/dist/model/EditOrderSuccessResponse.d.ts +25 -0
- package/dist/model/EditOrderSuccessResponse.js +21 -0
- package/dist/model/EditPortfolioRequest.d.ts +25 -0
- package/dist/model/EditPortfolioRequest.js +21 -0
- package/dist/model/EditPortfolioResponse.d.ts +23 -0
- package/dist/model/EditPortfolioResponse.js +21 -0
- package/dist/model/EmailAddress.d.ts +22 -0
- package/dist/model/EmailAddress.js +21 -0
- package/dist/model/Error.d.ts +30 -0
- package/dist/model/Error.js +21 -0
- package/dist/model/ExpiryDate.d.ts +23 -0
- package/dist/model/ExpiryDate.js +21 -0
- package/dist/model/ExtendedTimestamp.d.ts +33 -0
- package/dist/model/ExtendedTimestamp.js +21 -0
- package/dist/model/ExternalPaymentMethod.d.ts +22 -0
- package/dist/model/ExternalPaymentMethod.js +21 -0
- package/dist/model/FCMBalanceSummary.d.ts +73 -0
- package/dist/model/FCMBalanceSummary.js +21 -0
- package/dist/model/FCMPosition.d.ts +54 -0
- package/dist/model/FCMPosition.js +21 -0
- package/dist/model/FCMSweep.d.ts +43 -0
- package/dist/model/FCMSweep.js +21 -0
- package/dist/model/FcmMarginWindowMeasure.d.ts +51 -0
- package/dist/model/FcmMarginWindowMeasure.js +21 -0
- package/dist/model/FcmScheduledMaintenance.d.ts +26 -0
- package/dist/model/FcmScheduledMaintenance.js +21 -0
- package/dist/model/FcmTradingSessionDetails.d.ts +31 -0
- package/dist/model/FcmTradingSessionDetails.js +21 -0
- package/dist/model/Fedwire.d.ts +27 -0
- package/dist/model/Fedwire.js +21 -0
- package/dist/model/FedwireAccount.d.ts +25 -0
- package/dist/model/FedwireAccount.js +21 -0
- package/dist/model/FedwireAddress.d.ts +26 -0
- package/dist/model/FedwireAddress.js +21 -0
- package/dist/model/FedwireInstitution.d.ts +31 -0
- package/dist/model/FedwireInstitution.js +21 -0
- package/dist/model/Fee.d.ts +31 -0
- package/dist/model/Fee.js +21 -0
- package/dist/model/FeeTier.d.ts +49 -0
- package/dist/model/FeeTier.js +21 -0
- package/dist/model/Fill.d.ts +83 -0
- package/dist/model/Fill.js +21 -0
- package/dist/model/FirstDataToken.d.ts +23 -0
- package/dist/model/FirstDataToken.js +21 -0
- package/dist/model/FundMovement.d.ts +27 -0
- package/dist/model/FundMovement.js +21 -0
- package/dist/model/FutureProductDetails.d.ts +43 -0
- package/dist/model/FutureProductDetails.js +21 -0
- package/dist/model/FuturesPosition.d.ts +35 -0
- package/dist/model/FuturesPosition.js +21 -0
- package/dist/model/GetAccountResponse.d.ts +23 -0
- package/dist/model/GetAccountResponse.js +21 -0
- package/dist/model/GetAccountsResponse.d.ts +35 -0
- package/dist/model/GetAccountsResponse.js +21 -0
- package/dist/model/GetApiKeyPermissionsResponse.d.ts +42 -0
- package/dist/model/GetApiKeyPermissionsResponse.js +21 -0
- package/dist/model/GetBalanceSummaryResponse.d.ts +23 -0
- package/dist/model/GetBalanceSummaryResponse.js +21 -0
- package/dist/model/GetBestBidAskResponse.d.ts +23 -0
- package/dist/model/GetBestBidAskResponse.js +21 -0
- package/dist/model/GetCandlesResponse.d.ts +23 -0
- package/dist/model/GetCandlesResponse.js +21 -0
- package/dist/model/GetConvertTradeResponse.d.ts +23 -0
- package/dist/model/GetConvertTradeResponse.js +21 -0
- package/dist/model/GetCurrentMarginWindowResponse.d.ts +31 -0
- package/dist/model/GetCurrentMarginWindowResponse.js +21 -0
- package/dist/model/GetFCMBalanceSummaryResponse.d.ts +23 -0
- package/dist/model/GetFCMBalanceSummaryResponse.js +21 -0
- package/dist/model/GetFCMPositionResponse.d.ts +23 -0
- package/dist/model/GetFCMPositionResponse.js +21 -0
- package/dist/model/GetFCMPositionsResponse.d.ts +23 -0
- package/dist/model/GetFCMPositionsResponse.js +21 -0
- package/dist/model/GetFCMSweepsResponse.d.ts +23 -0
- package/dist/model/GetFCMSweepsResponse.js +21 -0
- package/dist/model/GetFillsResponse.d.ts +30 -0
- package/dist/model/GetFillsResponse.js +21 -0
- package/dist/model/GetHistoricalOrderResponse.d.ts +26 -0
- package/dist/model/GetHistoricalOrderResponse.js +21 -0
- package/dist/model/GetHistoricalOrdersResponse.d.ts +38 -0
- package/dist/model/GetHistoricalOrdersResponse.js +21 -0
- package/dist/model/GetIntradayMarginSettingResponse.d.ts +23 -0
- package/dist/model/GetIntradayMarginSettingResponse.js +21 -0
- package/dist/model/GetMarketTradesResponse.d.ts +31 -0
- package/dist/model/GetMarketTradesResponse.js +21 -0
- package/dist/model/GetPaymentMethodResponse.d.ts +23 -0
- package/dist/model/GetPaymentMethodResponse.js +21 -0
- package/dist/model/GetPaymentMethodsResponse.d.ts +23 -0
- package/dist/model/GetPaymentMethodsResponse.js +21 -0
- package/dist/model/GetPortfolioBreakdownResponse.d.ts +23 -0
- package/dist/model/GetPortfolioBreakdownResponse.js +21 -0
- package/dist/model/GetPortfoliosResponse.d.ts +25 -0
- package/dist/model/GetPortfoliosResponse.js +21 -0
- package/dist/model/GetPositionResponse.d.ts +23 -0
- package/dist/model/GetPositionResponse.js +21 -0
- package/dist/model/GetPositionsResponse.d.ts +25 -0
- package/dist/model/GetPositionsResponse.js +21 -0
- package/dist/model/GetProductBookResponse.d.ts +27 -0
- package/dist/model/GetProductBookResponse.js +21 -0
- package/dist/model/GetProductResponse.d.ts +23 -0
- package/dist/model/GetProductResponse.js +21 -0
- package/dist/model/GetProductsResponse.d.ts +23 -0
- package/dist/model/GetProductsResponse.js +21 -0
- package/dist/model/GetTransactionSummaryResponse.d.ts +61 -0
- package/dist/model/GetTransactionSummaryResponse.js +21 -0
- package/dist/model/GoodsAndServicesTax.d.ts +24 -0
- package/dist/model/GoodsAndServicesTax.js +21 -0
- package/dist/model/GooglePay.d.ts +40 -0
- package/dist/model/GooglePay.js +21 -0
- package/dist/model/GooglePayBraintreeData.d.ts +23 -0
- package/dist/model/GooglePayBraintreeData.js +21 -0
- package/dist/model/HistoricalMarketTrade.d.ts +50 -0
- package/dist/model/HistoricalMarketTrade.js +21 -0
- package/dist/model/Ideal.d.ts +27 -0
- package/dist/model/Ideal.js +21 -0
- package/dist/model/IdentityContractCall.d.ts +23 -0
- package/dist/model/IdentityContractCall.js +21 -0
- package/dist/model/Interac.d.ts +23 -0
- package/dist/model/Interac.js +21 -0
- package/dist/model/InteracAccount.d.ts +34 -0
- package/dist/model/InteracAccount.js +21 -0
- package/dist/model/IntraBank.d.ts +26 -0
- package/dist/model/IntraBank.js +21 -0
- package/dist/model/L2Level.d.ts +23 -0
- package/dist/model/L2Level.js +21 -0
- package/dist/model/LedgerAccount.d.ts +25 -0
- package/dist/model/LedgerAccount.js +21 -0
- package/dist/model/LedgerNamedAccount.d.ts +24 -0
- package/dist/model/LedgerNamedAccount.js +21 -0
- package/dist/model/LimitLimitFok.d.ts +29 -0
- package/dist/model/LimitLimitFok.js +21 -0
- package/dist/model/LimitLimitGtc.d.ts +33 -0
- package/dist/model/LimitLimitGtc.js +21 -0
- package/dist/model/LimitLimitGtd.d.ts +37 -0
- package/dist/model/LimitLimitGtd.js +21 -0
- package/dist/model/Link.d.ts +23 -0
- package/dist/model/Link.js +21 -0
- package/dist/model/LiquidationMarketGtc.d.ts +25 -0
- package/dist/model/LiquidationMarketGtc.js +21 -0
- package/dist/model/LiquidationMarketGtd.d.ts +29 -0
- package/dist/model/LiquidationMarketGtd.js +21 -0
- package/dist/model/LiquidityPool.d.ts +25 -0
- package/dist/model/LiquidityPool.js +21 -0
- package/dist/model/MarginWindow.d.ts +30 -0
- package/dist/model/MarginWindow.js +21 -0
- package/dist/model/MarketMarketIoc.d.ts +29 -0
- package/dist/model/MarketMarketIoc.js +21 -0
- package/dist/model/Merchant.d.ts +22 -0
- package/dist/model/Merchant.js +21 -0
- package/dist/model/Money.d.ts +26 -0
- package/dist/model/Money.js +21 -0
- package/dist/model/MovePortfolioFundsRequest.d.ts +34 -0
- package/dist/model/MovePortfolioFundsRequest.js +21 -0
- package/dist/model/MovePortfolioFundsResponse.d.ts +29 -0
- package/dist/model/MovePortfolioFundsResponse.js +21 -0
- package/dist/model/MultiAssetCollateralRequest.d.ts +29 -0
- package/dist/model/MultiAssetCollateralRequest.js +21 -0
- package/dist/model/MultiAssetCollateralResponse.d.ts +22 -0
- package/dist/model/MultiAssetCollateralResponse.js +21 -0
- package/dist/model/NewOrderErrorResponse.d.ts +43 -0
- package/dist/model/NewOrderErrorResponse.js +21 -0
- package/dist/model/NewOrderRequest.d.ts +56 -0
- package/dist/model/NewOrderRequest.js +21 -0
- package/dist/model/NewOrderResponse.d.ts +34 -0
- package/dist/model/NewOrderResponse.js +21 -0
- package/dist/model/NewOrderSuccessResponse.d.ts +38 -0
- package/dist/model/NewOrderSuccessResponse.js +21 -0
- package/dist/model/Order.d.ts +172 -0
- package/dist/model/Order.js +21 -0
- package/dist/model/OrderConfiguration.d.ts +66 -0
- package/dist/model/OrderConfiguration.js +21 -0
- package/dist/model/OrderPreviewRequest.d.ts +48 -0
- package/dist/model/OrderPreviewRequest.js +21 -0
- package/dist/model/OrderPreviewResponse.d.ts +59 -0
- package/dist/model/OrderPreviewResponse.js +21 -0
- package/dist/model/Owner.d.ts +26 -0
- package/dist/model/Owner.js +21 -0
- package/dist/model/PaymentMethod.d.ts +65 -0
- package/dist/model/PaymentMethod.js +21 -0
- package/dist/model/Paypal.d.ts +25 -0
- package/dist/model/Paypal.js +21 -0
- package/dist/model/PaypalAccount.d.ts +23 -0
- package/dist/model/PaypalAccount.js +21 -0
- package/dist/model/PaypalMerchant.d.ts +22 -0
- package/dist/model/PaypalMerchant.js +21 -0
- package/dist/model/PerpPosition.d.ts +44 -0
- package/dist/model/PerpPosition.js +21 -0
- package/dist/model/PerpetualProductDetails.d.ts +27 -0
- package/dist/model/PerpetualProductDetails.js +21 -0
- package/dist/model/PhoneNumber.d.ts +22 -0
- package/dist/model/PhoneNumber.js +21 -0
- package/dist/model/PixEbanx.d.ts +27 -0
- package/dist/model/PixEbanx.js +21 -0
- package/dist/model/PixEbanxPixDeposit.d.ts +23 -0
- package/dist/model/PixEbanxPixDeposit.js +21 -0
- package/dist/model/PixEbanxPixWithdrawal.d.ts +26 -0
- package/dist/model/PixEbanxPixWithdrawal.js +21 -0
- package/dist/model/PnlConfiguration.d.ts +23 -0
- package/dist/model/PnlConfiguration.js +21 -0
- package/dist/model/Portfolio.d.ts +80 -0
- package/dist/model/Portfolio.js +21 -0
- package/dist/model/PortfolioBalance.d.ts +25 -0
- package/dist/model/PortfolioBalance.js +21 -0
- package/dist/model/PortfolioBalances.d.ts +28 -0
- package/dist/model/PortfolioBalances.js +21 -0
- package/dist/model/PortfolioBreakdown.d.ts +31 -0
- package/dist/model/PortfolioBreakdown.js +21 -0
- package/dist/model/PortfolioPosition.d.ts +32 -0
- package/dist/model/PortfolioPosition.js +21 -0
- package/dist/model/PortfoliosSummary.d.ts +26 -0
- package/dist/model/PortfoliosSummary.js +21 -0
- package/dist/model/Position.d.ts +71 -0
- package/dist/model/Position.js +21 -0
- package/dist/model/PositionSummary.d.ts +23 -0
- package/dist/model/PositionSummary.js +21 -0
- package/dist/model/PreviewEditOrderResponse.d.ts +37 -0
- package/dist/model/PreviewEditOrderResponse.js +21 -0
- package/dist/model/PriceBook.d.ts +29 -0
- package/dist/model/PriceBook.js +21 -0
- package/dist/model/ProAccount.d.ts +26 -0
- package/dist/model/ProAccount.js +21 -0
- package/dist/model/ProInternalAccount.d.ts +23 -0
- package/dist/model/ProInternalAccount.js +21 -0
- package/dist/model/Product.d.ts +167 -0
- package/dist/model/Product.js +21 -0
- package/dist/model/Products.d.ts +30 -0
- package/dist/model/Products.js +21 -0
- package/dist/model/RatConvertTrade.d.ts +67 -0
- package/dist/model/RatConvertTrade.js +21 -0
- package/dist/model/Remitly.d.ts +23 -0
- package/dist/model/Remitly.js +21 -0
- package/dist/model/RemitlyAccount.d.ts +23 -0
- package/dist/model/RemitlyAccount.js +21 -0
- package/dist/model/Rtp.d.ts +28 -0
- package/dist/model/Rtp.js +21 -0
- package/dist/model/RtpAccount.d.ts +23 -0
- package/dist/model/RtpAccount.js +21 -0
- package/dist/model/RtpInstitution.d.ts +22 -0
- package/dist/model/RtpInstitution.js +21 -0
- package/dist/model/ScaledAmount.d.ts +24 -0
- package/dist/model/ScaledAmount.js +21 -0
- package/dist/model/ScheduleFCMSweepRequest.d.ts +25 -0
- package/dist/model/ScheduleFCMSweepRequest.js +21 -0
- package/dist/model/ScheduleFCMSweepResponse.d.ts +22 -0
- package/dist/model/ScheduleFCMSweepResponse.js +21 -0
- package/dist/model/Sepa.d.ts +29 -0
- package/dist/model/Sepa.js +21 -0
- package/dist/model/SepaAccount.d.ts +24 -0
- package/dist/model/SepaAccount.js +21 -0
- package/dist/model/SepaAccountDetail.d.ts +32 -0
- package/dist/model/SepaAccountDetail.js +21 -0
- package/dist/model/SepaInstitution.d.ts +23 -0
- package/dist/model/SepaInstitution.js +21 -0
- package/dist/model/SepaV2.d.ts +46 -0
- package/dist/model/SepaV2.js +21 -0
- package/dist/model/SetIntradayMarginSettingRequest.d.ts +26 -0
- package/dist/model/SetIntradayMarginSettingRequest.js +21 -0
- package/dist/model/SgFast.d.ts +28 -0
- package/dist/model/SgFast.js +21 -0
- package/dist/model/SgFastAccount.d.ts +23 -0
- package/dist/model/SgFastAccount.js +21 -0
- package/dist/model/SgFastInstitution.d.ts +22 -0
- package/dist/model/SgFastInstitution.js +21 -0
- package/dist/model/SgPayNow.d.ts +28 -0
- package/dist/model/SgPayNow.js +21 -0
- package/dist/model/Signet.d.ts +22 -0
- package/dist/model/Signet.js +21 -0
- package/dist/model/SingleProductGetProductBookConfig.d.ts +29 -0
- package/dist/model/SingleProductGetProductBookConfig.js +21 -0
- package/dist/model/Sofort.d.ts +27 -0
- package/dist/model/Sofort.js +21 -0
- package/dist/model/SorLimitIoc.d.ts +29 -0
- package/dist/model/SorLimitIoc.js +21 -0
- package/dist/model/StopLimitStopLimitGtc.d.ts +38 -0
- package/dist/model/StopLimitStopLimitGtc.js +21 -0
- package/dist/model/StopLimitStopLimitGtd.d.ts +42 -0
- package/dist/model/StopLimitStopLimitGtd.js +21 -0
- package/dist/model/SubscriptionInfo.d.ts +30 -0
- package/dist/model/SubscriptionInfo.js +21 -0
- package/dist/model/Swift.d.ts +26 -0
- package/dist/model/Swift.js +21 -0
- package/dist/model/SwiftAccount.d.ts +29 -0
- package/dist/model/SwiftAccount.js +21 -0
- package/dist/model/SwiftInstitution.d.ts +29 -0
- package/dist/model/SwiftInstitution.js +21 -0
- package/dist/model/TaxInfo.d.ts +24 -0
- package/dist/model/TaxInfo.js +21 -0
- package/dist/model/TradeIncentiveInfo.d.ts +28 -0
- package/dist/model/TradeIncentiveInfo.js +21 -0
- package/dist/model/TradeIncentiveMetadata.d.ts +29 -0
- package/dist/model/TradeIncentiveMetadata.js +21 -0
- package/dist/model/TriggerBracketGtc.d.ts +33 -0
- package/dist/model/TriggerBracketGtc.js +21 -0
- package/dist/model/TriggerBracketGtd.d.ts +37 -0
- package/dist/model/TriggerBracketGtd.js +21 -0
- package/dist/model/TriggerBracketPnl.d.ts +23 -0
- package/dist/model/TriggerBracketPnl.js +21 -0
- package/dist/model/TwapLimitGtd.d.ts +41 -0
- package/dist/model/TwapLimitGtd.js +21 -0
- package/dist/model/TypesDecimal.d.ts +28 -0
- package/dist/model/TypesDecimal.js +21 -0
- package/dist/model/Uk.d.ts +29 -0
- package/dist/model/Uk.js +21 -0
- package/dist/model/UkAccount.d.ts +25 -0
- package/dist/model/UkAccount.js +21 -0
- package/dist/model/UkInstitution.d.ts +22 -0
- package/dist/model/UkInstitution.js +21 -0
- package/dist/model/UnitPrice.d.ts +25 -0
- package/dist/model/UnitPrice.js +21 -0
- package/dist/model/User.d.ts +22 -0
- package/dist/model/User.js +21 -0
- package/dist/model/UserWarning.d.ts +28 -0
- package/dist/model/UserWarning.js +21 -0
- package/dist/model/UserWarningContext.d.ts +24 -0
- package/dist/model/UserWarningContext.js +21 -0
- package/dist/model/VaultToken.d.ts +23 -0
- package/dist/model/VaultToken.js +21 -0
- package/dist/model/VendorPayment.d.ts +23 -0
- package/dist/model/VendorPayment.js +21 -0
- package/dist/model/Venue.d.ts +22 -0
- package/dist/model/Venue.js +21 -0
- package/dist/model/WorldpayParams.d.ts +27 -0
- package/dist/model/WorldpayParams.js +21 -0
- package/dist/model/ZaakpayMobikwik.d.ts +25 -0
- package/dist/model/ZaakpayMobikwik.js +21 -0
- package/dist/model/Zengin.d.ts +28 -0
- package/dist/model/Zengin.js +21 -0
- package/dist/model/ZenginAccount.d.ts +24 -0
- package/dist/model/ZenginAccount.js +21 -0
- package/dist/model/ZenginInstitution.d.ts +23 -0
- package/dist/model/ZenginInstitution.js +21 -0
- package/dist/model/ZenginV2.d.ts +28 -0
- package/dist/model/ZenginV2.js +21 -0
- package/dist/model/ZenginV2Account.d.ts +24 -0
- package/dist/model/ZenginV2Account.js +21 -0
- package/dist/model/ZenginV2Institution.d.ts +23 -0
- package/dist/model/ZenginV2Institution.js +21 -0
- package/dist/model/Zepto.d.ts +26 -0
- package/dist/model/Zepto.js +21 -0
- package/dist/model/ZeptoAccount.d.ts +32 -0
- package/dist/model/ZeptoAccount.js +21 -0
- package/dist/model/enums/AccountPlatform.d.ts +25 -0
- package/dist/model/enums/AccountPlatform.js +29 -0
- package/dist/model/enums/AccountType.d.ts +26 -0
- package/dist/model/enums/AccountType.js +30 -0
- package/dist/model/enums/ApplePayResult.d.ts +24 -0
- package/dist/model/enums/ApplePayResult.js +28 -0
- package/dist/model/enums/ApplePayScheme.d.ts +24 -0
- package/dist/model/enums/ApplePayScheme.js +28 -0
- package/dist/model/enums/CancelOrderFailureReason.d.ts +31 -0
- package/dist/model/enums/CancelOrderFailureReason.js +35 -0
- package/dist/model/enums/CardScheme.d.ts +24 -0
- package/dist/model/enums/CardScheme.js +28 -0
- package/dist/model/enums/ContractExpiryType.d.ts +24 -0
- package/dist/model/enums/ContractExpiryType.js +28 -0
- package/dist/model/enums/EditOrderFailureReason.d.ts +35 -0
- package/dist/model/enums/EditOrderFailureReason.js +39 -0
- package/dist/model/enums/ErrorCodes.d.ts +44 -0
- package/dist/model/enums/ErrorCodes.js +48 -0
- package/dist/model/enums/ErrorCta.d.ts +29 -0
- package/dist/model/enums/ErrorCta.js +33 -0
- package/dist/model/enums/ExpiringContractStatus.d.ts +25 -0
- package/dist/model/enums/ExpiringContractStatus.js +29 -0
- package/dist/model/enums/FCMPositionSide.d.ts +24 -0
- package/dist/model/enums/FCMPositionSide.js +28 -0
- package/dist/model/enums/FCMSweepStatus.d.ts +24 -0
- package/dist/model/enums/FCMSweepStatus.js +28 -0
- package/dist/model/enums/FcmMarginWindowType.d.ts +26 -0
- package/dist/model/enums/FcmMarginWindowType.js +30 -0
- package/dist/model/enums/FcmTradingSessionClosedReason.d.ts +28 -0
- package/dist/model/enums/FcmTradingSessionClosedReason.js +32 -0
- package/dist/model/enums/FcmTradingSessionState.d.ts +26 -0
- package/dist/model/enums/FcmTradingSessionState.js +30 -0
- package/dist/model/enums/FedwireInstitutionType.d.ts +34 -0
- package/dist/model/enums/FedwireInstitutionType.js +38 -0
- package/dist/model/enums/FuturesPositionSide.d.ts +24 -0
- package/dist/model/enums/FuturesPositionSide.js +28 -0
- package/dist/model/enums/GetFillsRequestFillsSortBy.d.ts +24 -0
- package/dist/model/enums/GetFillsRequestFillsSortBy.js +28 -0
- package/dist/model/enums/GetHistoricalOrdersRequestHistoricalOrdersSortBy.d.ts +24 -0
- package/dist/model/enums/GetHistoricalOrdersRequestHistoricalOrdersSortBy.js +28 -0
- package/dist/model/enums/GooglePayResult.d.ts +24 -0
- package/dist/model/enums/GooglePayResult.js +28 -0
- package/dist/model/enums/GooglePayScheme.d.ts +24 -0
- package/dist/model/enums/GooglePayScheme.js +28 -0
- package/dist/model/enums/Granularity.d.ts +30 -0
- package/dist/model/enums/Granularity.js +34 -0
- package/dist/model/enums/GstType.d.ts +23 -0
- package/dist/model/enums/GstType.js +27 -0
- package/dist/model/enums/IntradayMarginSetting.d.ts +24 -0
- package/dist/model/enums/IntradayMarginSetting.js +28 -0
- package/dist/model/enums/LiquidityIndicator.d.ts +24 -0
- package/dist/model/enums/LiquidityIndicator.js +28 -0
- package/dist/model/enums/MarginLevelType.d.ts +26 -0
- package/dist/model/enums/MarginLevelType.js +30 -0
- package/dist/model/enums/MarginProfileType.d.ts +24 -0
- package/dist/model/enums/MarginProfileType.js +28 -0
- package/dist/model/enums/MarginType.d.ts +26 -0
- package/dist/model/enums/MarginType.js +30 -0
- package/dist/model/enums/MarginWindowType.d.ts +26 -0
- package/dist/model/enums/MarginWindowType.js +30 -0
- package/dist/model/enums/NewOrderFailureReason.d.ts +66 -0
- package/dist/model/enums/NewOrderFailureReason.js +70 -0
- package/dist/model/enums/OrderExecutionStatus.d.ts +30 -0
- package/dist/model/enums/OrderExecutionStatus.js +34 -0
- package/dist/model/enums/OrderPlacementSource.d.ts +24 -0
- package/dist/model/enums/OrderPlacementSource.js +28 -0
- package/dist/model/enums/OrderSide.d.ts +23 -0
- package/dist/model/enums/OrderSide.js +27 -0
- package/dist/model/enums/OrderType.d.ts +30 -0
- package/dist/model/enums/OrderType.js +34 -0
- package/dist/model/enums/OwnerType.d.ts +26 -0
- package/dist/model/enums/OwnerType.js +30 -0
- package/dist/model/enums/PaymentMethodType.d.ts +75 -0
- package/dist/model/enums/PaymentMethodType.js +79 -0
- package/dist/model/enums/PortfolioLiquidationStatus.d.ts +28 -0
- package/dist/model/enums/PortfolioLiquidationStatus.js +32 -0
- package/dist/model/enums/PortfolioMarginFlags.d.ts +23 -0
- package/dist/model/enums/PortfolioMarginFlags.js +27 -0
- package/dist/model/enums/PortfolioMarginType.d.ts +24 -0
- package/dist/model/enums/PortfolioMarginType.js +28 -0
- package/dist/model/enums/PortfolioType.d.ts +25 -0
- package/dist/model/enums/PortfolioType.js +29 -0
- package/dist/model/enums/PositionSide.d.ts +24 -0
- package/dist/model/enums/PositionSide.js +28 -0
- package/dist/model/enums/PreviewFailureReason.d.ts +95 -0
- package/dist/model/enums/PreviewFailureReason.js +99 -0
- package/dist/model/enums/PreviewWarningMsg.d.ts +24 -0
- package/dist/model/enums/PreviewWarningMsg.js +28 -0
- package/dist/model/enums/ProductType.d.ts +24 -0
- package/dist/model/enums/ProductType.js +28 -0
- package/dist/model/enums/ProductVenue.d.ts +25 -0
- package/dist/model/enums/ProductVenue.js +29 -0
- package/dist/model/enums/RejectReason.d.ts +26 -0
- package/dist/model/enums/RejectReason.js +30 -0
- package/dist/model/enums/RiskManagementType.d.ts +24 -0
- package/dist/model/enums/RiskManagementType.js +28 -0
- package/dist/model/enums/SgPayNowIdentifierType.d.ts +24 -0
- package/dist/model/enums/SgPayNowIdentifierType.js +28 -0
- package/dist/model/enums/StopPriceDirection.d.ts +23 -0
- package/dist/model/enums/StopPriceDirection.js +27 -0
- package/dist/model/enums/StopTriggerStatus.d.ts +25 -0
- package/dist/model/enums/StopTriggerStatus.js +29 -0
- package/dist/model/enums/TimeInForceType.d.ts +26 -0
- package/dist/model/enums/TimeInForceType.js +30 -0
- package/dist/model/enums/TradeStatus.d.ts +26 -0
- package/dist/model/enums/TradeStatus.js +30 -0
- package/dist/rest/accounts/index.d.ts +14 -0
- package/dist/rest/accounts/index.js +37 -0
- package/dist/rest/accounts/types.d.ts +11 -0
- package/dist/rest/accounts/types.js +2 -0
- package/dist/rest/client.d.ts +20 -0
- package/dist/rest/client.js +31 -0
- package/dist/rest/convert/index.d.ts +16 -0
- package/dist/rest/convert/index.js +55 -0
- package/dist/rest/convert/types.d.ts +25 -0
- package/dist/rest/convert/types.js +2 -0
- package/dist/rest/credentials/index.d.ts +6 -0
- package/dist/rest/credentials/index.js +80 -0
- package/dist/rest/data/index.d.ts +12 -0
- package/dist/rest/data/index.js +27 -0
- package/dist/rest/data/types.d.ts +3 -0
- package/dist/rest/data/types.js +2 -0
- package/dist/rest/errors/index.d.ts +22 -0
- package/dist/rest/errors/index.js +31 -0
- package/dist/rest/fees/index.d.ts +12 -0
- package/dist/rest/fees/index.js +28 -0
- package/dist/rest/fees/types.d.ts +10 -0
- package/dist/rest/fees/types.js +2 -0
- package/dist/rest/futures/index.d.ts +28 -0
- package/dist/rest/futures/index.js +106 -0
- package/dist/rest/futures/types.d.ts +35 -0
- package/dist/rest/futures/types.js +2 -0
- package/dist/rest/orders/index.d.ts +28 -0
- package/dist/rest/orders/index.js +114 -0
- package/dist/rest/orders/types.d.ts +71 -0
- package/dist/rest/orders/types.js +2 -0
- package/dist/rest/paymentMethods/index.d.ts +14 -0
- package/dist/rest/paymentMethods/index.js +36 -0
- package/dist/rest/paymentMethods/types.d.ts +9 -0
- package/dist/rest/paymentMethods/types.js +2 -0
- package/dist/rest/perpetuals/index.d.ts +22 -0
- package/dist/rest/perpetuals/index.js +77 -0
- package/dist/rest/perpetuals/types.d.ts +28 -0
- package/dist/rest/perpetuals/types.js +2 -0
- package/dist/rest/portfolios/index.d.ts +22 -0
- package/dist/rest/portfolios/index.js +81 -0
- package/dist/rest/portfolios/types.d.ts +27 -0
- package/dist/rest/portfolios/types.js +2 -0
- package/dist/rest/products/index.d.ts +22 -0
- package/dist/rest/products/index.js +96 -0
- package/dist/rest/products/types.d.ts +52 -0
- package/dist/rest/products/types.js +2 -0
- package/dist/rest/public/index.d.ts +22 -0
- package/dist/rest/public/index.js +76 -0
- package/dist/rest/public/types.d.ts +46 -0
- package/dist/rest/public/types.js +2 -0
- package/dist/rest/shared/toCamelCase.d.ts +1 -0
- package/dist/rest/shared/toCamelCase.js +23 -0
- package/package.json +36 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
export declare enum StopTriggerStatus {
|
|
21
|
+
UnknownTriggerStatus = "UNKNOWN_TRIGGER_STATUS",
|
|
22
|
+
InvalidOrderType = "INVALID_ORDER_TYPE",
|
|
23
|
+
StopPending = "STOP_PENDING",
|
|
24
|
+
StopTriggered = "STOP_TRIGGERED"
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.StopTriggerStatus = void 0;
|
|
23
|
+
var StopTriggerStatus;
|
|
24
|
+
(function (StopTriggerStatus) {
|
|
25
|
+
StopTriggerStatus["UnknownTriggerStatus"] = "UNKNOWN_TRIGGER_STATUS";
|
|
26
|
+
StopTriggerStatus["InvalidOrderType"] = "INVALID_ORDER_TYPE";
|
|
27
|
+
StopTriggerStatus["StopPending"] = "STOP_PENDING";
|
|
28
|
+
StopTriggerStatus["StopTriggered"] = "STOP_TRIGGERED";
|
|
29
|
+
})(StopTriggerStatus || (exports.StopTriggerStatus = StopTriggerStatus = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
export declare enum TimeInForceType {
|
|
21
|
+
UnknownTimeInForce = "UNKNOWN_TIME_IN_FORCE",
|
|
22
|
+
GoodUntilDateTime = "GOOD_UNTIL_DATE_TIME",
|
|
23
|
+
GoodUntilCancelled = "GOOD_UNTIL_CANCELLED",
|
|
24
|
+
ImmediateOrCancel = "IMMEDIATE_OR_CANCEL",
|
|
25
|
+
FillOrKill = "FILL_OR_KILL"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.TimeInForceType = void 0;
|
|
23
|
+
var TimeInForceType;
|
|
24
|
+
(function (TimeInForceType) {
|
|
25
|
+
TimeInForceType["UnknownTimeInForce"] = "UNKNOWN_TIME_IN_FORCE";
|
|
26
|
+
TimeInForceType["GoodUntilDateTime"] = "GOOD_UNTIL_DATE_TIME";
|
|
27
|
+
TimeInForceType["GoodUntilCancelled"] = "GOOD_UNTIL_CANCELLED";
|
|
28
|
+
TimeInForceType["ImmediateOrCancel"] = "IMMEDIATE_OR_CANCEL";
|
|
29
|
+
TimeInForceType["FillOrKill"] = "FILL_OR_KILL";
|
|
30
|
+
})(TimeInForceType || (exports.TimeInForceType = TimeInForceType = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
export declare enum TradeStatus {
|
|
21
|
+
Unspecified = "TRADE_STATUS_UNSPECIFIED",
|
|
22
|
+
Created = "TRADE_STATUS_CREATED",
|
|
23
|
+
Started = "TRADE_STATUS_STARTED",
|
|
24
|
+
Completed = "TRADE_STATUS_COMPLETED",
|
|
25
|
+
Canceled = "TRADE_STATUS_CANCELED"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generato
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.TradeStatus = void 0;
|
|
23
|
+
var TradeStatus;
|
|
24
|
+
(function (TradeStatus) {
|
|
25
|
+
TradeStatus["Unspecified"] = "TRADE_STATUS_UNSPECIFIED";
|
|
26
|
+
TradeStatus["Created"] = "TRADE_STATUS_CREATED";
|
|
27
|
+
TradeStatus["Started"] = "TRADE_STATUS_STARTED";
|
|
28
|
+
TradeStatus["Completed"] = "TRADE_STATUS_COMPLETED";
|
|
29
|
+
TradeStatus["Canceled"] = "TRADE_STATUS_CANCELED";
|
|
30
|
+
})(TradeStatus || (exports.TradeStatus = TradeStatus = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
2
|
+
import { GetAccountRequest, GetAccountResponse, ListAccountsRequest, ListAccountsResponse } from './types';
|
|
3
|
+
import { CoinbaseAdvTradeClient } from '../client';
|
|
4
|
+
import { CoinbaseAdvTradeClientException, CoinbaseAdvTradeException } from '../errors';
|
|
5
|
+
export interface IAccountsService {
|
|
6
|
+
getAccount(request: GetAccountRequest, options?: CoinbaseCallOptions): Promise<GetAccountResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
7
|
+
listAccounts(request: ListAccountsRequest, options?: CoinbaseCallOptions): Promise<ListAccountsResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
8
|
+
}
|
|
9
|
+
export declare class AccountsService implements IAccountsService {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: CoinbaseAdvTradeClient);
|
|
12
|
+
getAccount(request: GetAccountRequest, options?: CoinbaseCallOptions): Promise<GetAccountResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
13
|
+
listAccounts(request: ListAccountsRequest, options?: CoinbaseCallOptions): Promise<ListAccountsResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AccountsService = void 0;
|
|
13
|
+
class AccountsService {
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
getAccount(request, options) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield this.client.request({
|
|
20
|
+
url: `accounts/${request.accountUuid}`,
|
|
21
|
+
callOptions: options,
|
|
22
|
+
});
|
|
23
|
+
return response.data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
listAccounts(request, options) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const response = yield this.client.request({
|
|
29
|
+
url: `accounts`,
|
|
30
|
+
queryParams: request,
|
|
31
|
+
callOptions: options,
|
|
32
|
+
});
|
|
33
|
+
return response.data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.AccountsService = AccountsService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetAccountResponse as GetAccountResp } from '../../model/GetAccountResponse';
|
|
2
|
+
import { GetAccountsResponse } from '../../model/GetAccountsResponse';
|
|
3
|
+
export type GetAccountRequest = {
|
|
4
|
+
accountUuid: string;
|
|
5
|
+
};
|
|
6
|
+
export type GetAccountResponse = GetAccountResp;
|
|
7
|
+
export type ListAccountsRequest = {
|
|
8
|
+
limit?: number;
|
|
9
|
+
cursor?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ListAccountsResponse = GetAccountsResponse;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { CoinbaseClient } from '@coinbase-sample/core-ts';
|
|
17
|
+
import { CoinbaseAdvTradeCredentials } from './credentials';
|
|
18
|
+
export declare class CoinbaseAdvTradeClient extends CoinbaseClient {
|
|
19
|
+
constructor(credentials?: CoinbaseAdvTradeCredentials, apiBasePath?: string);
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoinbaseAdvTradeClient = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
const core_ts_1 = require("@coinbase-sample/core-ts");
|
|
20
|
+
const constants_1 = require("../constants");
|
|
21
|
+
const toCamelCase_1 = require("./shared/toCamelCase");
|
|
22
|
+
class CoinbaseAdvTradeClient extends core_ts_1.CoinbaseClient {
|
|
23
|
+
constructor(credentials, apiBasePath) {
|
|
24
|
+
super(apiBasePath !== null && apiBasePath !== void 0 ? apiBasePath : constants_1.API_BASE_PATH, credentials, constants_1.USER_AGENT);
|
|
25
|
+
// transform the response data to camelCase
|
|
26
|
+
this.addTransformResponse((response) => {
|
|
27
|
+
return Object.assign(Object.assign({}, response), { data: (0, toCamelCase_1.toCamelCase)(response.data) });
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CoinbaseAdvTradeClient = CoinbaseAdvTradeClient;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
2
|
+
import { CreateConvertQuoteRequest, CreateConvertQuoteResponse, CommitConvertTradeRequest, CommitConvertTradeResponse, GetConvertTradeRequest, GetConvertTradeResponse } from './types';
|
|
3
|
+
import { CoinbaseAdvTradeClient } from '../client';
|
|
4
|
+
import { CoinbaseAdvTradeClientException, CoinbaseAdvTradeException } from '../errors';
|
|
5
|
+
export interface IConvertsService {
|
|
6
|
+
createConvertQuote(request: CreateConvertQuoteRequest, options?: CoinbaseCallOptions): Promise<CreateConvertQuoteResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
7
|
+
commitConvertTrade(request: CommitConvertTradeRequest, options?: CoinbaseCallOptions): Promise<CommitConvertTradeResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
8
|
+
GetConvertTrade(request: GetConvertTradeRequest, options?: CoinbaseCallOptions): Promise<GetConvertTradeResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ConvertsService implements IConvertsService {
|
|
11
|
+
private client;
|
|
12
|
+
constructor(client: CoinbaseAdvTradeClient);
|
|
13
|
+
createConvertQuote(request: CreateConvertQuoteRequest, options?: CoinbaseCallOptions): Promise<CreateConvertQuoteResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
14
|
+
commitConvertTrade(request: CommitConvertTradeRequest, options?: CoinbaseCallOptions): Promise<CommitConvertTradeResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
15
|
+
GetConvertTrade(request: GetConvertTradeRequest, options?: CoinbaseCallOptions): Promise<GetConvertTradeResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ConvertsService = void 0;
|
|
13
|
+
const core_ts_1 = require("@coinbase-sample/core-ts");
|
|
14
|
+
class ConvertsService {
|
|
15
|
+
constructor(client) {
|
|
16
|
+
this.client = client;
|
|
17
|
+
}
|
|
18
|
+
createConvertQuote(request, options) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const response = yield this.client.request({
|
|
21
|
+
url: `convert/quote`,
|
|
22
|
+
method: core_ts_1.Method.POST,
|
|
23
|
+
bodyParams: request,
|
|
24
|
+
callOptions: options,
|
|
25
|
+
});
|
|
26
|
+
return response.data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
commitConvertTrade(request, options) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const response = yield this.client.request({
|
|
32
|
+
url: `convert/trade/${request.tradeId}`,
|
|
33
|
+
method: core_ts_1.Method.POST,
|
|
34
|
+
bodyParams: request,
|
|
35
|
+
callOptions: options,
|
|
36
|
+
});
|
|
37
|
+
return response.data;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
GetConvertTrade(request, options) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const queryParams = {
|
|
43
|
+
fromAccount: request.fromAccount,
|
|
44
|
+
toAccount: request.toAccount,
|
|
45
|
+
};
|
|
46
|
+
const response = yield this.client.request({
|
|
47
|
+
url: `convert/trade/${request.tradeId}`,
|
|
48
|
+
queryParams,
|
|
49
|
+
callOptions: options,
|
|
50
|
+
});
|
|
51
|
+
return response.data;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ConvertsService = ConvertsService;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CreateConvertQuoteResponse as createInt } from '../../model/CreateConvertQuoteResponse';
|
|
2
|
+
import { CommitConvertTradeResponse as commitInt } from '../../model/CommitConvertTradeResponse';
|
|
3
|
+
import { GetConvertTradeResponse as getInt } from '../../model/GetConvertTradeResponse';
|
|
4
|
+
export type CreateConvertQuoteRequest = {
|
|
5
|
+
fromAccount: string;
|
|
6
|
+
toAccount: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
tradeIncentiveMetadata?: {
|
|
9
|
+
userIcentiveId?: string;
|
|
10
|
+
codeVal?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type CreateConvertQuoteResponse = createInt;
|
|
14
|
+
export type CommitConvertTradeRequest = {
|
|
15
|
+
tradeId: string;
|
|
16
|
+
fromAccount: string;
|
|
17
|
+
toAccount: string;
|
|
18
|
+
};
|
|
19
|
+
export type CommitConvertTradeResponse = commitInt;
|
|
20
|
+
export type GetConvertTradeRequest = {
|
|
21
|
+
tradeId: string;
|
|
22
|
+
fromAccount: string;
|
|
23
|
+
toAccount: string;
|
|
24
|
+
};
|
|
25
|
+
export type GetConvertTradeResponse = getInt;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CoinbaseAdvTradeCredentials = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
29
|
+
*
|
|
30
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License.
|
|
32
|
+
* You may obtain a copy of the License at
|
|
33
|
+
*
|
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35
|
+
*
|
|
36
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
37
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
38
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
|
+
* See the License for the specific language governing permissions and
|
|
40
|
+
* limitations under the License.
|
|
41
|
+
*/
|
|
42
|
+
const constants_1 = require("../../constants");
|
|
43
|
+
const jwt = __importStar(require("jsonwebtoken"));
|
|
44
|
+
const crypto = __importStar(require("crypto"));
|
|
45
|
+
class CoinbaseAdvTradeCredentials {
|
|
46
|
+
constructor(key, secret) {
|
|
47
|
+
if (!key || !secret) {
|
|
48
|
+
console.log('Could not authenticate. Only public endpoints accessible.');
|
|
49
|
+
}
|
|
50
|
+
this.accessKey = key;
|
|
51
|
+
this.secretKey = secret;
|
|
52
|
+
}
|
|
53
|
+
generateAuthHeaders(requestMethod, uri) {
|
|
54
|
+
if (!this.secretKey || !this.accessKey) {
|
|
55
|
+
return {};
|
|
56
|
+
}
|
|
57
|
+
// Drop protocol and query parameters
|
|
58
|
+
const jwtUri = `${requestMethod} ${uri.replace('https://', '').replace('http://', '').split('?')[0]}`;
|
|
59
|
+
const payload = {
|
|
60
|
+
iss: constants_1.JWT_ISSUER,
|
|
61
|
+
nbf: Math.floor(Date.now() / 1000),
|
|
62
|
+
exp: Math.floor(Date.now() / 1000) + 120,
|
|
63
|
+
sub: this.accessKey,
|
|
64
|
+
uri: jwtUri,
|
|
65
|
+
};
|
|
66
|
+
const header = {
|
|
67
|
+
alg: constants_1.ALGORITHM,
|
|
68
|
+
kid: this.accessKey,
|
|
69
|
+
nonce: crypto.randomBytes(16).toString('hex'),
|
|
70
|
+
};
|
|
71
|
+
const signature = jwt.sign(payload, this.secretKey, {
|
|
72
|
+
algorithm: constants_1.ALGORITHM,
|
|
73
|
+
header,
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
Authorization: `Bearer ${signature}`,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.CoinbaseAdvTradeCredentials = CoinbaseAdvTradeCredentials;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
2
|
+
import { GetAPIKeyPermissionsRequest, GetAPIKeyPermissionsResponse } from './types';
|
|
3
|
+
import { CoinbaseAdvTradeClient } from '../client';
|
|
4
|
+
import { CoinbaseAdvTradeClientException, CoinbaseAdvTradeException } from '../errors';
|
|
5
|
+
export interface IDataService {
|
|
6
|
+
getAPIKeyPermissions(request: GetAPIKeyPermissionsRequest, options?: CoinbaseCallOptions): Promise<GetAPIKeyPermissionsResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
7
|
+
}
|
|
8
|
+
export declare class DataService implements IDataService {
|
|
9
|
+
private client;
|
|
10
|
+
constructor(client: CoinbaseAdvTradeClient);
|
|
11
|
+
getAPIKeyPermissions(request: GetAPIKeyPermissionsRequest, options?: CoinbaseCallOptions): Promise<GetAPIKeyPermissionsResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DataService = void 0;
|
|
13
|
+
class DataService {
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
getAPIKeyPermissions(request, options) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield this.client.request({
|
|
20
|
+
url: `key_permissions`,
|
|
21
|
+
callOptions: options,
|
|
22
|
+
});
|
|
23
|
+
return response.data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.DataService = DataService;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { CoinbaseClientException, CoinbaseError, CoinbaseResponse } from '@coinbase-sample/core-ts';
|
|
17
|
+
export declare class CoinbaseAdvTradeClientException extends CoinbaseClientException {
|
|
18
|
+
constructor(message: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class CoinbaseAdvTradeException extends CoinbaseError {
|
|
21
|
+
constructor(message: string, statusCode: number, response: CoinbaseResponse);
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoinbaseAdvTradeException = exports.CoinbaseAdvTradeClientException = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2024-present Coinbase Global, Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
const core_ts_1 = require("@coinbase-sample/core-ts");
|
|
20
|
+
class CoinbaseAdvTradeClientException extends core_ts_1.CoinbaseClientException {
|
|
21
|
+
constructor(message) {
|
|
22
|
+
super(message);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.CoinbaseAdvTradeClientException = CoinbaseAdvTradeClientException;
|
|
26
|
+
class CoinbaseAdvTradeException extends core_ts_1.CoinbaseError {
|
|
27
|
+
constructor(message, statusCode, response) {
|
|
28
|
+
super(message, statusCode, response);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CoinbaseAdvTradeException = CoinbaseAdvTradeException;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
2
|
+
import { GetTransactionsSummaryRequest, GetTransactionsSummaryResponse } from './types';
|
|
3
|
+
import { CoinbaseAdvTradeClient } from '../client';
|
|
4
|
+
import { CoinbaseAdvTradeClientException, CoinbaseAdvTradeException } from '../errors';
|
|
5
|
+
export interface IFeesService {
|
|
6
|
+
getTransactionSummary(request: GetTransactionsSummaryRequest, options?: CoinbaseCallOptions): Promise<GetTransactionsSummaryResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
7
|
+
}
|
|
8
|
+
export declare class FeesService implements IFeesService {
|
|
9
|
+
private client;
|
|
10
|
+
constructor(client: CoinbaseAdvTradeClient);
|
|
11
|
+
getTransactionSummary(request: GetTransactionsSummaryRequest, options?: CoinbaseCallOptions): Promise<GetTransactionsSummaryResponse | CoinbaseAdvTradeClientException | CoinbaseAdvTradeException>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FeesService = void 0;
|
|
13
|
+
class FeesService {
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
getTransactionSummary(request, options) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield this.client.request({
|
|
20
|
+
url: `transaction_summary`,
|
|
21
|
+
queryParams: request,
|
|
22
|
+
callOptions: options,
|
|
23
|
+
});
|
|
24
|
+
return response.data;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.FeesService = FeesService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContractExpiryType } from '../../model/enums/ContractExpiryType';
|
|
2
|
+
import { ProductType } from '../../model/enums/ProductType';
|
|
3
|
+
import { ProductVenue } from '../../model/enums/ProductVenue';
|
|
4
|
+
import { GetTransactionSummaryResponse } from '../../model/GetTransactionSummaryResponse';
|
|
5
|
+
export type GetTransactionsSummaryRequest = {
|
|
6
|
+
productType: ProductType;
|
|
7
|
+
contractExpiryType: ContractExpiryType;
|
|
8
|
+
productVenue: ProductVenue;
|
|
9
|
+
};
|
|
10
|
+
export type GetTransactionsSummaryResponse = GetTransactionSummaryResponse;
|