Skip to content

Class: RestClientV5 ​

REST API client for V5 REST APIs

https://bybit-exchange.github.io/docs/v5/intro

Extends ​

  • default

Constructors ​

Constructor ​

ts
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 ​

ParameterTypeDescription
restOptions?RestClientOptionsoptions to configure REST API connectivity
networkOptions?AxiosRequestConfigHTTP networking options for axios

Returns ​

RestClientV5

Inherited from ​

BaseRestClient.constructor

Methods ​

acceptNonLPQuote() ​

ts
acceptNonLPQuote(params: AcceptNonLPQuoteParamsV5): Promise<APIResponseV3WithTime<AcceptNonLPQuoteResultV5>>;

Accept non-LP Quote Accept non-LP Quote.

INFO:

  • Up to 50 requests per second

Parameters ​

ParameterType
paramsAcceptNonLPQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<AcceptNonLPQuoteResultV5>>


addOrReduceMargin() ​

ts
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 ​

ParameterType
paramsAddOrReduceMarginParamsV5

Returns ​

Promise<APIResponseV3WithTime<AddOrReduceMarginResultV5>>


adjustCollateralAmount() ​

ts
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 ​

ParameterType
params{ amount: string; direction: "0" | "1"; orderId: string; }
params.amountstring
params.direction"0" | "1"
params.orderIdstring

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() ​

