@katanaperps/katana-perps-sdk 0.0.0-placeholder
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/.nvmrc +1 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/abis/ERC20.json +288 -0
- package/dist/abis/EarningsEscrow.json +468 -0
- package/dist/abis/Exchange_v1.json +3644 -0
- package/dist/abis/IOFT.json +447 -0
- package/dist/bridge/config.d.ts +262 -0
- package/dist/bridge/config.d.ts.map +1 -0
- package/dist/bridge/config.js +221 -0
- package/dist/bridge/deposit.d.ts +107 -0
- package/dist/bridge/deposit.d.ts.map +1 -0
- package/dist/bridge/deposit.js +284 -0
- package/dist/bridge/index.d.ts +5 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +7 -0
- package/dist/bridge/utils.d.ts +140 -0
- package/dist/bridge/utils.d.ts.map +1 -0
- package/dist/bridge/utils.js +66 -0
- package/dist/bridge/withdraw.d.ts +42 -0
- package/dist/bridge/withdraw.d.ts.map +1 -0
- package/dist/bridge/withdraw.js +86 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +6 -0
- package/dist/client/orderBook/index.d.ts +2 -0
- package/dist/client/orderBook/index.d.ts.map +1 -0
- package/dist/client/orderBook/index.js +4 -0
- package/dist/client/orderBook/realTime.d.ts +180 -0
- package/dist/client/orderBook/realTime.d.ts.map +1 -0
- package/dist/client/orderBook/realTime.js +344 -0
- package/dist/client/orderBook/utils.d.ts +15 -0
- package/dist/client/orderBook/utils.d.ts.map +1 -0
- package/dist/client/orderBook/utils.js +77 -0
- package/dist/client/rest/authenticated.d.ts +1199 -0
- package/dist/client/rest/authenticated.d.ts.map +1 -0
- package/dist/client/rest/authenticated.js +1311 -0
- package/dist/client/rest/index.d.ts +3 -0
- package/dist/client/rest/index.d.ts.map +1 -0
- package/dist/client/rest/index.js +5 -0
- package/dist/client/rest/public.d.ts +436 -0
- package/dist/client/rest/public.d.ts.map +1 -0
- package/dist/client/rest/public.js +502 -0
- package/dist/client/webSocket/guards.d.ts +15 -0
- package/dist/client/webSocket/guards.d.ts.map +1 -0
- package/dist/client/webSocket/guards.js +37 -0
- package/dist/client/webSocket/index.d.ts +632 -0
- package/dist/client/webSocket/index.d.ts.map +1 -0
- package/dist/client/webSocket/index.js +1048 -0
- package/dist/client/webSocket/transform.d.ts +3 -0
- package/dist/client/webSocket/transform.d.ts.map +1 -0
- package/dist/client/webSocket/transform.js +244 -0
- package/dist/constants.d.ts +34 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +38 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/orderbook/apiConversions.d.ts +8 -0
- package/dist/orderbook/apiConversions.d.ts.map +1 -0
- package/dist/orderbook/apiConversions.js +100 -0
- package/dist/orderbook/demo.d.ts +2 -0
- package/dist/orderbook/demo.d.ts.map +1 -0
- package/dist/orderbook/demo.js +68 -0
- package/dist/orderbook/index.d.ts +3 -0
- package/dist/orderbook/index.d.ts.map +1 -0
- package/dist/orderbook/index.js +5 -0
- package/dist/orderbook/quantities.d.ts +112 -0
- package/dist/orderbook/quantities.d.ts.map +1 -0
- package/dist/orderbook/quantities.js +257 -0
- package/dist/orderbook/utils.d.ts +8 -0
- package/dist/orderbook/utils.d.ts.map +1 -0
- package/dist/orderbook/utils.js +28 -0
- package/dist/pipmath.d.ts +21 -0
- package/dist/pipmath.d.ts.map +1 -0
- package/dist/pipmath.js +110 -0
- package/dist/signatures.d.ts +37 -0
- package/dist/signatures.d.ts.map +1 -0
- package/dist/signatures.js +450 -0
- package/dist/tests/orderbook/quantities/calculateInitialMarginFractionWithOverride.test.d.ts +2 -0
- package/dist/tests/orderbook/quantities/calculateInitialMarginFractionWithOverride.test.d.ts.map +1 -0
- package/dist/tests/orderbook/quantities/calculateInitialMarginFractionWithOverride.test.js +49 -0
- package/dist/tests/orderbook/quantities/calculateMaximumInitialMarginFractionOverride.test.d.ts +2 -0
- package/dist/tests/orderbook/quantities/calculateMaximumInitialMarginFractionOverride.test.d.ts.map +1 -0
- package/dist/tests/orderbook/quantities/calculateMaximumInitialMarginFractionOverride.test.js +122 -0
- package/dist/tests/orderbook/quantities/determineMaximumReduceOnlyQuantityAvailableAtPriceLevel.test.d.ts +2 -0
- package/dist/tests/orderbook/quantities/determineMaximumReduceOnlyQuantityAvailableAtPriceLevel.test.d.ts.map +1 -0
- package/dist/tests/orderbook/quantities/determineMaximumReduceOnlyQuantityAvailableAtPriceLevel.test.js +138 -0
- package/dist/tests/orderbook/quantities.test.d.ts +2 -0
- package/dist/tests/orderbook/quantities.test.d.ts.map +1 -0
- package/dist/tests/orderbook/quantities.test.js +310 -0
- package/dist/tests/testHelpers.d.ts +2 -0
- package/dist/tests/testHelpers.d.ts.map +1 -0
- package/dist/tests/testHelpers.js +16 -0
- package/dist/tests/utils/deriveBaseURL.test.d.ts +2 -0
- package/dist/tests/utils/deriveBaseURL.test.d.ts.map +1 -0
- package/dist/tests/utils/deriveBaseURL.test.js +46 -0
- package/dist/typechain-types/ERC20.d.ts +170 -0
- package/dist/typechain-types/ERC20.d.ts.map +1 -0
- package/dist/typechain-types/ERC20.js +2 -0
- package/dist/typechain-types/EarningsEscrow.d.ts +210 -0
- package/dist/typechain-types/EarningsEscrow.d.ts.map +1 -0
- package/dist/typechain-types/EarningsEscrow.js +2 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter.d.ts +253 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter.d.ts.map +1 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter.js +2 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v2.d.ts +338 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v2.d.ts.map +1 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v2.js +2 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v3.d.ts +413 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v3.d.ts.map +1 -0
- package/dist/typechain-types/ExchangeLayerZeroAdapter_v3.js +2 -0
- package/dist/typechain-types/Exchange_v1.d.ts +2172 -0
- package/dist/typechain-types/Exchange_v1.d.ts.map +1 -0
- package/dist/typechain-types/Exchange_v1.js +2 -0
- package/dist/typechain-types/Exchange_v2.d.ts +2148 -0
- package/dist/typechain-types/Exchange_v2.d.ts.map +1 -0
- package/dist/typechain-types/Exchange_v2.js +2 -0
- package/dist/typechain-types/FixedIncomeVaultProviderStateAggregator_v1.d.ts +148 -0
- package/dist/typechain-types/FixedIncomeVaultProviderStateAggregator_v1.d.ts.map +1 -0
- package/dist/typechain-types/FixedIncomeVaultProviderStateAggregator_v1.js +2 -0
- package/dist/typechain-types/FixedIncomeVaultProvider_v1.d.ts +1204 -0
- package/dist/typechain-types/FixedIncomeVaultProvider_v1.d.ts.map +1 -0
- package/dist/typechain-types/FixedIncomeVaultProvider_v1.js +2 -0
- package/dist/typechain-types/IOFT.d.ts +247 -0
- package/dist/typechain-types/IOFT.d.ts.map +1 -0
- package/dist/typechain-types/IOFT.js +2 -0
- package/dist/typechain-types/IRewardVault.d.ts +649 -0
- package/dist/typechain-types/IRewardVault.d.ts.map +1 -0
- package/dist/typechain-types/IRewardVault.js +2 -0
- package/dist/typechain-types/KumaOFTAdapterUSDC.d.ts +638 -0
- package/dist/typechain-types/KumaOFTAdapterUSDC.d.ts.map +1 -0
- package/dist/typechain-types/KumaOFTAdapterUSDC.js +2 -0
- package/dist/typechain-types/KumaOFTUSDC.d.ts +756 -0
- package/dist/typechain-types/KumaOFTUSDC.d.ts.map +1 -0
- package/dist/typechain-types/KumaOFTUSDC.js +2 -0
- package/dist/typechain-types/KumaStargateForwarder_v1.d.ts +252 -0
- package/dist/typechain-types/KumaStargateForwarder_v1.d.ts.map +1 -0
- package/dist/typechain-types/KumaStargateForwarder_v1.js +2 -0
- package/dist/typechain-types/KumaStargateForwarder_v2.d.ts +252 -0
- package/dist/typechain-types/KumaStargateForwarder_v2.d.ts.map +1 -0
- package/dist/typechain-types/KumaStargateForwarder_v2.js +2 -0
- package/dist/typechain-types/ProfitShareVaultProvider_v1.d.ts +1095 -0
- package/dist/typechain-types/ProfitShareVaultProvider_v1.d.ts.map +1 -0
- package/dist/typechain-types/ProfitShareVaultProvider_v1.js +2 -0
- package/dist/typechain-types/StargatePoolUSDC.d.ts +956 -0
- package/dist/typechain-types/StargatePoolUSDC.d.ts.map +1 -0
- package/dist/typechain-types/StargatePoolUSDC.js +2 -0
- package/dist/typechain-types/common.d.ts +51 -0
- package/dist/typechain-types/common.d.ts.map +1 -0
- package/dist/typechain-types/common.js +2 -0
- package/dist/typechain-types/factories/ERC20__factory.d.ts +226 -0
- package/dist/typechain-types/factories/ERC20__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/ERC20__factory.js +305 -0
- package/dist/typechain-types/factories/EarningsEscrow__factory.d.ts +370 -0
- package/dist/typechain-types/factories/EarningsEscrow__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/EarningsEscrow__factory.js +485 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter__factory.d.ts +359 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter__factory.js +471 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v2__factory.d.ts +419 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v2__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v2__factory.js +545 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v3__factory.d.ts +546 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v3__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v3__factory.js +710 -0
- package/dist/typechain-types/factories/Exchange_v1__factory.d.ts +2852 -0
- package/dist/typechain-types/factories/Exchange_v1__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/Exchange_v1__factory.js +3661 -0
- package/dist/typechain-types/factories/Exchange_v2__factory.d.ts +2832 -0
- package/dist/typechain-types/factories/Exchange_v2__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/Exchange_v2__factory.js +3636 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProviderStateAggregator_v1__factory.d.ts +180 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProviderStateAggregator_v1__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProviderStateAggregator_v1__factory.js +246 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.d.ts +2092 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.js +2702 -0
- package/dist/typechain-types/factories/IOFT__factory.d.ts +352 -0
- package/dist/typechain-types/factories/IOFT__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/IOFT__factory.js +464 -0
- package/dist/typechain-types/factories/IRewardVault__factory.d.ts +1019 -0
- package/dist/typechain-types/factories/IRewardVault__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/IRewardVault__factory.js +1311 -0
- package/dist/typechain-types/factories/KumaOFTAdapterUSDC__factory.d.ts +996 -0
- package/dist/typechain-types/factories/KumaOFTAdapterUSDC__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/KumaOFTAdapterUSDC__factory.js +1306 -0
- package/dist/typechain-types/factories/KumaOFTUSDC__factory.d.ts +1234 -0
- package/dist/typechain-types/factories/KumaOFTUSDC__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/KumaOFTUSDC__factory.js +1619 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v1__factory.d.ts +354 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v1__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v1__factory.js +464 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v2__factory.d.ts +370 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v2__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/KumaStargateForwarder_v2__factory.js +486 -0
- package/dist/typechain-types/factories/ProfitShareVaultProvider_v1__factory.d.ts +1914 -0
- package/dist/typechain-types/factories/ProfitShareVaultProvider_v1__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/ProfitShareVaultProvider_v1__factory.js +2475 -0
- package/dist/typechain-types/factories/StargatePoolUSDC__factory.d.ts +1557 -0
- package/dist/typechain-types/factories/StargatePoolUSDC__factory.d.ts.map +1 -0
- package/dist/typechain-types/factories/StargatePoolUSDC__factory.js +2019 -0
- package/dist/typechain-types/factories/index.d.ts +5 -0
- package/dist/typechain-types/factories/index.d.ts.map +1 -0
- package/dist/typechain-types/factories/index.js +13 -0
- package/dist/typechain-types/index.d.ts +10 -0
- package/dist/typechain-types/index.d.ts.map +1 -0
- package/dist/typechain-types/index.js +15 -0
- package/dist/types/delegatedKeys.d.ts +44 -0
- package/dist/types/delegatedKeys.d.ts.map +1 -0
- package/dist/types/delegatedKeys.js +2 -0
- package/dist/types/enums/index.d.ts +4 -0
- package/dist/types/enums/index.d.ts.map +1 -0
- package/dist/types/enums/index.js +6 -0
- package/dist/types/enums/request.d.ts +980 -0
- package/dist/types/enums/request.d.ts.map +1 -0
- package/dist/types/enums/request.js +906 -0
- package/dist/types/enums/response.d.ts +329 -0
- package/dist/types/enums/response.d.ts.map +1 -0
- package/dist/types/enums/response.js +296 -0
- package/dist/types/enums/signature.d.ts +118 -0
- package/dist/types/enums/signature.d.ts.map +1 -0
- package/dist/types/enums/signature.js +131 -0
- package/dist/types/errors.d.ts +5 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +2 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/orderBook.d.ts +72 -0
- package/dist/types/orderBook.d.ts.map +1 -0
- package/dist/types/orderBook.js +2 -0
- package/dist/types/rest/common/common.d.ts +118 -0
- package/dist/types/rest/common/common.d.ts.map +1 -0
- package/dist/types/rest/common/common.js +2 -0
- package/dist/types/rest/common/guards.d.ts +8 -0
- package/dist/types/rest/common/guards.d.ts.map +1 -0
- package/dist/types/rest/common/guards.js +14 -0
- package/dist/types/rest/endpoints/AssociateWallet.d.ts +40 -0
- package/dist/types/rest/endpoints/AssociateWallet.d.ts.map +1 -0
- package/dist/types/rest/endpoints/AssociateWallet.js +2 -0
- package/dist/types/rest/endpoints/CancelOrders.d.ts +134 -0
- package/dist/types/rest/endpoints/CancelOrders.d.ts.map +1 -0
- package/dist/types/rest/endpoints/CancelOrders.js +2 -0
- package/dist/types/rest/endpoints/CreateOrder.d.ts +401 -0
- package/dist/types/rest/endpoints/CreateOrder.d.ts.map +1 -0
- package/dist/types/rest/endpoints/CreateOrder.js +2 -0
- package/dist/types/rest/endpoints/GetAuthenticationToken.d.ts +39 -0
- package/dist/types/rest/endpoints/GetAuthenticationToken.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetAuthenticationToken.js +2 -0
- package/dist/types/rest/endpoints/GetCandles.d.ts +115 -0
- package/dist/types/rest/endpoints/GetCandles.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetCandles.js +2 -0
- package/dist/types/rest/endpoints/GetDeposits.d.ts +109 -0
- package/dist/types/rest/endpoints/GetDeposits.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetDeposits.js +2 -0
- package/dist/types/rest/endpoints/GetExchange.d.ts +78 -0
- package/dist/types/rest/endpoints/GetExchange.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetExchange.js +9 -0
- package/dist/types/rest/endpoints/GetFills.d.ts +178 -0
- package/dist/types/rest/endpoints/GetFills.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetFills.js +2 -0
- package/dist/types/rest/endpoints/GetFundingPayments.d.ts +52 -0
- package/dist/types/rest/endpoints/GetFundingPayments.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetFundingPayments.js +2 -0
- package/dist/types/rest/endpoints/GetFundingRates.d.ts +34 -0
- package/dist/types/rest/endpoints/GetFundingRates.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetFundingRates.js +2 -0
- package/dist/types/rest/endpoints/GetGasFees.d.ts +23 -0
- package/dist/types/rest/endpoints/GetGasFees.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetGasFees.js +2 -0
- package/dist/types/rest/endpoints/GetHistoricalPnL.d.ts +39 -0
- package/dist/types/rest/endpoints/GetHistoricalPnL.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetHistoricalPnL.js +2 -0
- package/dist/types/rest/endpoints/GetInitialMarginFractionOverride.d.ts +31 -0
- package/dist/types/rest/endpoints/GetInitialMarginFractionOverride.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetInitialMarginFractionOverride.js +2 -0
- package/dist/types/rest/endpoints/GetLiquidations.d.ts +52 -0
- package/dist/types/rest/endpoints/GetLiquidations.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetLiquidations.js +2 -0
- package/dist/types/rest/endpoints/GetMarketMakerRewardsEpochs.d.ts +534 -0
- package/dist/types/rest/endpoints/GetMarketMakerRewardsEpochs.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetMarketMakerRewardsEpochs.js +2 -0
- package/dist/types/rest/endpoints/GetMarkets.d.ts +161 -0
- package/dist/types/rest/endpoints/GetMarkets.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetMarkets.js +2 -0
- package/dist/types/rest/endpoints/GetOrderBook.d.ts +176 -0
- package/dist/types/rest/endpoints/GetOrderBook.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetOrderBook.js +2 -0
- package/dist/types/rest/endpoints/GetOrders.d.ts +188 -0
- package/dist/types/rest/endpoints/GetOrders.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetOrders.js +2 -0
- package/dist/types/rest/endpoints/GetPing.d.ts +8 -0
- package/dist/types/rest/endpoints/GetPing.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetPing.js +2 -0
- package/dist/types/rest/endpoints/GetPositions.d.ts +104 -0
- package/dist/types/rest/endpoints/GetPositions.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetPositions.js +2 -0
- package/dist/types/rest/endpoints/GetTickers.d.ts +129 -0
- package/dist/types/rest/endpoints/GetTickers.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetTickers.js +2 -0
- package/dist/types/rest/endpoints/GetTime.d.ts +14 -0
- package/dist/types/rest/endpoints/GetTime.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetTime.js +2 -0
- package/dist/types/rest/endpoints/GetTrades.d.ts +62 -0
- package/dist/types/rest/endpoints/GetTrades.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetTrades.js +2 -0
- package/dist/types/rest/endpoints/GetWallets.d.ts +121 -0
- package/dist/types/rest/endpoints/GetWallets.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetWallets.js +2 -0
- package/dist/types/rest/endpoints/GetWithdrawals.d.ts +98 -0
- package/dist/types/rest/endpoints/GetWithdrawals.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetWithdrawals.js +2 -0
- package/dist/types/rest/endpoints/GetWithdrawalsFromManagedAccount.d.ts +98 -0
- package/dist/types/rest/endpoints/GetWithdrawalsFromManagedAccount.d.ts.map +1 -0
- package/dist/types/rest/endpoints/GetWithdrawalsFromManagedAccount.js +2 -0
- package/dist/types/rest/endpoints/Payouts.d.ts +199 -0
- package/dist/types/rest/endpoints/Payouts.d.ts.map +1 -0
- package/dist/types/rest/endpoints/Payouts.js +2 -0
- package/dist/types/rest/endpoints/SetInitialMarginFractionOverride.d.ts +83 -0
- package/dist/types/rest/endpoints/SetInitialMarginFractionOverride.d.ts.map +1 -0
- package/dist/types/rest/endpoints/SetInitialMarginFractionOverride.js +2 -0
- package/dist/types/rest/endpoints/WithdrawFunds.d.ts +144 -0
- package/dist/types/rest/endpoints/WithdrawFunds.d.ts.map +1 -0
- package/dist/types/rest/endpoints/WithdrawFunds.js +2 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByQuantity.d.ts +161 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByQuantity.d.ts.map +1 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByQuantity.js +2 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByShares.d.ts +160 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByShares.d.ts.map +1 -0
- package/dist/types/rest/endpoints/WithdrawFundsFromManagedAccountByShares.js +2 -0
- package/dist/types/rest/endpoints/index.d.ts +33 -0
- package/dist/types/rest/endpoints/index.d.ts.map +1 -0
- package/dist/types/rest/endpoints/index.js +35 -0
- package/dist/types/rest/endpoints/internal.d.ts +329 -0
- package/dist/types/rest/endpoints/internal.d.ts.map +1 -0
- package/dist/types/rest/endpoints/internal.js +14 -0
- package/dist/types/rest/index.d.ts +4 -0
- package/dist/types/rest/index.d.ts.map +1 -0
- package/dist/types/rest/index.js +6 -0
- package/dist/types/swaps.d.ts +11 -0
- package/dist/types/swaps.d.ts.map +1 -0
- package/dist/types/swaps.js +2 -0
- package/dist/types/utils.d.ts +67 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +3 -0
- package/dist/types/webSocket/base.d.ts +83 -0
- package/dist/types/webSocket/base.d.ts.map +1 -0
- package/dist/types/webSocket/base.js +2 -0
- package/dist/types/webSocket/constants.d.ts +41 -0
- package/dist/types/webSocket/constants.d.ts.map +1 -0
- package/dist/types/webSocket/constants.js +54 -0
- package/dist/types/webSocket/index.d.ts +6 -0
- package/dist/types/webSocket/index.d.ts.map +1 -0
- package/dist/types/webSocket/index.js +8 -0
- package/dist/types/webSocket/options.d.ts +276 -0
- package/dist/types/webSocket/options.d.ts.map +1 -0
- package/dist/types/webSocket/options.js +2 -0
- package/dist/types/webSocket/request/index.d.ts +3 -0
- package/dist/types/webSocket/request/index.d.ts.map +1 -0
- package/dist/types/webSocket/request/index.js +5 -0
- package/dist/types/webSocket/request/request.d.ts +137 -0
- package/dist/types/webSocket/request/request.d.ts.map +1 -0
- package/dist/types/webSocket/request/request.js +2 -0
- package/dist/types/webSocket/request/subscriptions.d.ts +498 -0
- package/dist/types/webSocket/request/subscriptions.d.ts.map +1 -0
- package/dist/types/webSocket/request/subscriptions.js +2 -0
- package/dist/types/webSocket/response/candles.d.ts +138 -0
- package/dist/types/webSocket/response/candles.d.ts.map +1 -0
- package/dist/types/webSocket/response/candles.js +2 -0
- package/dist/types/webSocket/response/deposits.d.ts +80 -0
- package/dist/types/webSocket/response/deposits.d.ts.map +1 -0
- package/dist/types/webSocket/response/deposits.js +2 -0
- package/dist/types/webSocket/response/fundingPayments.d.ts +78 -0
- package/dist/types/webSocket/response/fundingPayments.d.ts.map +1 -0
- package/dist/types/webSocket/response/fundingPayments.js +2 -0
- package/dist/types/webSocket/response/index.d.ts +13 -0
- package/dist/types/webSocket/response/index.d.ts.map +1 -0
- package/dist/types/webSocket/response/index.js +15 -0
- package/dist/types/webSocket/response/liquidations.d.ts +78 -0
- package/dist/types/webSocket/response/liquidations.d.ts.map +1 -0
- package/dist/types/webSocket/response/liquidations.js +2 -0
- package/dist/types/webSocket/response/orderbook.d.ts +214 -0
- package/dist/types/webSocket/response/orderbook.d.ts.map +1 -0
- package/dist/types/webSocket/response/orderbook.js +2 -0
- package/dist/types/webSocket/response/orders.d.ts +355 -0
- package/dist/types/webSocket/response/orders.d.ts.map +1 -0
- package/dist/types/webSocket/response/orders.js +2 -0
- package/dist/types/webSocket/response/ordersFill.d.ts +138 -0
- package/dist/types/webSocket/response/ordersFill.d.ts.map +1 -0
- package/dist/types/webSocket/response/ordersFill.js +2 -0
- package/dist/types/webSocket/response/positions.d.ts +120 -0
- package/dist/types/webSocket/response/positions.d.ts.map +1 -0
- package/dist/types/webSocket/response/positions.js +2 -0
- package/dist/types/webSocket/response/tickers.d.ts +131 -0
- package/dist/types/webSocket/response/tickers.d.ts.map +1 -0
- package/dist/types/webSocket/response/tickers.js +2 -0
- package/dist/types/webSocket/response/trades.d.ts +90 -0
- package/dist/types/webSocket/response/trades.d.ts.map +1 -0
- package/dist/types/webSocket/response/trades.js +2 -0
- package/dist/types/webSocket/response/webclient/base.d.ts +24 -0
- package/dist/types/webSocket/response/webclient/base.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/base.js +2 -0
- package/dist/types/webSocket/response/webclient/events/exchangeStatus.d.ts +31 -0
- package/dist/types/webSocket/response/webclient/events/exchangeStatus.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/events/exchangeStatus.js +2 -0
- package/dist/types/webSocket/response/webclient/events/index.d.ts +4 -0
- package/dist/types/webSocket/response/webclient/events/index.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/events/index.js +6 -0
- package/dist/types/webSocket/response/webclient/events/reloadBanners.d.ts +17 -0
- package/dist/types/webSocket/response/webclient/events/reloadBanners.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/events/reloadBanners.js +2 -0
- package/dist/types/webSocket/response/webclient/events/transactionSettled.d.ts +76 -0
- package/dist/types/webSocket/response/webclient/events/transactionSettled.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/events/transactionSettled.js +2 -0
- package/dist/types/webSocket/response/webclient/index.d.ts +3 -0
- package/dist/types/webSocket/response/webclient/index.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/index.js +5 -0
- package/dist/types/webSocket/response/webclient/webclient.d.ts +13 -0
- package/dist/types/webSocket/response/webclient/webclient.d.ts.map +1 -0
- package/dist/types/webSocket/response/webclient/webclient.js +2 -0
- package/dist/types/webSocket/response/withdrawals.d.ts +83 -0
- package/dist/types/webSocket/response/withdrawals.d.ts.map +1 -0
- package/dist/types/webSocket/response/withdrawals.js +2 -0
- package/dist/utils.d.ts +63 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +136 -0
- package/package.json +200 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/rest/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import Axios from 'axios';
|
|
2
|
+
import { INTERNAL_SYMBOL } from '#utils';
|
|
3
|
+
import type * as katanaPerps from '#index';
|
|
4
|
+
import type { AnyObj } from '#types/utils';
|
|
5
|
+
import type { AxiosInstance, AxiosRequestConfig, CreateAxiosDefaults } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Public REST API client options
|
|
8
|
+
*
|
|
9
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/interfaces/RestPublicClientOptions.html)
|
|
10
|
+
* @see client {@link RestPublicClient}
|
|
11
|
+
*
|
|
12
|
+
* @category API Clients
|
|
13
|
+
*/
|
|
14
|
+
export interface RestPublicClientOptions {
|
|
15
|
+
/**
|
|
16
|
+
* - If `true`, the client will point to [Katana Perps Sandbox API](https;//api-docs-v1-perps.katana.network/#sandbox)
|
|
17
|
+
* - If not provided or `false`, will point to the Katana Perps Production API.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue
|
|
20
|
+
* ```typescript
|
|
21
|
+
* false
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
sandbox?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional for public clients
|
|
27
|
+
*
|
|
28
|
+
* - Increases rate limits when provided
|
|
29
|
+
*/
|
|
30
|
+
apiKey?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Override the API url
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
baseURL?: string;
|
|
37
|
+
/**
|
|
38
|
+
* - This is for internal use only and may not work as expected if used.
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
axiosConfig?: CreateAxiosDefaults;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The {@link RestPublicClient} is used to make public requests to the Katana Perps API. It does not require
|
|
46
|
+
* any special options to access.
|
|
47
|
+
*
|
|
48
|
+
* - An {@link RestPublicClientOptions.apiKey apiKey} can be provided
|
|
49
|
+
* to increase rate limits.
|
|
50
|
+
* - Optionally, a {@link RestPublicClientOptions.sandbox sandbox} option can
|
|
51
|
+
* be set to `true` in order to point to the Katana Perps Sandbox API.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* import { RestPublicClient } from '@katanaperps/katana-perps-sdk';
|
|
56
|
+
*
|
|
57
|
+
* // works without any options
|
|
58
|
+
* // const publicClient = new RestPublicClient();
|
|
59
|
+
*
|
|
60
|
+
* const publicClient = new RestPublicClient({
|
|
61
|
+
* sandbox: true,
|
|
62
|
+
* // Optionally provide an API key to increase rate limits
|
|
63
|
+
* apiKey: '1f7c4f52-4af7-4e1b-aa94-94fac8d931aa',
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* const tickers = await publicClient.getTickers('ETH-USD');
|
|
67
|
+
* console.log('Tickers: ', tickers);
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* <br />
|
|
71
|
+
*
|
|
72
|
+
* ---
|
|
73
|
+
*
|
|
74
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html)
|
|
75
|
+
* @see options {@link RestPublicClientOptions}
|
|
76
|
+
*
|
|
77
|
+
* @category API Clients
|
|
78
|
+
* @category KatanaPerps - Get Time
|
|
79
|
+
* @category KatanaPerps - Get Ping
|
|
80
|
+
* @category KatanaPerps - Get Exchange
|
|
81
|
+
* @category KatanaPerps - Get Gas Fees
|
|
82
|
+
* @category KatanaPerps - Get Markets
|
|
83
|
+
* @category KatanaPerps - Get Tickers
|
|
84
|
+
* @category KatanaPerps - Get Candles
|
|
85
|
+
* @category KatanaPerps - Get Trades
|
|
86
|
+
* @category KatanaPerps - Get OrderBook
|
|
87
|
+
* @category KatanaPerps - Get Liquidations
|
|
88
|
+
* @category KatanaPerps - Get Funding Rates
|
|
89
|
+
*/
|
|
90
|
+
export declare class RestPublicClient {
|
|
91
|
+
#private;
|
|
92
|
+
/**
|
|
93
|
+
* The {@link RestPublicClient} is used to make public requests to the Katana Perps API. It does not require
|
|
94
|
+
* any special options to access.
|
|
95
|
+
*
|
|
96
|
+
* - An {@link RestPublicClientOptions.apiKey apiKey} can be provided
|
|
97
|
+
* to increase rate limits.
|
|
98
|
+
* - Optionally, a {@link RestPublicClientOptions.sandbox sandbox} option can
|
|
99
|
+
* be set to `true` in order to point to the Katana Perps Sandbox API.
|
|
100
|
+
*
|
|
101
|
+
* @param options
|
|
102
|
+
* Options for configuring the RestPublicClient
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import { RestPublicClient } from '@katanaperps/katana-perps-sdk';
|
|
107
|
+
*
|
|
108
|
+
* // works without any options
|
|
109
|
+
* // const publicClient = new RestPublicClient();
|
|
110
|
+
*
|
|
111
|
+
* const publicClient = new RestPublicClient({
|
|
112
|
+
* sandbox: true,
|
|
113
|
+
* // Optionally provide an API key to increase rate limits
|
|
114
|
+
* apiKey: '1f7c4f52-4af7-4e1b-aa94-94fac8d931aa',
|
|
115
|
+
* });
|
|
116
|
+
*
|
|
117
|
+
* const tickers = await publicClient.getTickers('ETH-USD');
|
|
118
|
+
* console.log('Tickers: ', tickers);
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* <br />
|
|
122
|
+
*
|
|
123
|
+
* ---
|
|
124
|
+
*
|
|
125
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html)
|
|
126
|
+
* @see options {@link RestPublicClientOptions}
|
|
127
|
+
*
|
|
128
|
+
* @category Constructor
|
|
129
|
+
*/
|
|
130
|
+
constructor(options?: RestPublicClientOptions);
|
|
131
|
+
/**
|
|
132
|
+
* Tests connectivity to the REST API
|
|
133
|
+
*
|
|
134
|
+
* ---
|
|
135
|
+
* **Endpoint Parameters**
|
|
136
|
+
*
|
|
137
|
+
* > - **HTTP Request**: `GET /v1/ping`
|
|
138
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
139
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
140
|
+
* ---
|
|
141
|
+
*
|
|
142
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#ping)
|
|
143
|
+
* @see response {@link katanaperps.RestResponseGetPing RestResponseGetPing}
|
|
144
|
+
*
|
|
145
|
+
* @category Utility
|
|
146
|
+
*/
|
|
147
|
+
ping(): Promise<import("#types/utils").EmptyObj>;
|
|
148
|
+
/**
|
|
149
|
+
* Returns the current server time
|
|
150
|
+
*
|
|
151
|
+
* ---
|
|
152
|
+
* **Endpoint Parameters**
|
|
153
|
+
*
|
|
154
|
+
* > - **HTTP Request**: `GET /v1/time`
|
|
155
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
156
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
157
|
+
* ---
|
|
158
|
+
*
|
|
159
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getServerTime)
|
|
160
|
+
* @see response {@link katanaperps.RestResponseGetTime RestResponseGetTime}
|
|
161
|
+
*
|
|
162
|
+
* @returns An object with the current server time in `UTC`
|
|
163
|
+
*
|
|
164
|
+
* @category Utility
|
|
165
|
+
*/
|
|
166
|
+
getServerTime(): Promise<katanaPerps.RestResponseGetTime>;
|
|
167
|
+
/**
|
|
168
|
+
* Returns basic information about the exchange.
|
|
169
|
+
*
|
|
170
|
+
* - Some of the returned parmeters can be used to configure contract calls
|
|
171
|
+
* required for other methods.
|
|
172
|
+
*
|
|
173
|
+
* ---
|
|
174
|
+
* **Endpoint Parameters**
|
|
175
|
+
*
|
|
176
|
+
* > - **HTTP Request**: `GET /v1/exchange`
|
|
177
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
178
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
179
|
+
* ---
|
|
180
|
+
*
|
|
181
|
+
* @returns
|
|
182
|
+
* > An object matching {@link katanaperps.KatanaPerpsExchange KatanaPerpsExchange} providing properties relating
|
|
183
|
+
* to the exchange.
|
|
184
|
+
*
|
|
185
|
+
* ---
|
|
186
|
+
*
|
|
187
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getExchange)
|
|
188
|
+
* @see response {@link katanaperps.RestResponseGetExchange RestResponseGetExchange}
|
|
189
|
+
*
|
|
190
|
+
* @category Exchange Data
|
|
191
|
+
*/
|
|
192
|
+
getExchange(): Promise<katanaPerps.KatanaPerpsExchange>;
|
|
193
|
+
/**
|
|
194
|
+
* Returns estimated gas fees by bridge and target chain
|
|
195
|
+
*
|
|
196
|
+
* ---
|
|
197
|
+
* **Endpoint Parameters**
|
|
198
|
+
*
|
|
199
|
+
* > - **HTTP Request**: `GET /v1/gasFees`
|
|
200
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
201
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
202
|
+
* ---
|
|
203
|
+
*
|
|
204
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getGasFees)
|
|
205
|
+
* @see response {@link katanaperps.RestResponseGetGasFees RestResponseGetGasFees}
|
|
206
|
+
* @see type {@link katanaperps.KatanaPerpsGasFees KatanaPerpsGasFees}
|
|
207
|
+
*
|
|
208
|
+
* @category Exchange Data
|
|
209
|
+
*/
|
|
210
|
+
getGasFees(): Promise<katanaPerps.KatanaPerpsGasFees>;
|
|
211
|
+
/**
|
|
212
|
+
* Returns information about the currently listed markets
|
|
213
|
+
*
|
|
214
|
+
* - Optionally filter for a specific market by providing a `market` request
|
|
215
|
+
* parameter.
|
|
216
|
+
*
|
|
217
|
+
* ---
|
|
218
|
+
* **Endpoint Parameters**
|
|
219
|
+
*
|
|
220
|
+
* > - **HTTP Request**: `GET /v1/markets`
|
|
221
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
222
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
223
|
+
* ---
|
|
224
|
+
*
|
|
225
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getMarkets)
|
|
226
|
+
* @see request {@link katanaperps.RestRequestGetMarkets RestRequestGetMarkets}
|
|
227
|
+
* @see response {@link katanaperps.RestResponseGetMarkets RestResponseGetMarkets}
|
|
228
|
+
* @see type {@link katanaperps.KatanaPerpsMarket KatanaPerpsMarket}
|
|
229
|
+
*
|
|
230
|
+
* @category Exchange Data
|
|
231
|
+
*/
|
|
232
|
+
getMarkets(params?: katanaPerps.RestRequestGetMarkets): Promise<katanaPerps.RestResponseGetMarkets>;
|
|
233
|
+
/**
|
|
234
|
+
* Returns market statistics for the trailing 24-hour period
|
|
235
|
+
*
|
|
236
|
+
* - **TIP:** Automatic ticker updates are avilable via the WebSocket API tickers subscription,
|
|
237
|
+
* which is both faster and more efficient than polling this endpoint!
|
|
238
|
+
*
|
|
239
|
+
* ---
|
|
240
|
+
* **Endpoint Parameters**
|
|
241
|
+
*
|
|
242
|
+
* > - **HTTP Request**: `GET /v1/tickers`
|
|
243
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
244
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
245
|
+
* ---
|
|
246
|
+
*
|
|
247
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getTickers)
|
|
248
|
+
* @see request {@link katanaperps.RestRequestGetTickers RestRequestGetTickers}
|
|
249
|
+
* @see response {@link katanaperps.RestResponseGetTickers RestResponseGetTickers}
|
|
250
|
+
* @see type {@link katanaperps.KatanaPerpsTicker KatanaPerpsTicker}
|
|
251
|
+
*
|
|
252
|
+
* @category Exchange Data
|
|
253
|
+
*/
|
|
254
|
+
getTickers(params?: katanaPerps.RestRequestGetTickers): Promise<katanaPerps.RestResponseGetTickers>;
|
|
255
|
+
/**
|
|
256
|
+
* Returns candle (OHLCV) data for a market
|
|
257
|
+
*
|
|
258
|
+
* - For autocompletion and inline documentation, use the {@link katanaperps.CandleInterval CandleInterval} enum
|
|
259
|
+
* when specifying the `interval` property (see example)
|
|
260
|
+
* - **TIP:** Automatic candle updates are avilable via the WebSocket API candles subscription,
|
|
261
|
+
* which is both faster and more efficient than polling this endpoint!
|
|
262
|
+
*
|
|
263
|
+
* ---
|
|
264
|
+
* **Endpoint Parameters**
|
|
265
|
+
*
|
|
266
|
+
* > - **HTTP Request**: `GET /v1/candles`
|
|
267
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
268
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
269
|
+
* > - **Pagination:**
|
|
270
|
+
* > {@link katanaperps.RestRequestPagination.start start},
|
|
271
|
+
* > {@link katanaperps.RestRequestPagination.end end},
|
|
272
|
+
* > {@link katanaperps.RestRequestPagination.limit limit}
|
|
273
|
+
* ---
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* ```typescript
|
|
277
|
+
* import { RestPublicClient, CandleInterval } from '@katanaperps/katana-perps-sdk';
|
|
278
|
+
*
|
|
279
|
+
* const client = new RestPublicClient();
|
|
280
|
+
*
|
|
281
|
+
* const candles = await client.getCandles({
|
|
282
|
+
* market: 'ETH-USD',
|
|
283
|
+
* interval: CandleInterval.ONE_MINUTE
|
|
284
|
+
* })
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* <br />
|
|
288
|
+
*
|
|
289
|
+
* ---
|
|
290
|
+
*
|
|
291
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getCandles)
|
|
292
|
+
* @see request {@link katanaperps.RestRequestGetCandles RestRequestGetCandles}
|
|
293
|
+
* @see response {@link katanaperps.RestResponseGetCandles RestResponseGetCandles}
|
|
294
|
+
* @see type {@link katanaperps.KatanaPerpsCandle KatanaPerpsCandle}
|
|
295
|
+
*
|
|
296
|
+
* @category Exchange Data
|
|
297
|
+
*/
|
|
298
|
+
getCandles(params: katanaPerps.RestRequestGetCandles): Promise<katanaPerps.RestResponseGetCandles>;
|
|
299
|
+
/**
|
|
300
|
+
* Returns trade data for a market. In this documentation, "trades" refers to public information about trades, whereas "fills" refers to detailed non-public information about trades resulting from orders placed by the API account.
|
|
301
|
+
*
|
|
302
|
+
* - **TIP:** Automatic trades updates are available via the WebSocket API trades subscription,
|
|
303
|
+
* which is both faster and more efficient than polling this endpoint!
|
|
304
|
+
* - **TIP:** There is also a call on the authenticated client {@link katanaPerps.RestAuthenticatedClient.getFills RestAuthenticatedClient.getFills}
|
|
305
|
+
* which includes the {@link katanaperps.KatanaPerpsFill KatanaPerpsFill} properties, if required.
|
|
306
|
+
*
|
|
307
|
+
* ---
|
|
308
|
+
* **Endpoint Parameters**
|
|
309
|
+
*
|
|
310
|
+
* > - **HTTP Request**: `GET /v1/trades`
|
|
311
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
312
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
313
|
+
* > - **Pagination:**
|
|
314
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.start start},
|
|
315
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.end end},
|
|
316
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.limit limit},
|
|
317
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.fromId fromId}
|
|
318
|
+
* ---
|
|
319
|
+
*
|
|
320
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getTrades)
|
|
321
|
+
* @see request {@link katanaperps.RestRequestGetTrades RestRequestGetTrades}
|
|
322
|
+
* @see response {@link katanaperps.RestResponseGetTrades RestResponseGetTrades}
|
|
323
|
+
* @see type {@link katanaperps.KatanaPerpsTrade KatanaPerpsTrade}
|
|
324
|
+
* @see related {@link katanaPerps.RestAuthenticatedClient.getFills RestAuthenticatedClient.getFills}
|
|
325
|
+
*
|
|
326
|
+
* @category Exchange Data
|
|
327
|
+
*/
|
|
328
|
+
getTrades(params: katanaPerps.RestRequestGetTrades): Promise<katanaPerps.RestResponseGetTrades>;
|
|
329
|
+
/**
|
|
330
|
+
* Returns a level-1 order book of a market.
|
|
331
|
+
*
|
|
332
|
+
* ---
|
|
333
|
+
* **Endpoint Parameters**
|
|
334
|
+
*
|
|
335
|
+
* > - **HTTP Request**: `GET /v1/orderbook`
|
|
336
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
337
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
338
|
+
* > - **Pagination:**
|
|
339
|
+
* > {@link katanaperps.RestRequestPagination.limit limit},
|
|
340
|
+
* ---
|
|
341
|
+
*
|
|
342
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getOrderBookLevel1)
|
|
343
|
+
* @see request {@link katanaperps.RestRequestGetOrderBookLevel1 RestRequestGetOrderBookLevel1}
|
|
344
|
+
* @see response {@link katanaperps.RestResponseGetOrderBookLevel1 RestResponseGetOrderBookLevel1}
|
|
345
|
+
* @see related {@link getOrderBookLevel2 client.getOrderBookLevel2}
|
|
346
|
+
*
|
|
347
|
+
* @category Exchange Data
|
|
348
|
+
*/
|
|
349
|
+
getOrderBookLevel1(params: katanaPerps.RestRequestGetOrderBookLevel1): Promise<katanaPerps.RestResponseGetOrderBookLevel1>;
|
|
350
|
+
/**
|
|
351
|
+
* Get current order book price levels for a market
|
|
352
|
+
*
|
|
353
|
+
* ---
|
|
354
|
+
* **Endpoint Parameters**
|
|
355
|
+
*
|
|
356
|
+
* > - **HTTP Request**: `GET /v1/orderbook`
|
|
357
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
358
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
359
|
+
* > - **Pagination:**
|
|
360
|
+
* > {@link katanaperps.RestRequestPagination.limit limit},
|
|
361
|
+
* ---
|
|
362
|
+
*
|
|
363
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getOrderBookLevel2)
|
|
364
|
+
* @see request {@link katanaperps.RestRequestGetOrderBookLevel2 RestRequestGetOrderBookLevel2}
|
|
365
|
+
* @see response {@link katanaperps.RestResponseGetOrderBookLevel2 RestResponseGetOrderBookLevel2}
|
|
366
|
+
* @see related {@link getOrderBookLevel1 client.getOrderBookLevel1}
|
|
367
|
+
*
|
|
368
|
+
* @category Exchange Data
|
|
369
|
+
*/
|
|
370
|
+
getOrderBookLevel2(params: katanaPerps.RestRequestGetOrderBookLevel2): Promise<katanaPerps.RestResponseGetOrderBookLevel2>;
|
|
371
|
+
/**
|
|
372
|
+
* Get liquidations for a market
|
|
373
|
+
*
|
|
374
|
+
* ---
|
|
375
|
+
* **Endpoint Parameters**
|
|
376
|
+
*
|
|
377
|
+
* > - **HTTP Request**: `GET /v1/liquidations`
|
|
378
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
379
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
380
|
+
* > - **Pagination:**
|
|
381
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.start start},
|
|
382
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.end end},
|
|
383
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.limit limit},
|
|
384
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.fromId fromId}
|
|
385
|
+
* ---
|
|
386
|
+
*
|
|
387
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getLiquidations)
|
|
388
|
+
* @see request {@link katanaperps.RestRequestGetLiquidations RestRequestGetLiquidations}
|
|
389
|
+
* @see response {@link katanaperps.RestResponseGetLiquidations RestResponseGetLiquidations}
|
|
390
|
+
* @see type {@link katanaperps.KatanaPerpsLiquidation KatanaPerpsLiquidation}
|
|
391
|
+
*
|
|
392
|
+
* @category Exchange Data
|
|
393
|
+
*/
|
|
394
|
+
getLiquidations(params: katanaPerps.RestRequestGetLiquidations): Promise<katanaPerps.RestResponseGetLiquidations>;
|
|
395
|
+
/**
|
|
396
|
+
* Get Funding Rates
|
|
397
|
+
*
|
|
398
|
+
* ---
|
|
399
|
+
* **Endpoint Parameters**
|
|
400
|
+
*
|
|
401
|
+
* > - **HTTP Request**: `GET /v1/fundingRates`
|
|
402
|
+
* > - **Endpoint Security:** [Public](https://api-docs-v1-perps.katana.network/#endpointSecurityPublic)
|
|
403
|
+
* > - **API Key Scope:** [None](https://api-docs-v1-perps.katana.network/#api-keys)
|
|
404
|
+
* > - **Pagination:**
|
|
405
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.start start},
|
|
406
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.end end},
|
|
407
|
+
* > {@link katanaperps.RestRequestPaginationWithFromId.limit limit}
|
|
408
|
+
* ---
|
|
409
|
+
*
|
|
410
|
+
* @see typedoc [Reference Documentation](https://sdk-js-docs-v1-perps.katana.network/classes/RestPublicClient.html#getFundingRates)
|
|
411
|
+
* @see request {@link katanaperps.RestRequestGetFundingRates RestRequestGetFundingRates}
|
|
412
|
+
* @see response {@link katanaperps.RestResponseGetFundingRates RestResponseGetFundingRates}
|
|
413
|
+
* @see type {@link katanaperps.KatanaPerpsFundingRate KatanaPerpsFundingRate}
|
|
414
|
+
*
|
|
415
|
+
* @category Exchange Data
|
|
416
|
+
*/
|
|
417
|
+
getFundingRates(params: katanaPerps.RestRequestGetFundingRates): Promise<katanaPerps.RestResponseGetFundingRates>;
|
|
418
|
+
/**
|
|
419
|
+
* - All requests within the internal symbol are undocumented internal methods which may change or be removed without notice.
|
|
420
|
+
* - API handling of the parameters used within these methods is likely to change without notice without changes to the SDK to match.
|
|
421
|
+
* - These methods or parameters may require additional permissions to use and result in errors or blocking of your request if used.
|
|
422
|
+
* - If you need to use these methods for your use case, please contact support to discuss your requirements before using them.
|
|
423
|
+
*
|
|
424
|
+
* @internal
|
|
425
|
+
*/
|
|
426
|
+
readonly [INTERNAL_SYMBOL]: Readonly<{
|
|
427
|
+
readonly realtime: () => void;
|
|
428
|
+
}>;
|
|
429
|
+
protected get<R, O extends AnyObj | URLSearchParams = {}>(endpoint: string, params?: O | undefined, axiosConfig?: Omit<Partial<AxiosRequestConfig>, 'method' | 'url' | 'params'>): Promise<R>;
|
|
430
|
+
protected request<R = any>(endpoint: string, config: Partial<AxiosRequestConfig> & {
|
|
431
|
+
method: 'GET';
|
|
432
|
+
}): Promise<Axios.AxiosResponse<R, any>>;
|
|
433
|
+
readonly axios: AxiosInstance;
|
|
434
|
+
}
|
|
435
|
+
export declare function loadExchangeResponseFromApiIfNeeded(opts?: RestPublicClientOptions): Promise<readonly [katanaPerps.KatanaPerpsExchange, katanaPerps.RestPublicClient]>;
|
|
436
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/client/rest/public.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,eAAe,EAIhB,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,KAAK,WAAW,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,OAAO,CAAC;AAEf;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBAAa,gBAAgB;;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;gBACgB,OAAO,GAAE,uBAA4B;IAgDxD;;;;;;;;;;;;;;;OAeG;IACU,IAAI;IAIjB;;;;;;;;;;;;;;;;;OAiBG;IACU,aAAa;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,WAAW;IAIxB;;;;;;;;;;;;;;;;OAgBG;IACU,UAAU;IAIvB;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,qBAAqB;IAMlE;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,qBAAqB;IAIlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACU,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,qBAAqB;IAIjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACU,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC,oBAAoB;IAI/D;;;;;;;;;;;;;;;;;;;OAmBG;IACU,kBAAkB,CAC7B,MAAM,EAAE,WAAW,CAAC,6BAA6B;IAQnD;;;;;;;;;;;;;;;;;;;OAmBG;IACU,kBAAkB,CAC7B,MAAM,EAAE,WAAW,CAAC,6BAA6B;IAQnD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,eAAe,CAAC,MAAM,EAAE,WAAW,CAAC,0BAA0B;IAO3E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,eAAe,CAAC,MAAM,EAAE,WAAW,CAAC,0BAA0B;IAO3E;;;;;;;OAOG;IACH,SAAgB,CAAC,eAAe,CAAC;;OAIrB;cAII,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,eAAe,GAAG,EAAE,EAC5D,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,EACtB,WAAW,GAAE,IAAI,CACf,OAAO,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,GAAG,KAAK,GAAG,QAAQ,CACvB;IAaR,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,GAAG,EACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;IAezD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAG/B;AAOD,wBAAsB,mCAAmC,CACvD,IAAI,CAAC,EAAE,uBAAuB,qFAkB/B"}
|