bybit-api 4.1.17 → 4.2.1
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 +21 -5
- package/lib/rest-client-v5.d.ts +205 -2
- package/lib/rest-client-v5.js +218 -1
- package/lib/rest-client-v5.js.map +1 -1
- package/lib/types/request/v5-account.d.ts +4 -0
- package/lib/types/request/v5-crypto-loan.d.ts +127 -0
- package/lib/types/response/v5-account.d.ts +1 -0
- package/lib/types/response/v5-crypto-loan.d.ts +183 -0
- package/lib/types/shared-v5.d.ts +18 -1
- package/lib/types/websockets/ws-events.d.ts +2 -1
- package/lib/types/websockets/ws-events.js.map +1 -1
- package/lib/util/BaseRestClient.js +4 -3
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/webCryptoAPI.d.ts +11 -1
- package/lib/util/webCryptoAPI.js +44 -6
- package/lib/util/webCryptoAPI.js.map +1 -1
- package/lib/websocket-client.js +4 -3
- package/lib/websocket-client.js.map +1 -1
- package/llms.txt +16337 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -22,12 +22,18 @@
|
|
|
22
22
|
Professional Node.js, JavaScript & TypeScript SDK for the Bybit REST APIs, WebSocket APIs & WebSocket Events:
|
|
23
23
|
|
|
24
24
|
- Complete integration with all Bybit REST APIs & WebSockets, including the WebSocket API.
|
|
25
|
-
- Higher API rate limits than the highest VIP tier!
|
|
26
|
-
- All API requests made with this SDK are automatically subject to significantly higher rate limits.
|
|
27
|
-
- Rate limits are raised to 400 requests per second, higher than the highest VIP tier.
|
|
28
|
-
- No action required. This is automatic for any API calls made with this SDK, for any user.
|
|
29
|
-
- Read more in the announcement: [here](https://github.com/tiagosiebler/bybit-api/issues/458).
|
|
30
25
|
- Actively maintained with a modern, promise-driven interface.
|
|
26
|
+
- Exclusive benefits with this Node.js, JavaScript & TypeScript SDK for Bybit:
|
|
27
|
+
- Higher API rate limits with this SDK than the highest VIP tier!
|
|
28
|
+
- All qualified API requests made with this SDK are automatically subject to significantly higher rate limits.
|
|
29
|
+
- Rate limits are raised to 400 requests per second, higher than the highest VIP tier.
|
|
30
|
+
- No action required. This is automatic for any API calls made with this SDK, for any user.
|
|
31
|
+
- Read more in the announcement: [here](https://github.com/tiagosiebler/bybit-api/issues/458).
|
|
32
|
+
- Lower minimum order notional value with this SDK!*
|
|
33
|
+
- Place orders with a notional value as low as $1.
|
|
34
|
+
- Lower than the default minimum notional order value $5.
|
|
35
|
+
- *Note: the lower min notional requirement is an undocumented benefit that may end at any time.
|
|
36
|
+
- Automatic support for HMAC & RSA authentication.
|
|
31
37
|
- TypeScript support (thorough type declarations for most API requests & responses, including WS API).
|
|
32
38
|
- JavaScript support (TypeScript not required but definitely recommended).
|
|
33
39
|
- Thorough & automatic end-to-end tests making real API calls & WebSocket connections, validating any changes before they reach npm.
|
|
@@ -78,6 +84,7 @@ Professional Node.js, JavaScript & TypeScript SDK for the Bybit REST APIs, WebSo
|
|
|
78
84
|
- [Browser Usage](#browser-usage)
|
|
79
85
|
- [Import](#import)
|
|
80
86
|
- [Webpack](#webpack)
|
|
87
|
+
- [Use with LLMs & AI](#use-with-llms--ai)
|
|
81
88
|
|
|
82
89
|
## Contributing
|
|
83
90
|
- [Contributions & Thanks](#contributions--thanks)
|
|
@@ -177,6 +184,7 @@ const { RestClientV5 } = require('bybit-api');
|
|
|
177
184
|
// import { RestClientV5 } from 'bybit-api';
|
|
178
185
|
|
|
179
186
|
const restClientOptions = {
|
|
187
|
+
/** supports HMAC & RSA API keys - automatically detected */
|
|
180
188
|
/** Your API key */
|
|
181
189
|
key: 'apiKeyHere',
|
|
182
190
|
|
|
@@ -287,6 +295,7 @@ const wsConfig = {
|
|
|
287
295
|
/**
|
|
288
296
|
* API credentials are optional. They are only required if you plan on using
|
|
289
297
|
* any account-specific topics or the WS API
|
|
298
|
+
* supports HMAC & RSA API keys - automatically detected
|
|
290
299
|
*/
|
|
291
300
|
key: 'yourAPIKeyHere',
|
|
292
301
|
secret: 'yourAPISecretHere',
|
|
@@ -438,6 +447,7 @@ const { WS_KEY_MAP, WebsocketAPIClient } = require('bybit-api');
|
|
|
438
447
|
// Create an instance of the WebsocketAPIClient. This is built on
|
|
439
448
|
// top of the WebsocketClient and will automatically handle WebSocket
|
|
440
449
|
// persistence and authentication for you.
|
|
450
|
+
// supports HMAC & RSA API keys - automatically detected
|
|
441
451
|
const wsClient = new WebsocketAPIClient(
|
|
442
452
|
{
|
|
443
453
|
key: 'yourApiKeyHere',
|
|
@@ -595,6 +605,12 @@ Build a bundle using webpack:
|
|
|
595
605
|
|
|
596
606
|
The bundle can be found in `dist/`. Altough usage should be largely consistent, smaller differences will exist. Documentation is still TODO - contributions welcome.
|
|
597
607
|
|
|
608
|
+
## Use with LLMs & AI
|
|
609
|
+
|
|
610
|
+
This SDK includes a bundled `llms.txt` file in the root of the repository. If you're developing with LLMs, use the included `llms.txt` with your LLM - it will significantly improve the LLMs understanding of how to correctly use this SDK.
|
|
611
|
+
|
|
612
|
+
This file contains AI optimised structure of all the functions in this package, and their parameters for easier use with any learning models or artificial intelligence.
|
|
613
|
+
|
|
598
614
|
---
|
|
599
615
|
|
|
600
616
|
<!-- template_contributions -->
|
package/lib/rest-client-v5.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountBorrowCollateralLimitV5, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AddOrReduceMarginParamsV5, AddOrReduceMarginResultV5, AffiliateUserInfoV5, AffiliateUserListItemV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, AmendSpreadOrderParamsV5, ApiKeyInfoV5, APIResponseV3, APIResponseV3WithTime, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResultV5, BatchCancelOrderParamsV5, BatchCancelOrderResultV5, BatchCreateOrderResultV5, BatchOrderParamsV5, BatchOrdersRetExtInfoV5, BorrowCryptoLoanParamsV5, BorrowHistoryRecordV5, BrokerIssuedVoucherV5, BrokerVoucherSpecV5, CancelAllOrdersParamsV5, CancelOrderParamsV5, CategoryCursorListV5, CategoryListV5, CategorySymbolListV5, CategoryV5, ClosedOptionsPositionV5, ClosedPnLV5, CoinExchangeRecordV5, CoinGreeksV5, CoinInfoV5, CollateralInfoV5, CompletedLoanOrderV5, ConfirmNewRiskLimitParamsV5, ConvertCoinsParamsV5, ConvertCoinSpecV5, ConvertHistoryRecordV5, ConvertQuoteV5, ConvertStatusV5, CreateP2PAdParamsV5, CreateSubApiKeyParamsV5, CreateSubApiKeyResultV5, CreateSubMemberParamsV5, CreateSubMemberResultV5, CursorListV5, CursorRowsV5, DCPInfoV5, DeleteSubMemberParamsV5, DeliveryPriceV5, DeliveryRecordV5, DepositAddressChainV5, DepositRecordV5, EarnOrderHistoryV5, EarnPositionV5, EarnProductV5, ExchangeBrokerAccountInfoV5, ExchangeBrokerEarningResultV5, ExchangeBrokerSubAccountDepositRecordV5, ExecutionV5, FeeRateV5, FundingRateHistoryResponseV5, GetAccountCoinBalanceParamsV5, GetAccountHistoricOrdersParamsV5, GetAccountOrdersParamsV5, GetAllCoinsBalanceParamsV5, GetAllowedDepositCoinInfoParamsV5, GetAssetInfoParamsV5, GetBorrowHistoryParamsV5, GetBrokerIssuedVoucherParamsV5, GetBrokerSubAccountDepositsV5, GetClassicTransactionLogsParamsV5, GetClosedOptionsPositionsParamsV5, GetClosedPnLParamsV5, GetCoinExchangeRecordParamsV5, GetCompletedLoanOrderHistoryParamsV5, GetConvertHistoryParamsV5, GetDeliveryPriceParamsV5, GetDeliveryRecordParamsV5, GetDepositRecordParamsV5, GetEarnOrderHistoryParamsV5, GetEarnPositionParamsV5, GetExchangeBrokerEarningsParamsV5, GetExecutionListParamsV5, GetFeeRateParamsV5, GetFundingRateHistoryParamsV5, GetHistoricalVolatilityParamsV5, GetIndexPriceKlineParamsV5, GetInstrumentsInfoParamsV5, GetInsuranceParamsV5, GetInternalDepositRecordParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetLoanLTVAdjustmentHistoryParamsV5, GetLongShortRatioParamsV5, GetMarkPriceKlineParamsV5, GetMovePositionHistoryParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetP2PAccountCoinsBalanceParamsV5, GetP2PCounterpartyUserInfoParamsV5, GetP2POnlineAdsParamsV5, GetP2POrderMessagesParamsV5, GetP2POrdersParamsV5, GetP2PPendingOrdersParamsV5, GetP2PPersonalAdsParamsV5, GetPremiumIndexPriceKlineParamsV5, GetPreUpgradeClosedPnlParamsV5, GetPreUpgradeOptionDeliveryRecordParamsV5, GetPreUpgradeOrderHistoryParamsV5, GetPreUpgradeTradeHistoryParamsV5, GetPreUpgradeTransactionLogParamsV5, GetPreUpgradeUSDCSessionParamsV5, GetPublicTradingHistoryParamsV5, GetRepaymentHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpreadInstrumentsInfoParamsV5, GetSpreadOpenOrdersParamsV5, GetSpreadOrderHistoryParamsV5, GetSpreadTradeHistoryParamsV5, GetSubAccountAllApiKeysParamsV5, GetSubAccountDepositRecordParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetUnpaidLoanOrdersParamsV5, GetVIPMarginDataParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalDepositRecordV5, InternalTransferRecordV5, IssueVoucherParamsV5, LoanLTVAdjustmentHistoryV5, LongShortRatioV5, MarkP2POrderAsPaidParamsV5, MMPModifyParamsV5, MMPStateV5, MovePositionHistoryV5, MovePositionParamsV5, MovePositionResultV5, OHLCKlineV5, OHLCVKlineV5, OpenInterestResponseV5, OptionDeliveryPriceV5, OrderbookResponseV5, OrderParamsV5, OrderPriceLimitV5, OrderResultV5, OrderSideV5, P2PAccountCoinsBalanceV5, P2PAdDetailV5, P2PCounterpartyUserInfoV5, P2PCreateAdResponseV5, P2POnlineAdsResponseV5, P2POrderDetailV5, P2POrderMessageV5, P2POrdersResponseV5, P2PPersonalAdsResponseV5, P2PUserInfoV5, P2PUserPaymentV5, PositionInfoParamsV5, PositionV5, PreCheckOrderResultV5, PreUpgradeOptionsDelivery, PreUpgradeTransaction, PreUpgradeUSDCSessionSettlement, PublicTradeV5, RepayLiabilityParamsV5, RepayLiabilityResultV5, RepaymentHistoryV5, RequestConvertQuoteParamsV5, RiskLimitV5, SendP2POrderMessageParamsV5, SetAutoAddMarginParamsV5, SetCollateralCoinParamsV5, SetLeverageParamsV5, SetRiskLimitParamsV5, SetRiskLimitResultV5, SettlementRecordV5, SetTPSLModeParamsV5, SetTradingStopParamsV5, SpotBorrowCheckResultV5, SpotMarginStateV5, SpreadInstrumentInfoV5, SpreadOpenOrderV5, SpreadOrderbookResponseV5, SpreadOrderHistoryV5, SpreadRecentTradeV5, SpreadTickerV5, SpreadTradeV5, SubMemberV5, SubmitSpreadOrderParamsV5, SubmitStakeRedeemParamsV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TPSLModeV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UnpaidLoanOrderV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, UpdateP2PAdParamsV5, VaspEntityV5, VipBorrowableCoinsV5, VipCollateralCoinsV5, VIPMarginDataV5, WalletBalanceV5, WithdrawableAmountV5, WithdrawalRecordV5, WithdrawParamsV5 } from './types';
|
|
1
|
+
import { AccountBorrowCollateralLimitV5, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AddOrReduceMarginParamsV5, AddOrReduceMarginResultV5, AdjustCollateralAmountParamsV5, AdjustCollateralAmountV5, AffiliateUserInfoV5, AffiliateUserListItemV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, AmendSpreadOrderParamsV5, ApiKeyInfoV5, APIResponseV3, APIResponseV3WithTime, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResultV5, BatchCancelOrderParamsV5, BatchCancelOrderResultV5, BatchCreateOrderResultV5, BatchOrderParamsV5, BatchOrdersRetExtInfoV5, BorrowableCoinV5, BorrowContractInfoFixedV5, BorrowCryptoLoanParamsV5, BorrowFlexibleParamsV5, BorrowFlexibleV5, BorrowHistoryFlexibleV5, BorrowHistoryRecordV5, BorrowOrderInfoFixedV5, BorrowOrderQuoteFixedV5, BrokerIssuedVoucherV5, BrokerVoucherSpecV5, CancelAllOrdersParamsV5, CancelBorrowOrderFixedParamsV5, CancelOrderParamsV5, CancelSupplyOrderFixedParamsV5, CategoryCursorListV5, CategoryListV5, CategorySymbolListV5, CategoryV5, ClosedOptionsPositionV5, ClosedPnLV5, CoinExchangeRecordV5, CoinGreeksV5, CoinInfoV5, CollateralAdjustmentHistoryV5, CollateralDataV5, CollateralInfoV5, CompletedLoanOrderV5, ConfirmNewRiskLimitParamsV5, ConvertCoinsParamsV5, ConvertCoinSpecV5, ConvertHistoryRecordV5, ConvertQuoteV5, ConvertStatusV5, CreateBorrowOrderFixedParamsV5, CreateBorrowOrderFixedV5, CreateP2PAdParamsV5, CreateSubApiKeyParamsV5, CreateSubApiKeyResultV5, CreateSubMemberParamsV5, CreateSubMemberResultV5, CreateSupplyOrderFixedParamsV5, CreateSupplyOrderFixedV5, CryptoLoanPositionV5, CursorListV5, CursorRowsV5, DCPInfoV5, DeleteSubMemberParamsV5, DeliveryPriceV5, DeliveryRecordV5, DepositAddressChainV5, DepositRecordV5, EarnOrderHistoryV5, EarnPositionV5, EarnProductV5, ExchangeBrokerAccountInfoV5, ExchangeBrokerEarningResultV5, ExchangeBrokerSubAccountDepositRecordV5, ExecutionV5, FeeRateV5, FundingRateHistoryResponseV5, GetAccountCoinBalanceParamsV5, GetAccountHistoricOrdersParamsV5, GetAccountOrdersParamsV5, GetAllCoinsBalanceParamsV5, GetAllowedDepositCoinInfoParamsV5, GetAssetInfoParamsV5, GetBorrowableCoinsParamsV5, GetBorrowContractInfoFixedParamsV5, GetBorrowHistoryFlexibleParamsV5, GetBorrowHistoryParamsV5, GetBorrowOrderInfoFixedParamsV5, GetBorrowOrderQuoteFixedParamsV5, GetBrokerIssuedVoucherParamsV5, GetBrokerSubAccountDepositsV5, GetClassicTransactionLogsParamsV5, GetClosedOptionsPositionsParamsV5, GetClosedPnLParamsV5, GetCoinExchangeRecordParamsV5, GetCollateralAdjustmentHistoryParamsV5, GetCollateralCoinsParamsV5, GetCompletedLoanOrderHistoryParamsV5, GetConvertHistoryParamsV5, GetDeliveryPriceParamsV5, GetDeliveryRecordParamsV5, GetDepositRecordParamsV5, GetEarnOrderHistoryParamsV5, GetEarnPositionParamsV5, GetExchangeBrokerEarningsParamsV5, GetExecutionListParamsV5, GetFeeRateParamsV5, GetFundingRateHistoryParamsV5, GetHistoricalVolatilityParamsV5, GetIndexPriceKlineParamsV5, GetInstrumentsInfoParamsV5, GetInsuranceParamsV5, GetInternalDepositRecordParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetLoanLTVAdjustmentHistoryParamsV5, GetLongShortRatioParamsV5, GetMarkPriceKlineParamsV5, GetMaxCollateralAmountParamsV5, GetMovePositionHistoryParamsV5, GetOngoingFlexibleLoansParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetP2PAccountCoinsBalanceParamsV5, GetP2PCounterpartyUserInfoParamsV5, GetP2POnlineAdsParamsV5, GetP2POrderMessagesParamsV5, GetP2POrdersParamsV5, GetP2PPendingOrdersParamsV5, GetP2PPersonalAdsParamsV5, GetPremiumIndexPriceKlineParamsV5, GetPreUpgradeClosedPnlParamsV5, GetPreUpgradeOptionDeliveryRecordParamsV5, GetPreUpgradeOrderHistoryParamsV5, GetPreUpgradeTradeHistoryParamsV5, GetPreUpgradeTransactionLogParamsV5, GetPreUpgradeUSDCSessionParamsV5, GetPublicTradingHistoryParamsV5, GetRepaymentHistoryFixedParamsV5, GetRepaymentHistoryFlexibleParamsV5, GetRepaymentHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpreadInstrumentsInfoParamsV5, GetSpreadOpenOrdersParamsV5, GetSpreadOrderHistoryParamsV5, GetSpreadTradeHistoryParamsV5, GetSubAccountAllApiKeysParamsV5, GetSubAccountDepositRecordParamsV5, GetSupplyContractInfoFixedParamsV5, GetSupplyOrderInfoFixedParamsV5, GetSupplyOrderQuoteFixedParamsV5, GetSystemStatusParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetUnpaidLoanOrdersParamsV5, GetVIPMarginDataParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalDepositRecordV5, InternalTransferRecordV5, IssueVoucherParamsV5, LoanLTVAdjustmentHistoryV5, LongShortRatioV5, MarkP2POrderAsPaidParamsV5, MMPModifyParamsV5, MMPStateV5, MovePositionHistoryV5, MovePositionParamsV5, MovePositionResultV5, OHLCKlineV5, OHLCVKlineV5, OngoingFlexibleLoanV5, OpenInterestResponseV5, OptionDeliveryPriceV5, OrderbookResponseV5, OrderParamsV5, OrderPriceLimitV5, OrderResultV5, OrderSideV5, P2PAccountCoinsBalanceV5, P2PAdDetailV5, P2PCounterpartyUserInfoV5, P2PCreateAdResponseV5, P2POnlineAdsResponseV5, P2POrderDetailV5, P2POrderMessageV5, P2POrdersResponseV5, P2PPersonalAdsResponseV5, P2PUserInfoV5, P2PUserPaymentV5, PositionInfoParamsV5, PositionV5, PreCheckOrderResultV5, PreUpgradeOptionsDelivery, PreUpgradeTransaction, PreUpgradeUSDCSessionSettlement, PublicTradeV5, RepayFixedParamsV5, RepayFixedV5, RepayFlexibleParamsV5, RepayFlexibleV5, RepayLiabilityParamsV5, RepayLiabilityResultV5, RepaymentHistoryFixedV5, RepaymentHistoryFlexibleV5, RepaymentHistoryV5, RequestConvertQuoteParamsV5, RiskLimitV5, SendP2POrderMessageParamsV5, SetAutoAddMarginParamsV5, SetCollateralCoinParamsV5, SetLeverageParamsV5, SetLimitPriceActionParamsV5, SetRiskLimitParamsV5, SetRiskLimitResultV5, SettlementRecordV5, SetTPSLModeParamsV5, SetTradingStopParamsV5, SpotBorrowCheckResultV5, SpotMarginStateV5, SpreadInstrumentInfoV5, SpreadOpenOrderV5, SpreadOrderbookResponseV5, SpreadOrderHistoryV5, SpreadRecentTradeV5, SpreadTickerV5, SpreadTradeV5, SubMemberV5, SubmitSpreadOrderParamsV5, SubmitStakeRedeemParamsV5, SupplyContractInfoFixedV5, SupplyOrderInfoFixedV5, SupplyOrderQuoteFixedV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, SystemStatusItemV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TPSLModeV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UnpaidLoanOrderV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, UpdateP2PAdParamsV5, VaspEntityV5, VipBorrowableCoinsV5, VipCollateralCoinsV5, VIPMarginDataV5, WalletBalanceV5, WithdrawableAmountV5, WithdrawalRecordV5, WithdrawParamsV5 } from './types';
|
|
2
2
|
import BaseRestClient from './util/BaseRestClient';
|
|
3
3
|
/**
|
|
4
4
|
* REST API client for V5 REST APIs
|
|
@@ -24,6 +24,9 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
24
24
|
****** Misc Bybit APIs
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
|
+
getSystemStatus(params?: GetSystemStatusParamsV5): Promise<APIResponseV3WithTime<{
|
|
28
|
+
list: SystemStatusItemV5[];
|
|
29
|
+
}>>;
|
|
27
30
|
getClientType(): "v5";
|
|
28
31
|
fetchServerTime(): Promise<number>;
|
|
29
32
|
getServerTime(): Promise<APIResponseV3WithTime<{
|
|
@@ -687,6 +690,14 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
687
690
|
setSpotHedging(params: {
|
|
688
691
|
setHedgingMode: 'ON' | 'OFF';
|
|
689
692
|
}): Promise<APIResponseV3WithTime<{}>>;
|
|
693
|
+
/**
|
|
694
|
+
* Set Limit Price Behaviour
|
|
695
|
+
* You can configure how the system behaves when your limit order price exceeds the highest bid or lowest ask price.
|
|
696
|
+
*
|
|
697
|
+
* Spot: If the order price exceeds the boundary, the system rejects the request.
|
|
698
|
+
* Futures: If the order price exceeds the boundary, the system will automatically adjust the price to the nearest allowed boundary.
|
|
699
|
+
*/
|
|
700
|
+
setLimitPriceAction(params: SetLimitPriceActionParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
690
701
|
/**
|
|
691
702
|
* Configure Market Maker Protection (MMP)
|
|
692
703
|
*/
|
|
@@ -1286,13 +1297,16 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1286
1297
|
}>>;
|
|
1287
1298
|
/**
|
|
1288
1299
|
*
|
|
1289
|
-
****** Crypto Loan
|
|
1300
|
+
****** Crypto Loan - Legacy
|
|
1301
|
+
*
|
|
1302
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1290
1303
|
*
|
|
1291
1304
|
*/
|
|
1292
1305
|
/**
|
|
1293
1306
|
* Get Collateral Coins
|
|
1294
1307
|
*
|
|
1295
1308
|
* INFO: Do not need authentication
|
|
1309
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1296
1310
|
*/
|
|
1297
1311
|
getCollateralCoins(params?: {
|
|
1298
1312
|
vipLevel?: string;
|
|
@@ -1304,6 +1318,7 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1304
1318
|
* Get Borrowable Coins
|
|
1305
1319
|
*
|
|
1306
1320
|
* INFO: Do not need authentication
|
|
1321
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1307
1322
|
*/
|
|
1308
1323
|
getBorrowableCoins(params?: {
|
|
1309
1324
|
vipLevel?: string;
|
|
@@ -1316,6 +1331,7 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1316
1331
|
* Query the account borrowable/collateral limit
|
|
1317
1332
|
*
|
|
1318
1333
|
* Permission: "Spot trade"
|
|
1334
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1319
1335
|
*/
|
|
1320
1336
|
getAccountBorrowCollateralLimit(params: {
|
|
1321
1337
|
loanCurrency: string;
|
|
@@ -1323,6 +1339,7 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1323
1339
|
}): Promise<APIResponseV3WithTime<AccountBorrowCollateralLimitV5>>;
|
|
1324
1340
|
/**
|
|
1325
1341
|
* Borrow Crypto Loan
|
|
1342
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1326
1343
|
*
|
|
1327
1344
|
* Permission: "Spot trade"
|
|
1328
1345
|
*
|
|
@@ -1336,6 +1353,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1336
1353
|
/**
|
|
1337
1354
|
* Repay Crypto Loan
|
|
1338
1355
|
*
|
|
1356
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1357
|
+
*
|
|
1339
1358
|
* You can repay partial loan. If there is interest occurred, interest will be repaid in priority
|
|
1340
1359
|
*
|
|
1341
1360
|
* Permission: "Spot trade"
|
|
@@ -1354,6 +1373,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1354
1373
|
* Get Unpaid Loan Orders
|
|
1355
1374
|
* Query the ongoing loan orders, which are not fully repaid
|
|
1356
1375
|
*
|
|
1376
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1377
|
+
*
|
|
1357
1378
|
* Permission: "Spot trade"
|
|
1358
1379
|
*/
|
|
1359
1380
|
getUnpaidLoanOrders(params?: GetUnpaidLoanOrdersParamsV5): Promise<APIResponseV3WithTime<{
|
|
@@ -1364,6 +1385,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1364
1385
|
* Get Repayment Transaction History
|
|
1365
1386
|
* Query repaid transaction history
|
|
1366
1387
|
*
|
|
1388
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1389
|
+
*
|
|
1367
1390
|
* Permission: "Spot trade"
|
|
1368
1391
|
*
|
|
1369
1392
|
* INFO:
|
|
@@ -1378,6 +1401,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1378
1401
|
* Get Completed Loan Order History
|
|
1379
1402
|
* Query the completed loan orders
|
|
1380
1403
|
*
|
|
1404
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1405
|
+
*
|
|
1381
1406
|
* Permission: "Spot trade"
|
|
1382
1407
|
*
|
|
1383
1408
|
* INFO:
|
|
@@ -1391,6 +1416,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1391
1416
|
* Get Max. Allowed Reduction Collateral Amount
|
|
1392
1417
|
* Query the maximum allowed reduction collateral amount
|
|
1393
1418
|
*
|
|
1419
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1420
|
+
*
|
|
1394
1421
|
* Permission: "Spot trade"
|
|
1395
1422
|
*/
|
|
1396
1423
|
getMaxAllowedReductionCollateralAmount(params: {
|
|
@@ -1402,6 +1429,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1402
1429
|
* Adjust Collateral Amount
|
|
1403
1430
|
* You can increase or reduce collateral amount. When you reduce, please follow the max. allowed reduction amount.
|
|
1404
1431
|
*
|
|
1432
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1433
|
+
*
|
|
1405
1434
|
* Permission: "Spot trade"
|
|
1406
1435
|
*
|
|
1407
1436
|
* INFO:
|
|
@@ -1418,6 +1447,8 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1418
1447
|
* Get Loan LTV Adjustment History
|
|
1419
1448
|
* Query the transaction history of collateral amount adjustment
|
|
1420
1449
|
*
|
|
1450
|
+
* @deprecated - Use "Crypto Loan - New" Endpoints instead
|
|
1451
|
+
*
|
|
1421
1452
|
* Permission: "Spot trade"
|
|
1422
1453
|
*
|
|
1423
1454
|
* INFO:
|
|
@@ -1428,6 +1459,178 @@ export declare class RestClientV5 extends BaseRestClient {
|
|
|
1428
1459
|
list: LoanLTVAdjustmentHistoryV5[];
|
|
1429
1460
|
nextPageCursor: string;
|
|
1430
1461
|
}>>;
|
|
1462
|
+
/**
|
|
1463
|
+
*
|
|
1464
|
+
****** Crypto Loan New
|
|
1465
|
+
*
|
|
1466
|
+
*/
|
|
1467
|
+
/**
|
|
1468
|
+
* Get Borrowable Coins New
|
|
1469
|
+
*
|
|
1470
|
+
*/
|
|
1471
|
+
getLoanBorrowableCoins(params?: GetBorrowableCoinsParamsV5): Promise<APIResponseV3WithTime<{
|
|
1472
|
+
list: BorrowableCoinV5[];
|
|
1473
|
+
}>>;
|
|
1474
|
+
/**
|
|
1475
|
+
* Get Collateral Coins New
|
|
1476
|
+
*
|
|
1477
|
+
*/
|
|
1478
|
+
getLoanCollateralCoins(params?: GetCollateralCoinsParamsV5): Promise<APIResponseV3WithTime<CollateralDataV5>>;
|
|
1479
|
+
/**
|
|
1480
|
+
* Get Max. Allowed Collateral Reduction Amount New
|
|
1481
|
+
*
|
|
1482
|
+
*/
|
|
1483
|
+
getMaxCollateralAmount(params: GetMaxCollateralAmountParamsV5): Promise<APIResponseV3WithTime<{
|
|
1484
|
+
maxCollateralAmount: string;
|
|
1485
|
+
}>>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Adjust Collateral Amount New
|
|
1488
|
+
* You can increase or reduce your collateral amount. When you reduce, please obey the Get Max. Allowed Collateral Reduction Amount
|
|
1489
|
+
*/
|
|
1490
|
+
updateCollateralAmount(params: AdjustCollateralAmountParamsV5): Promise<APIResponseV3WithTime<AdjustCollateralAmountV5>>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Get Collateral Adjustment History New
|
|
1493
|
+
* Query for your LTV adjustment history.
|
|
1494
|
+
*
|
|
1495
|
+
*/
|
|
1496
|
+
getCollateralAdjustmentHistory(params?: GetCollateralAdjustmentHistoryParamsV5): Promise<APIResponseV3WithTime<{
|
|
1497
|
+
list: CollateralAdjustmentHistoryV5[];
|
|
1498
|
+
nextPageCursor: string;
|
|
1499
|
+
}>>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Get Crypto Loan Position New
|
|
1502
|
+
*
|
|
1503
|
+
*/
|
|
1504
|
+
getCryptoLoanPosition(): Promise<APIResponseV3WithTime<CryptoLoanPositionV5>>;
|
|
1505
|
+
/**
|
|
1506
|
+
*
|
|
1507
|
+
****** Crypto Loan New - Flexible Loan
|
|
1508
|
+
*
|
|
1509
|
+
*/
|
|
1510
|
+
/**
|
|
1511
|
+
* Borrow Flexible Loan
|
|
1512
|
+
* Fully or partially repay a loan. If interest is due, that is paid off first, with the loaned amount being paid off only after due interest.
|
|
1513
|
+
*
|
|
1514
|
+
*/
|
|
1515
|
+
borrowFlexible(params: BorrowFlexibleParamsV5): Promise<APIResponseV3WithTime<BorrowFlexibleV5>>;
|
|
1516
|
+
/**
|
|
1517
|
+
* Repay Flexible Loan
|
|
1518
|
+
* Fully or partially repay a loan. If interest is due, that is paid off first, with the loaned amount being paid off only after due interest.
|
|
1519
|
+
*
|
|
1520
|
+
*/
|
|
1521
|
+
repayFlexible(params: RepayFlexibleParamsV5): Promise<APIResponseV3WithTime<RepayFlexibleV5>>;
|
|
1522
|
+
/**
|
|
1523
|
+
* Get Flexible Loans
|
|
1524
|
+
* Query for your ongoing loans
|
|
1525
|
+
*
|
|
1526
|
+
*/
|
|
1527
|
+
getOngoingFlexibleLoans(params?: GetOngoingFlexibleLoansParamsV5): Promise<APIResponseV3WithTime<{
|
|
1528
|
+
list: OngoingFlexibleLoanV5[];
|
|
1529
|
+
}>>;
|
|
1530
|
+
/**
|
|
1531
|
+
* Get Borrow Orders History
|
|
1532
|
+
*
|
|
1533
|
+
*/
|
|
1534
|
+
getBorrowHistoryFlexible(params?: GetBorrowHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
|
|
1535
|
+
list: BorrowHistoryFlexibleV5[];
|
|
1536
|
+
nextPageCursor: string;
|
|
1537
|
+
}>>;
|
|
1538
|
+
/**
|
|
1539
|
+
* Get Repayment Orders History
|
|
1540
|
+
*
|
|
1541
|
+
*/
|
|
1542
|
+
getRepaymentHistoryFlexible(params?: GetRepaymentHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
|
|
1543
|
+
list: RepaymentHistoryFlexibleV5[];
|
|
1544
|
+
nextPageCursor: string;
|
|
1545
|
+
}>>;
|
|
1546
|
+
/**
|
|
1547
|
+
*
|
|
1548
|
+
****** Fixed Loan
|
|
1549
|
+
*
|
|
1550
|
+
*/
|
|
1551
|
+
/**
|
|
1552
|
+
* Get Supplying Market
|
|
1553
|
+
* If you want to supply, you can use this endpoint to check whether there are any suitable counterparty borrow orders available.
|
|
1554
|
+
*
|
|
1555
|
+
*/
|
|
1556
|
+
getSupplyOrderQuoteFixed(params: GetSupplyOrderQuoteFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1557
|
+
list: SupplyOrderQuoteFixedV5[];
|
|
1558
|
+
}>>;
|
|
1559
|
+
/**
|
|
1560
|
+
* Get Borrowing Market
|
|
1561
|
+
* If you want to borrow, you can use this endpoint to check whether there are any suitable counterparty supply orders available.
|
|
1562
|
+
*
|
|
1563
|
+
*/
|
|
1564
|
+
getBorrowOrderQuoteFixed(params: GetBorrowOrderQuoteFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1565
|
+
list: BorrowOrderQuoteFixedV5[];
|
|
1566
|
+
}>>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Create Borrow Order
|
|
1569
|
+
* The loan funds are released to the Funding wallet.
|
|
1570
|
+
* The collateral funds are deducted from the Funding wallet, so make sure you have enough collateral amount in the Funding wallet.
|
|
1571
|
+
*/
|
|
1572
|
+
createBorrowOrderFixed(params: CreateBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<CreateBorrowOrderFixedV5>>;
|
|
1573
|
+
/**
|
|
1574
|
+
* Create Supply Order
|
|
1575
|
+
*
|
|
1576
|
+
* Permission: "Spot trade"
|
|
1577
|
+
*/
|
|
1578
|
+
createSupplyOrderFixed(params: CreateSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<CreateSupplyOrderFixedV5>>;
|
|
1579
|
+
/**
|
|
1580
|
+
* Cancel Borrow Order
|
|
1581
|
+
*
|
|
1582
|
+
*/
|
|
1583
|
+
cancelBorrowOrderFixed(params: CancelBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Cancel Supply Order
|
|
1586
|
+
*/
|
|
1587
|
+
cancelSupplyOrderFixed(params: CancelSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<{}>>;
|
|
1588
|
+
/**
|
|
1589
|
+
* Get Borrow Contract Info
|
|
1590
|
+
*
|
|
1591
|
+
*/
|
|
1592
|
+
getBorrowContractInfoFixed(params?: GetBorrowContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1593
|
+
list: BorrowContractInfoFixedV5[];
|
|
1594
|
+
nextPageCursor: string;
|
|
1595
|
+
}>>;
|
|
1596
|
+
/**
|
|
1597
|
+
* Get Supply Contract Info
|
|
1598
|
+
*
|
|
1599
|
+
*/
|
|
1600
|
+
getSupplyContractInfoFixed(params?: GetSupplyContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1601
|
+
list: SupplyContractInfoFixedV5[];
|
|
1602
|
+
nextPageCursor: string;
|
|
1603
|
+
}>>;
|
|
1604
|
+
/**
|
|
1605
|
+
* Get Borrow Order Info
|
|
1606
|
+
*
|
|
1607
|
+
*/
|
|
1608
|
+
getBorrowOrderInfoFixed(params?: GetBorrowOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1609
|
+
list: BorrowOrderInfoFixedV5[];
|
|
1610
|
+
nextPageCursor: string;
|
|
1611
|
+
}>>;
|
|
1612
|
+
/**
|
|
1613
|
+
* Get Supply Order Info
|
|
1614
|
+
*
|
|
1615
|
+
*/
|
|
1616
|
+
getSupplyOrderInfoFixed(params?: GetSupplyOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1617
|
+
list: SupplyOrderInfoFixedV5[];
|
|
1618
|
+
nextPageCursor: string;
|
|
1619
|
+
}>>;
|
|
1620
|
+
/**
|
|
1621
|
+
* Repay Fixed Loan
|
|
1622
|
+
* Either loanId or loanCurrency needs to be passed
|
|
1623
|
+
*
|
|
1624
|
+
*/
|
|
1625
|
+
repayFixed(params: RepayFixedParamsV5): Promise<APIResponseV3WithTime<RepayFixedV5>>;
|
|
1626
|
+
/**
|
|
1627
|
+
* Get Repayment History
|
|
1628
|
+
*
|
|
1629
|
+
*/
|
|
1630
|
+
getRepaymentHistoryFixed(params?: GetRepaymentHistoryFixedParamsV5): Promise<APIResponseV3WithTime<{
|
|
1631
|
+
list: RepaymentHistoryFixedV5[];
|
|
1632
|
+
nextPageCursor: string;
|
|
1633
|
+
}>>;
|
|
1431
1634
|
/**
|
|
1432
1635
|
*
|
|
1433
1636
|
****** Institutional Lending
|