ts
amendOrder(params: AmendOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;

Parameters ​

ParameterType
paramsAmendOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<OrderResultV5>>


amendSpreadOrder() ​

ts
amendSpreadOrder(params: AmendSpreadOrderParamsV5): Promise<APIResponseV3WithTime<{
  orderId: string;
  orderLinkId: string;
}>>;

Amend Spread Order You can only modify unfilled or partially filled orders.

Parameters ​

ParameterType
paramsAmendSpreadOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>


batchAmendOrders() ​

ts
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 ​

ParameterType
category"spot" | "linear" | "inverse" | "option"
ordersBatchAmendOrderParamsV5[]

Returns ​

Promise<APIResponseV3WithTime<{ list: BatchAmendOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>


batchCancelOrders() ​

ts
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 ​

ParameterType
category"spot" | "linear" | "inverse" | "option"
ordersBatchCancelOrderParamsV5[]

Returns ​

Promise<APIResponseV3WithTime<{ list: BatchCancelOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>


batchSetCollateralCoin() ​

ts
batchSetCollateralCoin(params: object): Promise<APIResponseV3WithTime<{
  list: SetCollateralCoinParamsV5[];
}>>;

Parameters ​

ParameterType
params{ request: SetCollateralCoinParamsV5[]; }
params.requestSetCollateralCoinParamsV5[]

Returns ​

Promise<APIResponseV3WithTime<{ list: SetCollateralCoinParamsV5[]; }>>


batchSubmitOrders() ​

ts
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 ​

ParameterType
category"spot" | "linear" | "inverse" | "option"
ordersBatchOrderParamsV5[]

Returns ​

Promise<APIResponseV3WithTime<{ list: BatchCreateOrderResultV5[]; }, BatchOrdersRetExtInfoV5>>


bindOrUnbindUID() ​

ts
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 ​

ParameterType
params{ operate: "0" | "1"; uid: string; }
params.operate"0" | "1"
params.uidstring

Returns ​

Promise<APIResponseV3WithTime<{ operate: "0" | "1"; uid: string; }>>


borrowCryptoLoan() ​

ts
borrowCryptoLoan(params: BorrowCryptoLoanParamsV5): Promise<APIResponseV3WithTime<{
  orderId: string;
}>>;

Borrow Crypto Loan

Parameters ​

ParameterType
paramsBorrowCryptoLoanParamsV5

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() ​

ts
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 ​

ParameterType
paramsBorrowFlexibleParamsV5

Returns ​

Promise<APIResponseV3WithTime<BorrowFlexibleV5>>


cancelAllOrders() ​

ts
cancelAllOrders(params: CancelAllOrdersParamsV5): Promise<APIResponseV3WithTime<{
  list: OrderResultV5[];
  success: string;
}>>;

Parameters ​

ParameterType
paramsCancelAllOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: OrderResultV5[]; success: string; }>>


cancelAllRFQ() ​

ts
cancelAllRFQ(): Promise<APIResponseV3WithTime<CancelAllRFQResultV5>>;

Cancel All RFQ Cancel all your inquiry forms

Returns ​

Promise<APIResponseV3WithTime<CancelAllRFQResultV5>>


cancelAllRFQQuotes() ​

ts
cancelAllRFQQuotes(): Promise<APIResponseV3WithTime<{
  data: CancelRFQQuoteItemV5[];
}>>;

Cancel All Quotes Cancel all quotations

Returns ​

Promise<APIResponseV3WithTime<{ data: CancelRFQQuoteItemV5[]; }>>


cancelAllSpreadOrders() ​

ts
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 ​

ParameterType
params?{ cancelAll?: boolean; symbol?: string; }
params.cancelAll?boolean
params.symbol?string

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; success: string; }>>


cancelBorrowOrderFixed() ​

ts
cancelBorrowOrderFixed(params: CancelBorrowOrderFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;

Cancel Borrow Order

Parameters ​

ParameterType
paramsCancelBorrowOrderFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


cancelEventQuote() ​

ts
cancelEventQuote(params?: CancelEventQuoteParamsV5): Promise<APIResponseV3WithTime<EventQuoteResultV5>>;

Cancel an Event Contract quote. Pass orderLinkId and/or orderId.

INFO: Event Contract maker accounts only.

Parameters ​

ParameterType
params?CancelEventQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventQuoteResultV5>>


cancelOrder() ​

ts
cancelOrder(params: CancelOrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;

Parameters ​

ParameterType
paramsCancelOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<OrderResultV5>>


cancelP2PAd() ​

ts
cancelP2PAd(params: object): Promise<APIResponseV3WithTime<{
  needSecurityRisk: boolean;
  riskTokenType: string;
  riskVersion: string;
  securityRiskToken: string;
}>>;

Cancel P2P advertisement

Parameters ​

ParameterType
params{ itemId: string; }
params.itemIdstring

Returns ​

Promise<APIResponseV3WithTime<{ needSecurityRisk: boolean; riskTokenType: string; riskVersion: string; securityRiskToken: string; }>>


cancelRFQ() ​

ts
cancelRFQ(params: CancelRFQParamsV5): Promise<APIResponseV3WithTime<CancelRFQResultV5>>;

Cancel RFQ Cancel your inquiry Pass at least one rfqId or rfqLinkId

Parameters ​

ParameterType
paramsCancelRFQParamsV5

Returns ​

Promise<APIResponseV3WithTime<CancelRFQResultV5>>


cancelRFQQuote() ​

ts
cancelRFQQuote(params: CancelRFQQuoteParamsV5): Promise<APIResponseV3WithTime<CancelRFQQuoteResultV5>>;

Cancel Quote Cancel a quotation Pass at least one quoteId, rfqId, and quoteLinkId

Parameters ​

ParameterType
paramsCancelRFQQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<CancelRFQQuoteResultV5>>


cancelSpreadOrder() ​

ts
cancelSpreadOrder(params: object): Promise<APIResponseV3WithTime<{
  orderId: string;
  orderLinkId: string;
}>>;

Cancel Spread Order

Parameters ​

ParameterType
params{ orderId?: string; orderLinkId?: string; }
params.orderId?string
params.orderLinkId?string

Returns ​

Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>


cancelSupplyOrderFixed() ​

ts
cancelSupplyOrderFixed(params: CancelSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;

Cancel Supply Order

Optional refundedAccount: 0 Funding, 1 EasyEarn (default 0).

Parameters ​

ParameterType
paramsCancelSupplyOrderFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


cancelWithdrawal() ​

ts
cancelWithdrawal(id: string): Promise<APIResponseV3WithTime<{
  status: 0 | 1;
}>>;

Cancel the withdrawal

CAUTION: Can query by the master UID's api key only

Parameters ​

ParameterType
idstring

Returns ​

Promise<APIResponseV3WithTime<{ status: 0 | 1; }>>


claimPwmWithdrawableFunds() ​

ts
claimPwmWithdrawableFunds(params: ClaimPwmWithdrawableFundsParamsV5): Promise<APIResponseV3WithTime<ClaimPwmWithdrawableFundsResultV5>>;

Claim withdrawable funds from a PWM investment plan (Active).

Parameters ​

ParameterType
paramsClaimPwmWithdrawableFundsParamsV5

Returns ​

Promise<APIResponseV3WithTime<ClaimPwmWithdrawableFundsResultV5>>


confirmConvertQuote() ​

ts
confirmConvertQuote(params: object): Promise<APIResponseV3WithTime<{
  exchangeStatus: "init" | "processing" | "success" | "failure";
  quoteTxId: string;
}>>;

Confirm a quote for converting coins.

Parameters ​

ParameterType
params{ quoteTxId: string; }
params.quoteTxIdstring

Returns ​

Promise<APIResponseV3WithTime<{ exchangeStatus: "init" | "processing" | "success" | "failure"; quoteTxId: string; }>>


confirmNewRiskLimit() ​

ts
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 ​

ParameterType
paramsConfirmNewRiskLimitParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


createBorrowOrderFixed() ​

ts
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 ​

ParameterType
paramsCreateBorrowOrderFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateBorrowOrderFixedV5>>


createDemoAccount() ​

ts
createDemoAccount(): Promise<APIResponseV3<{
  subMemberId: string;
}, {
}>>;

Create a demo trading account.

Returns ​

Promise<APIResponseV3<{ subMemberId: string; }, { }>>


createInternalTransfer() ​

ts
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 ​

ParameterType
transferIdstring
coinstring
amountstring
fromAccountTypeAccountTypeV5
toAccountTypeAccountTypeV5

Returns ​

Promise<APIResponseV3WithTime<{ status: string; transferId: string; }>>


createP2PAd() ​

ts
createP2PAd(params: CreateP2PAdParamsV5): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>;

Post new P2P advertisement

Parameters ​

ParameterType
paramsCreateP2PAdParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>


createPwmAssetManagerInvestmentPlan() ​

ts
createPwmAssetManagerInvestmentPlan(params: CreatePwmAssetManagerInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<CreatePwmAssetManagerInvestmentPlanResultV5>>;

Create a PWM investment plan for a user (PendingSubscription). Max 10 plans per institution.

Parameters ​

ParameterType
paramsCreatePwmAssetManagerInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreatePwmAssetManagerInvestmentPlanResultV5>>


createPwmCustomizeInvestmentPlan() ​

ts
createPwmCustomizeInvestmentPlan(params: CreatePwmCustomizeInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<CreatePwmCustomizeInvestmentPlanResultV5>>;

Create a customized PWM investment plan (max 20 Active + Pending plans per user).

Parameters ​

ParameterType
paramsCreatePwmCustomizeInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreatePwmCustomizeInvestmentPlanResultV5>>


createPwmFund() ​

ts
createPwmFund(params: CreatePwmFundParamsV5): Promise<APIResponseV3WithTime<CreatePwmFundResultV5>>;

Create a PWM fund (PendingSubscribe). Max 10 funds per institution.

Parameters ​

ParameterType
paramsCreatePwmFundParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreatePwmFundResultV5>>


createPwmFundSubAccount() ​

ts
createPwmFundSubAccount(params: CreatePwmFundSubAccountParamsV5): Promise<APIResponseV3WithTime<CreatePwmFundSubAccountResultV5>>;

Create a PWM fund sub-account (async; max 30 per fund, fund must be Active).

Parameters ​

ParameterType
paramsCreatePwmFundSubAccountParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreatePwmFundSubAccountResultV5>>


createRFQ() ​

ts
createRFQ(params: CreateRFQParamsV5): Promise<APIResponseV3WithTime<CreateRFQResultV5>>;

Create RFQ Create a new request for quote (RFQ) to specified counterparties

Parameters ​

ParameterType
paramsCreateRFQParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateRFQResultV5>>


createRFQQuote() ​

ts
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 ​

ParameterType
paramsCreateRFQQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateRFQQuoteResultV5>>


createStrategyOrder() ​

ts
createStrategyOrder(params: CreateStrategyOrderParamsV5): Promise<APIResponseV3WithTime<CreateStrategyOrderResultV5>>;

Create Strategy Order

Supported strategy types: twap, chaseOrder, iceberg, pov.

Parameters ​

ParameterType
paramsCreateStrategyOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateStrategyOrderResultV5>>


createSubMember() ​

ts
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 ​

ParameterType
paramsCreateSubMemberParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateSubMemberResultV5>>


createSubUIDAPIKey() ​

ts
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 ​

ParameterType
paramsCreateSubApiKeyParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateSubApiKeyResultV5>>


createSupplyOrderFixed() ​

ts
createSupplyOrderFixed(params: CreateSupplyOrderFixedParamsV5): Promise<APIResponseV3WithTime<CreateSupplyOrderFixedV5>>;

Create Supply Order

Permission: "Spot trade"

Optional availableSource: 0 Funding, 1 Earn Flexible, 2 ALL (default 0).

Parameters ​

ParameterType
paramsCreateSupplyOrderFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<CreateSupplyOrderFixedV5>>


createTaxBatchExport() ​

ts
createTaxBatchExport(params: CreateTaxBatchExportParamsV5): Promise<APIResponseV3WithTime<TaxBatchExportResultV5>>;

Export multiple tax report types in one batch. Returns a batchId for status polling.

Parameters ​

ParameterType
paramsCreateTaxBatchExportParamsV5

Returns ​

Promise<APIResponseV3WithTime<TaxBatchExportResultV5>>


createUniversalTransfer() ​

ts
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 ​

ParameterType
paramsUniversalTransferParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ status: string; transferId: string; }>>


deleteMasterApiKey() ​

ts
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() ​

ts
deletePrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.deletePrivate


deleteSubApiKey() ​

ts
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 ​

ParameterType
params?{ apikey?: string; }
params.apikey?string

Returns ​

Promise<APIResponseV3WithTime<{ }>>


deleteSubMember() ​

ts
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 ​

ParameterType
paramsDeleteSubMemberParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


enableUniversalTransferForSubUIDs() ​

ts
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 ​

ParameterType
subMemberIdsstring[]

Returns ​

Promise<APIResponseV3WithTime<{ }>>

Deprecated ​

  • You no longer need to configure transferable sub UIDs. Now, all sub UIDs are automatically enabled for universal transfer.

executeAlphaLPRedeem() ​

ts
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 ​

ParameterType
paramsExecuteAlphaLPRedeemParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaLPRedeemResultV5>>


executeAlphaLPStake() ​

ts
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 ​

ParameterType
paramsExecuteAlphaLPStakeParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaLPStakeResultV5>>


executeAlphaPredictionBuy() ​

ts
executeAlphaPredictionBuy(params: ExecuteAlphaPredictionBuyParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>;

Execute Buy Buy prediction outcome tokens with USDC. HTTP 200 is acknowledgment only — poll order list.

Parameters ​

ParameterType
paramsExecuteAlphaPredictionBuyParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>


executeAlphaPredictionSell() ​

ts
executeAlphaPredictionSell(params: ExecuteAlphaPredictionSellParamsV5): Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>;

Execute Sell Sell prediction outcome token shares for USDC. HTTP 200 is acknowledgment only — poll order list.

Parameters ​

ParameterType
paramsExecuteAlphaPredictionSellParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaPredictionOrderResultV5>>


executeAlphaTradePurchase() ​

ts
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 ​

ParameterType
paramsExecuteAlphaTradeParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>


executeAlphaTradeRedeem() ​

ts
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 ​

ParameterType
paramsExecuteAlphaTradeParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteAlphaTradeResultV5>>


executeRFQQuote() ​

ts
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 ​

ParameterType
paramsExecuteRFQQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExecuteRFQQuoteResultV5>>


fetchLatencySummary() ​

ts
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() ​

ts
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() ​

ts
fetchTimeOffset(): Promise<number>;

Estimate drift based on client<->server latency

Returns ​

Promise<number>

Inherited from ​

BaseRestClient.fetchTimeOffset


get() ​

ts
get(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.get


getAccountBorrowCollateralLimit() ​

ts
getAccountBorrowCollateralLimit(params: object): Promise<APIResponseV3WithTime<AccountBorrowCollateralLimitV5>>;

Get Account Borrow/Collateral Limit Query the account borrowable/collateral limit

Permission: "Spot trade"

Parameters ​

ParameterType
params{ collateralCurrency: string; loanCurrency: string; }
params.collateralCurrencystring
params.loanCurrencystring

Returns ​

Promise<APIResponseV3WithTime<AccountBorrowCollateralLimitV5>>

Deprecated ​

  • Use "Crypto Loan - New" Endpoints instead

getAccountInfo() ​

ts
getAccountInfo(): Promise<APIResponseV3<AccountInfoV5, {
}>>;

Query the margin mode and the upgraded status of account

Returns ​

Promise<APIResponseV3<AccountInfoV5, { }>>


getAccountInstrumentsInfo() ​

ts
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 ​

ParameterType
paramsGetAccountInstrumentsInfoParamsV5 & object

Returns ​

Promise<APIResponseV3WithTime<AccountInstrumentInfoResponseV5<C>>>


getActiveOrders() ​

ts
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 ​

ParameterType
paramsGetAccountOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>


getADLAlert() ​

ts
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 ​

ParameterType
params?GetADLAlertParamsV5

Returns ​

Promise<APIResponseV3WithTime<ADLAlertResponseV5>>


getAdvanceEarnOrder() ​

ts
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 ​

ParameterType
paramsGetAdvanceEarnOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdvanceEarnOrderListV5>>


getAdvanceEarnPosition() ​

ts
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 ​

ParameterType
paramsGetAdvanceEarnPositionListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdvanceEarnPositionListV5>>


getAdvanceEarnProduct() ​

ts
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 ​

ParameterType
paramsGetAdvanceEarnProductParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdvanceEarnAdvanceProductInfoV5>>


getAdvanceEarnProductExtraInfo() ​

ts
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 ​

ParameterType
paramsGetAdvanceEarnProductExtraInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdvanceEarnProductExtraInfoV5>>


getAffiliateSubAffiliateList() ​

ts
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 ​

ParameterType
params?GetAffiliateSubAffiliateListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AffiliateSubAffiliateListResultV5>>


getAffiliateUserInfo() ​

ts
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 ​

ParameterType
paramsGetAffiliateUserInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<AffiliateUserInfoV5>>


getAffiliateUserList() ​

ts
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 ​

ParameterType
params?GetAffiliateUserListParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: AffiliateUserListItemV5[]; nextPageCursor: string; }>>


getAllBrokerRateLimits() ​

ts
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 ​

ParameterType
params?GetAllBrokerRateLimitsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BrokerRateLimitAllItemV5[]; nextPageCursor: string; }>>


getAllCoinsBalance() ​

ts
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 ​

ParameterType
paramsGetAllCoinsBalanceParamsV5

Returns ​

Promise<APIResponseV3WithTime<AllCoinsBalanceV5>>


getAllowedDepositCoinInfo() ​

ts
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 ​

ParameterType
params?GetAllowedDepositCoinInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ configList: AllowedDepositCoinInfoV5[]; nextPageCursor: string; }>>


getAllRateLimits() ​

ts
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 ​

ParameterType
params?{ cursor?: string; limit?: string; uids?: string; }
params.cursor?string
params.limit?string
params.uids?string

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; nextPageCursor: string; }>>


getAlphaAssetDetail() ​

ts
getAlphaAssetDetail(params: GetAlphaAssetDetailParamsV5): Promise<APIResponseV3WithTime<AlphaAssetDetailResultV5>>;

Get Asset Detail Single-asset view; result.assetList has 0 or 1 item.

Parameters ​

ParameterType
paramsGetAlphaAssetDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaAssetDetailResultV5>>


getAlphaAssetList() ​

ts
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() ​

ts
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 ​

ParameterType
paramsGetAlphaBizTokenDetailsParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaBizTokenDetailsV5>>


getAlphaBizTokenList() ​

ts
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 ​

ParameterType
params?GetAlphaBizTokenListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaBizTokenV5[]>>


getAlphaBizTokenPriceList() ​

ts
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 ​

ParameterType
paramsGetAlphaBizTokenPriceListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaBizTokenPriceListResultV5>>


getAlphaLPOrderList() ​

ts
getAlphaLPOrderList(params?: GetAlphaLPOrderListParamsV5): Promise<APIResponseV3WithTime<AlphaLPOrderListResultV5>>;

Get LP Order List LP stake/redeem order history.

Parameters ​

ParameterType
params?GetAlphaLPOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaLPOrderListResultV5>>


getAlphaLPPayTokenList() ​

ts
getAlphaLPPayTokenList(params?: GetAlphaLPPayTokenListParamsV5): Promise<APIResponseV3WithTime<AlphaLPPayTokenListResultV5>>;

Get LP Pay Token List Supported payment tokens and available balances for LP staking.

Parameters ​

ParameterType
params?GetAlphaLPPayTokenListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaLPPayTokenListResultV5>>


getAlphaLPPayTokenPrice() ​

ts
getAlphaLPPayTokenPrice(params: GetAlphaLPPayTokenPriceParamsV5): Promise<APIResponseV3WithTime<AlphaLPPayTokenPriceResultV5>>;

Get LP Pay Token Price Batch USD prices for up to 50 payment token codes.

Parameters ​

ParameterType
paramsGetAlphaLPPayTokenPriceParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaLPPayTokenPriceResultV5>>


getAlphaLPPoolInfo() ​

ts
getAlphaLPPoolInfo(params: GetAlphaLPPoolInfoParamsV5): Promise<APIResponseV3WithTime<AlphaLPPoolInfoV5>>;

Get LP Pool Info Detailed pool data including APY, reserves, and price range.

Parameters ​

ParameterType
paramsGetAlphaLPPoolInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaLPPoolInfoV5>>


getAlphaLPPoolList() ​

ts
getAlphaLPPoolList(params?: GetAlphaLPPoolListParamsV5): Promise<APIResponseV3WithTime<AlphaLPPoolListResultV5>>;

Get LP Pool List Available liquidity pools, optionally filtered by token symbol.

Parameters ​

ParameterType
params?GetAlphaLPPoolListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaLPPoolListResultV5>>


getAlphaLPPositionList() ​

ts
getAlphaLPPositionList(): Promise<APIResponseV3WithTime<AlphaLPPositionListResultV5>>;

Get LP Position List User LP positions with valuation, rewards, and APY.

Returns ​

Promise<APIResponseV3WithTime<AlphaLPPositionListResultV5>>


getAlphaPayTokenList() ​

ts
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 ​

ParameterType
paramsGetAlphaPayTokenListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPayTokenV5[]>>


getAlphaPredictionEngineStatus() ​

ts
getAlphaPredictionEngineStatus(): Promise<APIResponseV3WithTime<AlphaPredictionEngineStatusV5>>;

Get Engine Status Query prediction market matching engine availability before placing buy/sell orders.

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionEngineStatusV5>>


getAlphaPredictionEventDetail() ​

ts
getAlphaPredictionEventDetail(params: GetAlphaPredictionEventDetailParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionEventDetailV5>>;

Get Event Detail Event metadata, outcome markets, and current prices. Obtain tokenId before trading.

Parameters ​

ParameterType
paramsGetAlphaPredictionEventDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionEventDetailV5>>


getAlphaPredictionOrderBook() ​

ts
getAlphaPredictionOrderBook(params: GetAlphaPredictionOrderBookParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionOrderBookV5[]>>;

Get Order Book Full bid/ask depth snapshot for up to 20 outcome tokens.

Parameters ​

ParameterType
paramsGetAlphaPredictionOrderBookParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionOrderBookV5[]>>


getAlphaPredictionOrderEstimate() ​

ts
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 ​

ParameterType
paramsGetAlphaPredictionOrderEstimateParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionOrderEstimateV5>>


getAlphaPredictionOrderList() ​

ts
getAlphaPredictionOrderList(params: GetAlphaPredictionOrderListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionOrderListResultV5>>;

Get Order List Prediction market order history for the authenticated user.

Parameters ​

ParameterType
paramsGetAlphaPredictionOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionOrderListResultV5>>


getAlphaPredictionPayTokenList() ​

ts
getAlphaPredictionPayTokenList(): Promise<APIResponseV3WithTime<AlphaPredictionPayTokenV5[]>>;

Get Payment Token List Available payment tokens for prediction market trading (Phase 1: USDC).

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionPayTokenV5[]>>


getAlphaPredictionPortfolioSummary() ​

ts
getAlphaPredictionPortfolioSummary(params?: GetAlphaPredictionPortfolioSummaryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPortfolioSummaryV5>>;

Get Portfolio Summary Overall prediction market portfolio P&L and win rate.

Parameters ​

ParameterType
params?GetAlphaPredictionPortfolioSummaryParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionPortfolioSummaryV5>>


getAlphaPredictionPositionHistory() ​

ts
getAlphaPredictionPositionHistory(params?: GetAlphaPredictionPositionHistoryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPositionHistoryResultV5>>;

Get Position History Closed prediction market positions including settlement results.

Parameters ​

ParameterType
params?GetAlphaPredictionPositionHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionPositionHistoryResultV5>>


getAlphaPredictionPositionList() ​

ts
getAlphaPredictionPositionList(params?: GetAlphaPredictionPositionListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPositionListResultV5>>;

Get Position List Active prediction market positions. Confirm before placing sell orders.

Parameters ​

ParameterType
params?GetAlphaPredictionPositionListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionPositionListResultV5>>


getAlphaPredictionPriceHistory() ​

ts
getAlphaPredictionPriceHistory(params: GetAlphaPredictionPriceHistoryParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionPriceHistoryV5>>;

Get Price History OHLC candlestick history for an outcome token.

Parameters ​

ParameterType
paramsGetAlphaPredictionPriceHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionPriceHistoryV5>>


getAlphaPredictionSideMarketList() ​

ts
getAlphaPredictionSideMarketList(params: GetAlphaPredictionSideMarketListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSideMarketListResultV5>>;

Get Side Market List Outcome markets for an event with prices, liquidity, and status.

Parameters ​

ParameterType
paramsGetAlphaPredictionSideMarketListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionSideMarketListResultV5>>


getAlphaPredictionSportsGroupStageDetail() ​

ts
getAlphaPredictionSportsGroupStageDetail(params: GetAlphaPredictionSportsGroupStageDetailParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsGroupStageDetailV5>>;

Get Sports Group Stage Detail Group stage standings and match schedule for a sports prediction event.

Parameters ​

ParameterType
paramsGetAlphaPredictionSportsGroupStageDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionSportsGroupStageDetailV5>>


getAlphaPredictionSportsMatchList() ​

ts
getAlphaPredictionSportsMatchList(params: GetAlphaPredictionSportsMatchListParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsMatchListResultV5>>;

Get Sports Match List Sports matches available in prediction markets (Phase 1: FIFA 2026).

Parameters ​

ParameterType
paramsGetAlphaPredictionSportsMatchListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionSportsMatchListResultV5>>


getAlphaPredictionSportsTimelineStages() ​

ts
getAlphaPredictionSportsTimelineStages(params: GetAlphaPredictionSportsTimelineStagesParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionSportsTimelineStagesV5>>;

Get Sports Timeline Stages Tournament stage timeline with status and match counts.

Parameters ​

ParameterType
paramsGetAlphaPredictionSportsTimelineStagesParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionSportsTimelineStagesV5>>


getAlphaPredictionTokenPrice() ​

ts
getAlphaPredictionTokenPrice(params: GetAlphaPredictionTokenPriceParamsV5): Promise<APIResponseV3WithTime<AlphaPredictionTokenPriceV5[]>>;

Get Token Price Best bid/ask and last price for up to 20 outcome tokens.

Parameters ​

ParameterType
paramsGetAlphaPredictionTokenPriceParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaPredictionTokenPriceV5[]>>


getAlphaTradeOrderList() ​

ts
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 ​

ParameterType
paramsGetAlphaTradeOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaTradeOrderListResultV5>>


getAlphaTradeQuote() ​

ts
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 ​

ParameterType
paramsGetAlphaTradeQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<AlphaTradeQuoteResultV5>>


getAssetInfo() ​

ts
getAssetInfo(params: GetAssetInfoParamsV5): Promise<APIResponseV3WithTime<{
  spot: AssetInfoV5;
}>>;

Query asset information.

INFO For now, it can query SPOT only.

Parameters ​

ParameterType
paramsGetAssetInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ spot: AssetInfoV5; }>>


getAssetOverview() ​

ts
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 ​

ParameterType
params?GetAssetOverviewParamsV5

Returns ​

Promise<APIResponseV3WithTime<AssetOverviewResultV5>>


getAutoRepayMode() ​

ts
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 ​

ParameterType
params?GetAutoRepayModeParamsV5

Returns ​

Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>


getAvailableAmountToRepay() ​

ts
getAvailableAmountToRepay(params: GetAvailableAmountToRepayParamsV5): Promise<APIResponseV3WithTime<AvailableAmountToRepayV5>>;

Get available amount to repay

Parameters ​

ParameterType
paramsGetAvailableAmountToRepayParamsV5

Returns ​

Promise<APIResponseV3WithTime<AvailableAmountToRepayV5>>


getBorrowableCoins() ​

ts
getBorrowableCoins(params?: object): Promise<APIResponseV3WithTime<{
  vipCoinList: VipBorrowableCoinsV5[];
}>>;

Get Borrowable Coins

INFO: Do not need authentication

Parameters ​

ParameterType
params?{ currency?: string; vipLevel?: string; }
params.currency?string
params.vipLevel?string

Returns ​

Promise<APIResponseV3WithTime<{ vipCoinList: VipBorrowableCoinsV5[]; }>>

Deprecated ​

  • Use "Crypto Loan - New" Endpoints instead

getBorrowContractInfoFixed() ​

ts
getBorrowContractInfoFixed(params?: GetBorrowContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
  list: BorrowContractInfoFixedV5[];
  nextPageCursor: string;
}>>;

Get Borrow Contract Info

Parameters ​

ParameterType
params?GetBorrowContractInfoFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BorrowContractInfoFixedV5[]; nextPageCursor: string; }>>


getBorrowHistory() ​

ts
getBorrowHistory(params?: GetBorrowHistoryParamsV5): Promise<APIResponseV3WithTime<CursorListV5<BorrowHistoryRecordV5[]>>>;

Get interest records, sorted in reverse order of creation time.

Unified account

Parameters ​

ParameterType
params?GetBorrowHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<CursorListV5<BorrowHistoryRecordV5[]>>>


getBorrowHistoryFlexible() ​

ts
getBorrowHistoryFlexible(params?: GetBorrowHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
  list: BorrowHistoryFlexibleV5[];
  nextPageCursor: string;
}>>;

Get Borrow Orders History

Parameters ​

ParameterType
params?GetBorrowHistoryFlexibleParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BorrowHistoryFlexibleV5[]; nextPageCursor: string; }>>


getBorrowOrderInfoFixed() ​

ts
getBorrowOrderInfoFixed(params?: GetBorrowOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
  list: BorrowOrderInfoFixedV5[];
  nextPageCursor: string;
}>>;

Get Borrow Order Info

Parameters ​

ParameterType
params?GetBorrowOrderInfoFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BorrowOrderInfoFixedV5[]; nextPageCursor: string; }>>


getBorrowOrderQuoteFixed() ​

ts
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 ​

ParameterType
paramsGetBorrowOrderQuoteFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BorrowOrderQuoteFixedV5[]; }>>


getBrokerIssuedVoucher() ​

ts
getBrokerIssuedVoucher(params: GetBrokerIssuedVoucherParamsV5): Promise<APIResponseV3<BrokerIssuedVoucherV5, {
}>>;

Query an issued voucher

INFO Use exchange broker master account to query

Parameters ​

ParameterType
paramsGetBrokerIssuedVoucherParamsV5

Returns ​

Promise<APIResponseV3<BrokerIssuedVoucherV5, { }>>


getBrokerRateLimitCap() ​

ts
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() ​

ts
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 ​

ParameterType
params?GetBrokerSubAccountDepositsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: ExchangeBrokerSubAccountDepositRecordV5[]; }>>


getBrokerVoucherSpec() ​

ts
getBrokerVoucherSpec(params: object): Promise<APIResponseV3WithTime<BrokerVoucherSpecV5>>;

Query Voucher Spec

Parameters ​

ParameterType
params{ id: string; }
params.idstring

Returns ​

Promise<APIResponseV3WithTime<BrokerVoucherSpecV5>>


getClassicTransactionLogs() ​

ts
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 ​

ParameterType
params?GetClassicTransactionLogsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: TransactionLogV5[]; nextPageCursor: string; }>>


getClientType() ​

ts
getClientType(): "v5";

Defines the client type (affecting how requests & signatures behave)

Returns ​

"v5"

Overrides ​

BaseRestClient.getClientType


getClosedOptionsPositions() ​

ts
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 ​

ParameterType
params?GetClosedOptionsPositionsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ category: string; list: ClosedOptionsPositionV5[]; nextPageCursor: string; }>>


getClosedPnL() ​

ts
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 ​

ParameterType
paramsGetClosedPnLParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>


getCoinBalance() ​

ts
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 ​

ParameterType
paramsGetAccountCoinBalanceParamsV5

Returns ​

Promise<APIResponseV3<AccountCoinBalanceV5, { }>>


getCoinExchangeRecords() ​

ts
getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise<APIResponseV3WithTime<{
  nextPageCursor?: string;
  orderBody: CoinExchangeRecordV5[];
}>>;

Query the coin exchange records.

CAUTION: You may experience long delays with this endpoint.

Parameters ​

ParameterType
params?GetCoinExchangeRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor?: string; orderBody: CoinExchangeRecordV5[]; }>>


getCoinGreeks() ​

ts
getCoinGreeks(baseCoin?: string): Promise<APIResponseV3WithTime<{
  list: CoinGreeksV5[];
}>>;

Get current account Greeks information

Parameters ​

ParameterType
baseCoin?string

Returns ​

Promise<APIResponseV3WithTime<{ list: CoinGreeksV5[]; }>>


getCoinInfo() ​

ts
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 ​

ParameterType
coin?string

Returns ​

Promise<APIResponseV3WithTime<{ rows: CoinInfoV5[]; }>>


getCoinState() ​

ts
getCoinState(params?: GetCoinStateParamsV5): Promise<APIResponseV3WithTime<{
  list: CoinStateV5[];
}>>;

Get currency leverage information (coin state)

Parameters ​

ParameterType
params?GetCoinStateParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: CoinStateV5[]; }>>


getCollateralAdjustmentHistory() ​

ts
getCollateralAdjustmentHistory(params?: GetCollateralAdjustmentHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: CollateralAdjustmentHistoryV5[];
  nextPageCursor: string;
}>>;

Get Collateral Adjustment History New Query for your LTV adjustment history.

Parameters ​

ParameterType
params?GetCollateralAdjustmentHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: CollateralAdjustmentHistoryV5[]; nextPageCursor: string; }>>


getCollateralCoins() ​

ts
getCollateralCoins(params?: object): Promise<APIResponseV3WithTime<{
  vipCoinList: VipCollateralCoinsV5[];
}>>;

Get Collateral Coins

INFO: Do not need authentication

Parameters ​

ParameterType
params?{ currency?: string; vipLevel?: string; }
params.currency?string
params.vipLevel?string

Returns ​

Promise<APIResponseV3WithTime<{ vipCoinList: VipCollateralCoinsV5[]; }>>

Deprecated ​

  • Use "Crypto Loan - New" Endpoints instead

getCollateralInfo() ​

ts
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 ​

ParameterType
currency?string

Returns ​

Promise<APIResponseV3WithTime<{ list: CollateralInfoV5[]; }>>


getCompletedLoanOrderHistory() ​

ts
getCompletedLoanOrderHistory(params?: GetCompletedLoanOrderHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: CompletedLoanOrderV5[];
  nextPageCursor: string;
}>>;

Get Completed Loan Order History Query the completed loan orders

Parameters ​

ParameterType
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() ​

ts
getConvertCoins(params: ConvertCoinsParamsV5): Promise<APIResponseV3WithTime<{
  coins: ConvertCoinSpecV5[];
}>>;

Query the coin list of convert from (to).

Parameters ​

ParameterType
paramsConvertCoinsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ coins: ConvertCoinSpecV5[]; }>>


getConvertHistory() ​

ts
getConvertHistory(params?: GetConvertHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: ConvertHistoryRecordV5[];
}>>;

Query the conversion history.

Parameters ​

ParameterType
params?GetConvertHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: ConvertHistoryRecordV5[]; }>>


getConvertStatus() ​

ts
getConvertStatus(params: object): Promise<APIResponseV3WithTime<{
  result: ConvertStatusV5;
}>>;

Query the exchange result by sending quoteTxId.

Parameters ​

ParameterType
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.quoteTxIdstring

Returns ​

Promise<APIResponseV3WithTime<{ result: ConvertStatusV5; }>>


getCryptoLoanPosition() ​

ts
getCryptoLoanPosition(): Promise<APIResponseV3WithTime<CryptoLoanPositionV5>>;

Get Crypto Loan Position New

Returns ​

Promise<APIResponseV3WithTime<CryptoLoanPositionV5>>


getDCPInfo() ​

ts
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() ​

ts
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 ​

ParameterType
paramsGetDeliveryPriceParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryPriceV5[], CategoryV5>>>


getDeliveryRecord() ​

ts
getDeliveryRecord(params: GetDeliveryRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryRecordV5[], CategoryV5>>>;

Query option delivery records, sorted by deliveryTime in descending order.

Covers: Option

Parameters ​

ParameterType
paramsGetDeliveryRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<DeliveryRecordV5[], CategoryV5>>>


getDepositRecords() ​

ts
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 ​

ParameterType
params?GetDepositRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: DepositRecordV5[]; }>>


getEarnAprHistory() ​

ts
getEarnAprHistory(params: GetEarnAprHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnAprHistoryPointV5[];
}>>;

Get historical APR (FlexibleSaving / OnChain), up to ~6 months.

INFO: Does not need authentication

Parameters ​

ParameterType
paramsGetEarnAprHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnAprHistoryPointV5[]; }>>


