Class: RestClientV5
REST API client for V5 REST APIs
https://bybit-exchange.github.io/docs/v5/intro
Extends
default
Constructors
Constructor
new RestClientV5(restOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig): RestClientV5;Create an instance of the REST client. Pass API credentials in the object in the first parameter.
Parameters
| Parameter | Type | Description |
|---|---|---|
restOptions? | RestClientOptions | options to configure REST API connectivity |
networkOptions? | AxiosRequestConfig | HTTP networking options for axios |
Returns
RestClientV5
Inherited from
BaseRestClient.constructor
Methods
acceptNonLPQuote()
acceptNonLPQuote(params: AcceptNonLPQuoteParamsV5): Promise<APIResponseV3WithTime<AcceptNonLPQuoteResultV5>>;Accept non-LP Quote Accept non-LP Quote.
INFO:
- Up to 50 requests per second
Parameters
| Parameter | Type |
|---|---|
params | AcceptNonLPQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<AcceptNonLPQuoteResultV5>>
addOrReduceMargin()
addOrReduceMargin(params: AddOrReduceMarginParamsV5): Promise<APIResponseV3WithTime<AddOrReduceMarginResultV5>>;Manually add or reduce margin for isolated margin position
Unified account covers: USDT perpetual / USDC perpetual / USDC futures / Inverse contract Normal account covers: USDT perpetual / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params | AddOrReduceMarginParamsV5 |
Returns
Promise<APIResponseV3WithTime<AddOrReduceMarginResultV5>>
adjustCollateralAmount()
adjustCollateralAmount(params: object): Promise<APIResponseV3WithTime<{
adjustId: string;
}>>;Adjust Collateral Amount You can increase or reduce collateral amount. When you reduce, please follow the max. allowed reduction amount.
Parameters
| Parameter | Type |
|---|---|
params | { amount: string; direction: "0" | "1"; orderId: string; } |
params.amount | string |
params.direction | "0" | "1" |
params.orderId | string |
Returns
Promise<APIResponseV3WithTime<{ adjustId: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
INFO: The adjusted collateral amount will be returned to or deducted from Funding account
amendOrder()
amendOrder(params: AmendOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;Parameters
| Parameter | Type |
|---|---|
params | AmendOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<OrderResultV5>>
amendSpreadOrder()
amendSpreadOrder(params: AmendSpreadOrderParamsV5): Promise<APIResponseV3WithTime<{
orderId: string;
orderLinkId: string;
}>>;Amend Spread Order You can only modify unfilled or partially filled orders.
Parameters
| Parameter | Type |
|---|---|
params | AmendSpreadOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>
batchAmendOrders()
batchAmendOrders(category: "spot" | "linear" | "inverse" | "option", orders: BatchAmendOrderParamsV5[]): Promise<APIResponseV3WithTime<{
list: BatchAmendOrderResultV5[];
}, BatchOrdersRetExtInfoV5>>;This endpoint allows you to amend more than one open order in a single request. Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
You can modify unfilled or partially filled orders. Conditional orders are not supported.
A maximum of 20 orders can be amended per request.
Parameters
| Parameter | Type |
|---|---|
category | "spot" | "linear" | "inverse" | "option" |
orders | BatchAmendOrderParamsV5[] |
Returns
Promise<APIResponseV3WithTime<{ list: BatchAmendOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>
batchCancelOrders()
batchCancelOrders(category: "spot" | "linear" | "inverse" | "option", orders: BatchCancelOrderParamsV5[]): Promise<APIResponseV3WithTime<{
list: BatchCancelOrderResultV5[];
}, BatchOrdersRetExtInfoV5>>;This endpoint allows you to cancel more than one open order in a single request. Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
You must specify orderId or orderLinkId. If orderId and orderLinkId is not matched, the system will process orderId first.
You can cancel unfilled or partially filled orders. A maximum of 20 orders can be cancelled per request.
Parameters
| Parameter | Type |
|---|---|
category | "spot" | "linear" | "inverse" | "option" |
orders | BatchCancelOrderParamsV5[] |
Returns
Promise<APIResponseV3WithTime<{ list: BatchCancelOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>
batchSetCollateralCoin()
batchSetCollateralCoin(params: object): Promise<APIResponseV3WithTime<{
list: SetCollateralCoinParamsV5[];
}>>;Parameters
| Parameter | Type |
|---|---|
params | { request: SetCollateralCoinParamsV5[]; } |
params.request | SetCollateralCoinParamsV5[] |
Returns
Promise<APIResponseV3WithTime<{ list: SetCollateralCoinParamsV5[]; }>>
batchSubmitOrders()
batchSubmitOrders(category: "spot" | "linear" | "inverse" | "option", orders: BatchOrderParamsV5[]): Promise<APIResponseV3WithTime<{
list: BatchCreateOrderResultV5[];
}, BatchOrdersRetExtInfoV5>>;This endpoint allows you to place more than one order in a single request. Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
Make sure you have sufficient funds in your account when placing an order. Once an order is placed, according to the funds required by the order, the funds in your account will be frozen by the corresponding amount during the life cycle of the order.
A maximum of 20 orders can be placed per request. The returned data list is divided into two lists. The first list indicates whether or not the order creation was successful and the second list details the created order information. The structure of the two lists are completely consistent.
Parameters
| Parameter | Type |
|---|---|
category | "spot" | "linear" | "inverse" | "option" |
orders | BatchOrderParamsV5[] |
Returns
Promise<APIResponseV3WithTime<{ list: BatchCreateOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>
bindOrUnbindUID()
bindOrUnbindUID(params: object): Promise<APIResponseV3WithTime<{
operate: "0" | "1";
uid: string;
}>>;Bind or unbind UID for the institutional loan product.
INFO Risk unit designated UID cannot be unbound This endpoint can only be called by uids in the risk unit list The UID must be upgraded to UTA Pro if you try to bind it. When the API is operated through the API Key of any UID in the risk unit, the UID is bound or unbound in the risk unit.
Parameters
| Parameter | Type |
|---|---|
params | { operate: "0" | "1"; uid: string; } |
params.operate | "0" | "1" |
params.uid | string |
Returns
Promise<APIResponseV3WithTime<{ operate: "0" | "1"; uid: string; }>>
borrowCryptoLoan()
borrowCryptoLoan(params: BorrowCryptoLoanParamsV5): Promise<APIResponseV3WithTime<{
orderId: string;
}>>;Borrow Crypto Loan
Parameters
| Parameter | Type |
|---|---|
params | BorrowCryptoLoanParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ orderId: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
INFO: The loan funds are released to the Funding account The collateral funds are deducted from the Funding account, so make sure you have enough collateral amount in the funding wallet
borrowFlexible()
borrowFlexible(params: BorrowFlexibleParamsV5): Promise<APIResponseV3WithTime<BorrowFlexibleV5>>;Borrow Flexible Loan 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.
Parameters
| Parameter | Type |
|---|---|
params | BorrowFlexibleParamsV5 |
Returns
Promise<APIResponseV3WithTime<BorrowFlexibleV5>>
cancelAllOrders()
cancelAllOrders(params: CancelAllOrdersParamsV5): Promise<APIResponseV3WithTime<{
list: OrderResultV5[];
success: string;
}>>;Parameters
| Parameter | Type |
|---|---|
params | CancelAllOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: OrderResultV5[]; success: string; }>>
cancelAllRFQ()
cancelAllRFQ(): Promise<APIResponseV3WithTime<CancelAllRFQResultV5>>;Cancel All RFQ Cancel all your inquiry forms
Returns
Promise<APIResponseV3WithTime<CancelAllRFQResultV5>>
cancelAllRFQQuotes()
cancelAllRFQQuotes(): Promise<APIResponseV3WithTime<{
data: CancelRFQQuoteItemV5[];
}>>;Cancel All Quotes Cancel all quotations
Returns
Promise<APIResponseV3WithTime<{ data: CancelRFQQuoteItemV5[]; }>>
cancelAllSpreadOrders()
cancelAllSpreadOrders(params?: object): Promise<APIResponseV3WithTime<{
list: object[];
success: string;
}>>;Cancel All Spread Orders
When a symbol is specified, all orders for that symbol will be canceled regardless of the cancelAll field. When symbol is not specified and cancelAll=true, all orders, regardless of the symbol, will be canceled.
Parameters
| Parameter | Type |
|---|---|
params? | { cancelAll?: boolean; symbol?: string; } |
params.cancelAll? | boolean |
params.symbol? | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; success: string; }>>
cancelBorrowOrderFixed()
cancelBorrowOrderFixed(params: CancelBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;Cancel Borrow Order
Parameters
| Parameter | Type |
|---|---|
params | CancelBorrowOrderFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
cancelEventQuote()
cancelEventQuote(params?: CancelEventQuoteParamsV5): Promise<APIResponseV3WithTime<EventQuoteResultV5>>;Cancel an Event Contract quote. Pass orderLinkId and/or orderId.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params? | CancelEventQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventQuoteResultV5>>
cancelOrder()
cancelOrder(params: CancelOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;Parameters
| Parameter | Type |
|---|---|
params | CancelOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<OrderResultV5>>
cancelP2PAd()
cancelP2PAd(params: object): Promise<APIResponseV3WithTime<{
needSecurityRisk: boolean;
riskTokenType: string;
riskVersion: string;
securityRiskToken: string;
}>>;Cancel P2P advertisement
Parameters
| Parameter | Type |
|---|---|
params | { itemId: string; } |
params.itemId | string |
Returns
Promise<APIResponseV3WithTime<{ needSecurityRisk: boolean; riskTokenType: string; riskVersion: string; securityRiskToken: string; }>>
cancelRFQ()
cancelRFQ(params: CancelRFQParamsV5): Promise<APIResponseV3WithTime<CancelRFQResultV5>>;Cancel RFQ Cancel your inquiry Pass at least one rfqId or rfqLinkId
Parameters
| Parameter | Type |
|---|---|
params | CancelRFQParamsV5 |
Returns
Promise<APIResponseV3WithTime<CancelRFQResultV5>>
cancelRFQQuote()
cancelRFQQuote(params: CancelRFQQuoteParamsV5): Promise<APIResponseV3WithTime<CancelRFQQuoteResultV5>>;Cancel Quote Cancel a quotation Pass at least one quoteId, rfqId, and quoteLinkId
Parameters
| Parameter | Type |
|---|---|
params | CancelRFQQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<CancelRFQQuoteResultV5>>
cancelSpreadOrder()
cancelSpreadOrder(params: object): Promise<APIResponseV3WithTime<{
orderId: string;
orderLinkId: string;
}>>;Cancel Spread Order
Parameters
| Parameter | Type |
|---|---|
params | { orderId?: string; orderLinkId?: string; } |
params.orderId? | string |
params.orderLinkId? | string |
Returns
Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>
cancelSupplyOrderFixed()
cancelSupplyOrderFixed(params: CancelSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;Cancel Supply Order
Optional refundedAccount: 0 Funding, 1 EasyEarn (default 0).
Parameters
| Parameter | Type |
|---|---|
params | CancelSupplyOrderFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
cancelWithdrawal()
cancelWithdrawal(id: string): Promise<APIResponseV3WithTime<{
status: 0 | 1;
}>>;Cancel the withdrawal
CAUTION: Can query by the master UID's api key only
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<APIResponseV3WithTime<{ status: 0 | 1; }>>
claimPwmWithdrawableFunds()
claimPwmWithdrawableFunds(params: ClaimPwmWithdrawableFundsParamsV5): Promise<APIResponseV3WithTime<ClaimPwmWithdrawableFundsResultV5>>;Claim withdrawable funds from a PWM investment plan (Active).
Parameters
| Parameter | Type |
|---|---|
params | ClaimPwmWithdrawableFundsParamsV5 |
Returns
Promise<APIResponseV3WithTime<ClaimPwmWithdrawableFundsResultV5>>
confirmConvertQuote()
confirmConvertQuote(params: object): Promise<APIResponseV3WithTime<{
exchangeStatus: "init" | "processing" | "success" | "failure";
quoteTxId: string;
}>>;Confirm a quote for converting coins.
Parameters
| Parameter | Type |
|---|---|
params | { quoteTxId: string; } |
params.quoteTxId | string |
Returns
Promise<APIResponseV3WithTime<{ exchangeStatus: "init" | "processing" | "success" | "failure"; quoteTxId: string; }>>
confirmNewRiskLimit()
confirmNewRiskLimit(params: ConfirmNewRiskLimitParamsV5): Promise<APIResponseV3WithTime<{
}>>;Confirm new risk limit.
It is only applicable when the user is marked as only reducing positions (please see the isReduceOnly field in the Get Position Info interface). After the user actively adjusts the risk level, this interface is called to try to calculate the adjusted risk level, and if it passes (retCode=0), the system will remove the position reduceOnly mark. You are recommended to call Get Position Info to check isReduceOnly field.
Unified account covers: USDT perpetual / USDC contract / Inverse contract Classic account covers: USDT perpetual / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params | ConfirmNewRiskLimitParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
createBorrowOrderFixed()
createBorrowOrderFixed(params: CreateBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<CreateBorrowOrderFixedV5>>;Create Borrow Order The loan funds are released to the Funding wallet. The collateral funds are deducted from the Funding wallet, so make sure you have enough collateral amount in the Funding wallet.
Parameters
| Parameter | Type |
|---|---|
params | CreateBorrowOrderFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateBorrowOrderFixedV5>>
createDemoAccount()
createDemoAccount(): Promise<APIResponseV3<{
subMemberId: string;
}, {
}>>;Create a demo trading account.
Returns
Promise<APIResponseV3<{ subMemberId: string; }, { }>>
createInternalTransfer()
createInternalTransfer(
transferId: string,
coin: string,
amount: string,
fromAccountType: AccountTypeV5,
toAccountType: AccountTypeV5
): Promise<APIResponseV3WithTime<{
status: string;
transferId: string;
}>>;Create the internal transfer between different account types under the same UID. Each account type has its own acceptable coins, e.g, you cannot transfer USDC from SPOT to CONTRACT.
Please refer to the getTransferableCoinList() API to find out more.
Parameters
| Parameter | Type |
|---|---|
transferId | string |
coin | string |
amount | string |
fromAccountType | AccountTypeV5 |
toAccountType | AccountTypeV5 |
Returns
Promise<APIResponseV3WithTime<{ status: string; transferId: string; }>>
createP2PAd()
createP2PAd(params: CreateP2PAdParamsV5): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>;Post new P2P advertisement
Parameters
| Parameter | Type |
|---|---|
params | CreateP2PAdParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>
createPwmAssetManagerInvestmentPlan()
createPwmAssetManagerInvestmentPlan(params: CreatePwmAssetManagerInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<CreatePwmAssetManagerInvestmentPlanResultV5>>;Create a PWM investment plan for a user (PendingSubscription). Max 10 plans per institution.
Parameters
| Parameter | Type |
|---|---|
params | CreatePwmAssetManagerInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreatePwmAssetManagerInvestmentPlanResultV5>>
createPwmCustomizeInvestmentPlan()
createPwmCustomizeInvestmentPlan(params: CreatePwmCustomizeInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<CreatePwmCustomizeInvestmentPlanResultV5>>;Create a customized PWM investment plan (max 20 Active + Pending plans per user).
Parameters
| Parameter | Type |
|---|---|
params | CreatePwmCustomizeInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreatePwmCustomizeInvestmentPlanResultV5>>
createPwmFund()
createPwmFund(params: CreatePwmFundParamsV5): Promise<APIResponseV3WithTime<CreatePwmFundResultV5>>;Create a PWM fund (PendingSubscribe). Max 10 funds per institution.
Parameters
| Parameter | Type |
|---|---|
params | CreatePwmFundParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreatePwmFundResultV5>>
createPwmFundSubAccount()
createPwmFundSubAccount(params: CreatePwmFundSubAccountParamsV5): Promise<APIResponseV3WithTime<CreatePwmFundSubAccountResultV5>>;Create a PWM fund sub-account (async; max 30 per fund, fund must be Active).
Parameters
| Parameter | Type |
|---|---|
params | CreatePwmFundSubAccountParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreatePwmFundSubAccountResultV5>>
createRFQ()
createRFQ(params: CreateRFQParamsV5): Promise<APIResponseV3WithTime<CreateRFQResultV5>>;Create RFQ Create a new request for quote (RFQ) to specified counterparties
Parameters
| Parameter | Type |
|---|---|
params | CreateRFQParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateRFQResultV5>>
createRFQQuote()
createRFQQuote(params: CreateRFQQuoteParamsV5): Promise<APIResponseV3WithTime<CreateRFQQuoteResultV5>>;Create Quote Allow the quotation party specified in the inquiry form to quote Pass at least one quoteBuyList and quoteSellList
Parameters
| Parameter | Type |
|---|---|
params | CreateRFQQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateRFQQuoteResultV5>>
createStrategyOrder()
createStrategyOrder(params: CreateStrategyOrderParamsV5): Promise<APIResponseV3WithTime<CreateStrategyOrderResultV5>>;Create Strategy Order
Supported strategy types: twap, chaseOrder, iceberg, pov.
Parameters
| Parameter | Type |
|---|---|
params | CreateStrategyOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateStrategyOrderResultV5>>
createSubMember()
createSubMember(params: CreateSubMemberParamsV5): Promise<APIResponseV3WithTime<CreateSubMemberResultV5>>;Create a new sub user id. Use master user's api key only.
The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
Parameters
| Parameter | Type |
|---|---|
params | CreateSubMemberParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateSubMemberResultV5>>
createSubUIDAPIKey()
createSubUIDAPIKey(params: CreateSubApiKeyParamsV5): Promise<APIResponseV3WithTime<CreateSubApiKeyResultV5>>;To create new API key for those newly created sub UID. Use master user's api key only.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
Parameters
| Parameter | Type |
|---|---|
params | CreateSubApiKeyParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateSubApiKeyResultV5>>
createSupplyOrderFixed()
createSupplyOrderFixed(params: CreateSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<CreateSupplyOrderFixedV5>>;Create Supply Order
Permission: "Spot trade"
Optional availableSource: 0 Funding, 1 Earn Flexible, 2 ALL (default 0).
Parameters
| Parameter | Type |
|---|---|
params | CreateSupplyOrderFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<CreateSupplyOrderFixedV5>>
createTaxBatchExport()
createTaxBatchExport(params: CreateTaxBatchExportParamsV5): Promise<APIResponseV3WithTime<TaxBatchExportResultV5>>;Export multiple tax report types in one batch. Returns a batchId for status polling.
Parameters
| Parameter | Type |
|---|---|
params | CreateTaxBatchExportParamsV5 |
Returns
Promise<APIResponseV3WithTime<TaxBatchExportResultV5>>
createUniversalTransfer()
createUniversalTransfer(params: UniversalTransferParamsV5): Promise<APIResponseV3WithTime<{
status: string;
transferId: string;
}>>;Transfer between sub-sub or main-sub. Please make sure you have enabled universal transfer on your sub UID in advance.
Parameters
| Parameter | Type |
|---|---|
params | UniversalTransferParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ status: string; transferId: string; }>>
deleteMasterApiKey()
deleteMasterApiKey(): Promise<APIResponseV3WithTime<{
}>>;Delete the api key of master account. Use the api key pending to be delete to call the endpoint. Use master user's api key only.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
DANGER: BE CAREFUL! The API key used to call this interface will be invalid immediately.
Returns
Promise<APIResponseV3WithTime<{ }>>
deletePrivate()
deletePrivate(
endpoint: string,
params?: any,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | any |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.deletePrivate
deleteSubApiKey()
deleteSubApiKey(params?: object): Promise<APIResponseV3WithTime<{
}>>;Delete the api key of sub account. Use the api key pending to be delete to call the endpoint. Use sub user's api key only.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- sub API key: "Account Transfer", "Sub Member Transfer"
- master API Key: "Account Transfer", "Sub Member Transfer", "Withdrawal"
DANGER: BE CAREFUL! The sub API key used to call this interface will be invalid immediately.
Parameters
| Parameter | Type |
|---|---|
params? | { apikey?: string; } |
params.apikey? | string |
Returns
Promise<APIResponseV3WithTime<{ }>>
deleteSubMember()
deleteSubMember(params: DeleteSubMemberParamsV5): Promise<APIResponseV3WithTime<{
}>>;Delete a sub UID. Before deleting the UID, please make sure there are no assets.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
Parameters
| Parameter | Type |
|---|---|
params | DeleteSubMemberParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
enableUniversalTransferForSubUIDs()
enableUniversalTransferForSubUIDs(subMemberIds: string[]): Promise<APIResponseV3WithTime<{
}>>;Enable Universal Transfer for Sub UID
Use this endpoint to enable a subaccount to take part in a universal transfer. It is a one-time switch which, once thrown, enables a subaccount permanently. If not set, your subaccount cannot use universal transfers.
Parameters
| Parameter | Type |
|---|---|
subMemberIds | string[] |
Returns
Promise<APIResponseV3WithTime<{ }>>
Deprecated
- You no longer need to configure transferable sub UIDs. Now, all sub UIDs are automatically enabled for universal transfer.
executeAlphaLPRedeem()
executeAlphaLPRedeem(params: ExecuteAlphaLPRedeemParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaLPRedeemResultV5>>;Execute LP Redeem Redeem liquidity from a pool position. HTTP 200 is ACK only — poll order list for status.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaLPRedeemParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaLPRedeemResultV5>>
executeAlphaLPStake()
executeAlphaLPStake(params: ExecuteAlphaLPStakeParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaLPStakeResultV5>>;Execute LP Stake Stake tokens into a liquidity pool. HTTP 200 is ACK only — poll order list for status.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaLPStakeParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaLPStakeResultV5>>
executeAlphaPredictionBuy()
executeAlphaPredictionBuy(params: ExecuteAlphaPredictionBuyParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>;Execute Buy Buy prediction outcome tokens with USDC. HTTP 200 is acknowledgment only — poll order list.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaPredictionBuyParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>
executeAlphaPredictionSell()
executeAlphaPredictionSell(params: ExecuteAlphaPredictionSellParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>;Execute Sell Sell prediction outcome token shares for USDC. HTTP 200 is acknowledgment only — poll order list.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaPredictionSellParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>
executeAlphaTradePurchase()
executeAlphaTradePurchase(params: ExecuteAlphaTradeParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>;Execute Purchase Buy on-chain tokens with a payment token (e.g. USDT). Requires a valid quote; obtain user confirmation first. HTTP 200 is only an acknowledgment — poll getAlphaTradeOrderList for final status. Idempotent by quoteDataId in the quote.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaTradeParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>
executeAlphaTradeRedeem()
executeAlphaTradeRedeem(params: ExecuteAlphaTradeParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>;Execute Redeem Sell on-chain tokens for a payment token. Requires a valid quote; obtain user confirmation first. HTTP 200 is only an acknowledgment — poll getAlphaTradeOrderList for final status. Idempotent by quoteDataId in the quote.
Parameters
| Parameter | Type |
|---|---|
params | ExecuteAlphaTradeParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>
executeRFQQuote()
executeRFQQuote(params: ExecuteRFQQuoteParamsV5): Promise<APIResponseV3WithTime<ExecuteRFQQuoteResultV5>>;Execute Quote Execute quotes, only for the creator of the inquiry form Need to view the execution result through the /v5/rfq/blocktrade-list interface
Parameters
| Parameter | Type |
|---|---|
params | ExecuteRFQQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExecuteRFQQuoteResultV5>>
fetchLatencySummary()
fetchLatencySummary(): Promise<any>;This method is used to get the latency and time sync between the client and the server. This is not official API endpoint and is only used for internal testing purposes. Use this method to check the latency and time sync between the client and the server. Final values might vary slightly, but it should be within few ms difference. If you have any suggestions or improvements to this measurement, please create an issue or pull request on GitHub.
Returns
Promise<any>
fetchServerTime()
fetchServerTime(): Promise<number>;Function that calls exchange API to query & resolve server time, used by time sync, disabled by default.
Note: this should always return server time in seconds
Returns
Promise<number>
Overrides
BaseRestClient.fetchServerTime
fetchTimeOffset()
fetchTimeOffset(): Promise<number>;Estimate drift based on client<->server latency
Returns
Promise<number>
Inherited from
BaseRestClient.fetchTimeOffset
get()
get(
endpoint: string,
params?: any,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | any |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.get
getAccountBorrowCollateralLimit()
getAccountBorrowCollateralLimit(params: object): Promise<APIResponseV3WithTime<AccountBorrowCollateralLimitV5>>;Get Account Borrow/Collateral Limit Query the account borrowable/collateral limit
Permission: "Spot trade"
Parameters
| Parameter | Type |
|---|---|
params | { collateralCurrency: string; loanCurrency: string; } |
params.collateralCurrency | string |
params.loanCurrency | string |
Returns
Promise<APIResponseV3WithTime<AccountBorrowCollateralLimitV5>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
getAccountInfo()
getAccountInfo(): Promise<APIResponseV3<AccountInfoV5, {
}>>;Query the margin mode and the upgraded status of account
Returns
Promise<APIResponseV3<AccountInfoV5, { }>>
getAccountInstrumentsInfo()
getAccountInstrumentsInfo<C extends "spot" | "linear" | "inverse">(params: GetAccountInstrumentsInfoParamsV5 & object): Promise<APIResponseV3WithTime<AccountInstrumentInfoResponseV5<C>>>;Get Account Instruments Info Query for the instrument specification of online trading pairs that available to users.
Covers: SPOT / USDT contract / USDC contract / Inverse contract
Includes RPI permission information (isPublicRpi, myRpiPermission) Note: e.g. symbolType: 'commodity', and for linear also stock, forex.
Type Parameters
| Type Parameter |
|---|
C extends "spot" | "linear" | "inverse" |
Parameters
| Parameter | Type |
|---|---|
params | GetAccountInstrumentsInfoParamsV5 & object |
Returns
Promise<APIResponseV3WithTime<AccountInstrumentInfoResponseV5<C>>>
getActiveOrders()
getActiveOrders(params: GetAccountOrdersParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>;Query unfilled or partially filled orders in real-time. To query older order records, please use the order history interface.
Parameters
| Parameter | Type |
|---|---|
params | GetAccountOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>
getADLAlert()
getADLAlert(params?: GetADLAlertParamsV5): Promise<APIResponseV3WithTime<ADLAlertResponseV5>>;Get ADL Alert Query for ADL (auto-deleveraging mechanism) alerts and insurance pool information.
Covers: USDT Perpetual / USDT Delivery / USDC Perpetual / USDC Delivery / Inverse Contracts Data update frequency: every 1 minute
Parameters
| Parameter | Type |
|---|---|
params? | GetADLAlertParamsV5 |
Returns
Promise<APIResponseV3WithTime<ADLAlertResponseV5>>
getAdvanceEarnOrder()
getAdvanceEarnOrder(params: GetAdvanceEarnOrderListParamsV5): Promise<APIResponseV3WithTime<AdvanceEarnOrderListV5>>;Advanced Earn — order list (Dual Assets, Discount Buy, …). Distinct from getEarnOrderHistory (/v5/earn/order).
INFO: API key needs "Earn" permission. E.g. 10 req/s (Dual Assets per docs).
Parameters
| Parameter | Type |
|---|---|
params | GetAdvanceEarnOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdvanceEarnOrderListV5>>
getAdvanceEarnPosition()
getAdvanceEarnPosition(params: GetAdvanceEarnPositionListParamsV5): Promise<APIResponseV3WithTime<AdvanceEarnPositionListV5>>;Advanced Earn — active positions (Dual Assets, Discount Buy, …).
INFO: API key needs "Earn" permission. E.g. 10 req/s (Dual Assets per docs).
Parameters
| Parameter | Type |
|---|---|
params | GetAdvanceEarnPositionListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdvanceEarnPositionListV5>>
getAdvanceEarnProduct()
getAdvanceEarnProduct(params: GetAdvanceEarnProductParamsV5): Promise<APIResponseV3WithTime<AdvanceEarnAdvanceProductInfoV5>>;Get Advanced Earn product info (Dual Asset, Double Win, Smart Leverage, etc. via category).
INFO: No authentication. Up to 50 requests/second per IP.
Parameters
| Parameter | Type |
|---|---|
params | GetAdvanceEarnProductParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdvanceEarnAdvanceProductInfoV5>>
getAdvanceEarnProductExtraInfo()
getAdvanceEarnProductExtraInfo(params: GetAdvanceEarnProductExtraInfoParamsV5): Promise<APIResponseV3WithTime<AdvanceEarnProductExtraInfoV5>>;Advanced Earn — quote / extra info (Discount Buy, Dual Assets, …). Call before place order where required.
INFO: No authentication. Up to 50 requests/second per IP. Dual Assets: productId is required. Response uses list with buyLowPrice / sellHighPrice.
Parameters
| Parameter | Type |
|---|---|
params | GetAdvanceEarnProductExtraInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdvanceEarnProductExtraInfoV5>>
getAffiliateSubAffiliateList()
getAffiliateSubAffiliateList(params?: GetAffiliateSubAffiliateListParamsV5): Promise<APIResponseV3WithTime<AffiliateSubAffiliateListResultV5>>;Get Affiliate Sub-Affiliate List.
To use this endpoint, you should have an affiliate account and only tick "affiliate" permission while creating the API key.
TIP:
- Use master UID only
- The api key can only have "Affiliate" permission
Parameters
| Parameter | Type |
|---|---|
params? | GetAffiliateSubAffiliateListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AffiliateSubAffiliateListResultV5>>
getAffiliateUserInfo()
getAffiliateUserInfo(params: GetAffiliateUserInfoParamsV5): Promise<APIResponseV3WithTime<AffiliateUserInfoV5>>;Get Affiliate User Info.
This API is used for affiliate to get their users information.
TIP Use master UID only The api key can only have "Affiliate" permission The transaction volume and deposit amount are the total amount of the user done on Bybit, and have nothing to do with commission settlement. Any transaction volume data related to commission settlement is subject to the Affiliate Portal.
Parameters
| Parameter | Type |
|---|---|
params | GetAffiliateUserInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<AffiliateUserInfoV5>>
getAffiliateUserList()
getAffiliateUserList(params?: GetAffiliateUserListParamsV5): Promise<APIResponseV3WithTime<{
list: AffiliateUserListItemV5[];
nextPageCursor: string;
}>>;Get Affiliate User List. To use this endpoint, you should have an affiliate account and only tick "affiliate" permission while creating the API key.
TIP:
- Use master UID only
- The api key can only have "Affiliate" permission
Parameters
| Parameter | Type |
|---|---|
params? | GetAffiliateUserListParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: AffiliateUserListItemV5[]; nextPageCursor: string; }>>
getAllBrokerRateLimits()
getAllBrokerRateLimits(params?: GetAllBrokerRateLimitsParamsV5): Promise<APIResponseV3WithTime<{
list: BrokerRateLimitAllItemV5[];
nextPageCursor: string;
}>>;Get All Rate Limits Use the master account to query for all your UID-level rate limits, including all master accounts and subaccounts.
API rate limit: 1 req per second
INFO
- Only exchange broker account can call this endpoint
- The accounts that have never had a rate limit configured via Set Rate Limit will not appear in the response and will use the default rate limit.
Parameters
| Parameter | Type |
|---|---|
params? | GetAllBrokerRateLimitsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BrokerRateLimitAllItemV5[]; nextPageCursor: string; }>>
getAllCoinsBalance()
getAllCoinsBalance(params: GetAllCoinsBalanceParamsV5): Promise<APIResponseV3WithTime<AllCoinsBalanceV5>>;Query all coin balances of all account types under the master account and sub accounts.
It is not allowed to get the master account coin balance via sub account API key.
Parameters
| Parameter | Type |
|---|---|
params | GetAllCoinsBalanceParamsV5 |
Returns
Promise<APIResponseV3WithTime<AllCoinsBalanceV5>>
getAllowedDepositCoinInfo()
getAllowedDepositCoinInfo(params?: GetAllowedDepositCoinInfoParamsV5): Promise<APIResponseV3WithTime<{
configList: AllowedDepositCoinInfoV5[];
nextPageCursor: string;
}>>;Query allowed deposit coin information. To find out paired chain of coin, please refer to the coin info api.
Parameters
| Parameter | Type |
|---|---|
params? | GetAllowedDepositCoinInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ configList: AllowedDepositCoinInfoV5[]; nextPageCursor: string; }>>
getAllRateLimits()
getAllRateLimits(params?: object): Promise<APIResponseV3WithTime<{
list: object[];
nextPageCursor: string;
}>>;Get All Rate Limits Query for all your UID-level rate limits, including all master accounts and subaccounts.
API rate limit: 50 req per second
Parameters
| Parameter | Type |
|---|---|
params? | { cursor?: string; limit?: string; uids?: string; } |
params.cursor? | string |
params.limit? | string |
params.uids? | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; nextPageCursor: string; }>>
getAlphaAssetDetail()
getAlphaAssetDetail(params: GetAlphaAssetDetailParamsV5): Promise<APIResponseV3WithTime<AlphaAssetDetailResultV5>>;Get Asset Detail Single-asset view; result.assetList has 0 or 1 item.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaAssetDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaAssetDetailResultV5>>
getAlphaAssetList()
getAlphaAssetList(): Promise<APIResponseV3WithTime<AlphaAssetListResultV5>>;Get Asset List Portfolio of on-chain token holdings (non-zero only), sorted by USD value.
Returns
Promise<APIResponseV3WithTime<AlphaAssetListResultV5>>
getAlphaBizTokenDetails()
getAlphaBizTokenDetails(params: GetAlphaBizTokenDetailsParamsV5): Promise<APIResponseV3WithTime<AlphaBizTokenDetailsV5>>;Get Token Details One token: description, links, riskFlag, and listing status. Use chainCode + tokenAddress from biz list or assets.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaBizTokenDetailsParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaBizTokenDetailsV5>>
getAlphaBizTokenList()
getAlphaBizTokenList(params?: GetAlphaBizTokenListParamsV5): Promise<APIResponseV3WithTime<AlphaBizTokenV5[]>>;Get Biz Token List Tradable on-chain tokens (DEX_ prefix ids), risk flags, limits, and supported payment token codes.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaBizTokenListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaBizTokenV5[]>>
getAlphaBizTokenPriceList()
getAlphaBizTokenPriceList(params: GetAlphaBizTokenPriceListParamsV5): Promise<APIResponseV3WithTime<AlphaBizTokenPriceListResultV5>>;Get Token Price List Batch market data (up to 20 chainCode + tokenAddress pairs). Prices, 24h change, volume, market cap, etc.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaBizTokenPriceListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaBizTokenPriceListResultV5>>
getAlphaLPOrderList()
getAlphaLPOrderList(params?: GetAlphaLPOrderListParamsV5): Promise<APIResponseV3WithTime<AlphaLPOrderListResultV5>>;Get LP Order List LP stake/redeem order history.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaLPOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaLPOrderListResultV5>>
getAlphaLPPayTokenList()
getAlphaLPPayTokenList(params?: GetAlphaLPPayTokenListParamsV5): Promise<APIResponseV3WithTime<AlphaLPPayTokenListResultV5>>;Get LP Pay Token List Supported payment tokens and available balances for LP staking.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaLPPayTokenListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaLPPayTokenListResultV5>>
getAlphaLPPayTokenPrice()
getAlphaLPPayTokenPrice(params: GetAlphaLPPayTokenPriceParamsV5): Promise<APIResponseV3WithTime<AlphaLPPayTokenPriceResultV5>>;Get LP Pay Token Price Batch USD prices for up to 50 payment token codes.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaLPPayTokenPriceParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaLPPayTokenPriceResultV5>>
getAlphaLPPoolInfo()
getAlphaLPPoolInfo(params: GetAlphaLPPoolInfoParamsV5): Promise<APIResponseV3WithTime<AlphaLPPoolInfoV5>>;Get LP Pool Info Detailed pool data including APY, reserves, and price range.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaLPPoolInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaLPPoolInfoV5>>
getAlphaLPPoolList()
getAlphaLPPoolList(params?: GetAlphaLPPoolListParamsV5): Promise<APIResponseV3WithTime<AlphaLPPoolListResultV5>>;Get LP Pool List Available liquidity pools, optionally filtered by token symbol.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaLPPoolListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaLPPoolListResultV5>>
getAlphaLPPositionList()
getAlphaLPPositionList(): Promise<APIResponseV3WithTime<AlphaLPPositionListResultV5>>;Get LP Position List User LP positions with valuation, rewards, and APY.
Returns
Promise<APIResponseV3WithTime<AlphaLPPositionListResultV5>>
getAlphaPayTokenList()
getAlphaPayTokenList(params: GetAlphaPayTokenListParamsV5): Promise<APIResponseV3WithTime<AlphaPayTokenV5[]>>;Get Payment Token List List payment tokens (e.g. USDT) and CEX token codes (e.g. CEX_1) for quote and execution. Each entry includes supportChains.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPayTokenListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPayTokenV5[]>>
getAlphaPredictionEngineStatus()
getAlphaPredictionEngineStatus(): Promise<APIResponseV3WithTime<AlphaPredictionEngineStatusV5>>;Get Engine Status Query prediction market matching engine availability before placing buy/sell orders.
Returns
Promise<APIResponseV3WithTime<AlphaPredictionEngineStatusV5>>
getAlphaPredictionEventDetail()
getAlphaPredictionEventDetail(params: GetAlphaPredictionEventDetailParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionEventDetailV5>>;Get Event Detail Event metadata, outcome markets, and current prices. Obtain tokenId before trading.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionEventDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionEventDetailV5>>
getAlphaPredictionOrderBook()
getAlphaPredictionOrderBook(params: GetAlphaPredictionOrderBookParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionOrderBookV5[]>>;Get Order Book Full bid/ask depth snapshot for up to 20 outcome tokens.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionOrderBookParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionOrderBookV5[]>>
getAlphaPredictionOrderEstimate()
getAlphaPredictionOrderEstimate(params: GetAlphaPredictionOrderEstimateParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionOrderEstimateV5>>;Get Order Estimate Preview buy/sell outcome before execution. Show estimate to user and confirm before Buy/Sell.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionOrderEstimateParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionOrderEstimateV5>>
getAlphaPredictionOrderList()
getAlphaPredictionOrderList(params: GetAlphaPredictionOrderListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionOrderListResultV5>>;Get Order List Prediction market order history for the authenticated user.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionOrderListResultV5>>
getAlphaPredictionPayTokenList()
getAlphaPredictionPayTokenList(): Promise<APIResponseV3WithTime<AlphaPredictionPayTokenV5[]>>;Get Payment Token List Available payment tokens for prediction market trading (Phase 1: USDC).
Returns
Promise<APIResponseV3WithTime<AlphaPredictionPayTokenV5[]>>
getAlphaPredictionPortfolioSummary()
getAlphaPredictionPortfolioSummary(params?: GetAlphaPredictionPortfolioSummaryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPortfolioSummaryV5>>;Get Portfolio Summary Overall prediction market portfolio P&L and win rate.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaPredictionPortfolioSummaryParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionPortfolioSummaryV5>>
getAlphaPredictionPositionHistory()
getAlphaPredictionPositionHistory(params?: GetAlphaPredictionPositionHistoryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPositionHistoryResultV5>>;Get Position History Closed prediction market positions including settlement results.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaPredictionPositionHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionPositionHistoryResultV5>>
getAlphaPredictionPositionList()
getAlphaPredictionPositionList(params?: GetAlphaPredictionPositionListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPositionListResultV5>>;Get Position List Active prediction market positions. Confirm before placing sell orders.
Parameters
| Parameter | Type |
|---|---|
params? | GetAlphaPredictionPositionListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionPositionListResultV5>>
getAlphaPredictionPriceHistory()
getAlphaPredictionPriceHistory(params: GetAlphaPredictionPriceHistoryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPriceHistoryV5>>;Get Price History OHLC candlestick history for an outcome token.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionPriceHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionPriceHistoryV5>>
getAlphaPredictionSideMarketList()
getAlphaPredictionSideMarketList(params: GetAlphaPredictionSideMarketListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSideMarketListResultV5>>;Get Side Market List Outcome markets for an event with prices, liquidity, and status.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionSideMarketListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionSideMarketListResultV5>>
getAlphaPredictionSportsGroupStageDetail()
getAlphaPredictionSportsGroupStageDetail(params: GetAlphaPredictionSportsGroupStageDetailParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsGroupStageDetailV5>>;Get Sports Group Stage Detail Group stage standings and match schedule for a sports prediction event.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionSportsGroupStageDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionSportsGroupStageDetailV5>>
getAlphaPredictionSportsMatchList()
getAlphaPredictionSportsMatchList(params: GetAlphaPredictionSportsMatchListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsMatchListResultV5>>;Get Sports Match List Sports matches available in prediction markets (Phase 1: FIFA 2026).
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionSportsMatchListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionSportsMatchListResultV5>>
getAlphaPredictionSportsTimelineStages()
getAlphaPredictionSportsTimelineStages(params: GetAlphaPredictionSportsTimelineStagesParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsTimelineStagesV5>>;Get Sports Timeline Stages Tournament stage timeline with status and match counts.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionSportsTimelineStagesParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionSportsTimelineStagesV5>>
getAlphaPredictionTokenPrice()
getAlphaPredictionTokenPrice(params: GetAlphaPredictionTokenPriceParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionTokenPriceV5[]>>;Get Token Price Best bid/ask and last price for up to 20 outcome tokens.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaPredictionTokenPriceParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaPredictionTokenPriceV5[]>>
getAlphaTradeOrderList()
getAlphaTradeOrderList(params: GetAlphaTradeOrderListParamsV5): Promise<APIResponseV3WithTime<AlphaTradeOrderListResultV5>>;Get Order List On-chain trade order history; filters for trade type, status, token, and time. Max 90 days.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaTradeOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaTradeOrderListResultV5>>
getAlphaTradeQuote()
getAlphaTradeQuote(params: GetAlphaTradeQuoteParamsV5): Promise<APIResponseV3WithTime<AlphaTradeQuoteResultV5>>;Get Trade Quote Get a price quote before a purchase or redeem. Required before executeAlphaTradePurchase or executeAlphaTradeRedeem. Pass quoteData and correctingCode from the response unchanged to the execute endpoints.
Parameters
| Parameter | Type |
|---|---|
params | GetAlphaTradeQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<AlphaTradeQuoteResultV5>>
getAssetInfo()
getAssetInfo(params: GetAssetInfoParamsV5): Promise<APIResponseV3WithTime<{
spot: AssetInfoV5;
}>>;Query asset information.
INFO For now, it can query SPOT only.
Parameters
| Parameter | Type |
|---|---|
params | GetAssetInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ spot: AssetInfoV5; }>>
getAssetOverview()
getAssetOverview(params?: GetAssetOverviewParamsV5): Promise<APIResponseV3WithTime<AssetOverviewResultV5>>;Asset Overview Query master account or subaccount's total assets and detailed asset holdings across different accounts and product categories.
INFO: For accountType=Alpha, on-chain assets are not included in the returned data in current version. valuationCurrency sets fiat for totals; accountType filters which account to return. For Alpha + farm, extMap may appear on coinDetail (price range and equity unit).
Parameters
| Parameter | Type |
|---|---|
params? | GetAssetOverviewParamsV5 |
Returns
Promise<APIResponseV3WithTime<AssetOverviewResultV5>>
getAutoRepayMode()
getAutoRepayMode(params?: GetAutoRepayModeParamsV5): Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>;Get Auto Repay Mode Get spot automatic repayment mode.
INFO:
- If currency is not passed, automatic repay mode for all currencies will be returned
Parameters
| Parameter | Type |
|---|---|
params? | GetAutoRepayModeParamsV5 |
Returns
Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>
getAvailableAmountToRepay()
getAvailableAmountToRepay(params: GetAvailableAmountToRepayParamsV5): Promise<APIResponseV3WithTime<AvailableAmountToRepayV5>>;Get available amount to repay
Parameters
| Parameter | Type |
|---|---|
params | GetAvailableAmountToRepayParamsV5 |
Returns
Promise<APIResponseV3WithTime<AvailableAmountToRepayV5>>
getBorrowableCoins()
getBorrowableCoins(params?: object): Promise<APIResponseV3WithTime<{
vipCoinList: VipBorrowableCoinsV5[];
}>>;Get Borrowable Coins
INFO: Do not need authentication
Parameters
| Parameter | Type |
|---|---|
params? | { currency?: string; vipLevel?: string; } |
params.currency? | string |
params.vipLevel? | string |
Returns
Promise<APIResponseV3WithTime<{ vipCoinList: VipBorrowableCoinsV5[]; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
getBorrowContractInfoFixed()
getBorrowContractInfoFixed(params?: GetBorrowContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
list: BorrowContractInfoFixedV5[];
nextPageCursor: string;
}>>;Get Borrow Contract Info
Parameters
| Parameter | Type |
|---|---|
params? | GetBorrowContractInfoFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BorrowContractInfoFixedV5[]; nextPageCursor: string; }>>
getBorrowHistory()
getBorrowHistory(params?: GetBorrowHistoryParamsV5): Promise<APIResponseV3WithTime<CursorListV5<BorrowHistoryRecordV5[]>>>;Get interest records, sorted in reverse order of creation time.
Unified account
Parameters
| Parameter | Type |
|---|---|
params? | GetBorrowHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<CursorListV5<BorrowHistoryRecordV5[]>>>
getBorrowHistoryFlexible()
getBorrowHistoryFlexible(params?: GetBorrowHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
list: BorrowHistoryFlexibleV5[];
nextPageCursor: string;
}>>;Get Borrow Orders History
Parameters
| Parameter | Type |
|---|---|
params? | GetBorrowHistoryFlexibleParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BorrowHistoryFlexibleV5[]; nextPageCursor: string; }>>
getBorrowOrderInfoFixed()
getBorrowOrderInfoFixed(params?: GetBorrowOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
list: BorrowOrderInfoFixedV5[];
nextPageCursor: string;
}>>;Get Borrow Order Info
Parameters
| Parameter | Type |
|---|---|
params? | GetBorrowOrderInfoFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BorrowOrderInfoFixedV5[]; nextPageCursor: string; }>>
getBorrowOrderQuoteFixed()
getBorrowOrderQuoteFixed(params: GetBorrowOrderQuoteFixedParamsV5): Promise<APIResponseV3WithTime<{
list: BorrowOrderQuoteFixedV5[];
}>>;Get Borrowing Market If you want to borrow, you can use this endpoint to check whether there are any suitable counterparty supply orders available.
Parameters
| Parameter | Type |
|---|---|
params | GetBorrowOrderQuoteFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BorrowOrderQuoteFixedV5[]; }>>
getBrokerIssuedVoucher()
getBrokerIssuedVoucher(params: GetBrokerIssuedVoucherParamsV5): Promise<APIResponseV3<BrokerIssuedVoucherV5, {
}>>;Query an issued voucher
INFO Use exchange broker master account to query
Parameters
| Parameter | Type |
|---|---|
params | GetBrokerIssuedVoucherParamsV5 |
Returns
Promise<APIResponseV3<BrokerIssuedVoucherV5, { }>>
getBrokerRateLimitCap()
getBrokerRateLimitCap(): Promise<APIResponseV3WithTime<{
list: BrokerRateLimitCapItemV5[];
}>>;Get Rate Limit Cap Get your exchange broker account entity total rate limit usage and cap, across the board.
API rate limit: 5 req per second
INFO
- Only Main UIDs can query this endpoint
- Only exchange broker account can call this endpoint
- If you never apply for a specific config via account manager, it gives empty response.
Returns
Promise<APIResponseV3WithTime<{ list: BrokerRateLimitCapItemV5[]; }>>
getBrokerSubAccountDeposits()
getBrokerSubAccountDeposits(params?: GetBrokerSubAccountDepositsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
rows: ExchangeBrokerSubAccountDepositRecordV5[];
}>>;Get Sub Account Deposit Records.
Exchange broker can query subaccount's deposit records by main UID's API key without specifying uid.
API rate limit: 300 req / min
TIP endTime - startTime should be less than 30 days. Queries for the last 30 days worth of records by default.
Parameters
| Parameter | Type |
|---|---|
params? | GetBrokerSubAccountDepositsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: ExchangeBrokerSubAccountDepositRecordV5[]; }>>
getBrokerVoucherSpec()
getBrokerVoucherSpec(params: object): Promise<APIResponseV3WithTime<BrokerVoucherSpecV5>>;Query Voucher Spec
Parameters
| Parameter | Type |
|---|---|
params | { id: string; } |
params.id | string |
Returns
Promise<APIResponseV3WithTime<BrokerVoucherSpecV5>>
getClassicTransactionLogs()
getClassicTransactionLogs(params?: GetClassicTransactionLogsParamsV5): Promise<APIResponseV3WithTime<{
list: TransactionLogV5[];
nextPageCursor: string;
}>>;Query transaction logs in the derivatives wallet (classic account), and inverse derivatives wallet (upgraded to UTA).
API key permission: "Contract - Position"
Parameters
| Parameter | Type |
|---|---|
params? | GetClassicTransactionLogsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: TransactionLogV5[]; nextPageCursor: string; }>>
getClientType()
getClientType(): "v5";Defines the client type (affecting how requests & signatures behave)
Returns
"v5"
Overrides
BaseRestClient.getClientType
getClosedOptionsPositions()
getClosedOptionsPositions(params?: GetClosedOptionsPositionsParamsV5): Promise<APIResponseV3WithTime<{
category: string;
list: ClosedOptionsPositionV5[];
nextPageCursor: string;
}>>;Get Closed Options Positions Query user's closed options positions, sorted by closeTime in descending order
INFO Only supports users to query closed options positions in recently 6 months Fee and price retain 8 decimal places and do not omit the last 0
Parameters
| Parameter | Type |
|---|---|
params? | GetClosedOptionsPositionsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ category: string; list: ClosedOptionsPositionV5[]; nextPageCursor: string; }>>
getClosedPnL()
getClosedPnL(params: GetClosedPnLParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>;Query user's closed profit and loss records. The results are sorted by createdTime in descending order.
Unified account covers: Linear contract Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
Parameters
| Parameter | Type |
|---|---|
params | GetClosedPnLParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>
getCoinBalance()
getCoinBalance(params: GetAccountCoinBalanceParamsV5): Promise<APIResponseV3<AccountCoinBalanceV5, {
}>>;Query the balance of a specific coin in a specific account type. Supports querying sub UID's balance.
CAUTION: Can query by the master UID's api key only.
Parameters
| Parameter | Type |
|---|---|
params | GetAccountCoinBalanceParamsV5 |
Returns
Promise<APIResponseV3<AccountCoinBalanceV5, { }>>
getCoinExchangeRecords()
getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor?: string;
orderBody: CoinExchangeRecordV5[];
}>>;Query the coin exchange records.
CAUTION: You may experience long delays with this endpoint.
Parameters
| Parameter | Type |
|---|---|
params? | GetCoinExchangeRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor?: string; orderBody: CoinExchangeRecordV5[]; }>>
getCoinGreeks()
getCoinGreeks(baseCoin?: string): Promise<APIResponseV3WithTime<{
list: CoinGreeksV5[];
}>>;Get current account Greeks information
Parameters
| Parameter | Type |
|---|---|
baseCoin? | string |
Returns
Promise<APIResponseV3WithTime<{ list: CoinGreeksV5[]; }>>
getCoinInfo()
getCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
rows: CoinInfoV5[];
}>>;Query coin information, including chain information, withdraw and deposit status.
Per-chain withdrawMax is the max amount per withdrawal on that chain (-1 = no limit). remainAmount is deprecated.
Parameters
| Parameter | Type |
|---|---|
coin? | string |
Returns
Promise<APIResponseV3WithTime<{ rows: CoinInfoV5[]; }>>
getCoinState()
getCoinState(params?: GetCoinStateParamsV5): Promise<APIResponseV3WithTime<{
list: CoinStateV5[];
}>>;Get currency leverage information (coin state)
Parameters
| Parameter | Type |
|---|---|
params? | GetCoinStateParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: CoinStateV5[]; }>>
getCollateralAdjustmentHistory()
getCollateralAdjustmentHistory(params?: GetCollateralAdjustmentHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: CollateralAdjustmentHistoryV5[];
nextPageCursor: string;
}>>;Get Collateral Adjustment History New Query for your LTV adjustment history.
Parameters
| Parameter | Type |
|---|---|
params? | GetCollateralAdjustmentHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: CollateralAdjustmentHistoryV5[]; nextPageCursor: string; }>>
getCollateralCoins()
getCollateralCoins(params?: object): Promise<APIResponseV3WithTime<{
vipCoinList: VipCollateralCoinsV5[];
}>>;Get Collateral Coins
INFO: Do not need authentication
Parameters
| Parameter | Type |
|---|---|
params? | { currency?: string; vipLevel?: string; } |
params.currency? | string |
params.vipLevel? | string |
Returns
Promise<APIResponseV3WithTime<{ vipCoinList: VipCollateralCoinsV5[]; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
getCollateralInfo()
getCollateralInfo(currency?: string): Promise<APIResponseV3WithTime<{
list: CollateralInfoV5[];
}>>;Get the collateral information of the current unified margin account, including loan interest rate, loanable amount, collateral conversion rate, whether it can be mortgaged as margin, etc.
Parameters
| Parameter | Type |
|---|---|
currency? | string |
Returns
Promise<APIResponseV3WithTime<{ list: CollateralInfoV5[]; }>>
getCompletedLoanOrderHistory()
getCompletedLoanOrderHistory(params?: GetCompletedLoanOrderHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: CompletedLoanOrderV5[];
nextPageCursor: string;
}>>;Get Completed Loan Order History Query the completed loan orders
Parameters
| Parameter | Type |
|---|---|
params? | GetCompletedLoanOrderHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: CompletedLoanOrderV5[]; nextPageCursor: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
INFO: Support querying last 6 months completed loan orders
getConvertCoins()
getConvertCoins(params: ConvertCoinsParamsV5): Promise<APIResponseV3WithTime<{
coins: ConvertCoinSpecV5[];
}>>;Query the coin list of convert from (to).
Parameters
| Parameter | Type |
|---|---|
params | ConvertCoinsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ coins: ConvertCoinSpecV5[]; }>>
getConvertHistory()
getConvertHistory(params?: GetConvertHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: ConvertHistoryRecordV5[];
}>>;Query the conversion history.
Parameters
| Parameter | Type |
|---|---|
params? | GetConvertHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: ConvertHistoryRecordV5[]; }>>
getConvertStatus()
getConvertStatus(params: object): Promise<APIResponseV3WithTime<{
result: ConvertStatusV5;
}>>;Query the exchange result by sending quoteTxId.
Parameters
| Parameter | Type |
|---|---|
params | { accountType: | "eb_convert_funding" | "eb_convert_uta" | "eb_convert_spot" | "eb_convert_contract" | "eb_convert_inverse"; quoteTxId: string; } |
params.accountType | | "eb_convert_funding" | "eb_convert_uta" | "eb_convert_spot" | "eb_convert_contract" | "eb_convert_inverse" |
params.quoteTxId | string |
Returns
Promise<APIResponseV3WithTime<{ result: ConvertStatusV5; }>>
getCryptoLoanPosition()
getCryptoLoanPosition(): Promise<APIResponseV3WithTime<CryptoLoanPositionV5>>;Get Crypto Loan Position New
Returns
Promise<APIResponseV3WithTime<CryptoLoanPositionV5>>
getDCPInfo()
getDCPInfo(): Promise<APIResponseV3WithTime<{
dcpInfos: DCPInfoV5[];
}>>;Query the DCP configuration of the account's contracts (USDT perpetual, USDC perpetual and USDC Futures) / spot / options.
Only the configured main / sub account can query information from this API. Calling this API by an account always returns empty.
INFO support linear contract (USDT, USDC Perp & USDC Futures) / Spot / Options only Unified account only
Returns
Promise<APIResponseV3WithTime<{ dcpInfos: DCPInfoV5[]; }>>
getDeliveryPrice()
getDeliveryPrice(params: GetDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryPriceV5[], CategoryV5>>>;Get the delivery price of Inverse futures, USDC futures and Options
Covers: USDC futures / Inverse futures / Option
Parameters
| Parameter | Type |
|---|---|
params | GetDeliveryPriceParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryPriceV5[], CategoryV5>>>
getDeliveryRecord()
getDeliveryRecord(params: GetDeliveryRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryRecordV5[], CategoryV5>>>;Query option delivery records, sorted by deliveryTime in descending order.
Covers: Option
Parameters
| Parameter | Type |
|---|---|
params | GetDeliveryRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryRecordV5[], CategoryV5>>>
getDepositRecords()
getDepositRecords(params?: GetDepositRecordParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
rows: DepositRecordV5[];
}>>;Query deposit records.
TIP endTime - startTime should be less than 30 days. Query last 30 days records by default.
Can use main or sub UID api key to query deposit records respectively.
Parameters
| Parameter | Type |
|---|---|
params? | GetDepositRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: DepositRecordV5[]; }>>
getEarnAprHistory()
getEarnAprHistory(params: GetEarnAprHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: EarnAprHistoryPointV5[];
}>>;Get historical APR (FlexibleSaving / OnChain), up to ~6 months.
INFO: Does not need authentication
Parameters
| Parameter | Type |
|---|---|
params | GetEarnAprHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnAprHistoryPointV5[]; }>>
getEarnCouponList()
getEarnCouponList(params: GetEarnCouponListParamsV5): Promise<APIResponseV3WithTime<EarnCouponListResultV5>>;Get Coupon List Interest-rate coupons and Dual Assets reward cards for FlexibleSaving or DualAssets.
Parameters
| Parameter | Type |
|---|---|
params | GetEarnCouponListParamsV5 |
Returns
Promise<APIResponseV3WithTime<EarnCouponListResultV5>>
getEarnHourlyYieldHistory()
getEarnHourlyYieldHistory(params: GetEarnHourlyYieldHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: EarnHourlyYieldHistoryV5[];
nextPageCursor: string;
}>>;Get Hourly Yield History
INFO: API key needs "Earn" permission
Parameters
| Parameter | Type |
|---|---|
params | GetEarnHourlyYieldHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnHourlyYieldHistoryV5[]; nextPageCursor: string; }>>
getEarnOrderHistory()
getEarnOrderHistory(params: GetEarnOrderHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: EarnOrderHistoryV5[];
nextPageCursor: string;
}>>;Get Stake/Redeem Order History
INFO: API key needs "Earn" permission
Note:
- For category = OnChain, either orderId or orderLinkId is required
- If both are passed, make sure they're matched, otherwise returning empty result
- Supports batch query with productId, startTime, endTime, limit, cursor
Parameters
| Parameter | Type |
|---|---|
params | GetEarnOrderHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnOrderHistoryV5[]; nextPageCursor: string; }>>
getEarnPosition()
getEarnPosition(params: GetEarnPositionParamsV5): Promise<APIResponseV3WithTime<{
list: EarnPositionV5[];
}>>;Get Staked Position
INFO: API key needs "Earn" permission
Note: Fully redeemed position is also returned in the response Note: Response includes autoReinvest where applicable; use modifyEarnPosition to change it (OnChain fixed). List items include availableAmount (redeemable) and freezeDetails (frozen amount + reason).
Parameters
| Parameter | Type |
|---|---|
params | GetEarnPositionParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnPositionV5[]; }>>
getEarnProduct()
getEarnProduct(params: object): Promise<APIResponseV3WithTime<{
list: EarnProductV5[];
}>>;Get Product Info for Earn products
INFO: Do not need authentication
Parameters
| Parameter | Type |
|---|---|
params | { category: string; coin?: string; } |
params.category | string |
params.coin? | string |
Returns
Promise<APIResponseV3WithTime<{ list: EarnProductV5[]; }>>
getEarnTokenDailyYield()
getEarnTokenDailyYield(params: GetEarnTokenDailyYieldParamsV5): Promise<APIResponseV3WithTime<{
list: EarnTokenDailyYieldRecordV5[];
nextPageCursor: string;
}>>;Earn token — Get Daily Yield Records
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenDailyYieldParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnTokenDailyYieldRecordV5[]; nextPageCursor: string; }>>
getEarnTokenHistoryApr()
getEarnTokenHistoryApr(params: GetEarnTokenHistoryAprParamsV5): Promise<APIResponseV3WithTime<{
list: EarnTokenHistoryAprPointV5[];
}>>;Earn token — Get History APR (7/30/180 days). No authentication required.
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenHistoryAprParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnTokenHistoryAprPointV5[]; }>>
getEarnTokenHourlyYield()
getEarnTokenHourlyYield(params: GetEarnTokenHourlyYieldParamsV5): Promise<APIResponseV3WithTime<{
list: EarnTokenHourlyYieldRecordV5[];
nextPageCursor: string;
}>>;Earn token — Get Hourly Yield Records
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenHourlyYieldParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnTokenHourlyYieldRecordV5[]; nextPageCursor: string; }>>
getEarnTokenOrders()
getEarnTokenOrders(params: GetEarnTokenOrderListParamsV5): Promise<APIResponseV3WithTime<{
list: EarnTokenOrderV5[];
nextPageCursor: string;
}>>;Earn token — Get Order List
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: EarnTokenOrderV5[]; nextPageCursor: string; }>>
getEarnTokenPosition()
getEarnTokenPosition(params: GetEarnTokenPositionParamsV5): Promise<APIResponseV3WithTime<EarnTokenPositionV5>>;Earn token — Get Position Info
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenPositionParamsV5 |
Returns
Promise<APIResponseV3WithTime<EarnTokenPositionV5>>
getEarnTokenProduct()
getEarnTokenProduct(params: GetEarnTokenProductParamsV5): Promise<APIResponseV3WithTime<EarnTokenProductV5>>;Earn token product (e.g. BYUSDT) — Get Product Info Without auth, user-specific fields are empty or defaulted.
Parameters
| Parameter | Type |
|---|---|
params | GetEarnTokenProductParamsV5 |
Returns
Promise<APIResponseV3WithTime<EarnTokenProductV5>>
getEarnYieldHistory()
getEarnYieldHistory(params: GetEarnYieldHistoryParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
yield: EarnYieldHistoryV5[];
}>>;Get Yield History
INFO: API key needs "Earn" permission
Note: category includes OnChain. For OnChain, do not pass productId (error).
Parameters
| Parameter | Type |
|---|---|
params | GetEarnYieldHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; yield: EarnYieldHistoryV5[]; }>>
getEventActiveOrders()
getEventActiveOrders(params?: GetEventActiveOrdersParamsV5): Promise<APIResponseV3WithTime<EventActiveOrdersResultV5>>;Get Event Contract active (unfilled / partially filled) orders.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params? | GetEventActiveOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventActiveOrdersResultV5>>
getEventInstrumentsInfo()
getEventInstrumentsInfo(params?: GetEventInstrumentsInfoParamsV5): Promise<APIResponseV3WithTime<EventInstrumentInfoResultV5>>;Get Event Contract instruments info.
INFO: No authentication.
Parameters
| Parameter | Type |
|---|---|
params? | GetEventInstrumentsInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventInstrumentInfoResultV5>>
getEventOrderbook()
getEventOrderbook(params: GetEventOrderbookParamsV5): Promise<APIResponseV3WithTime<EventOrderbookV5>>;Get Event Contract 25-level orderbook. Each level is [payoutRatio, orderValue].
INFO: No authentication.
Parameters
| Parameter | Type |
|---|---|
params | GetEventOrderbookParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventOrderbookV5>>
getEventOrderHistory()
getEventOrderHistory(params?: GetEventOrderHistoryParamsV5): Promise<APIResponseV3WithTime<EventOrderHistoryResultV5>>;Get Event Contract order history (up to 2 years). Default query window is 7 days if start/end omitted.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params? | GetEventOrderHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventOrderHistoryResultV5>>
getEventPositionInfo()
getEventPositionInfo(params?: GetEventPositionInfoParamsV5): Promise<APIResponseV3WithTime<EventPositionInfoResultV5>>;Get Event Contract position info (UpDown, Target, Range).
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params? | GetEventPositionInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventPositionInfoResultV5>>
getEventSettlementRecords()
getEventSettlementRecords(params: GetEventSettlementRecordsParamsV5): Promise<APIResponseV3WithTime<EventSettlementRecordsResultV5>>;Get Event Contract settlement records (up to 2 years). Default query window is 7 days if start/end omitted.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params | GetEventSettlementRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventSettlementRecordsResultV5>>
getEventTradeHistory()
getEventTradeHistory(params: GetEventTradeHistoryParamsV5): Promise<APIResponseV3WithTime<EventTradeHistoryResultV5>>;Get Event Contract trade (execution) history (up to 2 years). Default query window is 7 days if start/end omitted.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params | GetEventTradeHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventTradeHistoryResultV5>>
getExchangeBrokerAccountInfo()
getExchangeBrokerAccountInfo(): Promise<APIResponseV3WithTime<ExchangeBrokerAccountInfoV5>>;Get Exchange Broker Account Info.
INFO Use exchange broker master account to query API rate limit: 10 req / sec
Returns
Promise<APIResponseV3WithTime<ExchangeBrokerAccountInfoV5>>
getExchangeBrokerEarnings()
getExchangeBrokerEarnings(params?: GetExchangeBrokerEarningsParamsV5): Promise<APIResponseV3WithTime<ExchangeBrokerEarningResultV5>>;Get Exchange Broker Earning.
INFO Use exchange broker master account to query The data can support up to past 1 months until T-1. To extract data from over a month ago, please contact your Relationship Manager begin & end are either entered at the same time or not entered, and latest 7 days data are returned by default API rate limit: 10 req / sec
Parameters
| Parameter | Type |
|---|---|
params? | GetExchangeBrokerEarningsParamsV5 |
Returns
Promise<APIResponseV3WithTime<ExchangeBrokerEarningResultV5>>
getExchangeEntities()
getExchangeEntities(): Promise<APIResponseV3WithTime<{
vasp: VaspEntityV5[];
}>>;Get Exchange Entity List.
This endpoint is particularly used for kyc=KOR users. When withdraw funds, you need to fill entity id.
Returns
Promise<APIResponseV3WithTime<{ vasp: VaspEntityV5[]; }>>
getExecutionList()
getExecutionList(params: GetExecutionListParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>;Query users' execution records, sorted by execTime in descending order
Unified account covers: Spot / Linear contract / Options Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
Parameters
| Parameter | Type |
|---|---|
params | GetExecutionListParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>
getFeeGroupStructure()
getFeeGroupStructure(params: GetFeeGroupStructureParamsV5): Promise<APIResponseV3WithTime<FeeGroupStructureResponseV5>>;Get Fee Group Structure Query for the group fee structure and fee rates.
The new grouped fee structure only applies to Pro-level and Market Maker clients. Covers: USDT Perpetual / USDT Delivery / USDC Perpetual / USDC Delivery / Inverse Contracts
Parameters
| Parameter | Type |
|---|---|
params | GetFeeGroupStructureParamsV5 |
Returns
Promise<APIResponseV3WithTime<FeeGroupStructureResponseV5>>
getFeeRate()
getFeeRate(params: GetFeeRateParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[], CategoryV5>>>;Get the trading fee rate. Covers: Spot / USDT perpetual / Inverse perpetual / Inverse futures / Options
Parameters
| Parameter | Type |
|---|---|
params | GetFeeRateParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[], CategoryV5>>>
getFiatTradingPairList()
getFiatTradingPairList(params?: GetFiatTradingPairListParamsV5): Promise<APIResponseV3WithTime<FiatTradingPairListV5>>;Get Fiat Trading Pair List Query for the list of coins you can convert to/from.
INFO:
- For buy side (side=0): buy crypto, sell fiat
- For sell side (side=1): sell crypto, buy fiat
Parameters
| Parameter | Type |
|---|---|
params? | GetFiatTradingPairListParamsV5 |
Returns
Promise<APIResponseV3WithTime<FiatTradingPairListV5>>
getFixedLoanAvailableInventory()
getFixedLoanAvailableInventory(params: GetFixedLoanAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FixedLoanAvailableInventoryV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetFixedLoanAvailableInventoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedLoanAvailableInventoryV5>>
getFixedRateAvailableInventory()
getFixedRateAvailableInventory(params: GetFixedRateAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FixedRateAvailableInventoryV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetFixedRateAvailableInventoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedRateAvailableInventoryV5>>
getFixedRateBorrowContractInfo()
getFixedRateBorrowContractInfo(params?: GetFixedRateBorrowContractInfoParamsV5): Promise<APIResponseV3WithTime<{
list: FixedRateBorrowContractInfoV5[];
nextPageCursor: string;
}>>;Fixed-rate borrow contract list (descending by borrow time).
Parameters
| Parameter | Type |
|---|---|
params? | GetFixedRateBorrowContractInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: FixedRateBorrowContractInfoV5[]; nextPageCursor: string; }>>
getFixedRateBorrowOrderInfo()
getFixedRateBorrowOrderInfo(params?: GetFixedRateBorrowOrderInfoParamsV5): Promise<APIResponseV3WithTime<{
list: FixedRateBorrowOrderInfoV5[];
nextPageCursor: string;
}>>;Fixed-rate borrow order history (descending by order time).
Parameters
| Parameter | Type |
|---|---|
params? | GetFixedRateBorrowOrderInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: FixedRateBorrowOrderInfoV5[]; nextPageCursor: string; }>>
getFixedRateBorrowOrderQuote()
getFixedRateBorrowOrderQuote(params: GetFixedRateBorrowOrderQuoteParamsV5): Promise<APIResponseV3WithTime<{
list: FixedRateBorrowQuoteV5[];
}>>;Fixed-rate borrow order book quotes (sort by apy, term, or quantity).
Parameters
| Parameter | Type |
|---|---|
params | GetFixedRateBorrowOrderQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: FixedRateBorrowQuoteV5[]; }>>
getFixedTermEarnOrder()
getFixedTermEarnOrder(params?: GetFixedTermEarnOrderListParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnOrderListV5>>;Fixed-term earn — order list.
INFO: API key needs "Earn" permission. Rate limit: 10 req/s.
Parameters
| Parameter | Type |
|---|---|
params? | GetFixedTermEarnOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedTermEarnOrderListV5>>
getFixedTermEarnPosition()
getFixedTermEarnPosition(params?: GetFixedTermEarnPositionParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnPositionListV5>>;Fixed-term earn — active positions.
INFO: API key needs "Earn" permission. Rate limit: 10 req/s.
Parameters
| Parameter | Type |
|---|---|
params? | GetFixedTermEarnPositionParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedTermEarnPositionListV5>>
getFixedTermEarnProduct()
getFixedTermEarnProduct(params?: GetFixedTermEarnProductParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnProductListV5>>;Fixed-term / fixed saving — product list (Earn).
INFO: No authentication. Up to 50 requests/second per IP.
Parameters
| Parameter | Type |
|---|---|
params? | GetFixedTermEarnProductParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedTermEarnProductListV5>>
getFlexibleAvailableInventory()
getFlexibleAvailableInventory(params: GetFlexibleAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FlexibleAvailableInventoryV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetFlexibleAvailableInventoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<FlexibleAvailableInventoryV5>>
getFlexibleLoanAvailableInventory()
getFlexibleLoanAvailableInventory(params: GetFlexibleLoanAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FlexibleLoanAvailableInventoryV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetFlexibleLoanAvailableInventoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<FlexibleLoanAvailableInventoryV5>>
getFlexibleSavingAutoSavings()
getFlexibleSavingAutoSavings(params?: GetFlexibleSavingAutoSavingsParamsV5): Promise<APIResponseV3WithTime<FlexibleSavingAutoSavingsV5>>;Query Flexible Saving auto savings settings. Omit coins to return every supported coin.
Parameters
| Parameter | Type |
|---|---|
params? | GetFlexibleSavingAutoSavingsParamsV5 |
Returns
Promise<APIResponseV3WithTime<FlexibleSavingAutoSavingsV5>>
getFriendReferrals()
getFriendReferrals(params?: GetFriendReferralsParamsV5): Promise<APIResponseV3WithTime<{
nextCursor: string;
records: FriendReferralRecordV5[];
}>>;Get Friend Referrals Query the friend's invitee data.
TIP: Any permission can access this endpoint.
Parameters
| Parameter | Type |
|---|---|
params? | GetFriendReferralsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextCursor: string; records: FriendReferralRecordV5[]; }>>
getFullDepthOrderbook()
getFullDepthOrderbook(params: GetFullDepthOrderbookParamsV5): Promise<APIResponseV3WithTime<OrderbookResponseV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetFullDepthOrderbookParamsV5 |
Returns
Promise<APIResponseV3WithTime<OrderbookResponseV5>>
getFundingAccountTransactionHistory()
getFundingAccountTransactionHistory(params?: GetFundingAccountTransactionHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: FundingAccountTransactionRecordV5[];
nextPageCursor: string;
}>>;Funding Account Transaction History Transaction log in Funding Account. Supports filtering by transaction type and time range.
INFO: createTimeFrom and createTimeTo must be used together. Interval cannot exceed 7 days. If neither provided, defaults to last 7 days.
Parameters
| Parameter | Type |
|---|---|
params? | GetFundingAccountTransactionHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: FundingAccountTransactionRecordV5[]; nextPageCursor: string; }>>
getFundingRateHistory()
getFundingRateHistory(params: GetFundingRateHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<FundingRateHistoryResponseV5[], "linear" | "inverse">>>;Query historical funding rate. Each symbol has a different funding interval.
Covers: Linear contract / Inverse perpetual
Parameters
| Parameter | Type |
|---|---|
params | GetFundingRateHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<FundingRateHistoryResponseV5[], "linear" | "inverse">>>
getFuturesLeverage()
getFuturesLeverage(params: GetFuturesLeverageParamsV5): Promise<APIResponseV3WithTime<FuturesLeverageResultV5>>;Get Futures Leverage Query isolated leverage settings without requiring an open position.
Returns an error under Portfolio Margin mode.
Parameters
| Parameter | Type |
|---|---|
params | GetFuturesLeverageParamsV5 |
Returns
Promise<APIResponseV3WithTime<FuturesLeverageResultV5>>
getHistoricalInterestRate()
getHistoricalInterestRate(params: object): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Historical Interest Rate You can query up to six months borrowing interest rate of Margin trading. INFO: Need authentication, the api key needs "Spot" permission. Only supports Unified account.
Parameters
| Parameter | Type |
|---|---|
params | { currency: string; endTime?: number; startTime?: number; vipLevel?: string; } |
params.currency | string |
params.endTime? | number |
params.startTime? | number |
params.vipLevel? | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getHistoricalVolatility()
getHistoricalVolatility(params: GetHistoricalVolatilityParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<HistoricalVolatilityV5[], "option">>>;Query option historical volatility Covers: Option
Parameters
| Parameter | Type |
|---|---|
params | GetHistoricalVolatilityParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<HistoricalVolatilityV5[], "option">>>
getHistoricOrders()
getHistoricOrders(params: GetAccountHistoricOrdersParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>;Query order history. As order creation/cancellation is asynchronous, the data returned from this endpoint may delay.
If you want to get real-time order information, you could query this endpoint or rely on the websocket stream (recommended).
Parameters
| Parameter | Type |
|---|---|
params | GetAccountHistoricOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>
getHoldToEarnAirdropProducts()
getHoldToEarnAirdropProducts(): Promise<APIResponseV3WithTime<HoldToEarnAirdropProductsResultV5>>;Get Hold to Earn airdrop products (ByFi).
No authentication required; guest access supported. Authenticated users get eligibility-filtered products.
Returns
Promise<APIResponseV3WithTime<HoldToEarnAirdropProductsResultV5>>
getHoldToEarnAirdropYieldHistory()
getHoldToEarnAirdropYieldHistory(params: GetHoldToEarnAirdropYieldHistoryParamsV5): Promise<APIResponseV3WithTime<HoldToEarnAirdropYieldHistoryResultV5>>;Get Hold to Earn airdrop daily PnL records (ByFi). Up to 3 months of completed yield history.
INFO: API key needs "Earn" permission
Parameters
| Parameter | Type |
|---|---|
params | GetHoldToEarnAirdropYieldHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<HoldToEarnAirdropYieldHistoryResultV5>>
getIndexPriceComponents()
getIndexPriceComponents(params: GetIndexPriceComponentsParamsV5): Promise<APIResponseV3WithTime<IndexPriceComponentsResponseV5>>;Get Index Price Components Query for index price components that contribute to the calculation of an index price.
Parameters
| Parameter | Type |
|---|---|
params | GetIndexPriceComponentsParamsV5 |
Returns
Promise<APIResponseV3WithTime<IndexPriceComponentsResponseV5>>
getIndexPriceKline()
getIndexPriceKline(params: GetIndexPriceKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse">>>;Query the index price kline data. Charts are returned in groups based on the requested interval.
Covers: Linear contract / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params | GetIndexPriceKlineParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse">>>
getInstitutionalLendingCoinDeltaAmount()
getInstitutionalLendingCoinDeltaAmount(params?: GetCoinDeltaAmountParamsV5): Promise<APIResponseV3WithTime<InstitutionalLendingCoinDeltaAmountV5>>;Get Coin Delta Amount Coin delta amount details for institutional loan hedge product (unified account only).
Parameters
| Parameter | Type |
|---|---|
params? | GetCoinDeltaAmountParamsV5 |
Returns
Promise<APIResponseV3WithTime<InstitutionalLendingCoinDeltaAmountV5>>
getInstitutionalLendingDelayLiquidationStatus()
getInstitutionalLendingDelayLiquidationStatus(): Promise<APIResponseV3WithTime<InstitutionalLendingDelayLiquidationStatusV5>>;Current LTV, liquidation status, and delay-liquidation timing for an institutional loan account.
Returns
Promise<APIResponseV3WithTime<InstitutionalLendingDelayLiquidationStatusV5>>
getInstitutionalLendingLoanOrders()
getInstitutionalLendingLoanOrders(params?: object): Promise<APIResponseV3WithTime<{
loanInfo: any[];
}>>;Get Loan Orders
Parameters
| Parameter | Type |
|---|---|
params? | { endTime?: number; limit?: number; orderId?: string; startTime?: number; } |
params.endTime? | number |
params.limit? | number |
params.orderId? | string |
params.startTime? | number |
Returns
Promise<APIResponseV3WithTime<{ loanInfo: any[]; }>>
getInstitutionalLendingLTV()
getInstitutionalLendingLTV(): Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>;Get LTV
Returns
Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>
Deprecated
getInstitutionalLendingLTVWithLadderConversionRate()
getInstitutionalLendingLTVWithLadderConversionRate(): Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>;Get LTV with Ladder Conversion Rate
Returns
Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>
getInstitutionalLendingMarginCoinInfo()
getInstitutionalLendingMarginCoinInfo(productId?: string): Promise<APIResponseV3WithTime<{
marginToken: any[];
}>>;Get Margin Coin Info
Parameters
| Parameter | Type |
|---|---|
productId? | string |
Returns
Promise<APIResponseV3WithTime<{ marginToken: any[]; }>>
Deprecated
getInstitutionalLendingMarginCoinInfoWithConversionRate()
getInstitutionalLendingMarginCoinInfoWithConversionRate(productId?: string): Promise<APIResponseV3WithTime<{
marginToken: any[];
}>>;Get Margin Coin Info With Conversion Rate
Parameters
| Parameter | Type |
|---|---|
productId? | string |
Returns
Promise<APIResponseV3WithTime<{ marginToken: any[]; }>>
getInstitutionalLendingProductInfo()
getInstitutionalLendingProductInfo(productId?: string): Promise<APIResponseV3WithTime<{
marginProductInfo: InstitutionalLendingProductInfoV5[];
}>>;Get Product Info
Parameters
| Parameter | Type |
|---|---|
productId? | string |
Returns
Promise<APIResponseV3WithTime<{ marginProductInfo: InstitutionalLendingProductInfoV5[]; }>>
getInstitutionalLendingRepayOrders()
getInstitutionalLendingRepayOrders(params?: object): Promise<APIResponseV3WithTime<{
repayInfo: any[];
}>>;Get Repay Orders
Parameters
| Parameter | Type |
|---|---|
params? | { endTime?: number; limit?: number; startTime?: number; } |
params.endTime? | number |
params.limit? | number |
params.startTime? | number |
Returns
Promise<APIResponseV3WithTime<{ repayInfo: any[]; }>>
getInstrumentsInfo()
getInstrumentsInfo<C extends CategoryV5>(params: GetInstrumentsInfoParamsV5 & object): Promise<APIResponseV3WithTime<InstrumentInfoResponseV5<C>>>;Query a list of instruments of online trading pair.
Covers: Spot / Linear contract / Inverse contract / Option
Note: Spot does not support pagination, so limit & cursor are invalid. Note: e.g. symbolType: 'commodity', and for linear also stock, forex (see Bybit Get Instruments Info).
Type Parameters
| Type Parameter |
|---|
C extends CategoryV5 |
Parameters
| Parameter | Type |
|---|---|
params | GetInstrumentsInfoParamsV5 & object |
Returns
Promise<APIResponseV3WithTime<InstrumentInfoResponseV5<C>>>
getInstrumentSummary()
getInstrumentSummary(params: GetInstrumentSummaryParamsV5): Promise<APIResponseV3WithTime<InstrumentSummaryResponseV5>>;Query summary information and trading increments for linear and option instruments.
Covers: Linear contract / Option
category is required (linear or option). Page with cursor set to nextPageCursor from the previous response. limit is [1, 1000], default 500.
Parameters
| Parameter | Type |
|---|---|
params | GetInstrumentSummaryParamsV5 |
Returns
Promise<APIResponseV3WithTime<InstrumentSummaryResponseV5>>
getInsurance()
getInsurance(params?: GetInsuranceParamsV5): Promise<APIResponseV3WithTime<InsuranceResponseV5>>;Query Bybit insurance pool data (BTC/USDT/USDC etc). The data is updated every 24 hours.
Parameters
| Parameter | Type |
|---|---|
params? | GetInsuranceParamsV5 |
Returns
Promise<APIResponseV3WithTime<InsuranceResponseV5>>
getInternalDepositRecords()
getInternalDepositRecords(params?: GetInternalDepositRecordParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
rows: InternalDepositRecordV5[];
}>>;Get Internal Deposit Records (across Bybit) Query deposit records through Bybit platform
RULES The maximum difference between the start time and the end time is 30 days. Support to get deposit records by Master or Sub Member Api Key
Parameters
| Parameter | Type |
|---|---|
params? | GetInternalDepositRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: InternalDepositRecordV5[]; }>>
getInternalTransferRecords()
getInternalTransferRecords(params?: GetInternalTransferParamsV5): Promise<APIResponseV3WithTime<CursorListV5<InternalTransferRecordV5[]>>>;Query the internal transfer records between different account types under the same UID.
Parameters
| Parameter | Type |
|---|---|
params? | GetInternalTransferParamsV5 |
Returns
Promise<APIResponseV3WithTime<CursorListV5<InternalTransferRecordV5[]>>>
getKline()
getKline(params: GetKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCVKlineV5[], "spot" | "linear" | "inverse">>>;Query the kline data. Charts are returned in groups based on the requested interval.
Covers: Spot / Linear contract / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params | GetKlineParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCVKlineV5[], "spot" | "linear" | "inverse">>>
getLaunchpoolCurrentStaking()
getLaunchpoolCurrentStaking(): Promise<APIResponseV3WithTime<LaunchpoolCurrentStakingResultV5>>;Returns
Promise<APIResponseV3WithTime<LaunchpoolCurrentStakingResultV5>>
getLaunchpoolProjectList()
getLaunchpoolProjectList(params: GetLaunchpoolProjectListParamsV5): Promise<APIResponseV3WithTime<LaunchpoolProjectListResultV5>>;***** Spot-X (Launchpool / Puzzle / Token Splash)
Parameters
| Parameter | Type |
|---|---|
params | GetLaunchpoolProjectListParamsV5 |
Returns
Promise<APIResponseV3WithTime<LaunchpoolProjectListResultV5>>
getLaunchpoolUserActivityLog()
getLaunchpoolUserActivityLog(params?: GetLaunchpoolUserActivityLogParamsV5): Promise<APIResponseV3WithTime<LaunchpoolActivityLogResultV5>>;Parameters
| Parameter | Type |
|---|---|
params? | GetLaunchpoolUserActivityLogParamsV5 |
Returns
Promise<APIResponseV3WithTime<LaunchpoolActivityLogResultV5>>
getLaunchpoolUserHistory()
getLaunchpoolUserHistory(params?: GetLaunchpoolUserHistoryParamsV5): Promise<APIResponseV3WithTime<LaunchpoolUserHistoryResultV5>>;Parameters
| Parameter | Type |
|---|---|
params? | GetLaunchpoolUserHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<LaunchpoolUserHistoryResultV5>>
getLimitPriceAction()
getLimitPriceAction(): Promise<APIResponseV3WithTime<UserSettingConfigV5>>;Get Trade Behaviour Config / Get Limit Price Behaviour You can get configuration how the system behaves when your limit order price exceeds the highest bid or lowest ask price. Response includes deltaEnable for Delta Neutral mode, and smsef / fmsef for Spot and Futures MNT fee deduction.
Returns
Promise<APIResponseV3WithTime<UserSettingConfigV5>>
getLiquidityMiningProduct()
getLiquidityMiningProduct(params?: GetLiquidityMiningProductParamsV5): Promise<APIResponseV3WithTime<LiquidityMiningProductResultV5>>;Liquidity mining — product list (Advanced Earn).
INFO: No authentication. Up to 50 requests/second per IP.
Parameters
| Parameter | Type |
|---|---|
params? | GetLiquidityMiningProductParamsV5 |
Returns
Promise<APIResponseV3WithTime<LiquidityMiningProductResultV5>>
getLoanBorrowableCoins()
getLoanBorrowableCoins(params?: GetBorrowableCoinsParamsV5): Promise<APIResponseV3WithTime<{
list: BorrowableCoinV5[];
}>>;Get Borrowable Coins New
Parameters
| Parameter | Type |
|---|---|
params? | GetBorrowableCoinsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: BorrowableCoinV5[]; }>>
getLoanCollateralCoins()
getLoanCollateralCoins(params?: GetCollateralCoinsParamsV5): Promise<APIResponseV3WithTime<CollateralDataV5>>;Get Collateral Coins New
Parameters
| Parameter | Type |
|---|---|
params? | GetCollateralCoinsParamsV5 |
Returns
Promise<APIResponseV3WithTime<CollateralDataV5>>
getLoanLTVAdjustmentHistory()
getLoanLTVAdjustmentHistory(params?: GetLoanLTVAdjustmentHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: LoanLTVAdjustmentHistoryV5[];
nextPageCursor: string;
}>>;Get Loan LTV Adjustment History Query the transaction history of collateral amount adjustment
Parameters
| Parameter | Type |
|---|---|
params? | GetLoanLTVAdjustmentHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: LoanLTVAdjustmentHistoryV5[]; nextPageCursor: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
INFO: Support querying last 6 months adjustment transactions Only the ltv adjustment transactions launched by the user can be queried
getLongShortRatio()
getLongShortRatio(params: GetLongShortRatioParamsV5): Promise<APIResponseV3WithTime<CursorListV5<LongShortRatioV5[]>>>;Parameters
| Parameter | Type |
|---|---|
params | GetLongShortRatioParamsV5 |
Returns
Promise<APIResponseV3WithTime<CursorListV5<LongShortRatioV5[]>>>
getMarkPriceKline()
getMarkPriceKline(params: GetMarkPriceKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse" | "option">>>;Query the mark price kline data. Charts are returned in groups based on the requested interval.
Covers: USDT contract / USDC contract / Inverse contract / Options
category defaults to linear if omitted. For options, limit max is 500; futures max is 1000.
Parameters
| Parameter | Type |
|---|---|
params | GetMarkPriceKlineParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse" | "option">>>
getMasterDepositAddress()
getMasterDepositAddress(coin: string, chainType?: string): Promise<APIResponseV3WithTime<{
chains: DepositAddressChainV5[];
coin: string;
}>>;Query the deposit address information of MASTER account.
Parameters
| Parameter | Type |
|---|---|
coin | string |
chainType? | string |
Returns
Promise<APIResponseV3WithTime<{ chains: DepositAddressChainV5[]; coin: string; }>>
getMaxAllowedReductionCollateralAmount()
getMaxAllowedReductionCollateralAmount(params: object): Promise<APIResponseV3WithTime<{
maxCollateralAmount: string;
}>>;Get Max. Allowed Reduction Collateral Amount Query the maximum allowed reduction collateral amount
Parameters
| Parameter | Type |
|---|---|
params | { orderId: string; } |
params.orderId | string |
Returns
Promise<APIResponseV3WithTime<{ maxCollateralAmount: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
getMaxBorrowableAmount()
getMaxBorrowableAmount(params: GetMaxBorrowableAmountParamsV5): Promise<APIResponseV3WithTime<MaxBorrowableAmountV5>>;Get max borrowable amount.
maxLoan can be "0" when spot margin mode is off, or when no collateral coins are enabled. The app can still show a borrow amount after a collateral coin is selected. Undocumented; Bybit API staff confirmed this on 15 Oct 2026. Check getSpotMarginState(), setCollateralCoin() (POST /v5/account/set-collateral-switch), and toggleSpotMarginTrade() first.
Parameters
| Parameter | Type |
|---|---|
params | GetMaxBorrowableAmountParamsV5 |
Returns
Promise<APIResponseV3WithTime<MaxBorrowableAmountV5>>
getMaxCollateralAmount()
getMaxCollateralAmount(params: GetMaxCollateralAmountParamsV5): Promise<APIResponseV3WithTime<{
maxCollateralAmount: string;
}>>;Get Max. Allowed Collateral Reduction Amount New
Parameters
| Parameter | Type |
|---|---|
params | GetMaxCollateralAmountParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ maxCollateralAmount: string; }>>
getMaxLoanAmount()
getMaxLoanAmount(params: GetMaxLoanAmountParamsV5): Promise<APIResponseV3WithTime<MaxLoanAmountV5>>;Obtain Max Loan Amount Check the maximum borrowable amount & remaining individual platform limit for crypto loans.
INFO:
- Permission: "Spot trade"
- UID rate limit: 5 req/s
Parameters
| Parameter | Type |
|---|---|
params | GetMaxLoanAmountParamsV5 |
Returns
Promise<APIResponseV3WithTime<MaxLoanAmountV5>>
getMMPState()
getMMPState(baseCoin: string): Promise<APIResponseV3WithTime<{
result: MMPStateV5[];
}>>;Get MMP State
Parameters
| Parameter | Type |
|---|---|
baseCoin | string |
Returns
Promise<APIResponseV3WithTime<{ result: MMPStateV5[]; }>>
getMovePositionHistory()
getMovePositionHistory(params?: GetMovePositionHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: MovePositionHistoryV5[];
nextPageCursor: string;
}>>;Query moved position data by master UID api key.
Unified account covers: USDT perpetual / USDC contract / Spot / Option
Parameters
| Parameter | Type |
|---|---|
params? | GetMovePositionHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: MovePositionHistoryV5[]; nextPageCursor: string; }>>
getNewDeliveryPrice()
getNewDeliveryPrice(params: object): Promise<APIResponseV3WithTime<{
category: string;
list: object[];
}>>;Get New Delivery Price Get historical option delivery prices.
Covers: Option
INFO
- It is recommended to query this endpoint 1 minute after settlement is completed, because the data returned by this endpoint may be delayed by 1 minute.
- By default, the most recent 50 records are returned in reverse order of "deliveryTime".
Parameters
| Parameter | Type |
|---|---|
params | { baseCoin: string; category: "option"; settleCoin?: string; } |
params.baseCoin | string |
params.category | "option" |
params.settleCoin? | string |
Returns
Promise<APIResponseV3WithTime<{ category: string; list: object[]; }>>
getOngoingFlexibleLoans()
getOngoingFlexibleLoans(params?: GetOngoingFlexibleLoansParamsV5): Promise<APIResponseV3WithTime<{
list: OngoingFlexibleLoanV5[];
}>>;Get Flexible Loans Query for your ongoing loans
Parameters
| Parameter | Type |
|---|---|
params? | GetOngoingFlexibleLoansParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: OngoingFlexibleLoanV5[]; }>>
getOpenInterest()
getOpenInterest(params: GetOpenInterestParamsV5): Promise<APIResponseV3WithTime<OpenInterestResponseV5>>;Get open interest of each symbol.
Covers: Linear contract / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params | GetOpenInterestParamsV5 |
Returns
Promise<APIResponseV3WithTime<OpenInterestResponseV5>>
getOptionAssetInfo()
getOptionAssetInfo(): Promise<APIResponseV3WithTime<OptionAssetInfoNestedResultV5>>;Get Option Asset Info P&L per coin for options: delta, RPL, UPL, margin. Result uses a nested result list.
Returns
Promise<APIResponseV3WithTime<OptionAssetInfoNestedResultV5>>
getOptionBaseCoins()
getOptionBaseCoins(params?: GetOptionBaseCoinsParamsV5): Promise<APIResponseV3WithTime<OptionBaseCoinsResultV5>>;Query option base coins, display names, launch times, and tradable symbol availability.
Parameters
| Parameter | Type |
|---|---|
params? | GetOptionBaseCoinsParamsV5 |
Returns
Promise<APIResponseV3WithTime<OptionBaseCoinsResultV5>>
getOptionDeliveryPrice()
getOptionDeliveryPrice(params: GetOptionDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[], CategoryV5>>>;Get the delivery price for option
Covers: Option
Parameters
| Parameter | Type |
|---|---|
params | GetOptionDeliveryPriceParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[], CategoryV5>>>
Deprecated
use getDeliveryPrice() instead
getOrderbook()
getOrderbook(params: GetOrderbookParamsV5): Promise<APIResponseV3WithTime<OrderbookResponseV5>>;Query orderbook data
Covers: Spot / Linear contract / Inverse contract / Option
Parameters
| Parameter | Type |
|---|---|
params | GetOrderbookParamsV5 |
Returns
Promise<APIResponseV3WithTime<OrderbookResponseV5>>
Example
import { RestClientV5 } from 'bybit-api';
async function main() {
const client = new RestClientV5();
const response = await client.getOrderbook({ category: 'spot', symbol: 'BTCUSDT', limit: 5 });
if (response.retCode !== 0) throw new Error(`Bybit ${response.retCode}: ${response.retMsg}`);
console.log('Best bid [price, size]:', response.result.b[0]);
console.log('Best ask [price, size]:', response.result.a[0]);
}
main().catch((error) => {
console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
process.exitCode = 1;
});See
getOrderPriceLimit()
getOrderPriceLimit(params: object): Promise<APIResponseV3WithTime<OrderPriceLimitV5>>;Parameters
| Parameter | Type |
|---|---|
params | { category: "spot" | "linear" | "inverse"; symbol: string; } |
params.category | "spot" | "linear" | "inverse" |
params.symbol | string |
Returns
Promise<APIResponseV3WithTime<OrderPriceLimitV5>>
getP2PAccountCoinsBalance()
getP2PAccountCoinsBalance(params: GetP2PAccountCoinsBalanceParamsV5): Promise<APIResponseV3WithTime<P2PAccountCoinsBalanceV5>>;Get coin balance of all account types under the master account, and sub account.
Note: this field is mandatory for accountType=UNIFIED, and supports up to 10 coins each request
Parameters
| Parameter | Type |
|---|---|
params | GetP2PAccountCoinsBalanceParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2PAccountCoinsBalanceV5>>
getP2PAdDetail()
getP2PAdDetail(params: object): Promise<APIResponseV3WithTime<P2PAdDetailV5>>;Get P2P ad details
Parameters
| Parameter | Type |
|---|---|
params | { itemId: string; } |
params.itemId | string |
Returns
Promise<APIResponseV3WithTime<P2PAdDetailV5>>
getP2PChatMessages()
getP2PChatMessages(params: GetP2PChatMessagesParamsV5): Promise<APIP2PChatResponse<P2PChatMessagesResponseV5>>;Get P2P chat messages, ordered by creation time descending.
Parameters
| Parameter | Type |
|---|---|
params | GetP2PChatMessagesParamsV5 |
Returns
Promise<APIP2PChatResponse<P2PChatMessagesResponseV5>>
See
https://bybit-exchange.github.io/docs/p2p/chat/get-message-list
getP2PChatSessionId()
getP2PChatSessionId(params: GetP2PChatSessionIdParamsV5): Promise<APIP2PChatResponse<{
sessionId: string;
}>>;Get the AES encrypted P2P chat session ID for a counterparty.
Parameters
| Parameter | Type |
|---|---|
params | GetP2PChatSessionIdParamsV5 |
Returns
Promise<APIP2PChatResponse<{ sessionId: string; }>>
See
https://bybit-exchange.github.io/docs/p2p/chat/get-session-id
getP2PChatSessions()
getP2PChatSessions(params: GetP2PChatSessionsParamsV5): Promise<APIP2PChatResponse<P2PChatSessionsResponseV5>>;Get P2P chat sessions with cursor pagination and read status filtering.
Parameters
| Parameter | Type |
|---|---|
params | GetP2PChatSessionsParamsV5 |
Returns
Promise<APIP2PChatResponse<P2PChatSessionsResponseV5>>
See
https://bybit-exchange.github.io/docs/p2p/chat/get-chat-session-list
getP2PCounterpartyUserInfo()
getP2PCounterpartyUserInfo(params: GetP2PCounterpartyUserInfoParamsV5): Promise<APIResponseV3WithTime<P2PCounterpartyUserInfoV5>>;Get counterparty user information in a P2P order
Parameters
| Parameter | Type |
|---|---|
params | GetP2PCounterpartyUserInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2PCounterpartyUserInfoV5>>
getP2POnlineAds()
getP2POnlineAds(params: GetP2POnlineAdsParamsV5): Promise<APIResponseV3WithTime<P2POnlineAdsResponseV5>>;Get market online ads list
Parameters
| Parameter | Type |
|---|---|
params | GetP2POnlineAdsParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2POnlineAdsResponseV5>>
getP2POrderDetail()
getP2POrderDetail(params: object): Promise<APIResponseV3WithTime<P2POrderDetailV5>>;Get P2P order details
Parameters
| Parameter | Type |
|---|---|
params | { orderId: string; } |
params.orderId | string |
Returns
Promise<APIResponseV3WithTime<P2POrderDetailV5>>
getP2POrderMessages()
getP2POrderMessages(params: GetP2POrderMessagesParamsV5): Promise<APIP2PResponse<P2POrderMessageV5[], {
}>>;Get chat messages in a P2P order
Parameters
| Parameter | Type |
|---|---|
params | GetP2POrderMessagesParamsV5 |
Returns
Promise<APIP2PResponse<P2POrderMessageV5[], { }>>
getP2POrders()
getP2POrders(params: GetP2POrdersParamsV5): Promise<APIResponseV3WithTime<P2POrdersResponseV5>>;Get all P2P orders
Parameters
| Parameter | Type |
|---|---|
params | GetP2POrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2POrdersResponseV5>>
getP2PPendingOrders()
getP2PPendingOrders(params: GetP2PPendingOrdersParamsV5): Promise<APIResponseV3WithTime<P2POrdersResponseV5>>;Get pending P2P orders
Parameters
| Parameter | Type |
|---|---|
params | GetP2PPendingOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2POrdersResponseV5>>
getP2PPersonalAds()
getP2PPersonalAds(params: GetP2PPersonalAdsParamsV5): Promise<APIResponseV3WithTime<P2PPersonalAdsResponseV5>>;Get personal P2P ads list
Parameters
| Parameter | Type |
|---|---|
params | GetP2PPersonalAdsParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2PPersonalAdsResponseV5>>
getP2PUserInfo()
getP2PUserInfo(): Promise<APIResponseV3WithTime<P2PUserInfoV5>>;Get P2P user account information
Returns
Promise<APIResponseV3WithTime<P2PUserInfoV5>>
getP2PUserPayments()
getP2PUserPayments(): Promise<APIResponseV3WithTime<P2PUserPaymentV5[]>>;Get user payment information
Returns
Promise<APIResponseV3WithTime<P2PUserPaymentV5[]>>
getPayInfo()
getPayInfo(params?: GetPayInfoParamsV5): Promise<APIResponseV3WithTime<PayInfoResultV5>>;Get Pay Info Repayment collateral snapshot before manualRepay or repayLiability. Optional coin for one liability; omit for total.
Parameters
| Parameter | Type |
|---|---|
params? | GetPayInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<PayInfoResultV5>>
getPortfolioMarginInfo()
getPortfolioMarginInfo(params?: GetPortfolioMarginInfoParamsV5): Promise<APIResponseV3WithTime<PortfolioMarginInfoResultV5>>;Get Portfolio Margin Info Wallet and per-base-coin P&L range (aligned with the portfolio margin page).
Parameters
| Parameter | Type |
|---|---|
params? | GetPortfolioMarginInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<PortfolioMarginInfoResultV5>>
getPositionInfo()
getPositionInfo(params: PositionInfoParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<PositionV5[], CategoryV5>>>;Query real-time position data, such as position size, cumulative realizedPNL.
0: cross margin. 1: isolated margin
Unified account covers: Linear contract / Options
Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
Note: this will give a 404 error if you query the option category if your account is not unified
Response list items include openTime (position open timestamp in ms, default 0).
Parameters
| Parameter | Type |
|---|---|
params | PositionInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<PositionV5[], CategoryV5>>>
getPositionTiers()
getPositionTiers(params?: GetPositionTiersParamsV5): Promise<APIResponseV3WithTime<{
list: CurrencyPositionTiersV5[];
}>>;Get loan position risk information (position tiers)
Parameters
| Parameter | Type |
|---|---|
params? | GetPositionTiersParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: CurrencyPositionTiersV5[]; }>>
getPremiumIndexPriceKline()
getPremiumIndexPriceKline(params: GetPremiumIndexPriceKlineParamsV5): Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear">>>;Retrieve the premium index price kline data. Charts are returned in groups based on the requested interval.
Covers: Linear contract
Parameters
| Parameter | Type |
|---|---|
params | GetPremiumIndexPriceKlineParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear">>>
getPreUpgradeClosedPnl()
getPreUpgradeClosedPnl(params: GetPreUpgradeClosedPnlParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>;Query user's closed profit and loss records. The results are sorted by createdTime in descending order.
For now, it only supports to query USDT perpetual, Inverse perpetual and futures.
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeClosedPnlParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>
getPreUpgradeOptionDeliveryRecord()
getPreUpgradeOptionDeliveryRecord(params: GetPreUpgradeOptionDeliveryRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeOptionsDelivery[], CategoryV5>>>;Query delivery records of Option before you upgraded the account to a Unified account, sorted by deliveryTime in descending order.
INFO Supports the recent 6 months data. Please download older data via GUI
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeOptionDeliveryRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeOptionsDelivery[], CategoryV5>>>
getPreUpgradeOrderHistory()
getPreUpgradeOrderHistory(params: GetPreUpgradeOrderHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>;Get those orders which occurred before you upgrade the account to Unified account.
For now, it only supports to query USDT perpetual, USDC perpetual, Inverse perpetual and futures.
- can get all status in 7 days
- can only get filled orders beyond 7 days
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeOrderHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>
getPreUpgradeTradeHistory()
getPreUpgradeTradeHistory(params: GetPreUpgradeTradeHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>;Get users' execution records which occurred before you upgrade the account to Unified account, sorted by execTime in descending order
For now, it only supports to query USDT perpetual, Inverse perpetual and futures.
- You may have multiple executions in a single order.
- You can query by symbol, baseCoin, orderId and orderLinkId, and if you pass multiple params, the system will process them according to this priority: orderId > orderLinkId > symbol > baseCoin.
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeTradeHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>
getPreUpgradeTransactions()
getPreUpgradeTransactions(params: GetPreUpgradeTransactionLogParamsV5): Promise<APIResponseV3WithTime<{
list: PreUpgradeTransaction[];
nextPageCursor: string;
}>>;Query transaction logs which occurred in the USDC Derivatives wallet before the account was upgraded to a Unified account.
You can get USDC Perpetual, Option records.
INFO USDC Perpeual & Option support the recent 6 months data. Please download older data via GUI
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeTransactionLogParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: PreUpgradeTransaction[]; nextPageCursor: string; }>>
getPreUpgradeUSDCSessionSettlements()
getPreUpgradeUSDCSessionSettlements(params: GetPreUpgradeUSDCSessionParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeUSDCSessionSettlement[], CategoryV5>>>;Query session settlement records of USDC perpetual before you upgrade the account to Unified account.
INFO USDC Perpetual support the recent 6 months data. Please download older data via GUI
Parameters
| Parameter | Type |
|---|---|
params | GetPreUpgradeUSDCSessionParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeUSDCSessionSettlement[], CategoryV5>>>
getPrivate()
getPrivate(
endpoint: string,
params?: any,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | any |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.getPrivate
getPublicTradingHistory()
getPublicTradingHistory(params: GetPublicTradingHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<PublicTradeV5[], CategoryV5>>>;Query recent public trading data in Bybit.
Covers: Spot / Linear contract / Inverse contract / Option
Parameters
| Parameter | Type |
|---|---|
params | GetPublicTradingHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<PublicTradeV5[], CategoryV5>>>
getPuzzleProjectList()
getPuzzleProjectList(params: GetPuzzleProjectListParamsV5): Promise<APIResponseV3WithTime<PuzzleProjectListResultV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetPuzzleProjectListParamsV5 |
Returns
Promise<APIResponseV3WithTime<PuzzleProjectListResultV5>>
getPwmAllFundOrders()
getPwmAllFundOrders(params?: GetPwmAllFundOrdersParamsV5): Promise<APIResponseV3WithTime<PwmAllFundOrdersResultV5>>;Get all PWM fund orders (asset manager). Default time window: last 7 days.
Parameters
| Parameter | Type |
|---|---|
params? | GetPwmAllFundOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmAllFundOrdersResultV5>>
getPwmAllFunds()
getPwmAllFunds(params?: GetPwmAllFundsParamsV5): Promise<APIResponseV3WithTime<PwmAllFundsResultV5>>;Get all PWM funds managed by the institution (newest first).
Parameters
| Parameter | Type |
|---|---|
params? | GetPwmAllFundsParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmAllFundsResultV5>>
getPwmAssetManagerInvestmentPlans()
getPwmAssetManagerInvestmentPlans(params?: GetPwmAssetManagerInvestmentPlansParamsV5): Promise<APIResponseV3WithTime<PwmAssetManagerInvestmentPlansResultV5>>;Get PWM investment plans created by the institution (asset manager).
Parameters
| Parameter | Type |
|---|---|
params? | GetPwmAssetManagerInvestmentPlansParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmAssetManagerInvestmentPlansResultV5>>
getPwmFundHistoricalNav()
getPwmFundHistoricalNav(params: GetPwmFundHistoricalNavParamsV5): Promise<APIResponseV3WithTime<PwmFundHistoricalNavResultV5>>;Get PWM fund historical NAV (max 180 days between startTime and endTime).
Parameters
| Parameter | Type |
|---|---|
params | GetPwmFundHistoricalNavParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmFundHistoricalNavResultV5>>
getPwmFundTransferRecords()
getPwmFundTransferRecords(params?: GetPwmFundTransferRecordsParamsV5): Promise<APIResponseV3WithTime<PwmFundTransferRecordV5>>;Query PWM fund transfer result (fund custodian API key required).
Parameters
| Parameter | Type |
|---|---|
params? | GetPwmFundTransferRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmFundTransferRecordV5>>
getPwmInvestmentPlanAssetTrend()
getPwmInvestmentPlanAssetTrend(params: GetPwmInvestmentPlanAssetTrendParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanAssetTrendResultV5>>;Get PWM investment plan asset trend (default last 7 days).
Parameters
| Parameter | Type |
|---|---|
params | GetPwmInvestmentPlanAssetTrendParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmInvestmentPlanAssetTrendResultV5>>
getPwmInvestmentPlanDetail()
getPwmInvestmentPlanDetail(params: GetPwmInvestmentPlanDetailParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanDetailV5>>;Get PWM investment plan detail (Active or Closed).
Parameters
| Parameter | Type |
|---|---|
params | GetPwmInvestmentPlanDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmInvestmentPlanDetailV5>>
getPwmInvestmentPlanList()
getPwmInvestmentPlanList(): Promise<APIResponseV3WithTime<PwmInvestmentPlanListResultV5>>;Get all PWM investment plans.
Returns
Promise<APIResponseV3WithTime<PwmInvestmentPlanListResultV5>>
getPwmInvestmentPlanOrders()
getPwmInvestmentPlanOrders(params?: GetPwmInvestmentPlanOrdersParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanOrdersResultV5>>;Get PWM investment plan orders (subscribe / redeem / auto-reinvest).
Parameters
| Parameter | Type |
|---|---|
params? | GetPwmInvestmentPlanOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmInvestmentPlanOrdersResultV5>>
getPwmPendingInvestmentPlanDetail()
getPwmPendingInvestmentPlanDetail(params: GetPwmPendingInvestmentPlanDetailParamsV5): Promise<APIResponseV3WithTime<PwmPendingInvestmentPlanDetailV5>>;Get pending PWM investment plan detail (PendingSubscription).
Parameters
| Parameter | Type |
|---|---|
params | GetPwmPendingInvestmentPlanDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmPendingInvestmentPlanDetailV5>>
getPwmSubscribableProductInfo()
getPwmSubscribableProductInfo(): Promise<APIResponseV3WithTime<PwmSubscribableProductInfoResultV5>>;Get PWM subscribable product info for customize plan. No authentication required.
Returns
Promise<APIResponseV3WithTime<PwmSubscribableProductInfoResultV5>>
getQueryApiKey()
getQueryApiKey(): Promise<APIResponseV3WithTime<ApiKeyInfoV5>>;Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.
TIP: Any permission can access this endpoint.
Response permissions may include FiatBitPay (not FiatBybitPay).
Returns
Promise<APIResponseV3WithTime<ApiKeyInfoV5>>
getRateLimitCap()
getRateLimitCap(): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Rate Limit Cap Get your institution's total rate limit usage and cap, across the board.
API rate limit: 50 req per second Main UIDs or sub UIDs can query this endpoint, but a main UID can only see the rate limits of subs below it.
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getReferralCampaignRewards()
getReferralCampaignRewards(): Promise<APIResponseV3WithTime<ReferralCampaignRewardsResultV5>>;Get referral rules and configured campaign tasks for the current site.
Static configuration only. This does not return task progress, reward claims, or payouts. tasks entries are JSON strings (ReferralCampaignTaskPayloadV5). Send an empty JSON object.
Returns
Promise<APIResponseV3WithTime<ReferralCampaignRewardsResultV5>>
getReferralCode()
getReferralCode(): Promise<APIResponseV3WithTime<ReferralCodesResultV5>>;Returns
Promise<APIResponseV3WithTime<ReferralCodesResultV5>>
getReferralCommissionRecords()
getReferralCommissionRecords(params?: GetReferralCommissionRecordsParamsV5): Promise<APIResponseV3WithTime<ReferralCommissionRecordsResultV5>>;Query referral commission records for the authenticated inviter.
The inviter comes from the API key. Do not send an inviter user ID. Response userId is a masked invitee ID. A JSON body is required; pass {} or omit params when no filter is needed. Property names follow the proto camelCase names. Gateway serialization is not independently verified.
Parameters
| Parameter | Type |
|---|---|
params? | GetReferralCommissionRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<ReferralCommissionRecordsResultV5>>
getReferralUserIdentityProfile()
getReferralUserIdentityProfile(): Promise<APIResponseV3WithTime<ReferralUserIdentityProfileV5>>;Get the authenticated user's referral identity and available commission.
inviterAffiliateUserId and inviterUserId are relationship flags (1 or 0), not user IDs. commissionInfo is present only when an M1 inviter record matches this user and the commission query succeeds. Send an empty JSON object. Gateway serialization, including int64 and enum representation, is not independently verified.
Returns
Promise<APIResponseV3WithTime<ReferralUserIdentityProfileV5>>
getReferralUserInvitations()
getReferralUserInvitations(params?: GetReferralUserInvitationsParamsV5): Promise<APIResponseV3WithTime<ReferralUserInvitationsResultV5>>;Query invitation records for the authenticated referral user.
Do not send the caller's user ID. A JSON body is required; pass {} or omit params when no filter is needed. Gateway serialization is not independently verified.
Parameters
| Parameter | Type |
|---|---|
params? | GetReferralUserInvitationsParamsV5 |
Returns
Promise<APIResponseV3WithTime<ReferralUserInvitationsResultV5>>
getRenewOrderInfoFixed()
getRenewOrderInfoFixed(params?: GetRenewOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
list: RenewOrderInfoFixedV5[];
nextPageCursor: string;
}>>;Get Renew Order Info Query for renew order information
Permission: "Spot trade" UID rate limit: 5 req / second
Parameters
| Parameter | Type |
|---|---|
params? | GetRenewOrderInfoFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RenewOrderInfoFixedV5[]; nextPageCursor: string; }>>
getRepaymentHistory()
getRepaymentHistory(params?: GetRepaymentHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: RepaymentHistoryV5[];
nextPageCursor: string;
}>>;Get Repayment Transaction History Query repaid transaction history
Parameters
| Parameter | Type |
|---|---|
params? | GetRepaymentHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RepaymentHistoryV5[]; nextPageCursor: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
INFO: Support querying last 6 months completed loan orders Only successful repayments can be queried
getRepaymentHistoryFixed()
getRepaymentHistoryFixed(params?: GetRepaymentHistoryFixedParamsV5): Promise<APIResponseV3WithTime<{
list: RepaymentHistoryFixedV5[];
nextPageCursor: string;
}>>;Get Repayment History
Parameters
| Parameter | Type |
|---|---|
params? | GetRepaymentHistoryFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RepaymentHistoryFixedV5[]; nextPageCursor: string; }>>
getRepaymentHistoryFlexible()
getRepaymentHistoryFlexible(params?: GetRepaymentHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
list: RepaymentHistoryFlexibleV5[];
nextPageCursor: string;
}>>;Get Repayment Orders History
Parameters
| Parameter | Type |
|---|---|
params? | GetRepaymentHistoryFlexibleParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RepaymentHistoryFlexibleV5[]; nextPageCursor: string; }>>
getRFQConfig()
getRFQConfig(): Promise<APIResponseV3WithTime<RFQConfigV5>>;Get RFQ Configuration Query the information of the quoting party that can participate in the transaction and your own deskCode and other configuration information
Returns
Promise<APIResponseV3WithTime<RFQConfigV5>>
getRFQDetails()
getRFQDetails(params?: GetRFQDetailsParamsV5): Promise<APIResponseV3WithTime<{
cursor: string;
list: RFQDetailItemV5[];
}>>;Parameters
| Parameter | Type |
|---|---|
params? | GetRFQDetailsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ cursor: string; list: RFQDetailItemV5[]; }>>
getRFQHistory()
getRFQHistory(params?: GetRFQListParamsV5): Promise<APIResponseV3WithTime<RFQHistory>>;Get Historical RFQ Information Obtain the information of the inquiry form sent or received by the user, query from the database Pass both rfqId and rfqLinkId, rfqId shall prevail Sort in reverse order according to the creation time of rfq and return it
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQListParamsV5 |
Returns
Promise<APIResponseV3WithTime<RFQHistory>>
getRFQHistoryQuote()
getRFQHistoryQuote(params?: GetRFQHistoryParamsV5): Promise<APIResponseV3WithTime<{
cursor: string;
list: RFQQuoteItemV5[];
}>>;Get Historical Quote Information Obtain the quotation information sent or received by the user, query from the database Pass quoteId and quoteLinkId, quoteId shall prevail Pass both rfqId and rfqLinkId, rfqId shall prevail Sort in reverse order according to the creation time of the quotation
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ cursor: string; list: RFQQuoteItemV5[]; }>>
getRFQPublicTrades()
getRFQPublicTrades(params?: GetRFQPublicTradesParamsV5): Promise<APIResponseV3WithTime<{
cursor: string;
list: RFQPublicTradeV5[];
}>>;Get RFQ Public Transaction Data Get the recently executed RFQ successfullys
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQPublicTradesParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ cursor: string; list: RFQPublicTradeV5[]; }>>
getRFQRealtimeInfo()
getRFQRealtimeInfo(params?: GetRFQRealtimeParamsV5): Promise<APIResponseV3WithTime<GetRFQRealtimeResultV5>>;Get Real-time RFQ Information Obtain the inquiry information sent or received by the user, query from rfq-engine without delay Pass both rfqId and rfqLinkId, rfqId shall prevail Sort in reverse order according to the creation time of rfq and return it
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQRealtimeParamsV5 |
Returns
Promise<APIResponseV3WithTime<GetRFQRealtimeResultV5>>
getRFQRealtimeQuote()
getRFQRealtimeQuote(params?: GetRFQQuoteRealtimeParamsV5): Promise<APIResponseV3WithTime<{
list: RFQQuoteItemV5[];
}>>;Get Real-time Quote Information Obtain quotation information sent or received by users, query from rfq-engine without delay Pass quoteId and quoteLinkId, quoteId shall prevail Pass both rfqId and rfqLinkId, rfqId shall prevail Sort in reverse order according to the creation time of the quotation Return all non-final quotes
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQQuoteRealtimeParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RFQQuoteItemV5[]; }>>
getRFQTrades()
getRFQTrades(params?: GetRFQTradeListParamsV5): Promise<APIResponseV3WithTime<{
cursor: string;
list: RFQTradeV5[];
}>>;Get Trade Information Obtain transaction information executed by the user
Parameters
| Parameter | Type |
|---|---|
params? | GetRFQTradeListParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ cursor: string; list: RFQTradeV5[]; }>>
getRiskLimit()
getRiskLimit(params?: GetRiskLimitParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<RiskLimitV5[], "linear" | "inverse">>>;Query risk limit of futures
Covers: Linear contract / Inverse contract
Parameters
| Parameter | Type |
|---|---|
params? | GetRiskLimitParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<RiskLimitV5[], "linear" | "inverse">>>
getRPIOrderbook()
getRPIOrderbook(params: GetRPIOrderbookParamsV5): Promise<APIResponseV3WithTime<RPIOrderbookResponseV5>>;Get RPI Orderbook Query for orderbook depth data with RPI (Retail Price Improvement) information.
Covers: Spot / USDT contract / USDC contract / Inverse contract Contract: 50-level of RPI orderbook data Spot: 50-level of RPI orderbook data
Parameters
| Parameter | Type |
|---|---|
params | GetRPIOrderbookParamsV5 |
Returns
Promise<APIResponseV3WithTime<RPIOrderbookResponseV5>>
getRWANavChart()
getRWANavChart(params: GetRWANavChartParamsV5): Promise<APIResponseV3WithTime<RWANavChartResultV5>>;Get RWA NAV Chart NAV history for an RWA product (public; max 180-day span).
Parameters
| Parameter | Type |
|---|---|
params | GetRWANavChartParamsV5 |
Returns
Promise<APIResponseV3WithTime<RWANavChartResultV5>>
getRWAOrderList()
getRWAOrderList(params?: GetRWAOrderListParamsV5): Promise<APIResponseV3WithTime<RWAOrderListResultV5>>;Get RWA Order List
Parameters
| Parameter | Type |
|---|---|
params? | GetRWAOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<RWAOrderListResultV5>>
getRWAPositionList()
getRWAPositionList(): Promise<APIResponseV3WithTime<RWAPositionListResultV5>>;Get RWA Position List
Returns
Promise<APIResponseV3WithTime<RWAPositionListResultV5>>
getRWAProductList()
getRWAProductList(params?: GetRWAProductListParamsV5): Promise<APIResponseV3WithTime<RWAProductListResultV5>>;Get RWA Product List Real World Assets earn products. Auth optional; userQuota populated when authenticated.
Parameters
| Parameter | Type |
|---|---|
params? | GetRWAProductListParamsV5 |
Returns
Promise<APIResponseV3WithTime<RWAProductListResultV5>>
getServerTime()
getServerTime(): Promise<APIResponseV3WithTime<{
timeNano: string;
timeSecond: string;
}>>;Returns
Promise<APIResponseV3WithTime<{ timeNano: string; timeSecond: string; }>>
getSettlementRecords()
getSettlementRecords(params: GetSettlementRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<SettlementRecordV5[], CategoryV5>>>;Query session settlement records of USDC perpetual
Covers: Linear contract (USDC Perpetual only, Unified Account)
Parameters
| Parameter | Type |
|---|---|
params | GetSettlementRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<CategoryCursorListV5<SettlementRecordV5[], CategoryV5>>>
getSmallBalanceList()
getSmallBalanceList(params: GetSmallBalanceListParamsV5): Promise<APIResponseV3WithTime<SmallBalanceListV5>>;Get Small Balance Coins Query small-balance coins with a USDT equivalent of less than 10 USDT. Ensure total amount for each conversion transaction is between 1.0e-8 and 200 USDT.
INFO:
- API key permission: Convert
- API rate limit: 10 req/s
Parameters
| Parameter | Type |
|---|---|
params | GetSmallBalanceListParamsV5 |
Returns
Promise<APIResponseV3WithTime<SmallBalanceListV5>>
getSMPGroup()
getSMPGroup(): Promise<APIResponseV3WithTime<{
smpGroup: string;
}>>;Query the SMP group ID of self match prevention.
Returns
Promise<APIResponseV3WithTime<{ smpGroup: string; }>>
getSpotBorrowCheck()
getSpotBorrowCheck(symbol: string, side: OrderSideV5): Promise<APIResponseV3WithTime<SpotBorrowCheckResultV5>>;Query the qty and amount of borrowable coins in spot account.
Covers: Spot (Unified Account)
Parameters
| Parameter | Type |
|---|---|
symbol | string |
side | OrderSideV5 |
Returns
Promise<APIResponseV3WithTime<SpotBorrowCheckResultV5>>
getSpotMarginBorrowableCoinInfo()
getSpotMarginBorrowableCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Borrowable Coin Info
Parameters
| Parameter | Type |
|---|---|
coin? | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getSpotMarginBorrowOrderDetail()
getSpotMarginBorrowOrderDetail(params?: object): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Borrow Order Detail
Parameters
| Parameter | Type |
|---|---|
params? | { coin?: string; endTime?: number; limit?: number; startTime?: number; status?: 0 | 1 | 2; } |
params.coin? | string |
params.endTime? | number |
params.limit? | number |
params.startTime? | number |
params.status? | 0 | 1 | 2 |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getSpotMarginCoinInfo()
getSpotMarginCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Margin Coin Info
Parameters
| Parameter | Type |
|---|---|
coin? | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getSpotMarginCurrencyData()
getSpotMarginCurrencyData(params?: GetSpotMarginCurrencyDataParamsV5): Promise<APIResponseV3WithTime<{
list: SpotMarginCurrencyDataV5[];
}>>;Get Currency Data Borrowing currency data: flexible/fixed manual borrow, min qty, precision, interest rate range.
Parameters
| Parameter | Type |
|---|---|
params? | GetSpotMarginCurrencyDataParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SpotMarginCurrencyDataV5[]; }>>
getSpotMarginInterestAndQuota()
getSpotMarginInterestAndQuota(coin: string): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Interest & Quota
Parameters
| Parameter | Type |
|---|---|
coin | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getSpotMarginLiability()
getSpotMarginLiability(params: GetSpotMarginLiabilityInfoParamsV5): Promise<APIResponseV3WithTime<SpotMarginLiabilityInfoV5>>;Get Liability Info (spot margin UTA): fixed vs floating, spot vs derivatives borrow split.
Parameters
| Parameter | Type |
|---|---|
params | GetSpotMarginLiabilityInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<SpotMarginLiabilityInfoV5>>
getSpotMarginLoanAccountInfo()
getSpotMarginLoanAccountInfo(): Promise<APIResponseV3WithTime<{
acctBalanceSum: string;
debtBalanceSum: string;
loanAccountList: object[];
riskRate: string;
status: number;
switchStatus: number;
}>>;Get Loan Account Info
Returns
Promise<APIResponseV3WithTime<{ acctBalanceSum: string; debtBalanceSum: string; loanAccountList: object[]; riskRate: string; status: number; switchStatus: number; }>>
getSpotMarginRepaymentOrderDetail()
getSpotMarginRepaymentOrderDetail(params?: object): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Get Repayment Order Detail
Parameters
| Parameter | Type |
|---|---|
params? | { coin?: string; endTime?: number; limit?: number; startTime?: number; } |
params.coin? | string |
params.endTime? | number |
params.limit? | number |
params.startTime? | number |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
getSpotMarginState()
getSpotMarginState(): Promise<APIResponseV3WithTime<SpotMarginStateV5>>;Query the Spot margin status and leverage of Unified account.
Covers: Margin trade (Unified Account)
Returns
Promise<APIResponseV3WithTime<SpotMarginStateV5>>
getSpreadInstrumentsInfo()
getSpreadInstrumentsInfo(params?: GetSpreadInstrumentsInfoParamsV5): Promise<APIResponseV3WithTime<{
list: SpreadInstrumentInfoV5[];
nextPageCursor: string;
}>>;Get Spread Instruments Info
Parameters
| Parameter | Type |
|---|---|
params? | GetSpreadInstrumentsInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadInstrumentInfoV5[]; nextPageCursor: string; }>>
getSpreadMaxQty()
getSpreadMaxQty(params: GetSpreadMaxQtyParamsV5): Promise<APIResponseV3WithTime<SpreadMaxQtyResultV5>>;Get Spread Max Qty Max order quantity (available balance) for a spread order at a given side and price.
Parameters
| Parameter | Type |
|---|---|
params | GetSpreadMaxQtyParamsV5 |
Returns
Promise<APIResponseV3WithTime<SpreadMaxQtyResultV5>>
getSpreadOpenOrders()
getSpreadOpenOrders(params?: GetSpreadOpenOrdersParamsV5): Promise<APIResponseV3WithTime<{
list: SpreadOpenOrderV5[];
nextPageCursor: string;
}>>;Get Spread Open Orders Query unfilled or partially filled orders in real-time.
Parameters
| Parameter | Type |
|---|---|
params? | GetSpreadOpenOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadOpenOrderV5[]; nextPageCursor: string; }>>
getSpreadOrderbook()
getSpreadOrderbook(params: object): Promise<APIResponseV3WithTime<SpreadOrderbookResponseV5>>;Get Spread Orderbook
Parameters
| Parameter | Type |
|---|---|
params | { limit?: number; symbol: string; } |
params.limit? | number |
params.symbol | string |
Returns
Promise<APIResponseV3WithTime<SpreadOrderbookResponseV5>>
getSpreadOrderHistory()
getSpreadOrderHistory(params?: GetSpreadOrderHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: SpreadOrderHistoryV5[];
nextPageCursor: string;
}>>;Get Spread Order History
Note:
- orderId & orderLinkId has a higher priority than startTime & endTime
- Fully canceled orders are stored for up to 24 hours
- Single leg orders can also be found with "createType"=CreateByFutureSpread via Get Order History
Parameters
| Parameter | Type |
|---|---|
params? | GetSpreadOrderHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadOrderHistoryV5[]; nextPageCursor: string; }>>
getSpreadRecentTrades()
getSpreadRecentTrades(params: object): Promise<APIResponseV3WithTime<{
list: SpreadRecentTradeV5[];
}>>;Get Spread Public Recent Trades
Parameters
| Parameter | Type |
|---|---|
params | { limit?: number; symbol: string; } |
params.limit? | number |
params.symbol | string |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadRecentTradeV5[]; }>>
getSpreadTickers()
getSpreadTickers(params: object): Promise<APIResponseV3WithTime<{
list: SpreadTickerV5[];
}>>;Get Spread Tickers
Parameters
| Parameter | Type |
|---|---|
params | { symbol: string; } |
params.symbol | string |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadTickerV5[]; }>>
getSpreadTradeHistory()
getSpreadTradeHistory(params?: GetSpreadTradeHistoryParamsV5): Promise<APIResponseV3WithTime<{
list: SpreadTradeV5[];
nextPageCursor: string;
}>>;Get Spread Trade History
Note:
- In self-trade cases, both the maker and taker single-leg trades will be returned in the same request
- Single leg executions can also be found with "execType"=FutureSpread via Get Trade History
Parameters
| Parameter | Type |
|---|---|
params? | GetSpreadTradeHistoryParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SpreadTradeV5[]; nextPageCursor: string; }>>
getStrategyList()
getStrategyList(params?: GetStrategyListParamsV5): Promise<APIResponseV3WithTime<StrategyListResultV5>>;Get Strategy List
Query the strategy list. Supports filtering by strategy ID, symbol, status, category, and strategy type.
Parameters
| Parameter | Type |
|---|---|
params? | GetStrategyListParamsV5 |
Returns
Promise<APIResponseV3WithTime<StrategyListResultV5>>
getStrategyOrderList()
getStrategyOrderList(params: GetStrategyOrderListParamsV5): Promise<APIResponseV3WithTime<StrategyOrderListResultV5>>;Get Strategy Order List
Query the individual orders generated by a specific strategy.
Parameters
| Parameter | Type |
|---|---|
params | GetStrategyOrderListParamsV5 |
Returns
Promise<APIResponseV3WithTime<StrategyOrderListResultV5>>
getSubAccountAllApiKeys()
getSubAccountAllApiKeys(params: GetSubAccountAllApiKeysParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
result: ApiKeyInfoV5[];
}>>;Query all api keys information of a sub UID.
Parameters
| Parameter | Type |
|---|---|
params | GetSubAccountAllApiKeysParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; result: ApiKeyInfoV5[]; }>>
getSubAccountDepositRecords()
getSubAccountDepositRecords(params: GetSubAccountDepositRecordParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
rows: DepositRecordV5[];
}>>;Query subaccount's deposit records by MAIN UID's API key.
TIP: Query deposit records of SPOT only endTime - startTime should be less than 30 days. Queries for the last 30 days worth of records by default.
Parameters
| Parameter | Type |
|---|---|
params | GetSubAccountDepositRecordParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: DepositRecordV5[]; }>>
getSubDepositAddress()
getSubDepositAddress(
coin: string,
chainType: string,
subMemberId: string
): Promise<APIResponseV3WithTime<{
chains: DepositAddressChainV5;
coin: string;
}>>;Query the deposit address information of SUB account.
Parameters
| Parameter | Type |
|---|---|
coin | string |
chainType | string |
subMemberId | string |
Returns
Promise<APIResponseV3WithTime<{ chains: DepositAddressChainV5; coin: string; }>>
getSubUID()
getSubUID(): Promise<APIResponseV3WithTime<{
subMemberIds: string[];
transferableSubMemberIds: string[];
}>>;Query the sub UIDs under a main UID
CAUTION: Can query by the master UID's api key only
Returns
Promise<APIResponseV3WithTime<{ subMemberIds: string[]; transferableSubMemberIds: string[]; }>>
getSubUIDList()
getSubUIDList(): Promise<APIResponseV3WithTime<{
subMembers: SubMemberV5[];
}>>;This endpoint allows you to get a list of all sub UID of master account. At most 10k subaccounts.
Returns
Promise<APIResponseV3WithTime<{ subMembers: SubMemberV5[]; }>>
getSubUIDListUnlimited()
getSubUIDListUnlimited(params?: object): Promise<APIResponseV3WithTime<{
nextCursor: string;
subMembers: SubMemberV5[];
}>>;This endpoint allows you to get a list of all sub UID of master account. No limit on the number of subaccounts.
Parameters
| Parameter | Type |
|---|---|
params? | { nextCursor?: string; pageSize?: string; } |
params.nextCursor? | string |
params.pageSize? | string |
Returns
Promise<APIResponseV3WithTime<{ nextCursor: string; subMembers: SubMemberV5[]; }>>
getSupplyContractInfoFixed()
getSupplyContractInfoFixed(params?: GetSupplyContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
list: SupplyContractInfoFixedV5[];
nextPageCursor: string;
}>>;Get Supply Contract Info
Parameters
| Parameter | Type |
|---|---|
params? | GetSupplyContractInfoFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SupplyContractInfoFixedV5[]; nextPageCursor: string; }>>
getSupplyOrderInfoFixed()
getSupplyOrderInfoFixed(params?: GetSupplyOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
list: SupplyOrderInfoFixedV5[];
nextPageCursor: string;
}>>;Get Supply Order Info
Parameters
| Parameter | Type |
|---|---|
params? | GetSupplyOrderInfoFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SupplyOrderInfoFixedV5[]; nextPageCursor: string; }>>
getSupplyOrderQuoteFixed()
getSupplyOrderQuoteFixed(params: GetSupplyOrderQuoteFixedParamsV5): Promise<APIResponseV3WithTime<{
list: SupplyOrderQuoteFixedV5[];
}>>;Get Supplying Market If you want to supply, you can use this endpoint to check whether there are any suitable counterparty borrow orders available.
Parameters
| Parameter | Type |
|---|---|
params | GetSupplyOrderQuoteFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SupplyOrderQuoteFixedV5[]; }>>
getSystemStatus()
getSystemStatus(params?: GetSystemStatusParamsV5): Promise<APIResponseV3WithTime<{
list: SystemStatusItemV5[];
}>>;***** Misc Bybit APIs
Parameters
| Parameter | Type |
|---|---|
params? | GetSystemStatusParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: SystemStatusItemV5[]; }>>
getTaxBatchExport()
getTaxBatchExport(params: GetTaxBatchExportParamsV5): Promise<APIResponseV3WithTime<TaxBatchExportStatusV5>>;Query tax batch export task status and download URLs by batchId.
Parameters
| Parameter | Type |
|---|---|
params | GetTaxBatchExportParamsV5 |
Returns
Promise<APIResponseV3WithTime<TaxBatchExportStatusV5>>
getTickers()
Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours.
Covers: Spot / Linear contract / Inverse contract / Option
Call Signature
getTickers(params: GetTickersParamsV5<"linear" | "inverse">): Promise<APIResponseV3WithTime<CategoryListV5<TickerLinearInverseV5[], "linear" | "inverse">>>;Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours.
Covers: Spot / Linear contract / Inverse contract / Option
Parameters
| Parameter | Type |
|---|---|
params | GetTickersParamsV5<"linear" | "inverse"> |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<TickerLinearInverseV5[], "linear" | "inverse">>>
Example
import { RestClientV5 } from 'bybit-api';
async function main() {
const client = new RestClientV5();
const response = await client.getTickers({ category: 'spot', symbol: 'BTCUSDT' });
if (response.retCode !== 0) {
throw new Error(`Bybit ${response.retCode}: ${response.retMsg}`);
}
const ticker = response.result.list[0];
if (!ticker) throw new Error('BTCUSDT was not present in the ticker response.');
console.log('BTCUSDT last price:', ticker.lastPrice);
}
main().catch((error) => {
console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
process.exitCode = 1;
});See
Call Signature
getTickers(params: GetTickersParamsV5<"option">): Promise<APIResponseV3WithTime<CategoryListV5<TickerOptionV5[], "option">>>;Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours.
Covers: Spot / Linear contract / Inverse contract / Option
Parameters
| Parameter | Type |
|---|---|
params | GetTickersParamsV5<"option"> |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<TickerOptionV5[], "option">>>
Example
import { RestClientV5 } from 'bybit-api';
async function main() {
const client = new RestClientV5();
const response = await client.getTickers({ category: 'spot', symbol: 'BTCUSDT' });
if (response.retCode !== 0) {
throw new Error(`Bybit ${response.retCode}: ${response.retMsg}`);
}
const ticker = response.result.list[0];
if (!ticker) throw new Error('BTCUSDT was not present in the ticker response.');
console.log('BTCUSDT last price:', ticker.lastPrice);
}
main().catch((error) => {
console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
process.exitCode = 1;
});See
Call Signature
getTickers(params: GetTickersParamsV5<"spot">): Promise<APIResponseV3WithTime<CategoryListV5<TickerSpotV5[], "spot">>>;Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours.
Covers: Spot / Linear contract / Inverse contract / Option
Parameters
| Parameter | Type |
|---|---|
params | GetTickersParamsV5<"spot"> |
Returns
Promise<APIResponseV3WithTime<CategoryListV5<TickerSpotV5[], "spot">>>
Example
import { RestClientV5 } from 'bybit-api';
async function main() {
const client = new RestClientV5();
const response = await client.getTickers({ category: 'spot', symbol: 'BTCUSDT' });
if (response.retCode !== 0) {
throw new Error(`Bybit ${response.retCode}: ${response.retMsg}`);
}
const ticker = response.result.list[0];
if (!ticker) throw new Error('BTCUSDT was not present in the ticker response.');
console.log('BTCUSDT last price:', ticker.lastPrice);
}
main().catch((error) => {
console.error(error instanceof Error ? error.message : 'Request failed. See the troubleshooting guide.');
process.exitCode = 1;
});See
getTokenSplashProjectList()
getTokenSplashProjectList(params: GetTokenSplashProjectListParamsV5): Promise<APIResponseV3WithTime<TokenSplashProjectListResultV5>>;Parameters
| Parameter | Type |
|---|---|
params | GetTokenSplashProjectListParamsV5 |
Returns
Promise<APIResponseV3WithTime<TokenSplashProjectListResultV5>>
getTokenSplashUserActivityParams()
getTokenSplashUserActivityParams(params?: GetTokenSplashUserActivityParamsV5): Promise<APIResponseV3WithTime<TokenSplashUserActivityResultV5>>;Parameters
| Parameter | Type |
|---|---|
params? | GetTokenSplashUserActivityParamsV5 |
Returns
Promise<APIResponseV3WithTime<TokenSplashUserActivityResultV5>>
getTotalMembersAssets()
getTotalMembersAssets(params?: GetTotalMembersAssetsParamsV5): Promise<APIResponseV3WithTime<TotalMembersAssetsResultV5>>;Get Total Members Assets Master + sub-accounts; optional coin for valuation (default BTC).
Parameters
| Parameter | Type |
|---|---|
params? | GetTotalMembersAssetsParamsV5 |
Returns
Promise<APIResponseV3WithTime<TotalMembersAssetsResultV5>>
getTradeInfoForAnalysis()
getTradeInfoForAnalysis(params: GetTradeInfoForAnalysisParamsV5): Promise<APIResponseV3WithTime<TradeInfoForAnalysisResultV5>>;Get Trade Info For Analysis Aggregated spot trade stats for a symbol, including daily breakdown when returned.
Parameters
| Parameter | Type |
|---|---|
params | GetTradeInfoForAnalysisParamsV5 |
Returns
Promise<APIResponseV3WithTime<TradeInfoForAnalysisResultV5>>
getTransactionLog()
getTransactionLog(params?: GetTransactionLogParamsV5): Promise<APIResponseV3WithTime<CursorListV5<TransactionLogV5[]>>>;Query transaction logs in Unified account.
Parameters
| Parameter | Type |
|---|---|
params? | GetTransactionLogParamsV5 |
Returns
Promise<APIResponseV3WithTime<CursorListV5<TransactionLogV5[]>>>
getTransferableAmount()
getTransferableAmount(params: object): Promise<APIResponseV3WithTime<{
availableWithdrawal: string;
}>>;Query the available amount to transfer of a specific coin in the Unified wallet.
Parameters
| Parameter | Type |
|---|---|
params | { coinName: string; } |
params.coinName | string |
Returns
Promise<APIResponseV3WithTime<{ availableWithdrawal: string; }>>
getTransferableCoinList()
getTransferableCoinList(fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise<APIResponseV3WithTime<{
list: string[];
}>>;Query the transferable coin list between each account type.
Parameters
| Parameter | Type |
|---|---|
fromAccountType | AccountTypeV5 |
toAccountType | AccountTypeV5 |
Returns
Promise<APIResponseV3WithTime<{ list: string[]; }>>
getUIDWalletType()
getUIDWalletType(params: object): Promise<APIResponseV3WithTime<{
accounts: object[];
}>>;Parameters
| Parameter | Type |
|---|---|
params | { memberIds: string; } |
params.memberIds | string |
Returns
Promise<APIResponseV3WithTime<{ accounts: object[]; }>>
getUniversalTransferRecords()
getUniversalTransferRecords(params?: GetUniversalTransferRecordsParamsV5): Promise<APIResponseV3WithTime<CursorListV5<UniversalTransferRecordV5[]>>>;Query universal transfer records
CAUTION Can query by the master UID's API key only
Parameters
| Parameter | Type |
|---|---|
params? | GetUniversalTransferRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<CursorListV5<UniversalTransferRecordV5[]>>>
getUnpaidLoanOrders()
getUnpaidLoanOrders(params?: GetUnpaidLoanOrdersParamsV5): Promise<APIResponseV3WithTime<{
list: UnpaidLoanOrderV5[];
nextPageCursor: string;
}>>;Get Unpaid Loan Orders Query the ongoing loan orders, which are not fully repaid
Parameters
| Parameter | Type |
|---|---|
params? | GetUnpaidLoanOrdersParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: UnpaidLoanOrderV5[]; nextPageCursor: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
Permission: "Spot trade"
getVIPMarginData()
getVIPMarginData(params?: GetVIPMarginDataParamsV5): Promise<APIResponseV3WithTime<VIPMarginDataV5>>;Get VIP Margin Data.
This margin data is for Unified account in particular.
INFO Do not need authentication
Parameters
| Parameter | Type |
|---|---|
params? | GetVIPMarginDataParamsV5 |
Returns
Promise<APIResponseV3WithTime<VIPMarginDataV5>>
getWalletBalance()
getWalletBalance(params: GetWalletBalanceParamsV5): Promise<APIResponseV3WithTime<{
list: WalletBalanceV5[];
}>>;Obtain wallet balance, query asset information of each currency, and account risk rate information under unified margin mode.
By default, currency information with assets or liabilities of 0 is not returned.
Parameters
| Parameter | Type |
|---|---|
params | GetWalletBalanceParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: WalletBalanceV5[]; }>>
getWithdrawableAmount()
getWithdrawableAmount(params: object): Promise<APIResponseV3WithTime<WithdrawableAmountV5>>;Query withdrawable amount (incl. risk-frozen limitAmountUsd and per-wallet slices). May include FUND, UTA, EARN, SPOT keys depending on the coin. EARN is present when the coin supports withdrawal from the Earn account.
Parameters
| Parameter | Type |
|---|---|
params | { coin: string; } |
params.coin | string |
Returns
Promise<APIResponseV3WithTime<WithdrawableAmountV5>>
getWithdrawalAddressList()
getWithdrawalAddressList(params?: GetWithdrawalAddressListParamsV5): Promise<APIResponseV3WithTime<{
nextPageCursor: string;
rows: WithdrawalAddressV5[];
}>>;Get Withdrawal Address List Query the withdrawal addresses in the address book.
TIP: The API key for querying this endpoint must have withdrawal permissions.
Parameters
| Parameter | Type |
|---|---|
params? | GetWithdrawalAddressListParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: WithdrawalAddressV5[]; }>>
getWithdrawalRecords()
getWithdrawalRecords(params?: GetWithdrawalRecordsParamsV5): Promise<APIResponseV3<CursorRowsV5<WithdrawalRecordV5[]>, {
}>>;Query withdrawal records.
Parameters
| Parameter | Type |
|---|---|
params? | GetWithdrawalRecordsParamsV5 |
Returns
Promise<APIResponseV3<CursorRowsV5<WithdrawalRecordV5[]>, { }>>
investMorePwmInvestmentPlan()
investMorePwmInvestmentPlan(params: InvestMorePwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<InvestMorePwmInvestmentPlanResultV5>>;Invest more into a PWM investment plan product (Active).
Parameters
| Parameter | Type |
|---|---|
params | InvestMorePwmInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<InvestMorePwmInvestmentPlanResultV5>>
issueBrokerVoucher()
issueBrokerVoucher(params: IssueVoucherParamsV5): Promise<APIResponseV3<undefined, {
}>>;Issue a voucher to a user
INFO Use exchange broker master account to issue
Parameters
| Parameter | Type |
|---|---|
params | IssueVoucherParamsV5 |
Returns
Promise<APIResponseV3<undefined, { }>>
managePwmAssetManagerInvestmentPlan()
managePwmAssetManagerInvestmentPlan(params: ManagePwmAssetManagerInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<ManagePwmAssetManagerInvestmentPlanResultV5>>;Manage a PWM investment plan (status and/or fund allocation).
Parameters
| Parameter | Type |
|---|---|
params | ManagePwmAssetManagerInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<ManagePwmAssetManagerInvestmentPlanResultV5>>
managePwmFundOrder()
managePwmFundOrder(params: ManagePwmFundOrderParamsV5): Promise<APIResponseV3WithTime<ManagePwmFundOrderResultV5>>;Manage a PWM fund order (approve / reject Pending Review orders).
Parameters
| Parameter | Type |
|---|---|
params | ManagePwmFundOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<ManagePwmFundOrderResultV5>>
manualBorrow()
manualBorrow(params: ManualBorrowParamsV5): Promise<APIResponseV3WithTime<ManualBorrowResultV5>>;Manual borrow for UTA
Parameters
| Parameter | Type |
|---|---|
params | ManualBorrowParamsV5 |
Returns
Promise<APIResponseV3WithTime<ManualBorrowResultV5>>
manualRepay()
manualRepay(params?: ManualRepayParamsV5): Promise<APIResponseV3WithTime<ManualRepayResultV5>>;Manual Repay
If neither coin nor amount is passed, then repay all the liabilities. If coin is passed and amount is not, the coin will be repaid in full.
When repaying, the system will first use the spot available balance of the debt currency. If that's not enough, the remaining amount will be repaid by converting other assets.
Repayment is prohibited between 04:00 and 05:30 per hour.
When coin and amount are both set, validation depends on repaymentType (e.g. amount must not exceed the matching liability pool). If neither coin nor amount is set, repaymentType must be ALL. Response timing: ALL and FIXED are asynchronous; FLEXIBLE is synchronous. For repay-without-convert (spot balance only), use manualRepayWithoutConversion. From 2026-03-17 (full 2026-03-24), BYUSDT can be used for repayment. MNT: not via convert-repay; use manualRepayWithoutConversion for MNT with existing balance. From 2026-02-10 08:00 UTC, coin-conversion cap 300,000 USD equivalent per transaction applies.
Parameters
| Parameter | Type |
|---|---|
params? | ManualRepayParamsV5 |
Returns
Promise<APIResponseV3WithTime<ManualRepayResultV5>>
manualRepayWithoutConversion()
manualRepayWithoutConversion(params: ManualRepayWithoutConversionParamsV5): Promise<APIResponseV3WithTime<ManualRepayWithoutConversionResultV5>>;Manual repay without asset conversion
IMPORTANT: Repayment is prohibited between 04:00 and 05:30 per hour. When repaying, system will only use the spot available balance of the debt currency.
Use getAvailableAmountToRepay to check spot available amount. Response timing: ALL and FIXED asynchronous; FLEXIBLE synchronous. From 2026-03-17 (full 2026-03-24), BYUSDT can be used for repayment, including MNT using existing spot balance.
Parameters
| Parameter | Type |
|---|---|
params | ManualRepayWithoutConversionParamsV5 |
Returns
Promise<APIResponseV3WithTime<ManualRepayWithoutConversionResultV5>>
markP2POrderAsPaid()
markP2POrderAsPaid(params: MarkP2POrderAsPaidParamsV5): Promise<APIResponseV3WithTime<null>>;Mark P2P order as paid
Parameters
| Parameter | Type |
|---|---|
params | MarkP2POrderAsPaidParamsV5 |
Returns
Promise<APIResponseV3WithTime<null>>
modifyEarnPosition()
modifyEarnPosition(params: ModifyEarnPositionParamsV5): Promise<APIResponseV3WithTime<Record<string, never>>>;Modify OnChain Earn position (e.g. auto-reinvest for fixed duration products).
INFO: API key needs "Earn" permission. Only category=OnChain and fixed positions (see product).
Parameters
| Parameter | Type |
|---|---|
params | ModifyEarnPositionParamsV5 |
Returns
Promise<APIResponseV3WithTime<Record<string, never>>>
movePosition()
movePosition(params: MovePositionParamsV5): Promise<APIResponseV3WithTime<MovePositionResultV5>>;Move positions between sub-master, master-sub, or sub-sub UIDs.
Unified account covers: USDT perpetual / USDC contract / Spot / Option
INFO The endpoint can only be called by master UID api key UIDs must be the same master-sub account relationship The trades generated from move-position endpoint will not be displayed in the Recent Trade (Rest API & Websocket) There is no trading fee fromUid and toUid both should be Unified trading accounts, and they need to be one-way mode when moving the positions Please note that once executed, you will get execType=MovePosition entry from Get Trade History, Get Closed Pnl, and stream from Execution.
Parameters
| Parameter | Type |
|---|---|
params | MovePositionParamsV5 |
Returns
Promise<APIResponseV3WithTime<MovePositionResultV5>>
placeRWAOrder()
placeRWAOrder(params: PlaceRWAOrderParamsV5): Promise<APIResponseV3WithTime<PlaceRWAOrderResultV5>>;Place RWA Order Stake or redeem RWA product. Async — use getRWAOrderList to track status.
Parameters
| Parameter | Type |
|---|---|
params | PlaceRWAOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<PlaceRWAOrderResultV5>>
post()
post(
endpoint: string,
params?: any,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | any |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.post
postPrivate()
postPrivate(
endpoint: string,
params?: any,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | any |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.postPrivate
postPrivateFile()
postPrivateFile(
endpoint: string,
params?: FileUploadRequestParams,
callOptions?: RestCallOptions
): Promise<any>;Parameters
| Parameter | Type |
|---|---|
endpoint | string |
params? | FileUploadRequestParams |
callOptions? | RestCallOptions |
Returns
Promise<any>
Inherited from
BaseRestClient.postPrivateFile
preCheckOrder()
preCheckOrder(params: OrderParamsV5): Promise<APIResponseV3WithTime<PreCheckOrderResultV5>>;Pre-check order to calculate changes in IMR and MMR before placing an order
This endpoint supports orders with category = inverse, linear, option. Only Cross Margin mode and Portfolio Margin mode are supported, isolated margin mode is not supported. category = inverse is not supported in Cross Margin mode. Conditional order is not supported.
Parameters
| Parameter | Type |
|---|---|
params | OrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<PreCheckOrderResultV5>>
pwmFundTransfer()
pwmFundTransfer(params: PwmFundTransferParamsV5): Promise<APIResponseV3WithTime<PwmFundTransferResultV5>>;Transfer funds between custodian sub-accounts (fund custodian API key required).
Parameters
| Parameter | Type |
|---|---|
params | PwmFundTransferParamsV5 |
Returns
Promise<APIResponseV3WithTime<PwmFundTransferResultV5>>
queryApiRateLimit()
queryApiRateLimit(params: object): Promise<APIResponseV3WithTime<{
list: object[];
}>>;Query API rate limit
API rate limit: 50 req per second
INFO
- A master account can query api rate limit of its own and subaccounts.
- A subaccount can only query its own api rate limit.
Parameters
| Parameter | Type |
|---|---|
params | { uids: string; } |
params.uids | string |
Returns
Promise<APIResponseV3WithTime<{ list: object[]; }>>
queryCardAssetRecords()
queryCardAssetRecords(params?: QueryCardAssetRecordsParamsV5): Promise<APIResponseV3WithTime<CardAssetRecordsResultV5>>;Bybit Card — query card transaction / asset history (filter by status, card digits, merchant, time, type, …).
Parameters
| Parameter | Type |
|---|---|
params? | QueryCardAssetRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<CardAssetRecordsResultV5>>
queryCardMallItemList()
queryCardMallItemList(params?: QueryCardMallItemListParamsV5): Promise<APIResponseV3WithTime<CardMallItemListResultV5>>;Bybit Card — reward mall item list.
Parameters
| Parameter | Type |
|---|---|
params? | QueryCardMallItemListParamsV5 |
Returns
Promise<APIResponseV3WithTime<CardMallItemListResultV5>>
queryCardPointCashbackDetail()
queryCardPointCashbackDetail(params: QueryCardPointCashbackDetailParamsV5): Promise<APIResponseV3WithTime<CardPointCashbackDetailV5>>;Bybit Card — cashback detail for a reward order.
Parameters
| Parameter | Type |
|---|---|
params | QueryCardPointCashbackDetailParamsV5 |
Returns
Promise<APIResponseV3WithTime<CardPointCashbackDetailV5>>
queryCardPointsBalance()
queryCardPointsBalance(): Promise<APIResponseV3WithTime<CardPointBalanceV5>>;Bybit Card — point balance (available, pending, account status, …).
Returns
Promise<APIResponseV3WithTime<CardPointBalanceV5>>
queryCardPointsRecords()
queryCardPointsRecords(params?: QueryCardPointRecordsParamsV5): Promise<APIResponseV3WithTime<CardPointRecordsResultV5>>;Bybit Card — point transaction records.
Parameters
| Parameter | Type |
|---|---|
params? | QueryCardPointRecordsParamsV5 |
Returns
Promise<APIResponseV3WithTime<CardPointRecordsResultV5>>
queryCardPointsTier()
queryCardPointsTier(): Promise<APIResponseV3WithTime<CardPointTierInfoV5>>;Bybit Card — reward tier, spending limit, auto cashback.
Returns
Promise<APIResponseV3WithTime<CardPointTierInfoV5>>
querySubMemberAddress()
querySubMemberAddress(
coin: string,
chainType: string,
subMemberId: string
): Promise<APIResponseV3<{
chains: DepositAddressChainV5;
coin: string;
}, {
}>>;Parameters
| Parameter | Type |
|---|---|
coin | string |
chainType | string |
subMemberId | string |
Returns
Promise<APIResponseV3<{ chains: DepositAddressChainV5; coin: string; }, { }>>
Deprecated
- duplicate function, use getSubDepositAddress() instead Query the deposit address information of SUB account.
Deprecated
Duplicate endpoint - Use getSubDepositAddress() instead
CAUTION Can use master UID's api key only
redeemFixedTermEarn()
redeemFixedTermEarn(params: RedeemFixedTermEarnParamsV5): Promise<APIResponseV3WithTime<RedeemFixedTermEarnResultV5>>;Fixed-term earn — early redeem (FundPool only, when product allows).
INFO: API key needs "Earn" permission. Rate limit: 5 req/s.
Parameters
| Parameter | Type |
|---|---|
params | RedeemFixedTermEarnParamsV5 |
Returns
Promise<APIResponseV3WithTime<RedeemFixedTermEarnResultV5>>
redeemPwmInvestmentPlan()
redeemPwmInvestmentPlan(params: RedeemPwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<RedeemPwmInvestmentPlanResultV5>>;Redeem from a PWM investment plan product.
Parameters
| Parameter | Type |
|---|---|
params | RedeemPwmInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<RedeemPwmInvestmentPlanResultV5>>
reinvestLiquidityMining()
reinvestLiquidityMining(params: ReinvestLiquidityMiningParamsV5): Promise<APIResponseV3WithTime<ReinvestLiquidityMiningResultV5>>;Liquidity mining reinvest. Puts claimable yield of a position back into the pool. Async; success means the order was accepted. Use order status to track fill. Optional leverage is an integer string; defaults to "1" (no leverage).
INFO: Earn permission required. Up to 5 requests/second per UID.
Parameters
| Parameter | Type |
|---|---|
params | ReinvestLiquidityMiningParamsV5 |
Returns
Promise<APIResponseV3WithTime<ReinvestLiquidityMiningResultV5>>
releaseP2POrder()
releaseP2POrder(params: object): Promise<APIResponseV3WithTime<null>>;Release digital assets in a P2P order
Parameters
| Parameter | Type |
|---|---|
params | { orderId: string; } |
params.orderId | string |
Returns
Promise<APIResponseV3WithTime<null>>
renewBorrowOrderFixed()
renewBorrowOrderFixed(params: RenewBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<RenewBorrowOrderFixedV5>>;Renew Borrow Order This endpoint allows you to re-borrow the principal that was previously repaid. The renewal amount is the same as the amount previously repaid on this loan.
Permission: "Spot trade" UID rate limit: 1 req / second
Parameters
| Parameter | Type |
|---|---|
params | RenewBorrowOrderFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<RenewBorrowOrderFixedV5>>
renewFixedRateBorrow()
renewFixedRateBorrow(params: RenewFixedRateBorrowParamsV5): Promise<APIResponseV3WithTime<string>>;Renew a fixed-rate loan contract (full remaining amount if qty omitted).
Parameters
| Parameter | Type |
|---|---|
params | RenewFixedRateBorrowParamsV5 |
Returns
Promise<APIResponseV3WithTime<string>>
repayCollateralFixed()
repayCollateralFixed(params: RepayCollateralFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;Collateral Repayment Pay interest first, then repay the principal.
Parameters
| Parameter | Type |
|---|---|
params | RepayCollateralFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
repayCollateralFlexible()
repayCollateralFlexible(params: RepayCollateralFlexibleParamsV5): Promise<APIResponseV3WithTime<{
}>>;Collateral Repayment Pay interest first, then repay the principal.
Parameters
| Parameter | Type |
|---|---|
params | RepayCollateralFlexibleParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
repayCryptoLoan()
repayCryptoLoan(params: object): Promise<APIResponseV3WithTime<{
repayId: string;
}>>;Repay Crypto Loan
Parameters
| Parameter | Type |
|---|---|
params | { amount: string; orderId: string; } |
params.amount | string |
params.orderId | string |
Returns
Promise<APIResponseV3WithTime<{ repayId: string; }>>
Deprecated
- Use "Crypto Loan - New" Endpoints instead
You can repay partial loan. If there is interest occurred, interest will be repaid in priority
Permission: "Spot trade"
INFO: The repaid amount will be deducted from Funding account The collateral amount will not be auto returned when you don't fully repay the debt, but you can also adjust collateral amount
repayFixed()
repayFixed(params: RepayFixedParamsV5): Promise<APIResponseV3WithTime<RepayFixedV5>>;Repay Fixed Loan Either loanId or loanCurrency needs to be passed
Parameters
| Parameter | Type |
|---|---|
params | RepayFixedParamsV5 |
Returns
Promise<APIResponseV3WithTime<RepayFixedV5>>
repayFlexible()
repayFlexible(params: RepayFlexibleParamsV5): Promise<APIResponseV3WithTime<RepayFlexibleV5>>;Repay Flexible Loan 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.
Parameters
| Parameter | Type |
|---|---|
params | RepayFlexibleParamsV5 |
Returns
Promise<APIResponseV3WithTime<RepayFlexibleV5>>
repayInstitutionalLoan()
repayInstitutionalLoan(params: RepayInstitutionalLoanParamsV5): Promise<APIResponseV3WithTime<RepayInstitutionalLoanResultV5>>;Repay Institutional Loan Repay INS loan independently.
IMPORTANT:
- Only the designated Risk Unit UID is allowed to call this API
- The repayment is processed asynchronously and usually takes 2-3 minutes
- Confirm repayment status via Get Repayment Orders before initiating next repayment
- When repaying, principal amount will be deducted from Unified wallet (interest not included)
- Please contact RM before executing
Parameters
| Parameter | Type |
|---|---|
params | RepayInstitutionalLoanParamsV5 |
Returns
Promise<APIResponseV3WithTime<RepayInstitutionalLoanResultV5>>
repayLiability()
repayLiability(params?: RepayLiabilityParamsV5): Promise<APIResponseV3WithTime<{
list: RepayLiabilityResultV5[];
}>>;You can manually repay the liabilities of Unified account Applicable: Unified Account Permission: USDC Contracts
- Input the specific coin: repay the liability of this coin in particular
- No coin specified: repay the liability of all coins
Does not repay manual-borrow (spot margin manual borrow) liabilities — use manualRepay or manualRepayWithoutConversion instead (API error 182120 otherwise). From 2026-03-17 (full 2026-03-24), BYUSDT can be used for repayment. MNT is temporarily not used for this flow; MNT convert-repay is not supported (use manualRepayWithoutConversion with existing balance). From 2026-02-10 08:00 UTC, coin-conversion fees use the higher of collateral or debt fee rate, with a per-transaction coin-conversion cap of 300,000 USD equivalent.
Parameters
| Parameter | Type |
|---|---|
params? | RepayLiabilityParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ list: RepayLiabilityResultV5[]; }>>
requestConvertQuote()
requestConvertQuote(params: RequestConvertQuoteParamsV5): Promise<APIResponseV3WithTime<ConvertQuoteV5>>;Request a quote for converting coins.
Parameters
| Parameter | Type |
|---|---|
params | RequestConvertQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<ConvertQuoteV5>>
requestDemoTradingFunds()
requestDemoTradingFunds(params?: object): Promise<APIResponseV3<{
}, {
}>>;***** Demo Account APIs
Parameters
| Parameter | Type |
|---|---|
params? | { adjustType?: 0 | 1; utaDemoApplyMoney?: object[]; } |
params.adjustType? | 0 | 1 |
params.utaDemoApplyMoney? | object[] |
Returns
Promise<APIResponseV3<{ }, { }>>
resetMMP()
resetMMP(baseCoin: string): Promise<APIResponseV3<undefined, {
}>>;Once the mmp triggered, you can unfreeze the account via this endpoint
Parameters
| Parameter | Type |
|---|---|
baseCoin | string |
Returns
Promise<APIResponseV3<undefined, { }>>
reviewP2PSellerCancelOrderApply()
reviewP2PSellerCancelOrderApply(params: ReviewP2PSellerCancelOrderApplyParamsV5): Promise<APIResponseV3WithTime<null>>;Buyer review of a pending seller cancel request. Only the order buyer can call this, and only while that request is pending. rejectReason and rejectProofs are required when examineResult is REJECT.
Parameters
| Parameter | Type |
|---|---|
params | ReviewP2PSellerCancelOrderApplyParamsV5 |
Returns
Promise<APIResponseV3WithTime<null>>
See
https://bybit-exchange.github.io/docs/p2p/order/review-seller-cancel-order-apply
sendP2PChatMessage()
sendP2PChatMessage(params: SendP2PChatMessageParamsV5): Promise<{
rateLimitApi?: APIRateLimit;
ret_code: number;
ret_msg: string;
}>;Send a message in a P2P chat session. For files, first call uploadP2PChatFile and use its URL as the message.
Parameters
| Parameter | Type |
|---|---|
params | SendP2PChatMessageParamsV5 |
Returns
Promise<{ rateLimitApi?: APIRateLimit; ret_code: number; ret_msg: string; }>
See
https://bybit-exchange.github.io/docs/p2p/chat/send-chat-msg
sendP2POrderMessage()
sendP2POrderMessage(params: SendP2POrderMessageParamsV5): Promise<APIResponseV3WithTime<null>>;Send chat message in a P2P order
Parameters
| Parameter | Type |
|---|---|
params | SendP2POrderMessageParamsV5 |
Returns
Promise<APIResponseV3WithTime<null>>
setApiRateLimit()
setApiRateLimit(params: object): Promise<APIResponseV3WithTime<{
result: object[];
}>>;Set API rate limit
API rate limit: 50 req per second
INFO
- If UID requesting this endpoint is a master account, uids in the input parameter must be subaccounts of the master account.
- If UID requesting this endpoint is not a master account, uids in the input parameter must be the UID requesting this endpoint
- UID requesting this endpoint must be an institutional user.
Parameters
| Parameter | Type |
|---|---|
params | { list: object[]; } |
params.list | object[] |
Returns
Promise<APIResponseV3WithTime<{ result: object[]; }>>
setAutoAddMargin()
setAutoAddMargin(params: SetAutoAddMarginParamsV5): Promise<APIResponseV3WithTime<{
}>>;This endpoint allows you to turn on/off auto-add-margin for an isolated margin position.
Covers: USDT perpetual (Normal Account).
Parameters
| Parameter | Type |
|---|---|
params | SetAutoAddMarginParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setAutoRepayMode()
setAutoRepayMode(params: SetAutoRepayModeParamsV5): Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>;Set Auto Repay Mode Set spot automatic repayment mode.
INFO:
- If currency is not passed, spot automatic repayment will be enabled for all currencies
- If autoRepayMode of a currency is set to 1, the system will automatically make repayments without asset conversion to that currency at 0 and 30 minutes every hour
- The amount of repayments is the minimum of available spot balance and liability
Parameters
| Parameter | Type |
|---|---|
params | SetAutoRepayModeParamsV5 |
Returns
Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>
setBrokerRateLimit()
setBrokerRateLimit(params: SetBrokerRateLimitParamsV5): Promise<APIResponseV3WithTime<{
result: BrokerRateLimitSetResultItemV5[];
}>>;Set Rate Limit Exchange broker only. Set the rate limit for sub accounts.
API rate limit: 1 req per second
INFO
- If the UID calling this endpoint is a master account, the UIDs specified in the uids parameter must belong to its subaccounts. The master account itself cannot set a custom rate limit.
- If the UID requesting this endpoint is a subaccount, the UID can only be itself in uids.
- Only exchange broker account can call this endpoint
Parameters
| Parameter | Type |
|---|---|
params | SetBrokerRateLimitParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ result: BrokerRateLimitSetResultItemV5[]; }>>
setCollateralCoin()
setCollateralCoin(params: SetCollateralCoinParamsV5): Promise<APIResponseV3WithTime<{
}>>;You can decide whether the assets in the Unified account needs to be collateral coins.
Parameters
| Parameter | Type |
|---|---|
params | SetCollateralCoinParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setDeltaNeutralMode()
setDeltaNeutralMode(params: SetDeltaNeutralModeParamsV5): Promise<APIResponseV3WithTime<Record<string, never>>>;Set Delta Neutral Mode 1: enable, 0: disable. Query current status via getLimitPriceAction().
Parameters
| Parameter | Type |
|---|---|
params | SetDeltaNeutralModeParamsV5 |
Returns
Promise<APIResponseV3WithTime<Record<string, never>>>
setDepositAccount()
setDepositAccount(params: object): Promise<APIResponseV3WithTime<{
status: 0 | 1;
}>>;Set auto transfer account after deposit. The same function as the setting for Deposit on web GUI (UNIFIED, FUND, or EARN; if a coin is not in flexible saving, EARN may route to funding as per Bybit).
Parameters
| Parameter | Type |
|---|---|
params | { accountType: AccountTypeV5; } |
params.accountType | AccountTypeV5 |
Returns
Promise<APIResponseV3WithTime<{ status: 0 | 1; }>>
setDisconnectCancelAllWindow()
setDisconnectCancelAllWindow(category: "option", timeWindow: number): Promise<APIResponseV3<undefined, {
}>>;This endpoint allows you to set the disconnection protect time window. Covers: option (unified account).
If you need to turn it on/off, you can contact your client manager for consultation and application. The default time window is 10 seconds.
Only for institutional clients!
If it doesn't work, use v2!
Parameters
| Parameter | Type |
|---|---|
category | "option" |
timeWindow | number |
Returns
Promise<APIResponseV3<undefined, { }>>
setDisconnectCancelAllWindowV2()
setDisconnectCancelAllWindowV2(params: object): Promise<APIResponseV3<undefined, {
}>>;This endpoint allows you to set the disconnection protect time window. Covers: option (unified account).
If you need to turn it on/off, you can contact your client manager for consultation and application. The default time window is 10 seconds.
Only for institutional clients!
Parameters
| Parameter | Type |
|---|---|
params | { product?: "SPOT" | "OPTION" | "DERIVATIVES"; timeWindow: number; } |
params.product? | "SPOT" | "OPTION" | "DERIVATIVES" |
params.timeWindow | number |
Returns
Promise<APIResponseV3<undefined, { }>>
setFixedTermEarnAutoInvest()
setFixedTermEarnAutoInvest(params: SetFixedTermEarnAutoInvestParamsV5): Promise<APIResponseV3WithTime<Record<string, never>>>;Fixed-term earn — enable or disable auto-invest on a position.
INFO: API key needs "Earn" permission. Rate limit: 5 req/s.
Parameters
| Parameter | Type |
|---|---|
params | SetFixedTermEarnAutoInvestParamsV5 |
Returns
Promise<APIResponseV3WithTime<Record<string, never>>>
setFlexibleSavingAutoSavings()
setFlexibleSavingAutoSavings(params: SetFlexibleSavingAutoSavingsParamsV5): Promise<APIResponseV3WithTime<{
}>>;Enable or disable Flexible Saving auto savings for one coin, or globally when coin is omitted.
Parameters
| Parameter | Type |
|---|---|
params | SetFlexibleSavingAutoSavingsParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setLeverage()
setLeverage(params: SetLeverageParamsV5): Promise<APIResponseV3WithTime<{
}>>;Set the leverage
Unified account covers: Linear contract
Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
Note: Under one-way mode, buyLeverage must be the same as sellLeverage
Parameters
| Parameter | Type |
|---|---|
params | SetLeverageParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setLimitPriceAction()
setLimitPriceAction(params: SetLimitPriceActionParamsV5): Promise<APIResponseV3WithTime<{
}>>;Set Limit Price Behaviour You can configure how the system behaves when your limit order price exceeds the highest bid or lowest ask price.
Spot: If the order price exceeds the boundary, the system rejects the request. Futures: If the order price exceeds the boundary, the system will automatically adjust the price to the nearest allowed boundary.
Parameters
| Parameter | Type |
|---|---|
params | SetLimitPriceActionParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setMarginMode()
setMarginMode(marginMode: AccountMarginModeV5): Promise<APIResponseV3<{
reasons: object[];
}, {
}>>;Default is regular margin mode.
This mode is valid for USDT Perp, USDC Perp and USDC Option.
Parameters
| Parameter | Type |
|---|---|
marginMode | AccountMarginModeV5 |
Returns
Promise<APIResponseV3<{ reasons: object[]; }, { }>>
setMMP()
setMMP(params: MMPModifyParamsV5): Promise<APIResponseV3<undefined, {
}>>;Configure Market Maker Protection (MMP)
Parameters
| Parameter | Type |
|---|---|
params | MMPModifyParamsV5 |
Returns
Promise<APIResponseV3<undefined, { }>>
setRiskLimit()
setRiskLimit(params: SetRiskLimitParamsV5): Promise<APIResponseV3WithTime<SetRiskLimitResultV5>>;Parameters
| Parameter | Type |
|---|---|
params | SetRiskLimitParamsV5 |
Returns
Promise<APIResponseV3WithTime<SetRiskLimitResultV5>>
Deprecated
The risk limit will limit the maximum position value you can hold under different margin requirements. If you want to hold a bigger position size, you need more margin.
This interface can set the risk limit of a single position. If the order exceeds the current risk limit when placing an order, it will be rejected.
setSpotHedging()
setSpotHedging(params: object): Promise<APIResponseV3WithTime<{
}>>;Turn on/off Spot hedging feature in Portfolio margin for Unified account.
INFO Only unified account is applicable Only portfolio margin mode is applicable
Parameters
| Parameter | Type |
|---|---|
params | { setHedgingMode: "ON" | "OFF"; } |
params.setHedgingMode | "ON" | "OFF" |
Returns
Promise<APIResponseV3WithTime<{ }>>
setSpotMarginLeverage()
setSpotMarginLeverage(leverage: string): Promise<APIResponseV3WithTime<{
}>>;Parameters
| Parameter | Type |
|---|---|
leverage | string |
Returns
Promise<APIResponseV3WithTime<{ }>>
Deprecated
Use setSpotMarginLeverageV2 instead, which uses an object parameter instead. This method will be replaced by setSpotMarginLeverageV2 in a future release.
setSpotMarginLeverageV2()
setSpotMarginLeverageV2(params: SetSpotMarginLeverageParamsV5): Promise<APIResponseV3WithTime<{
}>>;Set the user's maximum leverage in spot cross margin. CAUTION: Your account needs to enable spot margin first; i.e., you must have finished the quiz on web / app.
Parameters
| Parameter | Type |
|---|---|
params | SetSpotMarginLeverageParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
setSubUIDFrozenState()
setSubUIDFrozenState(subuid: number, frozen: 0 | 1): Promise<APIResponseV3WithTime<{
}>>;Froze sub uid. Use master user's api key only.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
Parameters
| Parameter | Type |
|---|---|
subuid | number |
frozen | 0 | 1 |
Returns
Promise<APIResponseV3WithTime<{ }>>
settlePwmFundProfit()
settlePwmFundProfit(params: SettlePwmFundProfitParamsV5): Promise<APIResponseV3WithTime<SettlePwmFundProfitResultV5>>;Settle fund profit sharing (Active funds only).
Parameters
| Parameter | Type |
|---|---|
params | SettlePwmFundProfitParamsV5 |
Returns
Promise<APIResponseV3WithTime<SettlePwmFundProfitResultV5>>
setTPSLMode()
setTPSLMode(params: SetTPSLModeParamsV5): Promise<APIResponseV3WithTime<{
tpSlMode: TPSLModeV5;
}>>;Parameters
| Parameter | Type |
|---|---|
params | SetTPSLModeParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ tpSlMode: TPSLModeV5; }>>
Deprecated
This endpoint sets the take profit/stop loss (TP/SL) mode to full or partial.
Unified account covers: Linear contract; normal account covers: USDT perpetual, inverse perpetual, inverse futures.
For partial TP/SL mode, you can set the TP/SL size smaller than position size.
setTradingStop()
setTradingStop(params: SetTradingStopParamsV5): Promise<APIResponseV3WithTime<{
}>>;This endpoint allows you to set the take profit, stop loss or trailing stop for a position. Passing these parameters will create conditional orders by the system internally.
The system will cancel these orders if the position is closed, and adjust the qty according to the size of the open position.
Unified account covers: Linear contract. Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures.
Parameters
| Parameter | Type |
|---|---|
params | SetTradingStopParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
signAgreement()
signAgreement(params: SignAgreementParamsV5): Promise<APIResponseV3WithTime<{
}>>;Sign Agreement To trade commodity contracts (e.g. metals XAU/XAG perps, crude oil perps), complete the agreement signing first. Recommended to sign in advance via API so you can trade immediately when contracts go live. Send either category (legacy) or categoryV2 (preferred; new agreement types are added to categoryV2 only).
INFO
- Only the master account can sign. Subaccounts are not supported.
- Once the master has signed, all subaccounts will be eligible to trade.
- API key must have: Account Transfer, Subaccount Transfer, or Withdrawal.
- Trading without signing returns code=110123, msg=You must agree to the Trading Terms.
Parameters
| Parameter | Type |
|---|---|
params | SignAgreementParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
spotMarginBorrow()
spotMarginBorrow(params: object): Promise<APIResponseV3WithTime<{
transactId: string;
}>>;Borrow
Parameters
| Parameter | Type |
|---|---|
params | { coin: string; qty: string; } |
params.coin | string |
params.qty | string |
Returns
Promise<APIResponseV3WithTime<{ transactId: string; }>>
spotMarginRepay()
spotMarginRepay(params: object): Promise<APIResponseV3WithTime<{
repayId: string;
}>>;Repay
Parameters
| Parameter | Type |
|---|---|
params | { coin: string; completeRepayment: 0 | 1; qty?: string; } |
params.coin | string |
params.completeRepayment | 0 | 1 |
params.qty? | string |
Returns
Promise<APIResponseV3WithTime<{ repayId: string; }>>
stopStrategy()
stopStrategy(params: StopStrategyParamsV5): Promise<APIResponseV3WithTime<StopStrategyResultV5>>;Stop Strategy
Stop a running strategy. Once stopped, the strategy cannot be resumed.
Parameters
| Parameter | Type |
|---|---|
params | StopStrategyParamsV5 |
Returns
Promise<APIResponseV3WithTime<StopStrategyResultV5>>
submitAdvanceEarnPlaceOrder()
submitAdvanceEarnPlaceOrder(params: SubmitAdvanceEarnPlaceOrderParamsV5): Promise<APIResponseV3WithTime<AdvanceEarnPlaceOrderResultV5>>;Advanced Earn — place order (Dual Assets, Discount Buy, …). Async; use getAdvanceEarnOrder to track.
INFO: API key needs "Earn" permission. Rate limit e.g. 5 req/s (Dual Assets per docs).
Parameters
| Parameter | Type |
|---|---|
params | SubmitAdvanceEarnPlaceOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdvanceEarnPlaceOrderResultV5>>
submitDepositOriginatorInfo()
submitDepositOriginatorInfo(params: SubmitDepositOriginatorInfoParamsV5): Promise<APIResponseV3WithTime<SubmitDepositOriginatorInfoResultV5>>;Submit Deposit Originator Info Submit Travel Rule originator questionnaire when deposit travel_rule_status is pending (1).
Parameters
| Parameter | Type |
|---|---|
params | SubmitDepositOriginatorInfoParamsV5 |
Returns
Promise<APIResponseV3WithTime<SubmitDepositOriginatorInfoResultV5>>
submitEarnTokenOrder()
submitEarnTokenOrder(params: PlaceEarnTokenOrderParamsV5): Promise<APIResponseV3WithTime<PlaceEarnTokenOrderResultV5>>;Earn token — Place Order (Mint / Redeem). Accepted response is not final settlement; use getEarnTokenOrders.
Parameters
| Parameter | Type |
|---|---|
params | PlaceEarnTokenOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<PlaceEarnTokenOrderResultV5>>
submitEventQuote()
submitEventQuote(params: SubmitEventQuoteParamsV5): Promise<APIResponseV3WithTime<EventQuoteResultV5>>;Submit an Event Contract payout-ratio quote.
INFO: Event Contract maker accounts only.
Parameters
| Parameter | Type |
|---|---|
params | SubmitEventQuoteParamsV5 |
Returns
Promise<APIResponseV3WithTime<EventQuoteResultV5>>
submitFixedRateBorrow()
submitFixedRateBorrow(params: FixedRateBorrowParamsV5): Promise<APIResponseV3WithTime<FixedRateBorrowResultV5>>;Fixed-rate borrow (place order).
Parameters
| Parameter | Type |
|---|---|
params | FixedRateBorrowParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedRateBorrowResultV5>>
submitFixedTermEarnOrder()
submitFixedTermEarnOrder(params: SubmitFixedTermEarnOrderParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnPlaceOrderResultV5>>;Fixed-term earn — place order (stake). Async; use getFixedTermEarnOrder to track.
INFO: API key needs "Earn" permission. Rate limit: 5 req/s.
Parameters
| Parameter | Type |
|---|---|
params | SubmitFixedTermEarnOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<FixedTermEarnPlaceOrderResultV5>>
submitOrder()
submitOrder(params: OrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;***** Trade APIs
Parameters
| Parameter | Type |
|---|---|
params | OrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<OrderResultV5>>
submitSpreadOrder()
submitSpreadOrder(params: SubmitSpreadOrderParamsV5): Promise<APIResponseV3WithTime<{
orderId: string;
orderLinkId: string;
}>>;Create Spread Order
Parameters
| Parameter | Type |
|---|---|
params | SubmitSpreadOrderParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>
submitStakeRedeem()
submitStakeRedeem(params: SubmitStakeRedeemParamsV5): Promise<APIResponseV3WithTime<{
orderId: string;
orderLinkId: string;
}>>;Stake or Redeem Earn products
INFO: API key needs "Earn" permission
NOTE: In times of high demand for loans in the market for a specific cryptocurrency, the redemption of the principal may encounter delays and is expected to be processed within 48 hours. Once the redemption request is initiated, it cannot be canceled, and your principal will continue to earn interest until the process is completed.
Parameters
| Parameter | Type |
|---|---|
params | SubmitStakeRedeemParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>
submitWithdrawal()
submitWithdrawal(params: WithdrawParamsV5): Promise<APIResponseV3WithTime<{
id: string;
}>>;Withdraw from Funding, Unified, and/or Earn (and combos such as FUND,UTA,EARN per API).
CAUTION: Make sure you have whitelisted your wallet address before calling this endpoint.
You can make an off-chain transfer if the target wallet address is from Bybit. This means that no blockchain fee will be charged.
Bybit Turkey (TR) site: transactionPurpose is required on the request (see WithdrawParamsV5).
Parameters
| Parameter | Type |
|---|---|
params | WithdrawParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ id: string; }>>
subscribePwmInvestmentPlan()
subscribePwmInvestmentPlan(params: SubscribePwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<SubscribePwmInvestmentPlanResultV5>>;Subscribe to a PWM investment plan (PendingSubscription).
Parameters
| Parameter | Type |
|---|---|
params | SubscribePwmInvestmentPlanParamsV5 |
Returns
Promise<APIResponseV3WithTime<SubscribePwmInvestmentPlanResultV5>>
switchIsolatedMargin()
switchIsolatedMargin(params: SwitchIsolatedMarginParamsV5): Promise<APIResponseV3WithTime<{
}>>;Select cross margin mode or isolated margin mode. 0: cross margin. 1: isolated margin
Covers: USDT perpetual (Normal account) / Inverse contract (Normal account).
Switching margin modes will cause orders in progress to be cancelled. Please make sure that there are no open orders before you switch margin modes.
Parameters
| Parameter | Type |
|---|---|
params | SwitchIsolatedMarginParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
switchPositionMode()
switchPositionMode(params: SwitchPositionModeParamsV5): Promise<APIResponseV3WithTime<{
}>>;Switches the position mode for USDT perpetual and Inverse futures.
If you are in one-way Mode, you can only open one position on Buy or Sell side.
If you are in hedge mode, you can open both Buy and Sell side positions simultaneously.
Position mode. 0: Merged Single. 3: Both Sides.
Parameters
| Parameter | Type |
|---|---|
params | SwitchPositionModeParamsV5 |
Returns
Promise<APIResponseV3WithTime<{ }>>
toggleSpotCrossMarginTrade()
toggleSpotCrossMarginTrade(params: object): Promise<APIResponseV3WithTime<{
switchStatus: "0" | "1";
}>>;Turn spot margin trade on / off in your NORMAL account.
Parameters
| Parameter | Type |
|---|---|
params | { switch: 0 | 1; } |
params.switch | 0 | 1 |
Returns
Promise<APIResponseV3WithTime<{ switchStatus: "0" | "1"; }>>
toggleSpotMarginTrade()
toggleSpotMarginTrade(spotMarginMode: "0" | "1"): Promise<APIResponseV3WithTime<{
spotMarginMode: "0" | "1";
}>>;Turn spot margin trade on / off in your UTA account.
CAUTION Your account needs to turn on spot margin first.
Parameters
| Parameter | Type |
|---|---|
spotMarginMode | "0" | "1" |
Returns
Promise<APIResponseV3WithTime<{ spotMarginMode: "0" | "1"; }>>
updateCollateralAmount()
updateCollateralAmount(params: AdjustCollateralAmountParamsV5): Promise<APIResponseV3WithTime<AdjustCollateralAmountV5>>;Adjust Collateral Amount New You can increase or reduce your collateral amount. When you reduce, please obey the Get Max. Allowed Collateral Reduction Amount
Parameters
| Parameter | Type |
|---|---|
params | AdjustCollateralAmountParamsV5 |
Returns
Promise<APIResponseV3WithTime<AdjustCollateralAmountV5>>
updateMasterApiKey()
updateMasterApiKey(params: UpdateApiKeyParamsV5): Promise<APIResponseV3WithTime<UpdateApiKeyResultV5>>;Modify the settings of a master API key. Use the API key pending to be modified to call the endpoint. Use master user's API key only.
TIP: The API key must have one of the permissions to be allowed to call the following API endpoint.
- master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
permissions may include FiatBitPay (not FiatBybitPay).
Parameters
| Parameter | Type |
|---|---|
params | UpdateApiKeyParamsV5 |
Returns
Promise<APIResponseV3WithTime<UpdateApiKeyResultV5>>
updateP2PAd()
updateP2PAd(params: UpdateP2PAdParamsV5): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>;Update or relist P2P advertisement
Parameters
| Parameter | Type |
|---|---|
params | UpdateP2PAdParamsV5 |
Returns
Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>
updateSubApiKey()
updateSubApiKey(params: UpdateApiKeyParamsV5): Promise<APIResponseV3<UpdateApiKeyResultV5, {
}>>;This endpoint modifies the settings of a sub API key. Use the API key pending to be modified to call the endpoint or use master account api key to manage its sub account api key. The API key must have one of the below permissions in order to call this endpoint
- sub API key: "Account Transfer", "Sub Member Transfer"
- master API Key: "Account Transfer", "Sub Member Transfer", "Withdrawal"
Parameters
| Parameter | Type |
|---|---|
params | UpdateApiKeyParamsV5 |
Returns
Promise<APIResponseV3<UpdateApiKeyResultV5, { }>>
upgradeToUnifiedAccount()
upgradeToUnifiedAccount(): Promise<APIResponseV3WithTime<UnifiedAccountUpgradeResultV5>>;Upgrade to unified account.
Banned/OTC loan/Net asset unsatisfying/Express path users cannot upgrade the account to Unified Account for now.
Returns
Promise<APIResponseV3WithTime<UnifiedAccountUpgradeResultV5>>
uploadP2PChatFile()
uploadP2PChatFile(params: object): Promise<APIResponseV3WithTime<{
type: string;
uploadId: string | null;
url: string;
}>>;Upload chat file for P2P order (Node.js only)
Note: You must provide a Buffer. To upload from a file path, read it into a Buffer first:
import fs from 'fs';
const buffer = fs.readFileSync('./path/to/file.png');
await client.uploadP2PChatFile({ fileBuffer: buffer, fileName: 'file.png' });Supported file types: jpg, png, jpeg, pdf, mp4
Parameters
| Parameter | Type |
|---|---|
params | { fileBuffer: Buffer; fileName: string; } |
params.fileBuffer | Buffer |
params.fileName | string |
Returns
Promise<APIResponseV3WithTime<{ type: string; uploadId: string | null; url: string; }>>