getEarnCouponList() ​

ts
getEarnCouponList(params: GetEarnCouponListParamsV5): Promise<APIResponseV3WithTime<EarnCouponListResultV5>>;

Get Coupon List Interest-rate coupons and Dual Assets reward cards for FlexibleSaving or DualAssets.

Parameters ​

ParameterType
paramsGetEarnCouponListParamsV5

Returns ​

Promise<APIResponseV3WithTime<EarnCouponListResultV5>>


getEarnHourlyYieldHistory() ​

ts
getEarnHourlyYieldHistory(params: GetEarnHourlyYieldHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnHourlyYieldHistoryV5[];
  nextPageCursor: string;
}>>;

Get Hourly Yield History

INFO: API key needs "Earn" permission

Parameters ​

ParameterType
paramsGetEarnHourlyYieldHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnHourlyYieldHistoryV5[]; nextPageCursor: string; }>>


getEarnOrderHistory() ​

ts
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 ​

ParameterType
paramsGetEarnOrderHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnOrderHistoryV5[]; nextPageCursor: string; }>>


getEarnPosition() ​

ts
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 ​

ParameterType
paramsGetEarnPositionParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnPositionV5[]; }>>


getEarnProduct() ​

ts
getEarnProduct(params: object): Promise<APIResponseV3WithTime<{
  list: EarnProductV5[];
}>>;

Get Product Info for Earn products

INFO: Do not need authentication

Parameters ​

ParameterType
params{ category: string; coin?: string; }
params.categorystring
params.coin?string

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnProductV5[]; }>>


getEarnTokenDailyYield() ​

ts
getEarnTokenDailyYield(params: GetEarnTokenDailyYieldParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnTokenDailyYieldRecordV5[];
  nextPageCursor: string;
}>>;

Earn token — Get Daily Yield Records

Parameters ​

ParameterType
paramsGetEarnTokenDailyYieldParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnTokenDailyYieldRecordV5[]; nextPageCursor: string; }>>


getEarnTokenHistoryApr() ​

ts
getEarnTokenHistoryApr(params: GetEarnTokenHistoryAprParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnTokenHistoryAprPointV5[];
}>>;

Earn token — Get History APR (7/30/180 days). No authentication required.

Parameters ​

ParameterType
paramsGetEarnTokenHistoryAprParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnTokenHistoryAprPointV5[]; }>>


getEarnTokenHourlyYield() ​

ts
getEarnTokenHourlyYield(params: GetEarnTokenHourlyYieldParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnTokenHourlyYieldRecordV5[];
  nextPageCursor: string;
}>>;

Earn token — Get Hourly Yield Records

Parameters ​

ParameterType
paramsGetEarnTokenHourlyYieldParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnTokenHourlyYieldRecordV5[]; nextPageCursor: string; }>>


getEarnTokenOrders() ​

ts
getEarnTokenOrders(params: GetEarnTokenOrderListParamsV5): Promise<APIResponseV3WithTime<{
  list: EarnTokenOrderV5[];
  nextPageCursor: string;
}>>;

Earn token — Get Order List

Parameters ​

ParameterType
paramsGetEarnTokenOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: EarnTokenOrderV5[]; nextPageCursor: string; }>>


getEarnTokenPosition() ​

ts
getEarnTokenPosition(params: GetEarnTokenPositionParamsV5): Promise<APIResponseV3WithTime<EarnTokenPositionV5>>;

Earn token — Get Position Info

Parameters ​

ParameterType
paramsGetEarnTokenPositionParamsV5

Returns ​

Promise<APIResponseV3WithTime<EarnTokenPositionV5>>


getEarnTokenProduct() ​

ts
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 ​

ParameterType
paramsGetEarnTokenProductParamsV5

Returns ​

Promise<APIResponseV3WithTime<EarnTokenProductV5>>


getEarnYieldHistory() ​

ts
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 ​

ParameterType
paramsGetEarnYieldHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; yield: EarnYieldHistoryV5[]; }>>


getEventActiveOrders() ​

ts
getEventActiveOrders(params?: GetEventActiveOrdersParamsV5): Promise<APIResponseV3WithTime<EventActiveOrdersResultV5>>;

Get Event Contract active (unfilled / partially filled) orders.

INFO: Event Contract maker accounts only.

Parameters ​

ParameterType
params?GetEventActiveOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventActiveOrdersResultV5>>


getEventInstrumentsInfo() ​

ts
getEventInstrumentsInfo(params?: GetEventInstrumentsInfoParamsV5): Promise<APIResponseV3WithTime<EventInstrumentInfoResultV5>>;

Get Event Contract instruments info.

INFO: No authentication.

Parameters ​

ParameterType
params?GetEventInstrumentsInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventInstrumentInfoResultV5>>


getEventOrderbook() ​

ts
getEventOrderbook(params: GetEventOrderbookParamsV5): Promise<APIResponseV3WithTime<EventOrderbookV5>>;

Get Event Contract 25-level orderbook. Each level is [payoutRatio, orderValue].

INFO: No authentication.

Parameters ​

ParameterType
paramsGetEventOrderbookParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventOrderbookV5>>


getEventOrderHistory() ​

ts
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 ​

ParameterType
params?GetEventOrderHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventOrderHistoryResultV5>>


getEventPositionInfo() ​

ts
getEventPositionInfo(params?: GetEventPositionInfoParamsV5): Promise<APIResponseV3WithTime<EventPositionInfoResultV5>>;

Get Event Contract position info (UpDown, Target, Range).

INFO: Event Contract maker accounts only.

Parameters ​

ParameterType
params?GetEventPositionInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventPositionInfoResultV5>>


getEventSettlementRecords() ​

ts
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 ​

ParameterType
paramsGetEventSettlementRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventSettlementRecordsResultV5>>


getEventTradeHistory() ​

ts
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 ​

ParameterType
paramsGetEventTradeHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventTradeHistoryResultV5>>


getExchangeBrokerAccountInfo() ​

ts
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() ​

ts
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 ​

ParameterType
params?GetExchangeBrokerEarningsParamsV5

Returns ​

Promise<APIResponseV3WithTime<ExchangeBrokerEarningResultV5>>


getExchangeEntities() ​

ts
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() ​

ts
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 ​

ParameterType
paramsGetExecutionListParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>


getFeeGroupStructure() ​

ts
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 ​

ParameterType
paramsGetFeeGroupStructureParamsV5

Returns ​

Promise<APIResponseV3WithTime<FeeGroupStructureResponseV5>>


getFeeRate() ​

ts
getFeeRate(params: GetFeeRateParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[], CategoryV5>>>;

Get the trading fee rate. Covers: Spot / USDT perpetual / Inverse perpetual / Inverse futures / Options

Parameters ​

ParameterType
paramsGetFeeRateParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[], CategoryV5>>>


getFiatTradingPairList() ​

ts
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 ​

ParameterType
params?GetFiatTradingPairListParamsV5

Returns ​

Promise<APIResponseV3WithTime<FiatTradingPairListV5>>


getFixedLoanAvailableInventory() ​

ts
getFixedLoanAvailableInventory(params: GetFixedLoanAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FixedLoanAvailableInventoryV5>>;

Parameters ​

ParameterType
paramsGetFixedLoanAvailableInventoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedLoanAvailableInventoryV5>>


getFixedRateAvailableInventory() ​

ts
getFixedRateAvailableInventory(params: GetFixedRateAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FixedRateAvailableInventoryV5>>;

Parameters ​

ParameterType
paramsGetFixedRateAvailableInventoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedRateAvailableInventoryV5>>


getFixedRateBorrowContractInfo() ​

ts
getFixedRateBorrowContractInfo(params?: GetFixedRateBorrowContractInfoParamsV5): Promise<APIResponseV3WithTime<{
  list: FixedRateBorrowContractInfoV5[];
  nextPageCursor: string;
}>>;

Fixed-rate borrow contract list (descending by borrow time).

Parameters ​

ParameterType
params?GetFixedRateBorrowContractInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: FixedRateBorrowContractInfoV5[]; nextPageCursor: string; }>>


getFixedRateBorrowOrderInfo() ​

ts
getFixedRateBorrowOrderInfo(params?: GetFixedRateBorrowOrderInfoParamsV5): Promise<APIResponseV3WithTime<{
  list: FixedRateBorrowOrderInfoV5[];
  nextPageCursor: string;
}>>;

Fixed-rate borrow order history (descending by order time).

Parameters ​

ParameterType
params?GetFixedRateBorrowOrderInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: FixedRateBorrowOrderInfoV5[]; nextPageCursor: string; }>>


getFixedRateBorrowOrderQuote() ​

ts
getFixedRateBorrowOrderQuote(params: GetFixedRateBorrowOrderQuoteParamsV5): Promise<APIResponseV3WithTime<{
  list: FixedRateBorrowQuoteV5[];
}>>;

Fixed-rate borrow order book quotes (sort by apy, term, or quantity).

Parameters ​

ParameterType
paramsGetFixedRateBorrowOrderQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: FixedRateBorrowQuoteV5[]; }>>


getFixedTermEarnOrder() ​

ts
getFixedTermEarnOrder(params?: GetFixedTermEarnOrderListParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnOrderListV5>>;

Fixed-term earn — order list.

INFO: API key needs "Earn" permission. Rate limit: 10 req/s.

Parameters ​

ParameterType
params?GetFixedTermEarnOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedTermEarnOrderListV5>>


getFixedTermEarnPosition() ​

ts
getFixedTermEarnPosition(params?: GetFixedTermEarnPositionParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnPositionListV5>>;

Fixed-term earn — active positions.

INFO: API key needs "Earn" permission. Rate limit: 10 req/s.

Parameters ​

ParameterType
params?GetFixedTermEarnPositionParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedTermEarnPositionListV5>>


getFixedTermEarnProduct() ​

ts
getFixedTermEarnProduct(params?: GetFixedTermEarnProductParamsV5): Promise<APIResponseV3WithTime<FixedTermEarnProductListV5>>;

Fixed-term / fixed saving — product list (Earn).

INFO: No authentication. Up to 50 requests/second per IP.

Parameters ​

ParameterType
params?GetFixedTermEarnProductParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedTermEarnProductListV5>>


getFlexibleAvailableInventory() ​

ts
getFlexibleAvailableInventory(params: GetFlexibleAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FlexibleAvailableInventoryV5>>;

Parameters ​

ParameterType
paramsGetFlexibleAvailableInventoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<FlexibleAvailableInventoryV5>>


getFlexibleLoanAvailableInventory() ​

ts
getFlexibleLoanAvailableInventory(params: GetFlexibleLoanAvailableInventoryParamsV5): Promise<APIResponseV3WithTime<FlexibleLoanAvailableInventoryV5>>;

Parameters ​

ParameterType
paramsGetFlexibleLoanAvailableInventoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<FlexibleLoanAvailableInventoryV5>>


getFlexibleSavingAutoSavings() ​

ts
getFlexibleSavingAutoSavings(params?: GetFlexibleSavingAutoSavingsParamsV5): Promise<APIResponseV3WithTime<FlexibleSavingAutoSavingsV5>>;

Query Flexible Saving auto savings settings. Omit coins to return every supported coin.

Parameters ​

ParameterType
params?GetFlexibleSavingAutoSavingsParamsV5

Returns ​

Promise<APIResponseV3WithTime<FlexibleSavingAutoSavingsV5>>


getFriendReferrals() ​

ts
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 ​

ParameterType
params?GetFriendReferralsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextCursor: string; records: FriendReferralRecordV5[]; }>>


getFullDepthOrderbook() ​

ts
getFullDepthOrderbook(params: GetFullDepthOrderbookParamsV5): Promise<APIResponseV3WithTime<OrderbookResponseV5>>;

Parameters ​

ParameterType
paramsGetFullDepthOrderbookParamsV5

Returns ​

Promise<APIResponseV3WithTime<OrderbookResponseV5>>


getFundingAccountTransactionHistory() ​

ts
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 ​

ParameterType
params?GetFundingAccountTransactionHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: FundingAccountTransactionRecordV5[]; nextPageCursor: string; }>>


getFundingRateHistory() ​

ts
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 ​

ParameterType
paramsGetFundingRateHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<FundingRateHistoryResponseV5[], "linear" | "inverse">>>


getFuturesLeverage() ​

ts
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 ​

ParameterType
paramsGetFuturesLeverageParamsV5

Returns ​

Promise<APIResponseV3WithTime<FuturesLeverageResultV5>>


getHistoricalInterestRate() ​

ts
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 ​

ParameterType
params{ currency: string; endTime?: number; startTime?: number; vipLevel?: string; }
params.currencystring
params.endTime?number
params.startTime?number
params.vipLevel?string

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; }>>


getHistoricalVolatility() ​

ts
getHistoricalVolatility(params: GetHistoricalVolatilityParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<HistoricalVolatilityV5[], "option">>>;

Query option historical volatility Covers: Option

Parameters ​

ParameterType
paramsGetHistoricalVolatilityParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<HistoricalVolatilityV5[], "option">>>


getHistoricOrders() ​

ts
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 ​

ParameterType
paramsGetAccountHistoricOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>


getHoldToEarnAirdropProducts() ​

ts
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() ​

ts
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 ​

ParameterType
paramsGetHoldToEarnAirdropYieldHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<HoldToEarnAirdropYieldHistoryResultV5>>


getIndexPriceComponents() ​

ts
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 ​

ParameterType
paramsGetIndexPriceComponentsParamsV5

Returns ​

Promise<APIResponseV3WithTime<IndexPriceComponentsResponseV5>>


getIndexPriceKline() ​

ts
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 ​

ParameterType
paramsGetIndexPriceKlineParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse">>>


getInstitutionalLendingCoinDeltaAmount() ​

ts
getInstitutionalLendingCoinDeltaAmount(params?: GetCoinDeltaAmountParamsV5): Promise<APIResponseV3WithTime<InstitutionalLendingCoinDeltaAmountV5>>;

Get Coin Delta Amount Coin delta amount details for institutional loan hedge product (unified account only).

Parameters ​

ParameterType
params?GetCoinDeltaAmountParamsV5

Returns ​

Promise<APIResponseV3WithTime<InstitutionalLendingCoinDeltaAmountV5>>


getInstitutionalLendingDelayLiquidationStatus() ​

ts
getInstitutionalLendingDelayLiquidationStatus(): Promise<APIResponseV3WithTime<InstitutionalLendingDelayLiquidationStatusV5>>;

Current LTV, liquidation status, and delay-liquidation timing for an institutional loan account.

Returns ​

Promise<APIResponseV3WithTime<InstitutionalLendingDelayLiquidationStatusV5>>


getInstitutionalLendingLoanOrders() ​

ts
getInstitutionalLendingLoanOrders(params?: object): Promise<APIResponseV3WithTime<{
  loanInfo: any[];
}>>;

Get Loan Orders

Parameters ​

ParameterType
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() ​

ts
getInstitutionalLendingLTV(): Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>;

Get LTV

Returns ​

Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>

Deprecated ​


getInstitutionalLendingLTVWithLadderConversionRate() ​

ts
getInstitutionalLendingLTVWithLadderConversionRate(): Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>;

Get LTV with Ladder Conversion Rate

Returns ​

Promise<APIResponseV3WithTime<InstitutionalLoanLTVV5>>


getInstitutionalLendingMarginCoinInfo() ​

ts
getInstitutionalLendingMarginCoinInfo(productId?: string): Promise<APIResponseV3WithTime<{
  marginToken: any[];
}>>;

Get Margin Coin Info

Parameters ​

ParameterType
productId?string

Returns ​

Promise<APIResponseV3WithTime<{ marginToken: any[]; }>>

Deprecated ​


getInstitutionalLendingMarginCoinInfoWithConversionRate() ​

ts
getInstitutionalLendingMarginCoinInfoWithConversionRate(productId?: string): Promise<APIResponseV3WithTime<{
  marginToken: any[];
}>>;

Get Margin Coin Info With Conversion Rate

Parameters ​

ParameterType
productId?string

Returns ​

Promise<APIResponseV3WithTime<{ marginToken: any[]; }>>


getInstitutionalLendingProductInfo() ​

ts
getInstitutionalLendingProductInfo(productId?: string): Promise<APIResponseV3WithTime<{
  marginProductInfo: InstitutionalLendingProductInfoV5[];
}>>;

Get Product Info

Parameters ​

ParameterType
productId?string

Returns ​

Promise<APIResponseV3WithTime<{ marginProductInfo: InstitutionalLendingProductInfoV5[]; }>>


getInstitutionalLendingRepayOrders() ​

ts
getInstitutionalLendingRepayOrders(params?: object): Promise<APIResponseV3WithTime<{
  repayInfo: any[];
}>>;

Get Repay Orders

Parameters ​

ParameterType
params?{ endTime?: number; limit?: number; startTime?: number; }
params.endTime?number
params.limit?number
params.startTime?number

Returns ​

Promise<APIResponseV3WithTime<{ repayInfo: any[]; }>>


getInstrumentsInfo() ​

ts
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 ​

ParameterType
paramsGetInstrumentsInfoParamsV5 & object

Returns ​

Promise<APIResponseV3WithTime<InstrumentInfoResponseV5<C>>>


getInstrumentSummary() ​

ts
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 ​

ParameterType
paramsGetInstrumentSummaryParamsV5

Returns ​

Promise<APIResponseV3WithTime<InstrumentSummaryResponseV5>>


getInsurance() ​

ts
getInsurance(params?: GetInsuranceParamsV5): Promise<APIResponseV3WithTime<InsuranceResponseV5>>;

Query Bybit insurance pool data (BTC/USDT/USDC etc). The data is updated every 24 hours.

Parameters ​

ParameterType
params?GetInsuranceParamsV5

Returns ​

Promise<APIResponseV3WithTime<InsuranceResponseV5>>


getInternalDepositRecords() ​

ts
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 ​

ParameterType
params?GetInternalDepositRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: InternalDepositRecordV5[]; }>>


getInternalTransferRecords() ​

ts
getInternalTransferRecords(params?: GetInternalTransferParamsV5): Promise<APIResponseV3WithTime<CursorListV5<InternalTransferRecordV5[]>>>;

Query the internal transfer records between different account types under the same UID.

Parameters ​

ParameterType
params?GetInternalTransferParamsV5

Returns ​

Promise<APIResponseV3WithTime<CursorListV5<InternalTransferRecordV5[]>>>


getKline() ​

ts
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 ​

ParameterType
paramsGetKlineParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCVKlineV5[], "spot" | "linear" | "inverse">>>


getLaunchpoolCurrentStaking() ​

ts
getLaunchpoolCurrentStaking(): Promise<APIResponseV3WithTime<LaunchpoolCurrentStakingResultV5>>;

Returns ​

Promise<APIResponseV3WithTime<LaunchpoolCurrentStakingResultV5>>


getLaunchpoolProjectList() ​

ts
getLaunchpoolProjectList(params: GetLaunchpoolProjectListParamsV5): Promise<APIResponseV3WithTime<LaunchpoolProjectListResultV5>>;

***** Spot-X (Launchpool / Puzzle / Token Splash)

Parameters ​

ParameterType
paramsGetLaunchpoolProjectListParamsV5

Returns ​

Promise<APIResponseV3WithTime<LaunchpoolProjectListResultV5>>


getLaunchpoolUserActivityLog() ​

ts
getLaunchpoolUserActivityLog(params?: GetLaunchpoolUserActivityLogParamsV5): Promise<APIResponseV3WithTime<LaunchpoolActivityLogResultV5>>;

Parameters ​

ParameterType
params?GetLaunchpoolUserActivityLogParamsV5

Returns ​

Promise<APIResponseV3WithTime<LaunchpoolActivityLogResultV5>>


getLaunchpoolUserHistory() ​

ts
getLaunchpoolUserHistory(params?: GetLaunchpoolUserHistoryParamsV5): Promise<APIResponseV3WithTime<LaunchpoolUserHistoryResultV5>>;

Parameters ​

ParameterType
params?GetLaunchpoolUserHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<LaunchpoolUserHistoryResultV5>>


getLimitPriceAction() ​

ts
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() ​

ts
getLiquidityMiningProduct(params?: GetLiquidityMiningProductParamsV5): Promise<APIResponseV3WithTime<LiquidityMiningProductResultV5>>;

Liquidity mining — product list (Advanced Earn).

INFO: No authentication. Up to 50 requests/second per IP.

Parameters ​

ParameterType
params?GetLiquidityMiningProductParamsV5

Returns ​

Promise<APIResponseV3WithTime<LiquidityMiningProductResultV5>>


getLoanBorrowableCoins() ​

ts
getLoanBorrowableCoins(params?: GetBorrowableCoinsParamsV5): Promise<APIResponseV3WithTime<{
  list: BorrowableCoinV5[];
}>>;

Get Borrowable Coins New

Parameters ​

ParameterType
params?GetBorrowableCoinsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: BorrowableCoinV5[]; }>>


getLoanCollateralCoins() ​

ts
getLoanCollateralCoins(params?: GetCollateralCoinsParamsV5): Promise<APIResponseV3WithTime<CollateralDataV5>>;

Get Collateral Coins New

Parameters ​

ParameterType
params?GetCollateralCoinsParamsV5

Returns ​

Promise<APIResponseV3WithTime<CollateralDataV5>>


getLoanLTVAdjustmentHistory() ​

ts
getLoanLTVAdjustmentHistory(params?: GetLoanLTVAdjustmentHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: LoanLTVAdjustmentHistoryV5[];
  nextPageCursor: string;
}>>;

Get Loan LTV Adjustment History Query the transaction history of collateral amount adjustment

Parameters ​

ParameterType
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() ​

ts
getLongShortRatio(params: GetLongShortRatioParamsV5): Promise<APIResponseV3WithTime<CursorListV5<LongShortRatioV5[]>>>;

Parameters ​

ParameterType
paramsGetLongShortRatioParamsV5

Returns ​

Promise<APIResponseV3WithTime<CursorListV5<LongShortRatioV5[]>>>


getMarkPriceKline() ​

ts
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 ​

ParameterType
paramsGetMarkPriceKlineParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear" | "inverse" | "option">>>


getMasterDepositAddress() ​

ts
getMasterDepositAddress(coin: string, chainType?: string): Promise<APIResponseV3WithTime<{
  chains: DepositAddressChainV5[];
  coin: string;
}>>;

Query the deposit address information of MASTER account.

Parameters ​

ParameterType
coinstring
chainType?string

Returns ​

Promise<APIResponseV3WithTime<{ chains: DepositAddressChainV5[]; coin: string; }>>


getMaxAllowedReductionCollateralAmount() ​

ts
getMaxAllowedReductionCollateralAmount(params: object): Promise<APIResponseV3WithTime<{
  maxCollateralAmount: string;
}>>;

Get Max. Allowed Reduction Collateral Amount Query the maximum allowed reduction collateral amount

Parameters ​

ParameterType
params{ orderId: string; }
params.orderIdstring

Returns ​

Promise<APIResponseV3WithTime<{ maxCollateralAmount: string; }>>

Deprecated ​

  • Use "Crypto Loan - New" Endpoints instead

Permission: "Spot trade"


getMaxBorrowableAmount() ​

ts
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 ​

ParameterType
paramsGetMaxBorrowableAmountParamsV5

Returns ​

Promise<APIResponseV3WithTime<MaxBorrowableAmountV5>>


getMaxCollateralAmount() ​

ts
getMaxCollateralAmount(params: GetMaxCollateralAmountParamsV5): Promise<APIResponseV3WithTime<{
  maxCollateralAmount: string;
}>>;

Get Max. Allowed Collateral Reduction Amount New

Parameters ​

ParameterType
paramsGetMaxCollateralAmountParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ maxCollateralAmount: string; }>>


getMaxLoanAmount() ​

ts
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 ​

ParameterType
paramsGetMaxLoanAmountParamsV5

Returns ​

Promise<APIResponseV3WithTime<MaxLoanAmountV5>>


getMMPState() ​

ts
getMMPState(baseCoin: string): Promise<APIResponseV3WithTime<{
  result: MMPStateV5[];
}>>;

Get MMP State

Parameters ​

ParameterType
baseCoinstring

Returns ​

Promise<APIResponseV3WithTime<{ result: MMPStateV5[]; }>>


getMovePositionHistory() ​

ts
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 ​

ParameterType
params?GetMovePositionHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: MovePositionHistoryV5[]; nextPageCursor: string; }>>


getNewDeliveryPrice() ​

ts
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 ​

ParameterType
params{ baseCoin: string; category: "option"; settleCoin?: string; }
params.baseCoinstring
params.category"option"
params.settleCoin?string

Returns ​

Promise<APIResponseV3WithTime<{ category: string; list: object[]; }>>


getOngoingFlexibleLoans() ​

ts
getOngoingFlexibleLoans(params?: GetOngoingFlexibleLoansParamsV5): Promise<APIResponseV3WithTime<{
  list: OngoingFlexibleLoanV5[];
}>>;

Get Flexible Loans Query for your ongoing loans

Parameters ​

ParameterType
params?GetOngoingFlexibleLoansParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: OngoingFlexibleLoanV5[]; }>>


getOpenInterest() ​

ts
getOpenInterest(params: GetOpenInterestParamsV5): Promise<APIResponseV3WithTime<OpenInterestResponseV5>>;

Get open interest of each symbol.

Covers: Linear contract / Inverse contract

Parameters ​

ParameterType
paramsGetOpenInterestParamsV5

Returns ​

Promise<APIResponseV3WithTime<OpenInterestResponseV5>>


getOptionAssetInfo() ​

ts
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() ​

ts
getOptionBaseCoins(params?: GetOptionBaseCoinsParamsV5): Promise<APIResponseV3WithTime<OptionBaseCoinsResultV5>>;

Query option base coins, display names, launch times, and tradable symbol availability.

Parameters ​

ParameterType
params?GetOptionBaseCoinsParamsV5

Returns ​

Promise<APIResponseV3WithTime<OptionBaseCoinsResultV5>>


getOptionDeliveryPrice() ​

ts
getOptionDeliveryPrice(params: GetOptionDeliveryPriceParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[], CategoryV5>>>;

Get the delivery price for option

Covers: Option

Parameters ​

ParameterType
paramsGetOptionDeliveryPriceParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<OptionDeliveryPriceV5[], CategoryV5>>>

Deprecated ​

use getDeliveryPrice() instead


getOrderbook() ​

ts
getOrderbook(params: GetOrderbookParamsV5): Promise<APIResponseV3WithTime<OrderbookResponseV5>>;

Query orderbook data

Covers: Spot / Linear contract / Inverse contract / Option

Parameters ​

ParameterType
paramsGetOrderbookParamsV5

Returns ​

Promise<APIResponseV3WithTime<OrderbookResponseV5>>

Example ​

ts
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 ​

Read an order book


getOrderPriceLimit() ​

ts
getOrderPriceLimit(params: object): Promise<APIResponseV3WithTime<OrderPriceLimitV5>>;

Parameters ​

ParameterType
params{ category: "spot" | "linear" | "inverse"; symbol: string; }
params.category"spot" | "linear" | "inverse"
params.symbolstring

Returns ​

Promise<APIResponseV3WithTime<OrderPriceLimitV5>>


getP2PAccountCoinsBalance() ​

ts
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 ​

ParameterType
paramsGetP2PAccountCoinsBalanceParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2PAccountCoinsBalanceV5>>


getP2PAdDetail() ​

ts
getP2PAdDetail(params: object): Promise<APIResponseV3WithTime<P2PAdDetailV5>>;

Get P2P ad details

Parameters ​

ParameterType
params{ itemId: string; }
params.itemIdstring

Returns ​

Promise<APIResponseV3WithTime<P2PAdDetailV5>>


getP2PChatMessages() ​

ts
getP2PChatMessages(params: GetP2PChatMessagesParamsV5): Promise<APIP2PChatResponse<P2PChatMessagesResponseV5>>;

Get P2P chat messages, ordered by creation time descending.

Parameters ​

ParameterType
paramsGetP2PChatMessagesParamsV5

Returns ​

Promise<APIP2PChatResponse<P2PChatMessagesResponseV5>>

See ​

https://bybit-exchange.github.io/docs/p2p/chat/get-message-list


getP2PChatSessionId() ​

ts
getP2PChatSessionId(params: GetP2PChatSessionIdParamsV5): Promise<APIP2PChatResponse<{
  sessionId: string;
}>>;

Get the AES encrypted P2P chat session ID for a counterparty.

Parameters ​

ParameterType
paramsGetP2PChatSessionIdParamsV5

Returns ​

Promise<APIP2PChatResponse<{ sessionId: string; }>>

See ​

https://bybit-exchange.github.io/docs/p2p/chat/get-session-id


getP2PChatSessions() ​

ts
getP2PChatSessions(params: GetP2PChatSessionsParamsV5): Promise<APIP2PChatResponse<P2PChatSessionsResponseV5>>;

Get P2P chat sessions with cursor pagination and read status filtering.

Parameters ​

ParameterType
paramsGetP2PChatSessionsParamsV5

Returns ​

Promise<APIP2PChatResponse<P2PChatSessionsResponseV5>>

See ​

https://bybit-exchange.github.io/docs/p2p/chat/get-chat-session-list


getP2PCounterpartyUserInfo() ​

ts
getP2PCounterpartyUserInfo(params: GetP2PCounterpartyUserInfoParamsV5): Promise<APIResponseV3WithTime<P2PCounterpartyUserInfoV5>>;

Get counterparty user information in a P2P order

Parameters ​

ParameterType
paramsGetP2PCounterpartyUserInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2PCounterpartyUserInfoV5>>


getP2POnlineAds() ​

ts
getP2POnlineAds(params: GetP2POnlineAdsParamsV5): Promise<APIResponseV3WithTime<P2POnlineAdsResponseV5>>;

Get market online ads list

Parameters ​

ParameterType
paramsGetP2POnlineAdsParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2POnlineAdsResponseV5>>


getP2POrderDetail() ​

ts
getP2POrderDetail(params: object): Promise<APIResponseV3WithTime<P2POrderDetailV5>>;

Get P2P order details

Parameters ​

ParameterType
params{ orderId: string; }
params.orderIdstring

Returns ​

Promise<APIResponseV3WithTime<P2POrderDetailV5>>


getP2POrderMessages() ​

ts
getP2POrderMessages(params: GetP2POrderMessagesParamsV5): Promise<APIP2PResponse<P2POrderMessageV5[], {
}>>;

Get chat messages in a P2P order

Parameters ​

ParameterType
paramsGetP2POrderMessagesParamsV5

Returns ​

Promise<APIP2PResponse<P2POrderMessageV5[], { }>>


getP2POrders() ​

ts
getP2POrders(params: GetP2POrdersParamsV5): Promise<APIResponseV3WithTime<P2POrdersResponseV5>>;

Get all P2P orders

Parameters ​

ParameterType
paramsGetP2POrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2POrdersResponseV5>>


getP2PPendingOrders() ​

ts
getP2PPendingOrders(params: GetP2PPendingOrdersParamsV5): Promise<APIResponseV3WithTime<P2POrdersResponseV5>>;

Get pending P2P orders

Parameters ​

ParameterType
paramsGetP2PPendingOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2POrdersResponseV5>>


getP2PPersonalAds() ​

ts
getP2PPersonalAds(params: GetP2PPersonalAdsParamsV5): Promise<APIResponseV3WithTime<P2PPersonalAdsResponseV5>>;

Get personal P2P ads list

Parameters ​

ParameterType
paramsGetP2PPersonalAdsParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2PPersonalAdsResponseV5>>


getP2PUserInfo() ​

ts
getP2PUserInfo(): Promise<APIResponseV3WithTime<P2PUserInfoV5>>;

Get P2P user account information

Returns ​

Promise<APIResponseV3WithTime<P2PUserInfoV5>>


getP2PUserPayments() ​

ts
getP2PUserPayments(): Promise<APIResponseV3WithTime<P2PUserPaymentV5[]>>;

Get user payment information

Returns ​

Promise<APIResponseV3WithTime<P2PUserPaymentV5[]>>


getPayInfo() ​

ts
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 ​

ParameterType
params?GetPayInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<PayInfoResultV5>>


getPortfolioMarginInfo() ​

ts
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 ​

ParameterType
params?GetPortfolioMarginInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<PortfolioMarginInfoResultV5>>


getPositionInfo() ​

ts
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 ​

ParameterType
paramsPositionInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<PositionV5[], CategoryV5>>>


getPositionTiers() ​

ts
getPositionTiers(params?: GetPositionTiersParamsV5): Promise<APIResponseV3WithTime<{
  list: CurrencyPositionTiersV5[];
}>>;

Get loan position risk information (position tiers)

Parameters ​

ParameterType
params?GetPositionTiersParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: CurrencyPositionTiersV5[]; }>>


getPremiumIndexPriceKline() ​

ts
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 ​

ParameterType
paramsGetPremiumIndexPriceKlineParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategorySymbolListV5<OHLCKlineV5[], "linear">>>


getPreUpgradeClosedPnl() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeClosedPnlParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<ClosedPnLV5[], CategoryV5>>>


getPreUpgradeOptionDeliveryRecord() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeOptionDeliveryRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeOptionsDelivery[], CategoryV5>>>


getPreUpgradeOrderHistory() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeOrderHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<AccountOrderV5[], CategoryV5>>>


getPreUpgradeTradeHistory() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeTradeHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[], CategoryV5>>>


getPreUpgradeTransactions() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeTransactionLogParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: PreUpgradeTransaction[]; nextPageCursor: string; }>>


getPreUpgradeUSDCSessionSettlements() ​

ts
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 ​

ParameterType
paramsGetPreUpgradeUSDCSessionParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<PreUpgradeUSDCSessionSettlement[], CategoryV5>>>


getPrivate() ​

ts
getPrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.getPrivate


getPublicTradingHistory() ​

ts
getPublicTradingHistory(params: GetPublicTradingHistoryParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<PublicTradeV5[], CategoryV5>>>;

Query recent public trading data in Bybit.

Covers: Spot / Linear contract / Inverse contract / Option

Parameters ​

ParameterType
paramsGetPublicTradingHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<PublicTradeV5[], CategoryV5>>>


getPuzzleProjectList() ​

ts
getPuzzleProjectList(params: GetPuzzleProjectListParamsV5): Promise<APIResponseV3WithTime<PuzzleProjectListResultV5>>;

Parameters ​

ParameterType
paramsGetPuzzleProjectListParamsV5

Returns ​

Promise<APIResponseV3WithTime<PuzzleProjectListResultV5>>


getPwmAllFundOrders() ​

ts
getPwmAllFundOrders(params?: GetPwmAllFundOrdersParamsV5): Promise<APIResponseV3WithTime<PwmAllFundOrdersResultV5>>;

Get all PWM fund orders (asset manager). Default time window: last 7 days.

Parameters ​

ParameterType
params?GetPwmAllFundOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmAllFundOrdersResultV5>>


getPwmAllFunds() ​

ts
getPwmAllFunds(params?: GetPwmAllFundsParamsV5): Promise<APIResponseV3WithTime<PwmAllFundsResultV5>>;

Get all PWM funds managed by the institution (newest first).

Parameters ​

ParameterType
params?GetPwmAllFundsParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmAllFundsResultV5>>


getPwmAssetManagerInvestmentPlans() ​

ts
getPwmAssetManagerInvestmentPlans(params?: GetPwmAssetManagerInvestmentPlansParamsV5): Promise<APIResponseV3WithTime<PwmAssetManagerInvestmentPlansResultV5>>;

Get PWM investment plans created by the institution (asset manager).

Parameters ​

ParameterType
params?GetPwmAssetManagerInvestmentPlansParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmAssetManagerInvestmentPlansResultV5>>


getPwmFundHistoricalNav() ​

ts
getPwmFundHistoricalNav(params: GetPwmFundHistoricalNavParamsV5): Promise<APIResponseV3WithTime<PwmFundHistoricalNavResultV5>>;

Get PWM fund historical NAV (max 180 days between startTime and endTime).

Parameters ​

ParameterType
paramsGetPwmFundHistoricalNavParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmFundHistoricalNavResultV5>>


getPwmFundTransferRecords() ​

ts
getPwmFundTransferRecords(params?: GetPwmFundTransferRecordsParamsV5): Promise<APIResponseV3WithTime<PwmFundTransferRecordV5>>;

Query PWM fund transfer result (fund custodian API key required).

Parameters ​

ParameterType
params?GetPwmFundTransferRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmFundTransferRecordV5>>


getPwmInvestmentPlanAssetTrend() ​

ts
getPwmInvestmentPlanAssetTrend(params: GetPwmInvestmentPlanAssetTrendParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanAssetTrendResultV5>>;

Get PWM investment plan asset trend (default last 7 days).

Parameters ​

ParameterType
paramsGetPwmInvestmentPlanAssetTrendParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmInvestmentPlanAssetTrendResultV5>>


getPwmInvestmentPlanDetail() ​

ts
getPwmInvestmentPlanDetail(params: GetPwmInvestmentPlanDetailParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanDetailV5>>;

Get PWM investment plan detail (Active or Closed).

Parameters ​

ParameterType
paramsGetPwmInvestmentPlanDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmInvestmentPlanDetailV5>>


getPwmInvestmentPlanList() ​

ts
getPwmInvestmentPlanList(): Promise<APIResponseV3WithTime<PwmInvestmentPlanListResultV5>>;

Get all PWM investment plans.

Returns ​

Promise<APIResponseV3WithTime<PwmInvestmentPlanListResultV5>>


getPwmInvestmentPlanOrders() ​

ts
getPwmInvestmentPlanOrders(params?: GetPwmInvestmentPlanOrdersParamsV5): Promise<APIResponseV3WithTime<PwmInvestmentPlanOrdersResultV5>>;

Get PWM investment plan orders (subscribe / redeem / auto-reinvest).

Parameters ​

ParameterType
params?GetPwmInvestmentPlanOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmInvestmentPlanOrdersResultV5>>


getPwmPendingInvestmentPlanDetail() ​

ts
getPwmPendingInvestmentPlanDetail(params: GetPwmPendingInvestmentPlanDetailParamsV5): Promise<APIResponseV3WithTime<PwmPendingInvestmentPlanDetailV5>>;

Get pending PWM investment plan detail (PendingSubscription).

Parameters ​

ParameterType
paramsGetPwmPendingInvestmentPlanDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmPendingInvestmentPlanDetailV5>>


getPwmSubscribableProductInfo() ​

ts
getPwmSubscribableProductInfo(): Promise<APIResponseV3WithTime<PwmSubscribableProductInfoResultV5>>;

Get PWM subscribable product info for customize plan. No authentication required.

Returns ​

Promise<APIResponseV3WithTime<PwmSubscribableProductInfoResultV5>>


getQueryApiKey() ​

ts
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() ​

ts
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() ​

ts
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() ​

ts
getReferralCode(): Promise<APIResponseV3WithTime<ReferralCodesResultV5>>;

Returns ​

Promise<APIResponseV3WithTime<ReferralCodesResultV5>>


getReferralCommissionRecords() ​

ts
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 ​

ParameterType
params?GetReferralCommissionRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<ReferralCommissionRecordsResultV5>>


getReferralUserIdentityProfile() ​

ts
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() ​

ts
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 ​

ParameterType
params?GetReferralUserInvitationsParamsV5

Returns ​

Promise<APIResponseV3WithTime<ReferralUserInvitationsResultV5>>


getRenewOrderInfoFixed() ​

ts
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 ​

ParameterType
params?GetRenewOrderInfoFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: RenewOrderInfoFixedV5[]; nextPageCursor: string; }>>


getRepaymentHistory() ​

ts
getRepaymentHistory(params?: GetRepaymentHistoryParamsV5): Promise<APIResponseV3WithTime<{
  list: RepaymentHistoryV5[];
  nextPageCursor: string;
}>>;

Get Repayment Transaction History Query repaid transaction history

Parameters ​

ParameterType
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() ​

ts
getRepaymentHistoryFixed(params?: GetRepaymentHistoryFixedParamsV5): Promise<APIResponseV3WithTime<{
  list: RepaymentHistoryFixedV5[];
  nextPageCursor: string;
}>>;

Get Repayment History

Parameters ​

ParameterType
params?GetRepaymentHistoryFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: RepaymentHistoryFixedV5[]; nextPageCursor: string; }>>


getRepaymentHistoryFlexible() ​

ts
getRepaymentHistoryFlexible(params?: GetRepaymentHistoryFlexibleParamsV5): Promise<APIResponseV3WithTime<{
  list: RepaymentHistoryFlexibleV5[];
  nextPageCursor: string;
}>>;

Get Repayment Orders History

Parameters ​

ParameterType
params?GetRepaymentHistoryFlexibleParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: RepaymentHistoryFlexibleV5[]; nextPageCursor: string; }>>


getRFQConfig() ​

ts
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() ​

ts
getRFQDetails(params?: GetRFQDetailsParamsV5): Promise<APIResponseV3WithTime<{
  cursor: string;
  list: RFQDetailItemV5[];
}>>;

Parameters ​

ParameterType
params?GetRFQDetailsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ cursor: string; list: RFQDetailItemV5[]; }>>


getRFQHistory() ​

ts
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 ​

ParameterType
params?GetRFQListParamsV5

Returns ​

Promise<APIResponseV3WithTime<RFQHistory>>


getRFQHistoryQuote() ​

ts
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 ​

ParameterType
params?GetRFQHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ cursor: string; list: RFQQuoteItemV5[]; }>>


getRFQPublicTrades() ​

ts
getRFQPublicTrades(params?: GetRFQPublicTradesParamsV5): Promise<APIResponseV3WithTime<{
  cursor: string;
  list: RFQPublicTradeV5[];
}>>;

Get RFQ Public Transaction Data Get the recently executed RFQ successfullys

Parameters ​

ParameterType
params?GetRFQPublicTradesParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ cursor: string; list: RFQPublicTradeV5[]; }>>


getRFQRealtimeInfo() ​

ts
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 ​

ParameterType
params?GetRFQRealtimeParamsV5

Returns ​

Promise<APIResponseV3WithTime<GetRFQRealtimeResultV5>>


getRFQRealtimeQuote() ​

ts
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 ​

ParameterType
params?GetRFQQuoteRealtimeParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: RFQQuoteItemV5[]; }>>


getRFQTrades() ​

ts
getRFQTrades(params?: GetRFQTradeListParamsV5): Promise<APIResponseV3WithTime<{
  cursor: string;
  list: RFQTradeV5[];
}>>;

Get Trade Information Obtain transaction information executed by the user

Parameters ​

ParameterType
params?GetRFQTradeListParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ cursor: string; list: RFQTradeV5[]; }>>


getRiskLimit() ​

ts
getRiskLimit(params?: GetRiskLimitParamsV5): Promise<APIResponseV3WithTime<CategoryListV5<RiskLimitV5[], "linear" | "inverse">>>;

Query risk limit of futures

Covers: Linear contract / Inverse contract

Parameters ​

ParameterType
params?GetRiskLimitParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<RiskLimitV5[], "linear" | "inverse">>>


getRPIOrderbook() ​

ts
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 ​

ParameterType
paramsGetRPIOrderbookParamsV5

Returns ​

Promise<APIResponseV3WithTime<RPIOrderbookResponseV5>>


getRWANavChart() ​

ts
getRWANavChart(params: GetRWANavChartParamsV5): Promise<APIResponseV3WithTime<RWANavChartResultV5>>;

Get RWA NAV Chart NAV history for an RWA product (public; max 180-day span).

Parameters ​

ParameterType
paramsGetRWANavChartParamsV5

Returns ​

Promise<APIResponseV3WithTime<RWANavChartResultV5>>


getRWAOrderList() ​

ts
getRWAOrderList(params?: GetRWAOrderListParamsV5): Promise<APIResponseV3WithTime<RWAOrderListResultV5>>;

Get RWA Order List

Parameters ​

ParameterType
params?GetRWAOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<RWAOrderListResultV5>>


getRWAPositionList() ​

ts
getRWAPositionList(): Promise<APIResponseV3WithTime<RWAPositionListResultV5>>;

Get RWA Position List

Returns ​

Promise<APIResponseV3WithTime<RWAPositionListResultV5>>


getRWAProductList() ​

ts
getRWAProductList(params?: GetRWAProductListParamsV5): Promise<APIResponseV3WithTime<RWAProductListResultV5>>;

Get RWA Product List Real World Assets earn products. Auth optional; userQuota populated when authenticated.

Parameters ​

ParameterType
params?GetRWAProductListParamsV5

Returns ​

Promise<APIResponseV3WithTime<RWAProductListResultV5>>


getServerTime() ​

ts
getServerTime(): Promise<APIResponseV3WithTime<{
  timeNano: string;
  timeSecond: string;
}>>;

Returns ​

Promise<APIResponseV3WithTime<{ timeNano: string; timeSecond: string; }>>


getSettlementRecords() ​

ts
getSettlementRecords(params: GetSettlementRecordParamsV5): Promise<APIResponseV3WithTime<CategoryCursorListV5<SettlementRecordV5[], CategoryV5>>>;

Query session settlement records of USDC perpetual

Covers: Linear contract (USDC Perpetual only, Unified Account)

Parameters ​

ParameterType
paramsGetSettlementRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<CategoryCursorListV5<SettlementRecordV5[], CategoryV5>>>


getSmallBalanceList() ​

ts
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 ​

ParameterType
paramsGetSmallBalanceListParamsV5

Returns ​

Promise<APIResponseV3WithTime<SmallBalanceListV5>>


getSMPGroup() ​

ts
getSMPGroup(): Promise<APIResponseV3WithTime<{
  smpGroup: string;
}>>;

Query the SMP group ID of self match prevention.

Returns ​

Promise<APIResponseV3WithTime<{ smpGroup: string; }>>


getSpotBorrowCheck() ​

ts
getSpotBorrowCheck(symbol: string, side: OrderSideV5): Promise<APIResponseV3WithTime<SpotBorrowCheckResultV5>>;

Query the qty and amount of borrowable coins in spot account.

Covers: Spot (Unified Account)

Parameters ​

ParameterType
symbolstring
sideOrderSideV5

Returns ​

Promise<APIResponseV3WithTime<SpotBorrowCheckResultV5>>


getSpotMarginBorrowableCoinInfo() ​

ts
getSpotMarginBorrowableCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
  list: object[];
}>>;

Get Borrowable Coin Info

Parameters ​

ParameterType
coin?string

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; }>>


getSpotMarginBorrowOrderDetail() ​

ts
getSpotMarginBorrowOrderDetail(params?: object): Promise<APIResponseV3WithTime<{
  list: object[];
}>>;

Get Borrow Order Detail

Parameters ​

ParameterType
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() ​

ts
getSpotMarginCoinInfo(coin?: string): Promise<APIResponseV3WithTime<{
  list: object[];
}>>;

Get Margin Coin Info

Parameters ​

ParameterType
coin?string

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; }>>


getSpotMarginCurrencyData() ​

ts
getSpotMarginCurrencyData(params?: GetSpotMarginCurrencyDataParamsV5): Promise<APIResponseV3WithTime<{
  list: SpotMarginCurrencyDataV5[];
}>>;

Get Currency Data Borrowing currency data: flexible/fixed manual borrow, min qty, precision, interest rate range.

Parameters ​

ParameterType
params?GetSpotMarginCurrencyDataParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SpotMarginCurrencyDataV5[]; }>>


getSpotMarginInterestAndQuota() ​

ts
getSpotMarginInterestAndQuota(coin: string): Promise<APIResponseV3WithTime<{
  list: object[];
}>>;

Get Interest & Quota

Parameters ​

ParameterType
coinstring

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; }>>


getSpotMarginLiability() ​

ts
getSpotMarginLiability(params: GetSpotMarginLiabilityInfoParamsV5): Promise<APIResponseV3WithTime<SpotMarginLiabilityInfoV5>>;

Get Liability Info (spot margin UTA): fixed vs floating, spot vs derivatives borrow split.

Parameters ​

ParameterType
paramsGetSpotMarginLiabilityInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<SpotMarginLiabilityInfoV5>>


getSpotMarginLoanAccountInfo() ​

ts
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() ​

ts
getSpotMarginRepaymentOrderDetail(params?: object): Promise<APIResponseV3WithTime<{
  list: object[];
}>>;

Get Repayment Order Detail

Parameters ​

ParameterType
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() ​

ts
getSpotMarginState(): Promise<APIResponseV3WithTime<SpotMarginStateV5>>;

Query the Spot margin status and leverage of Unified account.

Covers: Margin trade (Unified Account)

Returns ​

Promise<APIResponseV3WithTime<SpotMarginStateV5>>


getSpreadInstrumentsInfo() ​

ts
getSpreadInstrumentsInfo(params?: GetSpreadInstrumentsInfoParamsV5): Promise<APIResponseV3WithTime<{
  list: SpreadInstrumentInfoV5[];
  nextPageCursor: string;
}>>;

Get Spread Instruments Info

Parameters ​

ParameterType
params?GetSpreadInstrumentsInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadInstrumentInfoV5[]; nextPageCursor: string; }>>


getSpreadMaxQty() ​

ts
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 ​

ParameterType
paramsGetSpreadMaxQtyParamsV5

Returns ​

Promise<APIResponseV3WithTime<SpreadMaxQtyResultV5>>


getSpreadOpenOrders() ​

ts
getSpreadOpenOrders(params?: GetSpreadOpenOrdersParamsV5): Promise<APIResponseV3WithTime<{
  list: SpreadOpenOrderV5[];
  nextPageCursor: string;
}>>;

Get Spread Open Orders Query unfilled or partially filled orders in real-time.

Parameters ​

ParameterType
params?GetSpreadOpenOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadOpenOrderV5[]; nextPageCursor: string; }>>


getSpreadOrderbook() ​

ts
getSpreadOrderbook(params: object): Promise<APIResponseV3WithTime<SpreadOrderbookResponseV5>>;

Get Spread Orderbook

Parameters ​

ParameterType
params{ limit?: number; symbol: string; }
params.limit?number
params.symbolstring

Returns ​

Promise<APIResponseV3WithTime<SpreadOrderbookResponseV5>>


getSpreadOrderHistory() ​

ts
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 ​

ParameterType
params?GetSpreadOrderHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadOrderHistoryV5[]; nextPageCursor: string; }>>


getSpreadRecentTrades() ​

ts
getSpreadRecentTrades(params: object): Promise<APIResponseV3WithTime<{
  list: SpreadRecentTradeV5[];
}>>;

Get Spread Public Recent Trades

Parameters ​

ParameterType
params{ limit?: number; symbol: string; }
params.limit?number
params.symbolstring

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadRecentTradeV5[]; }>>


getSpreadTickers() ​

ts
getSpreadTickers(params: object): Promise<APIResponseV3WithTime<{
  list: SpreadTickerV5[];
}>>;

Get Spread Tickers

Parameters ​

ParameterType
params{ symbol: string; }
params.symbolstring

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadTickerV5[]; }>>


getSpreadTradeHistory() ​

ts
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 ​

ParameterType
params?GetSpreadTradeHistoryParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SpreadTradeV5[]; nextPageCursor: string; }>>


getStrategyList() ​

ts
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 ​

ParameterType
params?GetStrategyListParamsV5

Returns ​

Promise<APIResponseV3WithTime<StrategyListResultV5>>


getStrategyOrderList() ​

ts
getStrategyOrderList(params: GetStrategyOrderListParamsV5): Promise<APIResponseV3WithTime<StrategyOrderListResultV5>>;

Get Strategy Order List

Query the individual orders generated by a specific strategy.

Parameters ​

ParameterType
paramsGetStrategyOrderListParamsV5

Returns ​

Promise<APIResponseV3WithTime<StrategyOrderListResultV5>>


getSubAccountAllApiKeys() ​

ts
getSubAccountAllApiKeys(params: GetSubAccountAllApiKeysParamsV5): Promise<APIResponseV3WithTime<{
  nextPageCursor: string;
  result: ApiKeyInfoV5[];
}>>;

Query all api keys information of a sub UID.

Parameters ​

ParameterType
paramsGetSubAccountAllApiKeysParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; result: ApiKeyInfoV5[]; }>>


getSubAccountDepositRecords() ​

ts
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 ​

ParameterType
paramsGetSubAccountDepositRecordParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: DepositRecordV5[]; }>>


getSubDepositAddress() ​

ts
getSubDepositAddress(
   coin: string, 
   chainType: string, 
   subMemberId: string
): Promise<APIResponseV3WithTime<{
  chains: DepositAddressChainV5;
  coin: string;
}>>;

Query the deposit address information of SUB account.

Parameters ​

ParameterType
coinstring
chainTypestring
subMemberIdstring

Returns ​

Promise<APIResponseV3WithTime<{ chains: DepositAddressChainV5; coin: string; }>>


getSubUID() ​

ts
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() ​

ts
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() ​

ts
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 ​

ParameterType
params?{ nextCursor?: string; pageSize?: string; }
params.nextCursor?string
params.pageSize?string

Returns ​

Promise<APIResponseV3WithTime<{ nextCursor: string; subMembers: SubMemberV5[]; }>>


getSupplyContractInfoFixed() ​

ts
getSupplyContractInfoFixed(params?: GetSupplyContractInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
  list: SupplyContractInfoFixedV5[];
  nextPageCursor: string;
}>>;

Get Supply Contract Info

Parameters ​

ParameterType
params?GetSupplyContractInfoFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SupplyContractInfoFixedV5[]; nextPageCursor: string; }>>


getSupplyOrderInfoFixed() ​

ts
getSupplyOrderInfoFixed(params?: GetSupplyOrderInfoFixedParamsV5): Promise<APIResponseV3WithTime<{
  list: SupplyOrderInfoFixedV5[];
  nextPageCursor: string;
}>>;

Get Supply Order Info

Parameters ​

ParameterType
params?GetSupplyOrderInfoFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SupplyOrderInfoFixedV5[]; nextPageCursor: string; }>>


getSupplyOrderQuoteFixed() ​

ts
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 ​

ParameterType
paramsGetSupplyOrderQuoteFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SupplyOrderQuoteFixedV5[]; }>>


getSystemStatus() ​

ts
getSystemStatus(params?: GetSystemStatusParamsV5): Promise<APIResponseV3WithTime<{
  list: SystemStatusItemV5[];
}>>;

***** Misc Bybit APIs

Parameters ​

ParameterType
params?GetSystemStatusParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: SystemStatusItemV5[]; }>>


getTaxBatchExport() ​

ts
getTaxBatchExport(params: GetTaxBatchExportParamsV5): Promise<APIResponseV3WithTime<TaxBatchExportStatusV5>>;

Query tax batch export task status and download URLs by batchId.

Parameters ​

ParameterType
paramsGetTaxBatchExportParamsV5

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 ​

ts
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 ​
ParameterType
paramsGetTickersParamsV5<"linear" | "inverse">
Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<TickerLinearInverseV5[], "linear" | "inverse">>>

Example ​
ts
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 ​

Quickstart

Call Signature ​

ts
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 ​
ParameterType
paramsGetTickersParamsV5<"option">
Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<TickerOptionV5[], "option">>>

Example ​
ts
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 ​

Quickstart

Call Signature ​

ts
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 ​
ParameterType
paramsGetTickersParamsV5<"spot">
Returns ​

Promise<APIResponseV3WithTime<CategoryListV5<TickerSpotV5[], "spot">>>

Example ​
ts
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 ​

Quickstart


getTokenSplashProjectList() ​

ts
getTokenSplashProjectList(params: GetTokenSplashProjectListParamsV5): Promise<APIResponseV3WithTime<TokenSplashProjectListResultV5>>;

Parameters ​

ParameterType
paramsGetTokenSplashProjectListParamsV5

Returns ​

Promise<APIResponseV3WithTime<TokenSplashProjectListResultV5>>


getTokenSplashUserActivityParams() ​

ts
getTokenSplashUserActivityParams(params?: GetTokenSplashUserActivityParamsV5): Promise<APIResponseV3WithTime<TokenSplashUserActivityResultV5>>;

Parameters ​

ParameterType
params?GetTokenSplashUserActivityParamsV5

Returns ​

Promise<APIResponseV3WithTime<TokenSplashUserActivityResultV5>>


getTotalMembersAssets() ​

ts
getTotalMembersAssets(params?: GetTotalMembersAssetsParamsV5): Promise<APIResponseV3WithTime<TotalMembersAssetsResultV5>>;

Get Total Members Assets Master + sub-accounts; optional coin for valuation (default BTC).

Parameters ​

ParameterType
params?GetTotalMembersAssetsParamsV5

Returns ​

Promise<APIResponseV3WithTime<TotalMembersAssetsResultV5>>


getTradeInfoForAnalysis() ​

ts
getTradeInfoForAnalysis(params: GetTradeInfoForAnalysisParamsV5): Promise<APIResponseV3WithTime<TradeInfoForAnalysisResultV5>>;

Get Trade Info For Analysis Aggregated spot trade stats for a symbol, including daily breakdown when returned.

Parameters ​

ParameterType
paramsGetTradeInfoForAnalysisParamsV5

Returns ​

Promise<APIResponseV3WithTime<TradeInfoForAnalysisResultV5>>


getTransactionLog() ​

ts
getTransactionLog(params?: GetTransactionLogParamsV5): Promise<APIResponseV3WithTime<CursorListV5<TransactionLogV5[]>>>;

Query transaction logs in Unified account.

Parameters ​

ParameterType
params?GetTransactionLogParamsV5

Returns ​

Promise<APIResponseV3WithTime<CursorListV5<TransactionLogV5[]>>>


getTransferableAmount() ​

ts
getTransferableAmount(params: object): Promise<APIResponseV3WithTime<{
  availableWithdrawal: string;
}>>;

Query the available amount to transfer of a specific coin in the Unified wallet.

Parameters ​

ParameterType
params{ coinName: string; }
params.coinNamestring

Returns ​

Promise<APIResponseV3WithTime<{ availableWithdrawal: string; }>>


getTransferableCoinList() ​

ts
getTransferableCoinList(fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise<APIResponseV3WithTime<{
  list: string[];
}>>;

Query the transferable coin list between each account type.

Parameters ​

ParameterType
fromAccountTypeAccountTypeV5
toAccountTypeAccountTypeV5

Returns ​

Promise<APIResponseV3WithTime<{ list: string[]; }>>


getUIDWalletType() ​

ts
getUIDWalletType(params: object): Promise<APIResponseV3WithTime<{
  accounts: object[];
}>>;

Parameters ​

ParameterType
params{ memberIds: string; }
params.memberIdsstring

Returns ​

Promise<APIResponseV3WithTime<{ accounts: object[]; }>>


getUniversalTransferRecords() ​

ts
getUniversalTransferRecords(params?: GetUniversalTransferRecordsParamsV5): Promise<APIResponseV3WithTime<CursorListV5<UniversalTransferRecordV5[]>>>;

Query universal transfer records

CAUTION Can query by the master UID's API key only

Parameters ​

ParameterType
params?GetUniversalTransferRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<CursorListV5<UniversalTransferRecordV5[]>>>


getUnpaidLoanOrders() ​

ts
getUnpaidLoanOrders(params?: GetUnpaidLoanOrdersParamsV5): Promise<APIResponseV3WithTime<{
  list: UnpaidLoanOrderV5[];
  nextPageCursor: string;
}>>;

Get Unpaid Loan Orders Query the ongoing loan orders, which are not fully repaid

Parameters ​

ParameterType
params?GetUnpaidLoanOrdersParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: UnpaidLoanOrderV5[]; nextPageCursor: string; }>>

Deprecated ​

  • Use "Crypto Loan - New" Endpoints instead

Permission: "Spot trade"


getVIPMarginData() ​

ts
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 ​

ParameterType
params?GetVIPMarginDataParamsV5

Returns ​

Promise<APIResponseV3WithTime<VIPMarginDataV5>>


getWalletBalance() ​

ts
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 ​

ParameterType
paramsGetWalletBalanceParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: WalletBalanceV5[]; }>>


getWithdrawableAmount() ​

ts
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 ​

ParameterType
params{ coin: string; }
params.coinstring

Returns ​

Promise<APIResponseV3WithTime<WithdrawableAmountV5>>


getWithdrawalAddressList() ​

ts
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 ​

ParameterType
params?GetWithdrawalAddressListParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ nextPageCursor: string; rows: WithdrawalAddressV5[]; }>>


getWithdrawalRecords() ​

ts
getWithdrawalRecords(params?: GetWithdrawalRecordsParamsV5): Promise<APIResponseV3<CursorRowsV5<WithdrawalRecordV5[]>, {
}>>;

Query withdrawal records.

Parameters ​

ParameterType
params?GetWithdrawalRecordsParamsV5

Returns ​

Promise<APIResponseV3<CursorRowsV5<WithdrawalRecordV5[]>, { }>>


investMorePwmInvestmentPlan() ​

ts
investMorePwmInvestmentPlan(params: InvestMorePwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<InvestMorePwmInvestmentPlanResultV5>>;

Invest more into a PWM investment plan product (Active).

Parameters ​

ParameterType
paramsInvestMorePwmInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<InvestMorePwmInvestmentPlanResultV5>>


issueBrokerVoucher() ​

ts
issueBrokerVoucher(params: IssueVoucherParamsV5): Promise<APIResponseV3<undefined, {
}>>;

Issue a voucher to a user

INFO Use exchange broker master account to issue

Parameters ​

ParameterType
paramsIssueVoucherParamsV5

Returns ​

Promise<APIResponseV3<undefined, { }>>


managePwmAssetManagerInvestmentPlan() ​

ts
managePwmAssetManagerInvestmentPlan(params: ManagePwmAssetManagerInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<ManagePwmAssetManagerInvestmentPlanResultV5>>;

Manage a PWM investment plan (status and/or fund allocation).

Parameters ​

ParameterType
paramsManagePwmAssetManagerInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<ManagePwmAssetManagerInvestmentPlanResultV5>>


managePwmFundOrder() ​

ts
managePwmFundOrder(params: ManagePwmFundOrderParamsV5): Promise<APIResponseV3WithTime<ManagePwmFundOrderResultV5>>;

Manage a PWM fund order (approve / reject Pending Review orders).

Parameters ​

ParameterType
paramsManagePwmFundOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<ManagePwmFundOrderResultV5>>


manualBorrow() ​

ts
manualBorrow(params: ManualBorrowParamsV5): Promise<APIResponseV3WithTime<ManualBorrowResultV5>>;

Manual borrow for UTA

Parameters ​

ParameterType
paramsManualBorrowParamsV5

Returns ​

Promise<APIResponseV3WithTime<ManualBorrowResultV5>>


manualRepay() ​

ts
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 ​

ParameterType
params?ManualRepayParamsV5

Returns ​

Promise<APIResponseV3WithTime<ManualRepayResultV5>>


manualRepayWithoutConversion() ​

ts
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 ​

ParameterType
paramsManualRepayWithoutConversionParamsV5

Returns ​

Promise<APIResponseV3WithTime<ManualRepayWithoutConversionResultV5>>


markP2POrderAsPaid() ​

ts
markP2POrderAsPaid(params: MarkP2POrderAsPaidParamsV5): Promise<APIResponseV3WithTime<null>>;

Mark P2P order as paid

Parameters ​

ParameterType
paramsMarkP2POrderAsPaidParamsV5

Returns ​

Promise<APIResponseV3WithTime<null>>


modifyEarnPosition() ​

ts
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 ​

ParameterType
paramsModifyEarnPositionParamsV5

Returns ​

Promise<APIResponseV3WithTime<Record<string, never>>>


movePosition() ​

ts
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 ​

ParameterType
paramsMovePositionParamsV5

Returns ​

Promise<APIResponseV3WithTime<MovePositionResultV5>>


placeRWAOrder() ​

ts
placeRWAOrder(params: PlaceRWAOrderParamsV5): Promise<APIResponseV3WithTime<PlaceRWAOrderResultV5>>;

Place RWA Order Stake or redeem RWA product. Async — use getRWAOrderList to track status.

Parameters ​

ParameterType
paramsPlaceRWAOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<PlaceRWAOrderResultV5>>


post() ​

ts
post(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.post


postPrivate() ​

ts
postPrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivate


postPrivateFile() ​

ts
postPrivateFile(
   endpoint: string, 
   params?: FileUploadRequestParams, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?FileUploadRequestParams
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivateFile


preCheckOrder() ​

ts
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 ​

ParameterType
paramsOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<PreCheckOrderResultV5>>


pwmFundTransfer() ​

ts
pwmFundTransfer(params: PwmFundTransferParamsV5): Promise<APIResponseV3WithTime<PwmFundTransferResultV5>>;

Transfer funds between custodian sub-accounts (fund custodian API key required).

Parameters ​

ParameterType
paramsPwmFundTransferParamsV5

Returns ​

Promise<APIResponseV3WithTime<PwmFundTransferResultV5>>


queryApiRateLimit() ​

ts
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 ​

ParameterType
params{ uids: string; }
params.uidsstring

Returns ​

Promise<APIResponseV3WithTime<{ list: object[]; }>>


queryCardAssetRecords() ​

ts
queryCardAssetRecords(params?: QueryCardAssetRecordsParamsV5): Promise<APIResponseV3WithTime<CardAssetRecordsResultV5>>;

Bybit Card — query card transaction / asset history (filter by status, card digits, merchant, time, type, …).

Parameters ​

ParameterType
params?QueryCardAssetRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<CardAssetRecordsResultV5>>


queryCardMallItemList() ​

ts
queryCardMallItemList(params?: QueryCardMallItemListParamsV5): Promise<APIResponseV3WithTime<CardMallItemListResultV5>>;

Bybit Card — reward mall item list.

Parameters ​

ParameterType
params?QueryCardMallItemListParamsV5

Returns ​

Promise<APIResponseV3WithTime<CardMallItemListResultV5>>


queryCardPointCashbackDetail() ​

ts
queryCardPointCashbackDetail(params: QueryCardPointCashbackDetailParamsV5): Promise<APIResponseV3WithTime<CardPointCashbackDetailV5>>;

Bybit Card — cashback detail for a reward order.

Parameters ​

ParameterType
paramsQueryCardPointCashbackDetailParamsV5

Returns ​

Promise<APIResponseV3WithTime<CardPointCashbackDetailV5>>


queryCardPointsBalance() ​

ts
queryCardPointsBalance(): Promise<APIResponseV3WithTime<CardPointBalanceV5>>;

Bybit Card — point balance (available, pending, account status, …).

Returns ​

Promise<APIResponseV3WithTime<CardPointBalanceV5>>


queryCardPointsRecords() ​

ts
queryCardPointsRecords(params?: QueryCardPointRecordsParamsV5): Promise<APIResponseV3WithTime<CardPointRecordsResultV5>>;

Bybit Card — point transaction records.

Parameters ​

ParameterType
params?QueryCardPointRecordsParamsV5

Returns ​

Promise<APIResponseV3WithTime<CardPointRecordsResultV5>>


queryCardPointsTier() ​

ts
queryCardPointsTier(): Promise<APIResponseV3WithTime<CardPointTierInfoV5>>;

Bybit Card — reward tier, spending limit, auto cashback.

Returns ​

Promise<APIResponseV3WithTime<CardPointTierInfoV5>>


querySubMemberAddress() ​

ts
querySubMemberAddress(
   coin: string, 
   chainType: string, 
   subMemberId: string
): Promise<APIResponseV3<{
  chains: DepositAddressChainV5;
  coin: string;
}, {
}>>;

Parameters ​

ParameterType
coinstring
chainTypestring
subMemberIdstring

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() ​

ts
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 ​

ParameterType
paramsRedeemFixedTermEarnParamsV5

Returns ​

Promise<APIResponseV3WithTime<RedeemFixedTermEarnResultV5>>


redeemPwmInvestmentPlan() ​

ts
redeemPwmInvestmentPlan(params: RedeemPwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<RedeemPwmInvestmentPlanResultV5>>;

Redeem from a PWM investment plan product.

Parameters ​

ParameterType
paramsRedeemPwmInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<RedeemPwmInvestmentPlanResultV5>>


reinvestLiquidityMining() ​

ts
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 ​

ParameterType
paramsReinvestLiquidityMiningParamsV5

Returns ​

Promise<APIResponseV3WithTime<ReinvestLiquidityMiningResultV5>>


releaseP2POrder() ​

ts
releaseP2POrder(params: object): Promise<APIResponseV3WithTime<null>>;

Release digital assets in a P2P order

Parameters ​

ParameterType
params{ orderId: string; }
params.orderIdstring

Returns ​

Promise<APIResponseV3WithTime<null>>


renewBorrowOrderFixed() ​

ts
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 ​

ParameterType
paramsRenewBorrowOrderFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<RenewBorrowOrderFixedV5>>


renewFixedRateBorrow() ​

ts
renewFixedRateBorrow(params: RenewFixedRateBorrowParamsV5): Promise<APIResponseV3WithTime<string>>;

Renew a fixed-rate loan contract (full remaining amount if qty omitted).

Parameters ​

ParameterType
paramsRenewFixedRateBorrowParamsV5

Returns ​

Promise<APIResponseV3WithTime<string>>


repayCollateralFixed() ​

ts
repayCollateralFixed(params: RepayCollateralFixedParamsV5): Promise<APIResponseV3WithTime<{
}>>;

Collateral Repayment Pay interest first, then repay the principal.

Parameters ​

ParameterType
paramsRepayCollateralFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


repayCollateralFlexible() ​

ts
repayCollateralFlexible(params: RepayCollateralFlexibleParamsV5): Promise<APIResponseV3WithTime<{
}>>;

Collateral Repayment Pay interest first, then repay the principal.

Parameters ​

ParameterType
paramsRepayCollateralFlexibleParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


repayCryptoLoan() ​

ts
repayCryptoLoan(params: object): Promise<APIResponseV3WithTime<{
  repayId: string;
}>>;

Repay Crypto Loan

Parameters ​

ParameterType
params{ amount: string; orderId: string; }
params.amountstring
params.orderIdstring

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() ​

ts
repayFixed(params: RepayFixedParamsV5): Promise<APIResponseV3WithTime<RepayFixedV5>>;

Repay Fixed Loan Either loanId or loanCurrency needs to be passed

Parameters ​

ParameterType
paramsRepayFixedParamsV5

Returns ​

Promise<APIResponseV3WithTime<RepayFixedV5>>


repayFlexible() ​

ts
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 ​

ParameterType
paramsRepayFlexibleParamsV5

Returns ​

Promise<APIResponseV3WithTime<RepayFlexibleV5>>


repayInstitutionalLoan() ​

ts
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 ​

ParameterType
paramsRepayInstitutionalLoanParamsV5

Returns ​

Promise<APIResponseV3WithTime<RepayInstitutionalLoanResultV5>>


repayLiability() ​

ts
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 ​

ParameterType
params?RepayLiabilityParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ list: RepayLiabilityResultV5[]; }>>


requestConvertQuote() ​

ts
requestConvertQuote(params: RequestConvertQuoteParamsV5): Promise<APIResponseV3WithTime<ConvertQuoteV5>>;

Request a quote for converting coins.

Parameters ​

ParameterType
paramsRequestConvertQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<ConvertQuoteV5>>


requestDemoTradingFunds() ​

ts
requestDemoTradingFunds(params?: object): Promise<APIResponseV3<{
}, {
}>>;

***** Demo Account APIs

Parameters ​

ParameterType
params?{ adjustType?: 0 | 1; utaDemoApplyMoney?: object[]; }
params.adjustType?0 | 1
params.utaDemoApplyMoney?object[]

Returns ​

Promise<APIResponseV3<{ }, { }>>


resetMMP() ​

ts
resetMMP(baseCoin: string): Promise<APIResponseV3<undefined, {
}>>;

Once the mmp triggered, you can unfreeze the account via this endpoint

Parameters ​

ParameterType
baseCoinstring

Returns ​

Promise<APIResponseV3<undefined, { }>>


reviewP2PSellerCancelOrderApply() ​

ts
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 ​

ParameterType
paramsReviewP2PSellerCancelOrderApplyParamsV5

Returns ​

Promise<APIResponseV3WithTime<null>>

See ​

https://bybit-exchange.github.io/docs/p2p/order/review-seller-cancel-order-apply


sendP2PChatMessage() ​

ts
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 ​

ParameterType
paramsSendP2PChatMessageParamsV5

Returns ​

Promise<{ rateLimitApi?: APIRateLimit; ret_code: number; ret_msg: string; }>

See ​

https://bybit-exchange.github.io/docs/p2p/chat/send-chat-msg


sendP2POrderMessage() ​

ts
sendP2POrderMessage(params: SendP2POrderMessageParamsV5): Promise<APIResponseV3WithTime<null>>;

Send chat message in a P2P order

Parameters ​

ParameterType
paramsSendP2POrderMessageParamsV5

Returns ​

Promise<APIResponseV3WithTime<null>>


setApiRateLimit() ​

ts
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 ​

ParameterType
params{ list: object[]; }
params.listobject[]

Returns ​

Promise<APIResponseV3WithTime<{ result: object[]; }>>


setAutoAddMargin() ​

ts
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 ​

ParameterType
paramsSetAutoAddMarginParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setAutoRepayMode() ​

ts
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 ​

ParameterType
paramsSetAutoRepayModeParamsV5

Returns ​

Promise<APIResponseV3WithTime<AutoRepayModeResultV5>>


setBrokerRateLimit() ​

ts
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 ​

ParameterType
paramsSetBrokerRateLimitParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ result: BrokerRateLimitSetResultItemV5[]; }>>


setCollateralCoin() ​

ts
setCollateralCoin(params: SetCollateralCoinParamsV5): Promise<APIResponseV3WithTime<{
}>>;

You can decide whether the assets in the Unified account needs to be collateral coins.

Parameters ​

ParameterType
paramsSetCollateralCoinParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setDeltaNeutralMode() ​

ts
setDeltaNeutralMode(params: SetDeltaNeutralModeParamsV5): Promise<APIResponseV3WithTime<Record<string, never>>>;

Set Delta Neutral Mode 1: enable, 0: disable. Query current status via getLimitPriceAction().

Parameters ​

ParameterType
paramsSetDeltaNeutralModeParamsV5

Returns ​

Promise<APIResponseV3WithTime<Record<string, never>>>


setDepositAccount() ​

ts
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 ​

ParameterType
params{ accountType: AccountTypeV5; }
params.accountTypeAccountTypeV5

Returns ​

Promise<APIResponseV3WithTime<{ status: 0 | 1; }>>


setDisconnectCancelAllWindow() ​

ts
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 ​

ParameterType
category"option"
timeWindownumber

Returns ​

Promise<APIResponseV3<undefined, { }>>


setDisconnectCancelAllWindowV2() ​

ts
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 ​

ParameterType
params{ product?: "SPOT" | "OPTION" | "DERIVATIVES"; timeWindow: number; }
params.product?"SPOT" | "OPTION" | "DERIVATIVES"
params.timeWindownumber

Returns ​

Promise<APIResponseV3<undefined, { }>>


setFixedTermEarnAutoInvest() ​

ts
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 ​

ParameterType
paramsSetFixedTermEarnAutoInvestParamsV5

Returns ​

Promise<APIResponseV3WithTime<Record<string, never>>>


setFlexibleSavingAutoSavings() ​

ts
setFlexibleSavingAutoSavings(params: SetFlexibleSavingAutoSavingsParamsV5): Promise<APIResponseV3WithTime<{
}>>;

Enable or disable Flexible Saving auto savings for one coin, or globally when coin is omitted.

Parameters ​

ParameterType
paramsSetFlexibleSavingAutoSavingsParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setLeverage() ​

ts
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 ​

ParameterType
paramsSetLeverageParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setLimitPriceAction() ​

ts
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 ​

ParameterType
paramsSetLimitPriceActionParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setMarginMode() ​

ts
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 ​

ParameterType
marginModeAccountMarginModeV5

Returns ​

Promise<APIResponseV3<{ reasons: object[]; }, { }>>


setMMP() ​

ts
setMMP(params: MMPModifyParamsV5): Promise<APIResponseV3<undefined, {
}>>;

Configure Market Maker Protection (MMP)

Parameters ​

ParameterType
paramsMMPModifyParamsV5

Returns ​

Promise<APIResponseV3<undefined, { }>>


setRiskLimit() ​

ts
setRiskLimit(params: SetRiskLimitParamsV5): Promise<APIResponseV3WithTime<SetRiskLimitResultV5>>;

Parameters ​

ParameterType
paramsSetRiskLimitParamsV5

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() ​

ts
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 ​

ParameterType
params{ setHedgingMode: "ON" | "OFF"; }
params.setHedgingMode"ON" | "OFF"

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setSpotMarginLeverage() ​

ts
setSpotMarginLeverage(leverage: string): Promise<APIResponseV3WithTime<{
}>>;

Parameters ​

ParameterType
leveragestring

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() ​

ts
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 ​

ParameterType
paramsSetSpotMarginLeverageParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


setSubUIDFrozenState() ​

ts
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 ​

ParameterType
subuidnumber
frozen0 | 1

Returns ​

Promise<APIResponseV3WithTime<{ }>>


settlePwmFundProfit() ​

ts
settlePwmFundProfit(params: SettlePwmFundProfitParamsV5): Promise<APIResponseV3WithTime<SettlePwmFundProfitResultV5>>;

Settle fund profit sharing (Active funds only).

Parameters ​

ParameterType
paramsSettlePwmFundProfitParamsV5

Returns ​

Promise<APIResponseV3WithTime<SettlePwmFundProfitResultV5>>


setTPSLMode() ​

ts
setTPSLMode(params: SetTPSLModeParamsV5): Promise<APIResponseV3WithTime<{
  tpSlMode: TPSLModeV5;
}>>;

Parameters ​

ParameterType
paramsSetTPSLModeParamsV5

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() ​

ts
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 ​

ParameterType
paramsSetTradingStopParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


signAgreement() ​

ts
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 ​

ParameterType
paramsSignAgreementParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


spotMarginBorrow() ​

ts
spotMarginBorrow(params: object): Promise<APIResponseV3WithTime<{
  transactId: string;
}>>;

Borrow

Parameters ​

ParameterType
params{ coin: string; qty: string; }
params.coinstring
params.qtystring

Returns ​

Promise<APIResponseV3WithTime<{ transactId: string; }>>


spotMarginRepay() ​

ts
spotMarginRepay(params: object): Promise<APIResponseV3WithTime<{
  repayId: string;
}>>;

Repay

Parameters ​

ParameterType
params{ coin: string; completeRepayment: 0 | 1; qty?: string; }
params.coinstring
params.completeRepayment0 | 1
params.qty?string

Returns ​

Promise<APIResponseV3WithTime<{ repayId: string; }>>


stopStrategy() ​

ts
stopStrategy(params: StopStrategyParamsV5): Promise<APIResponseV3WithTime<StopStrategyResultV5>>;

Stop Strategy

Stop a running strategy. Once stopped, the strategy cannot be resumed.

Parameters ​

ParameterType
paramsStopStrategyParamsV5

Returns ​

Promise<APIResponseV3WithTime<StopStrategyResultV5>>


submitAdvanceEarnPlaceOrder() ​

ts
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 ​

ParameterType
paramsSubmitAdvanceEarnPlaceOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdvanceEarnPlaceOrderResultV5>>


submitDepositOriginatorInfo() ​

ts
submitDepositOriginatorInfo(params: SubmitDepositOriginatorInfoParamsV5): Promise<APIResponseV3WithTime<SubmitDepositOriginatorInfoResultV5>>;

Submit Deposit Originator Info Submit Travel Rule originator questionnaire when deposit travel_rule_status is pending (1).

Parameters ​

ParameterType
paramsSubmitDepositOriginatorInfoParamsV5

Returns ​

Promise<APIResponseV3WithTime<SubmitDepositOriginatorInfoResultV5>>


submitEarnTokenOrder() ​

ts
submitEarnTokenOrder(params: PlaceEarnTokenOrderParamsV5): Promise<APIResponseV3WithTime<PlaceEarnTokenOrderResultV5>>;

Earn token — Place Order (Mint / Redeem). Accepted response is not final settlement; use getEarnTokenOrders.

Parameters ​

ParameterType
paramsPlaceEarnTokenOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<PlaceEarnTokenOrderResultV5>>


submitEventQuote() ​

ts
submitEventQuote(params: SubmitEventQuoteParamsV5): Promise<APIResponseV3WithTime<EventQuoteResultV5>>;

Submit an Event Contract payout-ratio quote.

INFO: Event Contract maker accounts only.

Parameters ​

ParameterType
paramsSubmitEventQuoteParamsV5

Returns ​

Promise<APIResponseV3WithTime<EventQuoteResultV5>>


submitFixedRateBorrow() ​

ts
submitFixedRateBorrow(params: FixedRateBorrowParamsV5): Promise<APIResponseV3WithTime<FixedRateBorrowResultV5>>;

Fixed-rate borrow (place order).

Parameters ​

ParameterType
paramsFixedRateBorrowParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedRateBorrowResultV5>>


submitFixedTermEarnOrder() ​

ts
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 ​

ParameterType
paramsSubmitFixedTermEarnOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<FixedTermEarnPlaceOrderResultV5>>


submitOrder() ​

ts
submitOrder(params: OrderParamsV5): Promise<APIResponseV3WithTime<OrderResultV5>>;

***** Trade APIs

Parameters ​

ParameterType
paramsOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<OrderResultV5>>


submitSpreadOrder() ​

ts
submitSpreadOrder(params: SubmitSpreadOrderParamsV5): Promise<APIResponseV3WithTime<{
  orderId: string;
  orderLinkId: string;
}>>;

Create Spread Order

Parameters ​

ParameterType
paramsSubmitSpreadOrderParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>


submitStakeRedeem() ​

ts
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 ​

ParameterType
paramsSubmitStakeRedeemParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ orderId: string; orderLinkId: string; }>>


submitWithdrawal() ​

ts
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 ​

ParameterType
paramsWithdrawParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ id: string; }>>


subscribePwmInvestmentPlan() ​

ts
subscribePwmInvestmentPlan(params: SubscribePwmInvestmentPlanParamsV5): Promise<APIResponseV3WithTime<SubscribePwmInvestmentPlanResultV5>>;

Subscribe to a PWM investment plan (PendingSubscription).

Parameters ​

ParameterType
paramsSubscribePwmInvestmentPlanParamsV5

Returns ​

Promise<APIResponseV3WithTime<SubscribePwmInvestmentPlanResultV5>>


switchIsolatedMargin() ​

ts
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 ​

ParameterType
paramsSwitchIsolatedMarginParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


switchPositionMode() ​

ts
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 ​

ParameterType
paramsSwitchPositionModeParamsV5

Returns ​

Promise<APIResponseV3WithTime<{ }>>


toggleSpotCrossMarginTrade() ​

ts
toggleSpotCrossMarginTrade(params: object): Promise<APIResponseV3WithTime<{
  switchStatus: "0" | "1";
}>>;

Turn spot margin trade on / off in your NORMAL account.

Parameters ​

ParameterType
params{ switch: 0 | 1; }
params.switch0 | 1

Returns ​

Promise<APIResponseV3WithTime<{ switchStatus: "0" | "1"; }>>


toggleSpotMarginTrade() ​

ts
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 ​

ParameterType
spotMarginMode"0" | "1"

Returns ​

Promise<APIResponseV3WithTime<{ spotMarginMode: "0" | "1"; }>>


updateCollateralAmount() ​

ts
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 ​

ParameterType
paramsAdjustCollateralAmountParamsV5

Returns ​

Promise<APIResponseV3WithTime<AdjustCollateralAmountV5>>


updateMasterApiKey() ​

ts
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 ​

ParameterType
paramsUpdateApiKeyParamsV5

Returns ​

Promise<APIResponseV3WithTime<UpdateApiKeyResultV5>>


updateP2PAd() ​

ts
updateP2PAd(params: UpdateP2PAdParamsV5): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>;

Update or relist P2P advertisement

Parameters ​

ParameterType
paramsUpdateP2PAdParamsV5

Returns ​

Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>>


updateSubApiKey() ​

ts
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 ​

ParameterType
paramsUpdateApiKeyParamsV5

Returns ​

Promise<APIResponseV3<UpdateApiKeyResultV5, { }>>


upgradeToUnifiedAccount() ​

ts
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() ​

ts
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:

typescript
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 ​

ParameterType
params{ fileBuffer: Buffer; fileName: string; }
params.fileBufferBuffer
params.fileNamestring

Returns ​

Promise<APIResponseV3WithTime<{ type: string; uploadId: string | null; url: string; }>>

Built by Siebly. Open source SDKs for exchange APIs.