Skip to content

Class: RestClient ​

Unified REST API client for all of Gate's REST APIs

Extends ​

  • BaseRestClient

Constructors ​

Constructor ​

ts
new RestClient(restClientOptions?: RestClientOptions, requestOptions?: AxiosRequestConfig): RestClient;

Parameters ​

ParameterType
restClientOptions?RestClientOptions
requestOptions?AxiosRequestConfig

Returns ​

RestClient

Overrides ​

BaseRestClient.constructor

Methods ​

addAutoInvestPlanPosition() ​

ts
addAutoInvestPlanPosition(params: AddAutoInvestPlanPositionReq): Promise<unknown>;

Add position immediately (auto invest)

Parameters ​

ParameterType
paramsAddAutoInvestPlanPositionReq

Returns ​

Promise<unknown>


addUsersToStpGroup() ​

ts
addUsersToStpGroup(params: object): Promise<StpGroupUser[]>;

Add users to the STP group

Parameters ​

ParameterTypeDescription
params{ body: number[]; stp_id: number; }Parameters for adding users to the STP group
params.bodynumber[]-
params.stp_idnumber-

Returns ​

Promise<StpGroupUser[]>

Promise<StpResp[]>


amendOptionsOrder() ​

ts
amendOptionsOrder(params: object & AmendOptionsOrderReq): Promise<SubmitOptionsOrderResp>;

Amend an options order (modify price and/or size). Only orders with status open are supported.

Parameters ​

ParameterTypeDescription
paramsobject & AmendOptionsOrderReqorder_id and amendment body (contract is required)

Returns ​

Promise<SubmitOptionsOrderResp>

Promise<SubmitOptionsOrderResp>


batchCancelFuturesOrders() ​

ts
batchCancelFuturesOrders(params: object): Promise<DeleteFuturesBatchOrdersResp[]>;

Cancel a batch of orders with an ID list

Multiple distinct order ID list can be specified. Each request can cancel a maximum of 20 records.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
params{ orderIds: string[]; settle: FuturesSettle; xGateExptime?: number; }Parameters for cancelling a batch of orders with an ID list
params.orderIdsstring[]-
params.settleFuturesSettle-
params.xGateExptime?number-

Returns ​

Promise<DeleteFuturesBatchOrdersResp[]>

Promise<DeleteFuturesBatchOrdersResp[]>


batchCancelSpotOrders() ​

ts
batchCancelSpotOrders(body: CancelSpotBatchOrdersReq[], params?: object): Promise<DeleteSpotBatchOrdersResp[]>;

Cancel a batch of orders with an ID list

Multiple currency pairs can be specified, but maximum 20 orders are allowed per request.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
bodyCancelSpotBatchOrdersReq[]-
params?{ xGateExptime?: number; }Parameters for cancelling a batch of orders
params.xGateExptime?number-

Returns ​

Promise<DeleteSpotBatchOrdersResp[]>

Promise<DeleteSpotBatchOrdersResp[]>


batchTerminateTrailOrders() ​

ts
batchTerminateTrailOrders(params: BatchTerminateTrailOrdersReq): Promise<{
  code?: number;
  data?: {
     orders?: TrailOrder[];
  };
  message?: string;
  timestamp?: number;
}>;

Batch terminate trail orders

Parameters ​

ParameterTypeDescription
paramsBatchTerminateTrailOrdersReqsettle and optional contract, related_position

Returns ​

Promise<{ code?: number; data?: { orders?: TrailOrder[]; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.orders


batchUpdateFuturesOrders() ​

ts
batchUpdateFuturesOrders(params: object): Promise<BatchAmendOrderResp[]>;

Batch modify orders with specified IDs

You can specify multiple different order IDs. You can only modify up to 10 orders in one request.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
params{ orders: BatchAmendOrderReq[]; settle: FuturesSettle; xGateExptime?: number; }Array of BatchAmendOrderReq objects
params.ordersBatchAmendOrderReq[]-
params.settleFuturesSettle-
params.xGateExptime?number-

Returns ​

Promise<BatchAmendOrderResp[]>

Promise<BatchAmendOrderResp[]>


batchUpdateSpotOrders() ​

ts
batchUpdateSpotOrders(body: UpdateSpotBatchOrdersReq[], params?: object): Promise<SpotOrder[]>;

Batch modification of orders

Default modification of orders for spot, portfolio, and margin accounts. To modify orders for a cross margin account, the account parameter must be specified as cross_margin. For portfolio margin accounts, the account parameter can only be specified as cross_margin. Currently, only modifications to price or quantity (choose one) are supported.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
bodyUpdateSpotBatchOrdersReq[]-
params?{ xGateExptime?: number; }Parameters for batch modification of orders
params.xGateExptime?number-

Returns ​

Promise<SpotOrder[]>

Promise<Order[]>


cancelAllDeliveryOrders() ​

ts
cancelAllDeliveryOrders(params: object): Promise<FuturesOrder[]>;

Cancel all open orders matched

Zero-filled order cannot be retrieved 10 minutes after order cancellation

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: "usdt"; side?: "ask" | "bid"; }Parameters for cancelling all open orders matched
params.contractstring-
params.settle"usdt"-
params.side?"ask" | "bid"-

Returns ​

Promise<FuturesOrder[]>

Promise<FuturesOrder[]>


cancelAllFuturesOrders() ​

ts
cancelAllFuturesOrders(params: DeleteAllFuturesOrdersReq): Promise<FuturesOrder[]>;

Cancel all open orders matched

Zero-filled order cannot be retrieved 10 minutes after order cancellation.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsDeleteAllFuturesOrdersReqParameters for cancelling all open orders matched

Returns ​

Promise<FuturesOrder[]>

Promise<FuturesOrder[]>


cancelAllOpenDeliveryOrders() ​

ts
cancelAllOpenDeliveryOrders(params: object): Promise<FuturesPriceTriggeredOrder[]>;

Cancel all open orders

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: "usdt"; }Parameters for cancelling all open orders
params.contractstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPriceTriggeredOrder[]>

Promise<FuturesPriceTriggeredOrder[]>


cancelAllOpenFuturesOrders() ​

ts
cancelAllOpenFuturesOrders(params: object): Promise<FuturesPriceTriggeredOrder[]>;

Cancel all open orders

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: FuturesSettle; }Parameters for cancelling all open orders
params.contractstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPriceTriggeredOrder[]>

Promise<FuturesPriceTriggeredOrder[]>


cancelAllOpenOptionsOrders() ​

ts
cancelAllOpenOptionsOrders(params: object): Promise<SubmitOptionsOrderResp[]>;

Cancel all open orders matched

Parameters ​

ParameterTypeDescription
params{ contract?: string; side?: "ask" | "bid"; underlying?: string; }Parameters for canceling all open orders matched
params.contract?string-
params.side?"ask" | "bid"-
params.underlying?string-

Returns ​

Promise<SubmitOptionsOrderResp[]>

Promise<SubmitOptionsOrderResp[]>


cancelAllOpenSpotOrders() ​

ts
cancelAllOpenSpotOrders(params?: object): Promise<SpotPriceTriggeredOrder[]>;

Cancel all open orders

Parameters ​

ParameterTypeDescription
params?{ account?: "margin" | "cross_margin" | "normal"; market?: string; }Parameters for cancelling all open orders
params.account?"margin" | "cross_margin" | "normal"-
params.market?string-

Returns ​

Promise<SpotPriceTriggeredOrder[]>

Promise<SpotPriceTriggeredOrder[]>


cancelAllStockOrders() ​

ts
cancelAllStockOrders(): Promise<StockApiResp<Record<string, never>>>;

Cancel all open stock orders

Returns ​

Promise<StockApiResp<Record<string, never>>>

Promise with empty data on success


cancelBatchCrossExOrders() ​

ts
cancelBatchCrossExOrders(params: CancelBatchCrossExOrdersReq[]): Promise<CancelBatchCrossExOrdersResp[]>;

Batch cancel CrossEx orders

Cancel multiple CrossEx orders by order_id or custom text. When both are provided, order_id takes precedence. Each result reports whether the request was accepted plus any error label and message. Rate Limit: 100 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsCancelBatchCrossExOrdersReq[]Array of cancel requests (order_id and/or text)

Returns ​

Promise<CancelBatchCrossExOrdersResp[]>

Promise with array of batch cancel results


cancelCrossExOrder() ​

ts
cancelCrossExOrder(order_id: string): Promise<CancelCrossExOrderResp>;

Cancel Order

Cancel an order. Rate Limit: 100 requests per 10 seconds

Parameters ​

ParameterTypeDescription
order_idstringOrder ID or Text for Cancel Order

Returns ​

Promise<CancelCrossExOrderResp>

Promise with cancellation confirmation


cancelDeliveryOrder() ​

ts
cancelDeliveryOrder(params: object): Promise<FuturesOrder>;

Cancel a single order

Parameters ​

ParameterTypeDescription
params{ order_id: string; settle: "usdt"; }Parameters for cancelling a single order
params.order_idstring-
params.settle"usdt"-

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


cancelFuturesOrder() ​

ts
cancelFuturesOrder(params: object): Promise<FuturesOrder>;

Cancel a single order

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
params{ action_mode?: "ACK" | "RESULT" | "FULL"; order_id: string; settle: FuturesSettle; xGateExptime?: number; }Parameters for cancelling a single order
params.action_mode?"ACK" | "RESULT" | "FULL"-
params.order_idstring-
params.settleFuturesSettle-
params.xGateExptime?number-

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


cancelFuturesPriceTriggeredOrder() ​

ts
cancelFuturesPriceTriggeredOrder(params: object): Promise<FuturesPriceTriggeredOrder>;

Cancel a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: number; settle: FuturesSettle; }Parameters for cancelling a price-triggered order
params.order_idnumber-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPriceTriggeredOrder>

Promise<FuturesPriceTriggeredOrder>


cancelOptionsOrder() ​

ts
cancelOptionsOrder(params: object): Promise<SubmitOptionsOrderResp>;

Cancel a single order

Parameters ​

ParameterTypeDescription
params{ order_id: number; }Parameters for canceling a single order
params.order_idnumber-

Returns ​

Promise<SubmitOptionsOrderResp>

Promise<SubmitOptionsOrderResp>


cancelOTCOrder() ​

ts
cancelOTCOrder(params: CancelOTCOrderReq): Promise<OTCActionResp>;

Fiat order cancellation

Cancel fiat order

Parameters ​

ParameterTypeDescription
paramsCancelOTCOrderReqParameters with order_id

Returns ​

Promise<OTCActionResp>

Promise with cancellation confirmation


cancelP2PMerchantTransaction() ​

ts
cancelP2PMerchantTransaction(params: P2PMerchantCancelTransactionReq): Promise<P2PMerchantApiResp<Record<string, unknown>>>;

Cancel order

Parameters ​

ParameterType
paramsP2PMerchantCancelTransactionReq

Returns ​

Promise<P2PMerchantApiResp<Record<string, unknown>>>


cancelSpotOpenOrders() ​

ts
cancelSpotOpenOrders(params: object): Promise<SpotOrder[]>;

Cancel all open orders in specified currency pair

If account is not set, all open orders, including spot, portfolio, margin and cross margin ones, will be cancelled. You can set account to cancel only orders within the specified account.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
params{ account?: "spot" | "margin" | "cross_margin" | "unified"; action_mode?: "ACK" | "RESULT" | "FULL"; currency_pair: string; side?: "buy" | "sell"; trade_quote?: string; xGateExptime?: number; }Parameters for cancelling all open orders in specified currency pair
params.account?"spot" | "margin" | "cross_margin" | "unified"-
params.action_mode?"ACK" | "RESULT" | "FULL"-
params.currency_pairstring-
params.side?"buy" | "sell"-
params.trade_quote?string-
params.xGateExptime?number-

Returns ​

Promise<SpotOrder[]>

Promise<Order[]>


cancelSpotOrder() ​

ts
cancelSpotOrder(params: DeleteSpotOrderReq): Promise<SpotOrder>;

Cancel a single order

Spot, portfolio and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsDeleteSpotOrderReqParameters for cancelling a single order

Returns ​

Promise<SpotOrder>

Promise<Order>

See ​

Spot order management


cancelSpotPovOrder() ​

ts
cancelSpotPovOrder(params: object): Promise<SpotPovOrder>;

Cancel a Spot POV order

Supports the order ID returned after creation, or the custom ID specified in the text field.

Parameters ​

ParameterTypeDescription
params{ order_id: string; }Parameters containing the order ID
params.order_idstring-

Returns ​

Promise<SpotPovOrder>

Promise<SpotPovOrder>


cancelSpotPovOrders() ​

ts
cancelSpotPovOrders(params?: CancelSpotPovOrdersReq): Promise<SpotPovOrder[]>;

Cancel Spot POV orders

Cancel Spot POV orders in bulk. Optionally filter by currency pair.

Parameters ​

ParameterTypeDescription
params?CancelSpotPovOrdersReqOptional parameters for cancelling Spot POV orders

Returns ​

Promise<SpotPovOrder[]>

Promise<SpotPovOrder[]>


cancelSpotTriggeredOrder() ​

ts
cancelSpotTriggeredOrder(params: object): Promise<SpotPriceTriggeredOrder>;

Cancel a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: string; }Parameters for cancelling a price-triggered order
params.order_idstring-

Returns ​

Promise<SpotPriceTriggeredOrder>

Promise<SpotPriceTriggeredOrder>


cancelStockOrder() ​

ts
cancelStockOrder(orderId: number): Promise<StockApiResp<Record<string, never>>>;

Cancel a stock order

Parameters ​

ParameterTypeDescription
orderIdnumberOrder ID

Returns ​

Promise<StockApiResp<Record<string, never>>>

Promise with empty data on success


cancelTradFiOrder() ​

ts
cancelTradFiOrder(orderId: number): Promise<Record<string, never>>;

Parameters ​

ParameterType
orderIdnumber

Returns ​

Promise<Record<string, never>>


cancelTriggeredDeliveryOrder() ​

ts
cancelTriggeredDeliveryOrder(params: object): Promise<FuturesPriceTriggeredOrder>;

Cancel a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: string; settle: "usdt"; }Parameters for cancelling a price-triggered order
params.order_idstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPriceTriggeredOrder>

Promise<FuturesPriceTriggeredOrder>


cancelWithdrawal() ​

ts
cancelWithdrawal(params: object): Promise<WithdrawalRecord>;

Cancel withdrawal with specified ID

Parameters ​

ParameterTypeDescription
params{ withdrawal_id: string; }Parameters containing the withdrawal ID
params.withdrawal_idstring-

Returns ​

Promise<WithdrawalRecord>

Promise<WithdrawalRecord>


closeCrossExPosition() ​

ts
closeCrossExPosition(params: CloseCrossExPositionReq): Promise<CloseCrossExPositionResp>;

Full Close Position

Fully close a position. Rate Limit: 100 requests per day

Parameters ​

ParameterTypeDescription
paramsCloseCrossExPositionReqPosition close parameters

Returns ​

Promise<CloseCrossExPositionResp>

Promise with close position confirmation


closeStockPosition() ​

ts
closeStockPosition(params: CloseStockPositionReq): Promise<StockApiResp<StockClosePositionResult>>;

Close a stock position

Parameters ​

ParameterTypeDescription
paramsCloseStockPositionReqClose parameters (partial or full)

Returns ​

Promise<StockApiResp<StockClosePositionResult>>

Promise with close order ID


closeTradFiPosition() ​

ts
closeTradFiPosition(positionId: number, params: TradFiClosePositionReq): Promise<TradFiApiResp<Record<string, never>>>;

Parameters ​

ParameterType
positionIdnumber
paramsTradFiClosePositionReq

Returns ​

Promise<TradFiApiResp<Record<string, never>>>


confirmP2PMerchantPayment() ​

ts
confirmP2PMerchantPayment(params: P2PMerchantConfirmPaymentReq): Promise<P2PMerchantApiResp<Record<string, unknown>>>;

Confirm payment

Parameters ​

ParameterType
paramsP2PMerchantConfirmPaymentReq

Returns ​

Promise<P2PMerchantApiResp<Record<string, unknown>>>


confirmP2PMerchantReceipt() ​

ts
confirmP2PMerchantReceipt(params: P2PMerchantConfirmReceiptReq): Promise<P2PMerchantApiResp<Record<string, unknown>>>;

Confirm receipt

Parameters ​

ParameterType
paramsP2PMerchantConfirmReceiptReq

Returns ​

Promise<P2PMerchantApiResp<Record<string, unknown>>>


convertSmallBalance() ​

ts
convertSmallBalance(params?: object): Promise<any>;

Convert small balance

Parameters ​

ParameterTypeDescription
params?{ currency?: string[]; is_all?: boolean; }Parameters for converting small balance
params.currency?string[]-
params.is_all?boolean-

Returns ​

Promise<any>

Promise<any>


createAlphaOrder() ​

ts
createAlphaOrder(params: CreateAlphaOrderReq): Promise<CreateAlphaOrderResp>;

Alpha Order API

Create an alpha order. Rate-limited at 5 requests per second per user.

Parameters ​

ParameterTypeDescription
paramsCreateAlphaOrderReqOrder parameters including quote_id

Returns ​

Promise<CreateAlphaOrderResp>

Promise with order details


createAlphaQuote() ​

ts
createAlphaQuote(params: CreateAlphaQuoteReq): Promise<CreateAlphaQuoteResp>;

Alpha Quote API

Get a quote for alpha trading. Quote is valid for 1 minute. Rate-limited at 10 requests per second per user.

Parameters ​

ParameterTypeDescription
paramsCreateAlphaQuoteReqQuote parameters

Returns ​

Promise<CreateAlphaQuoteResp>

Promise with quote details


createAutoInvestPlan() ​

ts
createAutoInvestPlan(params: CreateAutoInvestPlanReq): Promise<CreateAutoInvestPlanResp>;

Create auto invest plan

Parameters ​

ParameterType
paramsCreateAutoInvestPlanReq

Returns ​

Promise<CreateAutoInvestPlanResp>


createChaseOrder() ​

ts
createChaseOrder(params: CreateChaseOrderReq): Promise<CreateChaseOrderResp>;

Create a chase limit order

Parameters ​

ParameterType
paramsCreateChaseOrderReq

Returns ​

Promise<CreateChaseOrderResp>


createCrossExConvertOrder() ​

ts
createCrossExConvertOrder(params: CreateCrossExConvertOrderReq): Promise<CreateCrossExConvertOrderResp>;

Flash Swap Transaction

Execute a flash swap transaction. Rate limit: 10 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsCreateCrossExConvertOrderReqParameters with quote_id

Returns ​

Promise<CreateCrossExConvertOrderResp>

Promise with transaction confirmation


createCrossExConvertQuote() ​

ts
createCrossExConvertQuote(params: CreateCrossExConvertQuoteReq): Promise<CreateCrossExConvertQuoteResp>;

Flash Swap Inquiry

Create a flash swap quote. Rate Limit: 100 requests per day

Parameters ​

ParameterTypeDescription
paramsCreateCrossExConvertQuoteReqQuote parameters

Returns ​

Promise<CreateCrossExConvertQuoteResp>

Promise with quote details


createCrossExOrder() ​

ts
createCrossExOrder(params: CreateCrossExOrderReq): Promise<CreateCrossExOrderResp>;

Create an order

Create an order for cross-exchange trading. Rate Limit: 100 requests per 10 seconds. Stocks and ETFs also allow 1 request per second per user, and only in cross-exchange account mode with time_in_force GTC and qty. quote_qty is not supported. Stock and ETF prices use the listing market currency (USD, HKD, KRW, JPY).

Parameters ​

ParameterTypeDescription
paramsCreateCrossExOrderReqOrder parameters

Returns ​

Promise<CreateCrossExOrderResp>

Promise with order creation response


createCrossExTransfer() ​

ts
createCrossExTransfer(params: CreateCrossExTransferReq): Promise<CreateCrossExTransferResp>;

Fund Transfer

Transfer funds between accounts. Rate limit: 10 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsCreateCrossExTransferReqTransfer parameters

Returns ​

Promise<CreateCrossExTransferResp>

Promise with transfer confirmation


createDepositAddress() ​

ts
createDepositAddress(params: object): Promise<CreateDepositAddressResp>;

Generate currency deposit address

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters containing the currency name
params.currencystring-

Returns ​

Promise<CreateDepositAddressResp>

Promise<CreateDepositAddressResp>


createEarnFixedTermLend() ​

ts
createEarnFixedTermLend(params: CreateEarnFixedTermLendReq): Promise<CreateEarnFixedTermLendResponse>;

Subscribe to a fixed-term earn product.

Parameters ​

ParameterType
paramsCreateEarnFixedTermLendReq

Returns ​

Promise<CreateEarnFixedTermLendResponse>


createEarnFixedTermPreRedeem() ​

ts
createEarnFixedTermPreRedeem(params: EarnFixedTermPreRedeemReq): Promise<CreateEarnFixedTermPreRedeemResponse>;

Early redeem a fixed-term earn order.

Parameters ​

ParameterType
paramsEarnFixedTermPreRedeemReq

Returns ​

Promise<CreateEarnFixedTermPreRedeemResponse>


createOTCBank() ​

ts
createOTCBank(params: CreateOTCBankReq): Promise<CreateOTCBankResp>;

Create / bind a bank card (multipart/form-data)

Parameters ​

ParameterType
paramsCreateOTCBankReq

Returns ​

Promise<CreateOTCBankResp>


createOTCFiatOrder() ​

ts
createOTCFiatOrder(params: CreateOTCFiatOrderReq): Promise<OTCActionResp>;

Create fiat order

Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp

Parameters ​

ParameterTypeDescription
paramsCreateOTCFiatOrderReqFiat order parameters

Returns ​

Promise<OTCActionResp>

Promise with order creation confirmation


createOTCQuote() ​

ts
createOTCQuote(params: CreateOTCQuoteReq): Promise<CreateOTCQuoteResp>;

Fiat and stablecoin quote

Create fiat and stablecoin quotes, supporting both PAY and GET directions

Parameters ​

ParameterTypeDescription
paramsCreateOTCQuoteReqQuote parameters

Returns ​

Promise<CreateOTCQuoteResp>

Promise with quote details including rate, amounts, and quote_token


createOTCStablecoinOrder() ​

ts
createOTCStablecoinOrder(params: CreateOTCStablecoinOrderReq): Promise<CreateOTCStablecoinOrderResp>;

Create stablecoin order

Create stablecoin order

Parameters ​

ParameterTypeDescription
paramsCreateOTCStablecoinOrderReqStablecoin order parameters

Returns ​

Promise<CreateOTCStablecoinOrderResp>

Promise with order creation confirmation


createOTCUploadPreUpload() ​

ts
createOTCUploadPreUpload(params: CreateOTCUploadPreUploadReq): Promise<CreateOTCUploadPreUploadResp>;

Parameters ​

ParameterType
paramsCreateOTCUploadPreUploadReq

Returns ​

Promise<CreateOTCUploadPreUploadResp>


createQuickRepayment() ​

ts
createQuickRepayment(params: CreateQuickRepaymentReq): Promise<QuickRepaymentResp>;

Execute quick repayment

Parameters ​

ParameterType
paramsCreateQuickRepaymentReq

Returns ​

Promise<QuickRepaymentResp>


createSpotPovOrder() ​

ts
createSpotPovOrder(params: CreateSpotPovOrderReq): Promise<SpotPovOrder>;

Create a Spot POV order

Create a percentage-of-volume strategy order with a target participation rate, validity period, and optional limit/trigger prices.

Parameters ​

ParameterTypeDescription
paramsCreateSpotPovOrderReqParameters for creating a Spot POV order

Returns ​

Promise<SpotPovOrder>

Promise<SpotPovOrder>


createStockOrder() ​

ts
createStockOrder(params: CreateStockOrderReq): Promise<StockApiResp<StockCreateOrderResult>>;

Create a stock order

Limit orders support only the all trading session; market orders support only regular. time_in_force supports day only.

Parameters ​

ParameterTypeDescription
paramsCreateStockOrderReqOrder parameters

Returns ​

Promise<StockApiResp<StockCreateOrderResult>>

Promise with created order ID


createStockTransaction() ​

ts
createStockTransaction(params: CreateStockTransactionReq): Promise<StockApiResp<Record<string, never>>>;

Fund transfer for stock account

Transfer funds in or out of the stock account (USDT only).

Parameters ​

ParameterTypeDescription
paramsCreateStockTransactionReqTransfer parameters including ref_id for idempotency

Returns ​

Promise<StockApiResp<Record<string, never>>>

Promise with empty data on success


createStpGroup() ​

ts
createStpGroup(params: CreateStpGroupReq): Promise<StpGroup>;

Create STP Group

Parameters ​

ParameterTypeDescription
paramsCreateStpGroupReqParameters for creating an STP group

Returns ​

Promise<StpGroup>

Promise<CreateStpGroupResp>


createSubAccount() ​

ts
createSubAccount(params: CreateSubAccountReq): Promise<SubAccount>;

Create a new sub-account

Parameters ​

ParameterTypeDescription
paramsCreateSubAccountReqParameters for creating a new sub-account

Returns ​

Promise<SubAccount>

Promise<CreateSubAccountResp>


createSubAccountApiKey() ​

ts
createSubAccountApiKey(params: CreateSubAccountApiKeyReq): Promise<CreatedSubAccountAPIKey>;

Create API Key of the sub-account

Parameters ​

ParameterTypeDescription
paramsCreateSubAccountApiKeyReqParameters for creating API Key of the sub-account

Returns ​

Promise<CreatedSubAccountAPIKey>

Promise<CreateSubAccountApiKeyResp>


createTradFiOrder() ​

ts
createTradFiOrder(params: TradFiCreateOrderReq): Promise<TradFiApiResp<TradFiCreateOrderResult>>;

Parameters ​

ParameterType
paramsTradFiCreateOrderReq

Returns ​

Promise<TradFiApiResp<TradFiCreateOrderResult>>


createTradFiTransaction() ​

ts
createTradFiTransaction(params: TradFiCreateTransactionReq): Promise<TradFiApiResp<Record<string, never>>>;

Parameters ​

ParameterType
paramsTradFiCreateTransactionReq

Returns ​

Promise<TradFiApiResp<Record<string, never>>>


createTradFiUser() ​

ts
createTradFiUser(): Promise<TradFiApiResp<TradFiCreateUserResult>>;

Returns ​

Promise<TradFiApiResp<TradFiCreateUserResult>>


createTrailOrder() ​

ts
createTrailOrder(params: CreateTrailOrderReq): Promise<{
  code?: number;
  data?: {
     id?: string;
  };
  message?: string;
  timestamp?: number;
}>;

Create trail order

Parameters ​

ParameterTypeDescription
paramsCreateTrailOrderReqsettle and trail order parameters

Returns ​

Promise<{ code?: number; data?: { id?: string; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.id


deleteOTCBank() ​

ts
deleteOTCBank(params: OTCBankIdReq): Promise<OTCActionResp>;

Delete a bank card

Parameters ​

ParameterType
paramsOTCBankIdReq

Returns ​

Promise<OTCActionResp>


deleteSubAccountApiKey() ​

ts
deleteSubAccountApiKey(params: object): Promise<any>;

Delete API key of the sub-account

Parameters ​

ParameterTypeDescription
params{ key: string; user_id: number; }Parameters for deleting API key of the sub-account
params.keystring-
params.user_idnumber-

Returns ​

Promise<any>

Promise<any>


deleteUserFromStpGroup() ​

ts
deleteUserFromStpGroup(params: object): Promise<StpGroupUser[]>;

Delete the user in the STP group

Parameters ​

ParameterTypeDescription
params{ stp_id: number; user_id: number; }Parameters for deleting users from the STP group
params.stp_idnumber-
params.user_idnumber-

Returns ​

Promise<StpGroupUser[]>

Promise<StpResp[]>


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>


getAccountDetail() ​

ts
getAccountDetail(): Promise<AccountDetail>;

Get account detail

Returns ​

Promise<AccountDetail>

Promise<GetAccountDetailResp>


getAccountMainKeys() ​

ts
getAccountMainKeys(): Promise<AccountMainKey[]>;

Query all main account API key information

Returns ​

Promise<AccountMainKey[]>

Promise<AccountMainKey[]>


getAccountRateLimit() ​

ts
getAccountRateLimit(): Promise<AccountRateLimit[]>;

Get user transaction rate limit information

Returns ​

Promise<AccountRateLimit[]>

Promise<AccountRateLimit[]>


getAgencyCommissionHistory() ​

ts
getAgencyCommissionHistory(params: GetAgencyCommissionHistoryReq): Promise<{
  list: AgencyCommissionHistoryRecord[];
  total: number;
}>;

The agency obtains the commission history of the recommended user. Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
paramsGetAgencyCommissionHistoryReqParameters for retrieving commission history

Returns ​

Promise<{ list: AgencyCommissionHistoryRecord[]; total: number; }>

Promise<GetAgencyCommissionHistoryResp>


getAgencyTransactionHistory() ​

ts
getAgencyTransactionHistory(params: GetAgencyTransactionHistoryReq): Promise<{
  list: AgencyTransactionHistoryRecord[];
  total: number;
}>;

The agency obtains the transaction history of the recommended user. Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
paramsGetAgencyTransactionHistoryReqParameters for retrieving transaction history

Returns ​

Promise<{ list: AgencyTransactionHistoryRecord[]; total: number; }>

Promise<GetAgencyTransactionHistoryResp>


getAllDeliveryContracts() ​

ts
getAllDeliveryContracts(params: object): Promise<FuturesDeliveryContract[]>;

List all futures contracts

Parameters ​

ParameterTypeDescription
params{ settle: "usdt"; }Parameters for listing all futures contracts
params.settle"usdt"-

Returns ​

Promise<FuturesDeliveryContract[]>

Promise<DeliveryContract[]>


getAlphaAccountBook() ​

ts
getAlphaAccountBook(params: GetAlphaAccountBookReq): Promise<AlphaAccountBook[]>;

Query asset transactions

Query alpha account transaction history

Parameters ​

ParameterTypeDescription
paramsGetAlphaAccountBookReqParameters with required from timestamp

Returns ​

Promise<AlphaAccountBook[]>

Promise with array of transaction records


getAlphaAccounts() ​

ts
getAlphaAccounts(): Promise<AlphaAccount[]>;

Query position assets

Query alpha account position assets

Returns ​

Promise<AlphaAccount[]>

Promise with array of account balances


getAlphaCurrencies() ​

ts
getAlphaCurrencies(params?: GetAlphaCurrenciesReq): Promise<AlphaCurrency[]>;

Query currency information

Query alpha currency information. When currency is provided, returns specific currency info; otherwise returns paginated list.

Parameters ​

ParameterTypeDescription
params?GetAlphaCurrenciesReqOptional filter parameters

Returns ​

Promise<AlphaCurrency[]>

Promise with array of currency information


getAlphaOrder() ​

ts
getAlphaOrder(params: GetAlphaOrderReq): Promise<AlphaOrder>;

Alpha Single Order Query API

Query a single alpha order by order ID

Parameters ​

ParameterTypeDescription
paramsGetAlphaOrderReqParameters with order_id

Returns ​

Promise<AlphaOrder>

Promise with order details


getAlphaOrders() ​

ts
getAlphaOrders(params?: GetAlphaOrdersReq): Promise<AlphaOrder[]>;

Alpha Order List API

Query alpha order list with filters

Parameters ​

ParameterTypeDescription
params?GetAlphaOrdersReqFilter parameters

Returns ​

Promise<AlphaOrder[]>

Promise with array of orders


getAlphaTickers() ​

ts
getAlphaTickers(params?: GetAlphaTickersReq): Promise<AlphaTicker[]>;

Query currency ticker

Query alpha currency ticker. When currency is provided, returns specific ticker; otherwise returns paginated list.

Parameters ​

ParameterTypeDescription
params?GetAlphaTickersReqOptional filter parameters

Returns ​

Promise<AlphaTicker[]>

Promise with array of ticker information


getAutoInvestCoins() ​

ts
getAutoInvestCoins(params?: GetAutoInvestCoinsReq): Promise<AutoInvestCoinItem[]>;

List currencies supporting auto invest

Parameters ​

ParameterType
params?GetAutoInvestCoinsReq

Returns ​

Promise<AutoInvestCoinItem[]>


getAutoInvestConfig() ​

ts
getAutoInvestConfig(): Promise<AutoInvestConfigItem[]>;

List investment currency configuration

Returns ​

Promise<AutoInvestConfigItem[]>


getAutoInvestMinAmount() ​

ts
getAutoInvestMinAmount(params: GetAutoInvestMinAmountReq): Promise<AutoInvestMinAmountResp>;

Get minimum investment amount for a portfolio

Parameters ​

ParameterType
paramsGetAutoInvestMinAmountReq

Returns ​

Promise<AutoInvestMinAmountResp>


getAutoInvestOrders() ​

ts
getAutoInvestOrders(params: GetAutoInvestOrdersReq): Promise<AutoInvestOrderItem[]>;

List plan execution order details

Parameters ​

ParameterType
paramsGetAutoInvestOrdersReq

Returns ​

Promise<AutoInvestOrderItem[]>


getAutoInvestPlanDetail() ​

ts
getAutoInvestPlanDetail(params: GetAutoInvestPlanDetailReq): Promise<AutoInvestPlanDetail>;

Get auto invest plan details

Parameters ​

ParameterType
paramsGetAutoInvestPlanDetailReq

Returns ​

Promise<AutoInvestPlanDetail>


getAutoInvestPlanRecords() ​

ts
getAutoInvestPlanRecords(params: GetAutoInvestPlanRecordsReq): Promise<AutoInvestPlanExecutionRecordsPaginated>;

List plan execution records

Parameters ​

ParameterType
paramsGetAutoInvestPlanRecordsReq

Returns ​

Promise<AutoInvestPlanExecutionRecordsPaginated>


getAutoInvestPlans() ​

ts
getAutoInvestPlans(params: GetAutoInvestPlansReq): Promise<AutoInvestPlansListResp>;

List auto invest plans

Parameters ​

ParameterType
paramsGetAutoInvestPlansReq

Returns ​

Promise<AutoInvestPlansListResp>


getAutoRepaymentSetting() ​

ts
getAutoRepaymentSetting(): Promise<{
  status: "on" | "off";
}>;

Retrieve user auto repayment setting

Returns ​

Promise<{ status: "on" | "off"; }>

Promise<{ status: 'on' | 'off' }>


getBalances() ​

ts
getBalances(params?: object): Promise<GetBalancesResp>;

Retrieve user's total balances

This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account. The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation.

For trading calculation, use the corresponding account query endpoint for each account type. For example:

  • GET /spot/accounts to query spot account balance
  • GET /margin/accounts to query margin account balance
  • GET /futures/{settle}/accounts to query futures account balance

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Parameters for retrieving total balances
params.currency?string-

Returns ​

Promise<GetBalancesResp>

Promise<GetBalancesResp>


getBatchFundingRates() ​

ts
getBatchFundingRates(params: BatchFundingRatesReq): Promise<BatchFundingRatesResponse[]>;

Batch query historical funding rate data for perpetual contracts

Parameters ​

ParameterTypeDescription
paramsBatchFundingRatesReqsettle and array of contract names

Returns ​

Promise<BatchFundingRatesResponse[]>

Promise<BatchFundingRatesResponse[]>


getBrokerCommissionHistory() ​

ts
getBrokerCommissionHistory(params: GetBrokerCommissionHistoryReq): Promise<{
  list: BrokerCommissionHistoryRecord[];
  total: number;
}>;

The broker obtains the user's commission rebate records. Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
paramsGetBrokerCommissionHistoryReqParameters for retrieving commission rebate records

Returns ​

Promise<{ list: BrokerCommissionHistoryRecord[]; total: number; }>

Promise<GetBrokerCommissionHistoryResp>


getBrokerTransactionHistory() ​

ts
getBrokerTransactionHistory(params: GetBrokerTransactionHistoryReq): Promise<{
  list: BrokerTransactionHistoryRecord[];
  total: number;
}>;

The broker obtains the user's trading history. Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
paramsGetBrokerTransactionHistoryReqParameters for retrieving trading history

Returns ​

Promise<{ list: BrokerTransactionHistoryRecord[]; total: number; }>

Promise<GetBrokerTransactionHistoryResp>


getChaseOrderDetail() ​

ts
getChaseOrderDetail(params: GetChaseOrderDetailReq): Promise<GetChaseOrderDetailResp>;

Get chase order detail

Parameters ​

ParameterType
paramsGetChaseOrderDetailReq

Returns ​

Promise<GetChaseOrderDetailResp>


getChaseOrders() ​

ts
getChaseOrders(params: GetChaseOrdersReq): Promise<GetChaseOrdersResp>;

List chase orders

Parameters ​

ParameterType
paramsGetChaseOrdersReq

Returns ​

Promise<GetChaseOrdersResp>


getClientType() ​

ts
getClientType(): "main";

Gate.io misc endpoints

Returns ​

"main"

Overrides ​

BaseRestClient.getClientType


getCrossExAccountBook() ​

ts
getCrossExAccountBook(params?: GetCrossExAccountBookReq): Promise<CrossExAccountBook[]>;

Query Account Asset Change History

Query account balance change history. Rate Limit: 200 requests per 10 seconds. statement_type includes SECURITY_DIVIDEND (stock or ETF dividend) and SECURITY_CORPORATE_ACTION (split or reverse split). Filter with the same values.

Parameters ​

ParameterTypeDescription
params?GetCrossExAccountBookReqOptional filter parameters

Returns ​

Promise<CrossExAccountBook[]>

Promise with array of account book records


getCrossExAccounts() ​

ts
getCrossExAccounts(params?: GetCrossExAccountsReq): Promise<CrossExAccount>;

Query Account Assets

Query account assets and balances. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExAccountsReqOptional exchange_type filter

Returns ​

Promise<CrossExAccount>

Promise with account information


getCrossExAdlRank() ​

ts
getCrossExAdlRank(params: GetCrossExAdlRankReq): Promise<CrossExAdlRank[]>;

Query ADL Position Reduction Ranking

Query ADL position reduction ranking. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsGetCrossExAdlRankReqParameters with required symbol

Returns ​

Promise<CrossExAdlRank[]>

Promise with array of ADL rankings


getCrossExCoinDiscountRate() ​

ts
getCrossExCoinDiscountRate(params?: GetCrossExCoinDiscountRateReq): Promise<CrossExCoinDiscountRate[]>;

Query currency discount rate

Query currency discount rate (for margin currency in isolated exchange mode). Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExCoinDiscountRateReqOptional filter parameters

Returns ​

Promise<CrossExCoinDiscountRate[]>

Promise with array of coin discount rates


getCrossExFeeRate() ​

ts
getCrossExFeeRate(): Promise<CrossExFeeRate[]>;

Query User Fee Rates

Query user fee rates. Rate Limit: 200 requests per 10 seconds

Returns ​

Promise<CrossExFeeRate[]>

Promise with fee rates per exchange


getCrossExHistoryMarginInterests() ​

ts
getCrossExHistoryMarginInterests(params?: GetCrossExHistoryMarginInterestsReq): Promise<CrossExHistoryMarginInterest[]>;

Query Leveraged Interest Deduction History

Query margin interest deduction history. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExHistoryMarginInterestsReqOptional filter parameters

Returns ​

Promise<CrossExHistoryMarginInterest[]>

Promise with array of interest deduction records


getCrossExHistoryMarginPositions() ​

ts
getCrossExHistoryMarginPositions(params?: GetCrossExHistoryMarginPositionsReq): Promise<CrossExHistoryMarginPosition[]>;

Query Leveraged Position History

Query margin position history. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExHistoryMarginPositionsReqOptional filter parameters

Returns ​

Promise<CrossExHistoryMarginPosition[]>

Promise with array of historical margin positions


getCrossExHistoryOrders() ​

ts
getCrossExHistoryOrders(params?: GetCrossExHistoryOrdersReq): Promise<CrossExOrder[]>;

Query order history

Query historical orders. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExHistoryOrdersReqOptional filter parameters

Returns ​

Promise<CrossExOrder[]>

Promise with array of historical orders


getCrossExHistoryPositions() ​

ts
getCrossExHistoryPositions(params?: GetCrossExHistoryPositionsReq): Promise<CrossExHistoryPosition[]>;

Query Contract Position History

Query contract position history. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExHistoryPositionsReqOptional filter parameters

Returns ​

Promise<CrossExHistoryPosition[]>

Promise with array of historical positions


getCrossExHistoryTrades() ​

ts
getCrossExHistoryTrades(params?: GetCrossExHistoryTradesReq): Promise<CrossExHistoryTrade[]>;

Query filled history

Query trade execution history. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExHistoryTradesReqOptional filter parameters

Returns ​

Promise<CrossExHistoryTrade[]>

Promise with array of trade records


getCrossExInterestRate() ​

ts
getCrossExInterestRate(params?: GetCrossExInterestRateReq): Promise<CrossExInterestRate[]>;

Query margin asset interest rates

Query interest rates for margin assets. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExInterestRateReqOptional filter parameters

Returns ​

Promise<CrossExInterestRate[]>

Promise with array of interest rates


getCrossExMarginPositionLeverage() ​

ts
getCrossExMarginPositionLeverage(params?: GetCrossExMarginPositionLeverageReq): Promise<CrossExMarginPositionLeverage[]>;

Query Leveraged Trading Pair Leverage Multiplier

Query leverage for margin trading pairs. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExMarginPositionLeverageReqOptional symbols filter

Returns ​

Promise<CrossExMarginPositionLeverage[]>

Promise with array of leverage information


getCrossExMarginPositions() ​

ts
getCrossExMarginPositions(params?: GetCrossExMarginPositionsReq): Promise<CrossExMarginPosition[]>;

Query Leveraged Positions

Query margin/leveraged positions. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExMarginPositionsReqOptional filter parameters

Returns ​

Promise<CrossExMarginPosition[]>

Promise with array of margin positions


getCrossExMarketFundingInfo() ​

ts
getCrossExMarketFundingInfo(params?: GetCrossExMarketFundingInfoReq): Promise<CrossExMarketFundingInfo[]>;

Query CrossEx market funding info

Query futures funding rates, funding intervals, and next funding timestamps across exchanges.

Parameters ​

ParameterTypeDescription
params?GetCrossExMarketFundingInfoReqOptional parameters to filter symbols

Returns ​

Promise<CrossExMarketFundingInfo[]>

Promise with array of funding info records


getCrossExMarketTickers() ​

ts
getCrossExMarketTickers(params?: GetCrossExMarketTickersReq): Promise<CrossExMarketTicker[]>;

Query CrossEx market tickers

Query exchange market tickers, optionally filtered by a comma-separated list of symbols.

Parameters ​

ParameterTypeDescription
params?GetCrossExMarketTickersReqOptional parameters to filter symbols

Returns ​

Promise<CrossExMarketTicker[]>

Promise with array of market tickers


getCrossExOpenOrders() ​

ts
getCrossExOpenOrders(params?: GetCrossExOpenOrdersReq): Promise<CrossExOrder[]>;

Query All Current Open Orders

Query all current open orders. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExOpenOrdersReqOptional filter parameters

Returns ​

Promise<CrossExOrder[]>

Promise with array of open orders


getCrossExOrder() ​

ts
getCrossExOrder(order_id: string): Promise<CrossExOrder>;

Query order details

Query order details by order ID or custom text. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
order_idstringOrder ID or custom text

Returns ​

Promise<CrossExOrder>

Promise with order details


getCrossExPositionLeverage() ​

ts
getCrossExPositionLeverage(params?: GetCrossExPositionLeverageReq): Promise<CrossExPositionLeverage[]>;

Query Contract Trading Pair Leverage Multiplier

Query leverage for contract trading pairs. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExPositionLeverageReqOptional symbols filter

Returns ​

Promise<CrossExPositionLeverage[]>

Promise with array of leverage information


getCrossExPositions() ​

ts
getCrossExPositions(params?: GetCrossExPositionsReq): Promise<CrossExPosition[]>;

Query Contract Positions

Query contract positions. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExPositionsReqOptional filter parameters

Returns ​

Promise<CrossExPosition[]>

Promise with array of positions


getCrossExRiskLimits() ​

ts
getCrossExRiskLimits(params: GetCrossExRiskLimitsReq): Promise<CrossExRiskLimit[]>;

Query Risk Limit Information

Query risk limit information for futures/margin trading pairs

Parameters ​

ParameterTypeDescription
paramsGetCrossExRiskLimitsReqParameters with required symbols

Returns ​

Promise<CrossExRiskLimit[]>

Promise with array of risk limit information


getCrossExSecurityPositions() ​

ts
getCrossExSecurityPositions(params?: GetCrossExSecurityPositionsReq): Promise<CrossExSecurityPosition[]>;

List stock and ETF positions

Prices, position value, and unrealized PnL use the listing market currency (USD, HKD, KRW, JPY). Rate Limit: 200 requests per 10 seconds.

Parameters ​

ParameterTypeDescription
params?GetCrossExSecurityPositionsReqOptional symbol and exchange_type (US, HK, KR, JP)

Returns ​

Promise<CrossExSecurityPosition[]>


getCrossExSymbols() ​

ts
getCrossExSymbols(params?: GetCrossExSymbolsReq): Promise<CrossExSymbol[]>;

Query Trading Pair Information

Stock and ETF symbols use {market}_{STOCK|ETF}_{code}_USDT (US_STOCK_AAPL_USDT, HK_STOCK_00700_USDT, US_ETF_SPY_USDT). tag is required: security description, Hyperliquid DEX info, or an empty string.

Parameters ​

ParameterTypeDescription
params?GetCrossExSymbolsReqOptional parameters to filter symbols

Returns ​

Promise<CrossExSymbol[]>

Promise with array of symbol information


getCrossExTransferCoins() ​

ts
getCrossExTransferCoins(params?: GetCrossExTransferCoinsReq): Promise<CrossExTransferCoin[]>;

Query Supported Transfer Currencies

Query supported transfer currencies for cross-exchange

Parameters ​

ParameterTypeDescription
params?GetCrossExTransferCoinsReqOptional currency filter

Returns ​

Promise<CrossExTransferCoin[]>

Promise with array of transfer coin information


getCrossExTransferHistory() ​

ts
getCrossExTransferHistory(params?: GetCrossExTransferHistoryReq): Promise<CrossExTransferHistory[]>;

Query Fund Transfer History

Query fund transfer history. Rate Limit: 200 requests per 10 seconds

Parameters ​

ParameterTypeDescription
params?GetCrossExTransferHistoryReqOptional filter parameters

Returns ​

Promise<CrossExTransferHistory[]>

Promise with array of transfer history records


getCrossMarginAccount() ​

ts
getCrossMarginAccount(): Promise<CrossMarginAccount>;

Returns ​

Promise<CrossMarginAccount>

Promise<GetCrossMarginAccountResp>

Deprecated ​

as of 2025-02-10 Retrieve cross margin account


getCrossMarginAccountHistory() ​

ts
getCrossMarginAccountHistory(params?: GetCrossMarginAccountHistoryReq): Promise<CrossMarginAccountHistoryRecord[]>;

Parameters ​

ParameterTypeDescription
params?GetCrossMarginAccountHistoryReqParameters for retrieving cross margin account change history

Returns ​

Promise<CrossMarginAccountHistoryRecord[]>

Promise<GetCrossMarginAccountHistoryResp[]>

Deprecated ​

as of 2025-02-10 Retrieve cross margin account change history

Record time range cannot exceed 30 days.


getCrossMarginBorrowableAmount() ​

ts
getCrossMarginBorrowableAmount(params: object): Promise<{
  amount: string;
  currency: string;
}>;

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for retrieving the max borrowable amount
params.currencystring-

Returns ​

Promise<{ amount: string; currency: string; }>

Promise<{ currency: string; amount: string; }>

Deprecated ​

as of 2025-02-10 Get the max borrowable amount for a specific cross margin currency


getCrossMarginBorrowHistory() ​

ts
getCrossMarginBorrowHistory(params: GetCrossMarginBorrowHistoryReq): Promise<CrossMarginMorrowLoanRecord[]>;

List cross margin borrow history

Sort by creation time in descending order by default. Set reverse=false to return ascending results.

Parameters ​

ParameterTypeDescription
paramsGetCrossMarginBorrowHistoryReqParameters for listing cross margin borrow history

Returns ​

Promise<CrossMarginMorrowLoanRecord[]>

Promise<SubmitCrossMarginBorrowLoanResp[]>


getCrossMarginBorrowLoan() ​

ts
getCrossMarginBorrowLoan(params: object): Promise<CrossMarginMorrowLoanRecord>;

Parameters ​

ParameterTypeDescription
params{ loan_id: string; }Parameters containing the borrow loan ID
params.loan_idstring-

Returns ​

Promise<CrossMarginMorrowLoanRecord>

Promise<SubmitCrossMarginBorrowLoanResp>

Deprecated ​

as of 2025-02-10 Retrieve single borrow loan detail


getCrossMarginCurrencies() ​

ts
getCrossMarginCurrencies(): Promise<CrossMarginCurrency[]>;

Returns ​

Promise<CrossMarginCurrency[]>

Promise<GetCrossMarginCurrenciesResp[]>

Deprecated ​

as of 2025-02-10 Currencies supported by cross margin


getCrossMarginCurrency() ​

ts
getCrossMarginCurrency(params: object): Promise<CrossMarginCurrency>;

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters containing the currency name
params.currencystring-

Returns ​

Promise<CrossMarginCurrency>

Promise<GetCrossMarginCurrenciesResp>

Deprecated ​

as of 2025-02-10 Retrieve detail of one single currency supported by cross margin


getCrossMarginInterestRecords() ​

ts
getCrossMarginInterestRecords(params?: GetCrossMarginInterestRecordsReq): Promise<GetCrossMarginInterestRecordsReq[]>;

Parameters ​

ParameterTypeDescription
params?GetCrossMarginInterestRecordsReqParameters for retrieving interest records

Returns ​

Promise<GetCrossMarginInterestRecordsReq[]>

Promise<GetCrossMarginInterestRecordsResp[]>

Deprecated ​

as of 2025-02-10 Interest records for the cross margin account


getCrossMarginRepayments() ​

ts
getCrossMarginRepayments(params?: GetCrossMarginRepaymentsReq): Promise<CrossMarginAccount[]>;

Parameters ​

ParameterTypeDescription
params?GetCrossMarginRepaymentsReqParameters for retrieving cross margin repayments

Returns ​

Promise<CrossMarginAccount[]>

Promise<GetCrossMarginRepaymentsResp[]>

Deprecated ​

as of 2025-02-10 Retrieve cross margin repayments

Sort by creation time in descending order by default. Set reverse=false to return ascending results.


getCrossMarginTransferableAmount() ​

ts
getCrossMarginTransferableAmount(params: object): Promise<{
  amount: string;
  currency: string;
}>;

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for retrieving the max transferable amount
params.currencystring-

Returns ​

Promise<{ amount: string; currency: string; }>

Promise<{ currency: string; amount: string; }>

Deprecated ​

as of 2025-02-10 Get the max transferable amount for a specific cross margin currency


getCurrencyChains() ​

ts
getCurrencyChains(params: object): Promise<CurrencyChain[]>;

List chains supported for specified currency

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters containing the currency name
params.currencystring-

Returns ​

Promise<CurrencyChain[]>

Promise<CurrencyChain[]>


getDeliveryAccount() ​

ts
getDeliveryAccount(params: object): Promise<DeliveryAccount>;

Query futures account

Parameters ​

ParameterTypeDescription
params{ settle: "usdt"; }Parameters for querying futures account
params.settle"usdt"-

Returns ​

Promise<DeliveryAccount>

Promise<GetDeliveryAccountResp>


getDeliveryAutoOrders() ​

ts
getDeliveryAutoOrders(params: GetDeliveryAutoOrdersReq): Promise<FuturesPriceTriggeredOrder[]>;

List all auto orders

Parameters ​

ParameterTypeDescription
paramsGetDeliveryAutoOrdersReqParameters for listing all auto orders

Returns ​

Promise<FuturesPriceTriggeredOrder[]>

Promise<FuturesPriceTriggeredOrder[]>


getDeliveryBook() ​

ts
getDeliveryBook(params: GetDeliveryBookReq): Promise<DeliveryBook[]>;

Query account book

Parameters ​

ParameterTypeDescription
paramsGetDeliveryBookReqParameters for querying account book

Returns ​

Promise<DeliveryBook[]>

Promise<GetDeliveryBookResp[]>


getDeliveryCandles() ​

ts
getDeliveryCandles(params: GetDeliveryCandlesReq): Promise<DeliveryCandle[]>;

Get futures Candles

Return specified contract Candles. If prefix contract with mark_, the contract's mark price Candles are returned; if prefix with index_, index price Candles will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying from, to and interval.

Parameters ​

ParameterTypeDescription
paramsGetDeliveryCandlesReqParameters for retrieving futures Candles

Returns ​

Promise<DeliveryCandle[]>

Promise<GetDeliveryCandlesResp[]>


getDeliveryClosedPositions() ​

ts
getDeliveryClosedPositions(params: GetDeliveryClosedPositionsReq): Promise<DeliveryClosedPosition[]>;

List position close history

Parameters ​

ParameterTypeDescription
paramsGetDeliveryClosedPositionsReqParameters for listing position close history

Returns ​

Promise<DeliveryClosedPosition[]>

Promise<GetDeliveryClosedPositionsResp[]>


getDeliveryContract() ​

ts
getDeliveryContract(params: object): Promise<FuturesDeliveryContract>;

Get a single contract

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: "usdt"; }Parameters for retrieving a single contract
params.contractstring-
params.settle"usdt"-

Returns ​

Promise<FuturesDeliveryContract>

Promise<DeliveryContract>


getDeliveryInsuranceBalanceHistory() ​

ts
getDeliveryInsuranceBalanceHistory(params: object): Promise<object[]>;

Futures insurance balance history

Parameters ​

ParameterTypeDescription
params{ limit?: number; settle: "usdt"; }Parameters for retrieving the futures insurance balance history
params.limit?number-
params.settle"usdt"-

Returns ​

Promise<object[]>

Promise<{ t: number; b: string; }[]>


getDeliveryLiquidationHistory() ​

ts
getDeliveryLiquidationHistory(params: GetDeliveryLiquidationHistoryReq): Promise<DeliveryLiquidationHistoryRecord[]>;

List liquidation history

Parameters ​

ParameterTypeDescription
paramsGetDeliveryLiquidationHistoryReqParameters for listing liquidation history

Returns ​

Promise<DeliveryLiquidationHistoryRecord[]>

Promise<GetDeliveryLiquidationHistoryResp[]>


getDeliveryOrder() ​

ts
getDeliveryOrder(params: object): Promise<FuturesOrder>;

Get a single order

Zero-filled order cannot be retrieved 10 minutes after order cancellation

Parameters ​

ParameterTypeDescription
params{ order_id: string; settle: "usdt"; }Parameters for retrieving a single order
params.order_idstring-
params.settle"usdt"-

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


getDeliveryOrderBook() ​

ts
getDeliveryOrderBook(params: GetDeliveryOrderBookReq): Promise<DeliveryOrderBook>;

Futures order book

Bids will be sorted by price from high to low, while asks sorted reversely

Parameters ​

ParameterTypeDescription
paramsGetDeliveryOrderBookReqParameters for retrieving the futures order book

Returns ​

Promise<DeliveryOrderBook>

Promise<GetDeliveryOrderBookResp>


getDeliveryOrders() ​

ts
getDeliveryOrders(params: GetDeliveryOrdersReq): Promise<FuturesOrder[]>;

List futures orders

Zero-fill order cannot be retrieved 10 minutes after order cancellation.

Parameters ​

ParameterTypeDescription
paramsGetDeliveryOrdersReqParameters for listing futures orders

Returns ​

Promise<FuturesOrder[]>

Promise<FuturesOrder[]>


getDeliveryPosition() ​

ts
getDeliveryPosition(params: object): Promise<FuturesPosition>;

Get single position

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: "usdt"; }Parameters for retrieving a single position
params.contractstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPosition>

Promise<Position>


getDeliveryPositions() ​

ts
getDeliveryPositions(params: object): Promise<FuturesPosition[]>;

List all positions of a user

Parameters ​

ParameterTypeDescription
params{ settle: "usdt"; }Parameters for listing all positions of a user
params.settle"usdt"-

Returns ​

Promise<FuturesPosition[]>

Promise<Position[]>


getDeliverySettlementHistory() ​

ts
getDeliverySettlementHistory(params: GetDeliverySettlementHistoryReq): Promise<DeliverySettlementHistoryRecord[]>;

List settlement history

Parameters ​

ParameterTypeDescription
paramsGetDeliverySettlementHistoryReqParameters for listing settlement history

Returns ​

Promise<DeliverySettlementHistoryRecord[]>

Promise<GetDeliverySettlementHistoryResp[]>


getDeliveryTickers() ​

ts
getDeliveryTickers(params: object): Promise<DeliveryTicker[]>;

List futures tickers

Parameters ​

ParameterTypeDescription
params{ contract?: string; settle: "usdt"; }Parameters for listing futures tickers
params.contract?string-
params.settle"usdt"-

Returns ​

Promise<DeliveryTicker[]>

Promise<GetDeliveryTickersResp[]>


getDeliveryTrades() ​

ts
getDeliveryTrades(params: GetDeliveryTradesReq): Promise<DeliveryTrade[]>;

Futures trading history

Parameters ​

ParameterTypeDescription
paramsGetDeliveryTradesReqParameters for retrieving the futures trading history

Returns ​

Promise<DeliveryTrade[]>

Promise<GetDeliveryTradesResp[]>


getDeliveryTradingHistory() ​

ts
getDeliveryTradingHistory(params: GetDeliveryTradingHistoryReq): Promise<DeliveryTradingHistoryRecord[]>;

List personal trading history

Parameters ​

ParameterTypeDescription
paramsGetDeliveryTradingHistoryReqParameters for listing personal trading history

Returns ​

Promise<DeliveryTradingHistoryRecord[]>

Promise<GetDeliveryTradingHistoryResp[]>


getDeliveryTriggeredOrder() ​

ts
getDeliveryTriggeredOrder(params: object): Promise<FuturesPriceTriggeredOrder>;

Get a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: string; settle: "usdt"; }Parameters for retrieving a price-triggered order
params.order_idstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPriceTriggeredOrder>

Promise<FuturesPriceTriggeredOrder>


getDepositRecords() ​

ts
getDepositRecords(params?: GetWithdrawalDepositRecordsReq): Promise<DepositRecord[]>;

Retrieve deposit records

Record time range cannot exceed 30 days

Parameters ​

ParameterTypeDescription
params?GetWithdrawalDepositRecordsReqParameters for filtering deposit records

Returns ​

Promise<DepositRecord[]>

Promise<DepositRecord[]>


getDualInvestmentOrders() ​

ts
getDualInvestmentOrders(params?: GetDualInvestmentOrdersReq): Promise<DualInvestmentOrder[]>;

Dual Investment order list

Parameters ​

ParameterType
params?GetDualInvestmentOrdersReq

Returns ​

Promise<DualInvestmentOrder[]>

Promise<GetDualInvestmentOrdersResp[]>


getDualInvestmentProducts() ​

ts
getDualInvestmentProducts(params?: GetDualInvestmentPlansReq): Promise<DualInvestmentProduct[]>;

Dual Investment product list

type is call (sell high) or put (buy low).

Parameters ​

ParameterType
params?GetDualInvestmentPlansReq

Returns ​

Promise<DualInvestmentProduct[]>

Promise<GetDualInvestmentProductsResp[]>


getDualModePosition() ​

ts
getDualModePosition(params: object): Promise<FuturesPosition[]>;

Retrieve position detail in dual mode

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: FuturesSettle; }Parameters for retrieving position detail in dual mode
params.contractstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition[]>

Promise<Position[]>


getDualOrderRefundPreview() ​

ts
getDualOrderRefundPreview(params: GetDualOrderRefundPreviewReq): Promise<DualOrderRefundPreview>;

Dual-currency early redemption preview

Parameters ​

ParameterType
paramsGetDualOrderRefundPreviewReq

Returns ​

Promise<DualOrderRefundPreview>


getDualProjectRecommend() ​

ts
getDualProjectRecommend(params?: GetDualProjectRecommendReq): Promise<DualProjectRecommend[]>;

Dual-currency recommended projects

Parameters ​

ParameterType
params?GetDualProjectRecommendReq

Returns ​

Promise<DualProjectRecommend[]>


getDualStockBalance() ​

ts
getDualStockBalance(): Promise<DualInvestmentBalance>;

Stock dual investment asset statistics

Returns ​

Promise<DualInvestmentBalance>


getDualStockInvestmentPlans() ​

ts
getDualStockInvestmentPlans(params?: GetDualStockInvestmentPlansReq): Promise<DualInvestmentProduct[]>;

Stock dual investment product list

Public. Each plan includes type: call (sell high) or put (buy low).

Parameters ​

ParameterType
params?GetDualStockInvestmentPlansReq

Returns ​

Promise<DualInvestmentProduct[]>


getDualStockOrderRefundPreview() ​

ts
getDualStockOrderRefundPreview(params: GetDualOrderRefundPreviewReq): Promise<DualOrderRefundPreview>;

Preview redemption of a stock dual investment order

Parameters ​

ParameterType
paramsGetDualOrderRefundPreviewReq

Returns ​

Promise<DualOrderRefundPreview>


getDualStockOrders() ​

ts
getDualStockOrders(params?: GetDualStockOrdersReq): Promise<DualInvestmentOrder[]>;

Stock dual investment order list

Parameters ​

ParameterType
params?GetDualStockOrdersReq

Returns ​

Promise<DualInvestmentOrder[]>


getDualStockProjectRecommend() ​

ts
getDualStockProjectRecommend(params?: GetDualProjectRecommendReq): Promise<DualProjectRecommend[]>;

Stock dual investment recommendations

Public. mode normal (default) or senior. When nothing matches, Gate returns label SERVER_ERROR and message "No data".

Parameters ​

ParameterType
params?GetDualProjectRecommendReq

Returns ​

Promise<DualProjectRecommend[]>


getEarnFixedTermHistory() ​

ts
getEarnFixedTermHistory(params: GetEarnFixedTermHistoryReq): Promise<GetEarnFixedTermHistoryResponse>;

Fixed-term earn subscription history.

Parameters ​

ParameterType
paramsGetEarnFixedTermHistoryReq

Returns ​

Promise<GetEarnFixedTermHistoryResponse>


getEarnFixedTermLends() ​

ts
getEarnFixedTermLends(params: GetEarnFixedTermLendsReq): Promise<GetEarnFixedTermLendsResponse>;

List fixed-term earn subscriptions.

Parameters ​

ParameterType
paramsGetEarnFixedTermLendsReq

Returns ​

Promise<GetEarnFixedTermLendsResponse>


getEarnFixedTermProducts() ​

ts
getEarnFixedTermProducts(params: GetEarnFixedTermProductsReq): Promise<GetEarnFixedTermProductsResponse>;

List fixed-term earn products (public).

Parameters ​

ParameterType
paramsGetEarnFixedTermProductsReq

Returns ​

Promise<GetEarnFixedTermProductsResponse>


getEarnFixedTermProductsByAsset() ​

ts
getEarnFixedTermProductsByAsset(asset: string, params?: GetEarnFixedTermProductsByAssetReq): Promise<GetEarnFixedTermProductsByAssetResponse>;

List fixed-term earn products for one asset (public).

Parameters ​

ParameterType
assetstring
params?GetEarnFixedTermProductsByAssetReq

Returns ​

Promise<GetEarnFixedTermProductsByAssetResponse>


getEstimatedInterestRate() ​

ts
getEstimatedInterestRate(params: object): Promise<Record<string, string>>;

Estimate interest rate

Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.

Parameters ​

ParameterTypeDescription
params{ currencies: string[]; }Parameters for retrieving estimated interest rates
params.currenciesstring[]-

Returns ​

Promise<Record<string, string>>

Promise<Record<string, string>>


getEstimatedInterestRates() ​

ts
getEstimatedInterestRates(params: object): Promise<any>;

Parameters ​

ParameterTypeDescription
params{ currencies: string[]; }Parameters for retrieving estimated interest rates
params.currenciesstring[]-

Returns ​

Promise<any>

Promise<any>

Deprecated ​

as of 2025-02-10 Estimated interest rates

Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.


getEstimatedQuickRepayment() ​

ts
getEstimatedQuickRepayment(): Promise<QuickEstimatedRepayment>;

Get estimated quick repayment data (unified account, cross-currency or portfolio margin mode)

Returns ​

Promise<QuickEstimatedRepayment>


getFlashSwapCurrencyPairs() ​

ts
getFlashSwapCurrencyPairs(params?: object): Promise<FlashSwapCurrencyPair[]>;

List All Supported Currency Pairs In Flash Swap

Parameters ​

ParameterTypeDescription
params?{ currency?: string; limit?: number; page?: number; }Parameters for retrieving data of the specified currency
params.currency?string-
params.limit?number-
params.page?number-

Returns ​

Promise<FlashSwapCurrencyPair[]>

Promise<GetFlashSwapCurrencyPairsResp[]>


getFlashSwapOrder() ​

ts
getFlashSwapOrder(params: object): Promise<FlashSwapOrder>;

Get a single flash swap order's detail

Parameters ​

ParameterTypeDescription
params{ order_id: number; }Parameters containing the flash swap order ID
params.order_idnumber-

Returns ​

Promise<FlashSwapOrder>

Promise<GetFlashSwapOrderResp>


getFlashSwapOrders() ​

ts
getFlashSwapOrders(params?: GetFlashSwapOrdersReq): Promise<FlashSwapOrder[]>;

List all flash swap orders

Parameters ​

ParameterTypeDescription
params?GetFlashSwapOrdersReqParameters for listing flash swap orders

Returns ​

Promise<FlashSwapOrder[]>

Promise<GetFlashSwapOrdersResp[]>


getFundingAccounts() ​

ts
getFundingAccounts(params?: object): Promise<object[]>;

Funding account list

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Parameters for listing funding accounts
params.currency?string-

Returns ​

Promise<object[]>

Promise<{ currency: string; available: string; locked: string; lent: string; total_lent: string; }[]>


getFundingRates() ​

ts
getFundingRates(params: GetFundingRatesReq): Promise<object[]>;

Funding rate history

Parameters ​

ParameterTypeDescription
paramsGetFundingRatesReqParameters for retrieving funding rate history

Returns ​

Promise<object[]>

Promise<{ t: number; r: string; }[]>


getFuturesAccount() ​

ts
getFuturesAccount(params: object): Promise<FuturesAccount>;

Query futures account

Query account information for classic future account and unified account

Parameters ​

ParameterTypeDescription
params{ settle: FuturesSettle; }Parameters for querying futures account
params.settleFuturesSettle-

Returns ​

Promise<FuturesAccount>

Promise<GetFuturesAccountResp>


getFuturesAccountBook() ​

ts
getFuturesAccountBook(params: GetFuturesAccountBookReq): Promise<FuturesAccountBookRecord[]>;

Query account book

If the contract field is provided, it can only filter records that include this field after 2023-10-30.

Parameters ​

ParameterTypeDescription
paramsGetFuturesAccountBookReqParameters for querying account book

Returns ​

Promise<FuturesAccountBookRecord[]>

Promise<GetFuturesAccountBookResp[]>


getFuturesAutoDeleveragingHistory() ​

ts
getFuturesAutoDeleveragingHistory(params: GetFuturesLiquidationHistoryReq): Promise<FuturesAutoDeleveragingHistoryRecord[]>;

List Auto-Deleveraging History

Parameters ​

ParameterTypeDescription
paramsGetFuturesLiquidationHistoryReqParameters for listing auto-deleveraging history

Returns ​

Promise<FuturesAutoDeleveragingHistoryRecord[]>

Promise<GetFuturesAutoDeleveragingHistoryResp[]>


getFuturesAutoOrders() ​

ts
getFuturesAutoOrders(params: GetFuturesAutoOrdersReq): Promise<FuturesPriceTriggeredOrder[]>;

List all auto orders

Parameters ​

ParameterTypeDescription
paramsGetFuturesAutoOrdersReqParameters for listing all auto orders

Returns ​

Promise<FuturesPriceTriggeredOrder[]>

Promise<FuturesPriceTriggeredOrder[]>


getFuturesCandles() ​

ts
getFuturesCandles(params: GetFuturesCandlesReq): Promise<FuturesCandle[]>;

Get futures Candles

Return specified contract Candles. If prefix contract with mark_, the contract's mark price Candles are returned; if prefix with index_, index price Candles will be returned.

Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying from, to and interval.

Parameters ​

ParameterTypeDescription
paramsGetFuturesCandlesReqParameters for retrieving futures Candles

Returns ​

Promise<FuturesCandle[]>

Promise<GetFuturesCandlesResp[]>


getFuturesContract() ​

ts
getFuturesContract(params: object): Promise<FuturesContract>;

Get a single contract

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: FuturesSettle; }Parameters for retrieving a single contract
params.contractstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesContract>

Promise<Contract>


getFuturesContractLeverage() ​

ts
getFuturesContractLeverage(params: GetFuturesContractLeverageReq): Promise<FuturesContractLeverageInfo>;

Get leverage for a contract in split / dual-side mode (requires pos_margin_mode and dual_side).

Parameters ​

ParameterTypeDescription
paramsGetFuturesContractLeverageReqsettle, contract, pos_margin_mode, dual_side

Returns ​

Promise<FuturesContractLeverageInfo>

Promise<FuturesContractLeverageInfo> — response field Lever is the leverage string


getFuturesContracts() ​

ts
getFuturesContracts(params: object): Promise<FuturesContract[]>;

List all futures contracts

Parameters ​

ParameterTypeDescription
params{ limit?: number; offset?: number; settle: FuturesSettle; }Parameters for listing futures contracts
params.limit?number-
params.offset?number-
params.settleFuturesSettle-

Returns ​

Promise<FuturesContract[]>

Promise<Contract[]>


getFuturesInsuranceBalanceHistory() ​

ts
getFuturesInsuranceBalanceHistory(params: object): Promise<object[]>;

Futures insurance balance history

Parameters ​

ParameterTypeDescription
params{ limit?: number; settle: FuturesSettle; }Parameters for retrieving futures insurance balance history
params.limit?number-
params.settleFuturesSettle-

Returns ​

Promise<object[]>

Promise<{ t: number; b: string; }[]>


getFuturesInsuranceHistory() ​

ts
getFuturesInsuranceHistory(params: GetFuturesInsuranceReq): Promise<FuturesInsuranceHistory[]>;

Parameters ​

ParameterType
paramsGetFuturesInsuranceReq

Returns ​

Promise<FuturesInsuranceHistory[]>


getFuturesLiquidationHistory() ​

ts
getFuturesLiquidationHistory(params: GetFuturesLiquidationHistoryReq): Promise<FuturesLiquidationHistoryRecord[]>;

List liquidation history

Parameters ​

ParameterTypeDescription
paramsGetFuturesLiquidationHistoryReqParameters for listing liquidation history

Returns ​

Promise<FuturesLiquidationHistoryRecord[]>

Promise<GetFuturesLiquidationHistoryResp[]>


getFuturesOrder() ​

ts
getFuturesOrder(params: object): Promise<FuturesOrder>;

Get a single order

Zero-fill order cannot be retrieved for 10 minutes after cancellation. Historical orders, by default, only data within the past 6 months is supported.

Parameters ​

ParameterTypeDescription
params{ order_id: string; settle: FuturesSettle; }-
params.order_idstringExchange order id (numeric), or the order's custom client id from the text field — same path segment as in GET /futures/{settle}/orders/{order_id}.
params.settleFuturesSettle-

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


getFuturesOrderBook() ​

ts
getFuturesOrderBook(params: GetFuturesOrderBookReq): Promise<FuturesOrderBook>;

Futures order book

Bids will be sorted by price from high to low, while asks sorted reversely.

Parameters ​

ParameterTypeDescription
paramsGetFuturesOrderBookReqParameters for retrieving the futures order book

Returns ​

Promise<FuturesOrderBook>

Promise<GetFuturesOrderBookResp>


getFuturesOrders() ​

ts
getFuturesOrders(params: GetFuturesOrdersReq): Promise<FuturesOrder[]>;

List futures orders

Zero-fill order cannot be retrieved for 10 minutes after cancellation. Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use GET /futures/{settle}/orders_timerange.

Parameters ​

ParameterTypeDescription
paramsGetFuturesOrdersReqParameters for listing futures orders

Returns ​

Promise<FuturesOrder[]>

Promise<FuturesOrder[]>


getFuturesOrdersByTimeRange() ​

ts
getFuturesOrdersByTimeRange(params: GetFuturesOrdersByTimeRangeReq): Promise<FuturesOrderTimerange[]>;

List Futures Orders By Time Range

Parameters ​

ParameterTypeDescription
paramsGetFuturesOrdersByTimeRangeReqParameters for listing futures orders by time range

Returns ​

Promise<FuturesOrderTimerange[]>

Promise<FuturesOrderTimerange[]>


getFuturesPosition() ​

ts
getFuturesPosition(params: object): Promise<FuturesPosition>;

Get single position

Clarifies dual-position query method when holding both long and short positions in the same contract market

Parameters ​

ParameterTypeDescription
params{ contract: string; settle: FuturesSettle; }Parameters for retrieving a single position
params.contractstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition>

Promise<Position>


getFuturesPositionCloseHistory() ​

ts
getFuturesPositionCloseHistory(params: GetFuturesPositionCloseHistoryReq): Promise<FuturesPositionHistoryRecord[]>;

Parameters ​

ParameterType
paramsGetFuturesPositionCloseHistoryReq

Returns ​

Promise<FuturesPositionHistoryRecord[]>


getFuturesPositionHistory() ​

ts
getFuturesPositionHistory(params: GetFuturesPositionHistoryReq): Promise<FuturesPositionHistoryRecord[]>;

List position close history

Parameters ​

ParameterTypeDescription
paramsGetFuturesPositionHistoryReqParameters for listing position close history

Returns ​

Promise<FuturesPositionHistoryRecord[]>

Promise<GetFuturesPositionHistoryResp[]>


getFuturesPositions() ​

ts
getFuturesPositions(params: GetFuturesPositionsReq): Promise<FuturesPosition[]>;

List all positions of a user

Parameters ​

ParameterTypeDescription
paramsGetFuturesPositionsReqParameters for listing all positions of a user

Returns ​

Promise<FuturesPosition[]>

Promise<Position[]>


getFuturesPriceTriggeredOrder() ​

ts
getFuturesPriceTriggeredOrder(params: object): Promise<FuturesPriceTriggeredOrder>;

Get a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: number; settle: FuturesSettle; }Parameters for retrieving a price-triggered order
params.order_idnumber-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPriceTriggeredOrder>

Promise<FuturesPriceTriggeredOrder>


getFuturesRpiOrderBook() ​

ts
getFuturesRpiOrderBook(params: GetFuturesOrderBookReq): Promise<FuturesOrderBook>;

Futures RPI order book

Public. No API key. Bids are sorted by descending price, asks by ascending price. interval is the merged-depth price precision (0 means no merge). with_id returns the depth update id, which increments on each change.

Parameters ​

ParameterTypeDescription
paramsGetFuturesOrderBookReqsettle, contract, optional interval, limit, with_id

Returns ​

Promise<FuturesOrderBook>


getFuturesStats() ​

ts
getFuturesStats(params: GetFuturesStatsReq): Promise<FuturesStats[]>;

Futures stats

Parameters ​

ParameterTypeDescription
paramsGetFuturesStatsReqParameters for retrieving futures stats

Returns ​

Promise<FuturesStats[]>

Promise<GetFuturesStatsResp[]>


getFuturesTickers() ​

ts
getFuturesTickers(params: object): Promise<FuturesTicker[]>;

List futures tickers

Parameters ​

ParameterTypeDescription
params{ contract?: string; settle: FuturesSettle; }Parameters for listing futures tickers
params.contract?string-
params.settleFuturesSettle-

Returns ​

Promise<FuturesTicker[]>

Promise<GetFuturesTickersResp[]>


getFuturesTrades() ​

ts
getFuturesTrades(params: GetFuturesTradesReq): Promise<FuturesTrade[]>;

Futures trading history

Parameters ​

ParameterTypeDescription
paramsGetFuturesTradesReqParameters for retrieving futures trading history

Returns ​

Promise<FuturesTrade[]>

Promise<GetFuturesTradesResp[]>


getFuturesTradingHistory() ​

ts
getFuturesTradingHistory(params: GetFuturesTradingHistoryReq): Promise<FuturesTradingHistoryRecord[]>;

List personal trading history

By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use GET /futures/{settle}/my_trades_timerange.

Parameters ​

ParameterTypeDescription
paramsGetFuturesTradingHistoryReqParameters for listing personal trading history

Returns ​

Promise<FuturesTradingHistoryRecord[]>

Promise<GetFuturesTradingHistoryResp[]>


getFuturesTradingHistoryByTimeRange() ​

ts
getFuturesTradingHistoryByTimeRange(params: GetFuturesTradingHistoryByTimeRangeReq): Promise<FuturesTradingHistoryRecord[]>;

List personal trading history

This endpoint is for data longer than 6 months.

Parameters ​

ParameterTypeDescription
paramsGetFuturesTradingHistoryByTimeRangeReqParameters for listing personal trading history

Returns ​

Promise<FuturesTradingHistoryRecord[]>

Promise<GetFuturesTradingHistoryResp[]>


getFuturesUserTradingFees() ​

ts
getFuturesUserTradingFees(params: object): Promise<any>;

Query user trading fee rates

Parameters ​

ParameterTypeDescription
params{ contract?: string; settle: FuturesSettle; }Parameters for querying user trading fee rates
params.contract?string-
params.settleFuturesSettle-

Returns ​

Promise<any>

Promise<any>


getGTDeduction() ​

ts
getGTDeduction(): Promise<{
  enabled: boolean;
}>;

Query GT deduction configuration

Query the current GT deduction configuration for the account.

Returns ​

Promise<{ enabled: boolean; }>

Promise<{ enabled: boolean }>


getHistoricalLendingRates() ​

ts
getHistoricalLendingRates(params: GetUnifiedHistoryLendingRateReq): Promise<UnifiedHistoryLendingRate>;

Get historical lending rates

Parameters ​

ParameterTypeDescription
paramsGetUnifiedHistoryLendingRateReqParameters for retrieving historical lending rates

Returns ​

Promise<UnifiedHistoryLendingRate>

Promise<UnifiedHistoryLendingRate>


getIndexConstituents() ​

ts
getIndexConstituents(params: object): Promise<IndexConstituents>;

Get index constituents

Parameters ​

ParameterTypeDescription
params{ index: string; settle: FuturesSettle; }Parameters for retrieving index constituents
params.indexstring-
params.settleFuturesSettle-

Returns ​

Promise<IndexConstituents>

Promise<GetIndexConstituentsResp>


getLendingAnnualizedTrendChart() ​

ts
getLendingAnnualizedTrendChart(params: object): Promise<object[]>;

UniLoan currency annualized trend chart

Get the annualized interest rate trend chart data for a specific currency

Parameters ​

ParameterTypeDescription
params{ asset: string; from: number; to: number; }Parameters for retrieving the annualized trend chart
params.assetstring-
params.fromnumber-
params.tonumber-

Returns ​

Promise<object[]>

Promise<{ time: number; value: string }[]>


getLendingCurrencies() ​

ts
getLendingCurrencies(): Promise<LendingCurrency[]>;

List currencies for lending

Returns ​

Promise<LendingCurrency[]>

Promise<GetLendingCurrenciesResp[]>


getLendingCurrency() ​

ts
getLendingCurrency(params: object): Promise<LendingCurrency>;

Get currency detail for lending

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for retrieving currency detail for lending
params.currencystring-

Returns ​

Promise<LendingCurrency>

Promise<GetLendingCurrenciesResp>


getLendingEstimatedRates() ​

ts
getLendingEstimatedRates(): Promise<object[]>;

Returns ​

Promise<object[]>


getLendingInterestRecords() ​

ts
getLendingInterestRecords(params?: GetLendingInterestRecordsReq): Promise<LendingInterestRecord[]>;

List interest records

Parameters ​

ParameterTypeDescription
params?GetLendingInterestRecordsReqParameters for listing interest records

Returns ​

Promise<LendingInterestRecord[]>

Promise<GetLendingInterestRecordsResp[]>


getLendingInterestStatus() ​

ts
getLendingInterestStatus(params: object): Promise<{
  currency: string;
  interest_status: string;
}>;

Query currency interest compounding status

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for querying currency interest compounding status
params.currencystring-

Returns ​

Promise<{ currency: string; interest_status: string; }>

Promise<{ currency: string; interest_status: string; }>


getLendingMarket() ​

ts
getLendingMarket(params: object): Promise<LendingMarket>;

Get detail of lending market

Parameters ​

ParameterTypeDescription
params{ currency_pair: string; }Parameters containing the currency pair
params.currency_pairstring-

Returns ​

Promise<LendingMarket>

Promise<{ currency_pair: string; base_min_borrow_amount: string; quote_min_borrow_amount: string; leverage: string; }>


getLendingMarkets() ​

ts
getLendingMarkets(): Promise<LendingMarket[]>;

List lending markets

Returns ​

Promise<LendingMarket[]>

Promise<GetLendingMarketsResp[]>


getLendingOrders() ​

ts
getLendingOrders(params?: GetLendingOrdersReq): Promise<LendingOrder[]>;

List user's lending orders

Parameters ​

ParameterTypeDescription
params?GetLendingOrdersReqParameters for listing user's lending orders

Returns ​

Promise<LendingOrder[]>

Promise<GetLendingOrdersResp[]>


getLendingRecords() ​

ts
getLendingRecords(params?: GetLendingRecordsReq): Promise<LendingRecord[]>;

List records of lending

Parameters ​

ParameterTypeDescription
params?GetLendingRecordsReqParameters for listing records of lending

Returns ​

Promise<LendingRecord[]>

Promise<GetLendingRecordsResp[]>


getLendingTotalInterest() ​

ts
getLendingTotalInterest(params: object): Promise<{
  currency: string;
  interest: string;
}>;

Get the user's total interest income of specified currency

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for retrieving the user's total interest income of specified currency
params.currencystring-

Returns ​

Promise<{ currency: string; interest: string; }>

Promise<{ currency: string; interest: string; }>


getLiquidationHistory() ​

ts
getLiquidationHistory(params: GetLiquidationHistoryReq): Promise<LiquidationHistoryRecord[]>;

Retrieve liquidation history

Interval between from and to cannot exceed 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail.

Parameters ​

ParameterTypeDescription
paramsGetLiquidationHistoryReqParameters for retrieving liquidation history

Returns ​

Promise<LiquidationHistoryRecord[]>

Promise<GetLiquidationHistoryResp[]>


getLoanMarginTiers() ​

ts
getLoanMarginTiers(): Promise<object[]>;

List loan margin tiers

Returns ​

Promise<object[]>

Promise<{ currency: string; margin_tiers: MarginTier[]; }[]>


getLowCapExchangeList() ​

ts
getLowCapExchangeList(): Promise<string[]>;

Retrieve the list of low-liquidity or low-cap tokens

Returns ​

Promise<string[]>

Promise<string[]>


getMainSubTransfers() ​

ts
getMainSubTransfers(params?: GetMainSubTransfersReq): Promise<SubAccountTransferRecord[]>;

Retrieve transfer records between main and sub accounts

Record time range cannot exceed 30 days

Note: only records after 2020-04-10 can be retrieved

Parameters ​

ParameterTypeDescription
params?GetMainSubTransfersReqParameters for filtering transfer records

Returns ​

Promise<SubAccountTransferRecord[]>

Promise<SubAccountTransferRecordResp[]>


getMarginAccounts() ​

ts
getMarginAccounts(params?: object): Promise<MarginAccount[]>;

Margin account list

Parameters ​

ParameterTypeDescription
params?{ currency_pair?: string; }Parameters for listing margin accounts
params.currency_pair?string-

Returns ​

Promise<MarginAccount[]>

Promise<GetMarginAccountsResp[]>


getMarginBalanceHistory() ​

ts
getMarginBalanceHistory(params?: GetMarginBalanceHistoryReq): Promise<MarginBalanceHistoryRecord[]>;

List margin account balance change history

Only transferals from and to margin account are provided for now. Time range allows 30 days at most.

Parameters ​

ParameterTypeDescription
params?GetMarginBalanceHistoryReqParameters for listing margin account balance change history

Returns ​

Promise<MarginBalanceHistoryRecord[]>

Promise<GetMarginBalanceHistoryResp[]>


getMarginPublicLoanTiers() ​

ts
getMarginPublicLoanTiers(params: object): Promise<object[]>;

Query the current market leverage lending gradient

Parameters ​

ParameterTypeDescription
params{ currency_pair: string; }Parameters containing currency pair to query
params.currency_pairstring-

Returns ​

Promise<object[]>

Promise with array of market gradient information


getMarginTransferableAmount() ​

ts
getMarginTransferableAmount(params: object): Promise<{
  amount: string;
  currency: string;
  currency_pair?: string;
}>;

Get the max transferable amount for a specific margin currency

Parameters ​

ParameterTypeDescription
params{ currency: string; currency_pair?: string; }Parameters for retrieving the max transferable amount
params.currencystring-
params.currency_pair?string-

Returns ​

Promise<{ amount: string; currency: string; currency_pair?: string; }>

Promise<{ currency: string; currency_pair?: string; amount: string; }>


getMarginUNIInterestRecords() ​

ts
getMarginUNIInterestRecords(params?: GetMarginUNIInterestRecordsReq): Promise<MarginUNIInterestRecord[]>;

List interest records

Parameters ​

ParameterTypeDescription
params?GetMarginUNIInterestRecordsReqParameters for listing interest records

Returns ​

Promise<MarginUNIInterestRecord[]>

Promise<GetMarginUNIInterestRecordsResp[]>


getMarginUNILoanRecords() ​

ts
getMarginUNILoanRecords(params?: GetMarginUNILoanRecordsReq): Promise<MarginUNILoanRecord[]>;

Get loan records

Parameters ​

ParameterTypeDescription
params?GetMarginUNILoanRecordsReqParameters for retrieving loan records

Returns ​

Promise<MarginUNILoanRecord[]>

Promise<GetMarginUNILoanRecordsResp[]>


getMarginUNILoans() ​

ts
getMarginUNILoans(params?: GetMarginUNILoansReq): Promise<MarginUNILoan[]>;

List loans

Parameters ​

ParameterTypeDescription
params?GetMarginUNILoansReqParameters for listing loans

Returns ​

Promise<MarginUNILoan[]>

Promise<GetMarginUNILoansResp[]>


getMarginUNIMaxBorrow() ​

ts
getMarginUNIMaxBorrow(params: GetMarginUNIMaxBorrowReq): Promise<MarginUNIMaxBorrowable>;

Get maximum borrowable

Parameters ​

ParameterTypeDescription
paramsGetMarginUNIMaxBorrowReqParameters for retrieving the maximum borrowable amount

Returns ​

Promise<MarginUNIMaxBorrowable>

Promise<GetMarginUNIMaxBorrowResp>


getMarginUserAccounts() ​

ts
getMarginUserAccounts(params?: object): Promise<MarginUserAccount[]>;

Query the user's leverage account list

Supports querying risk rate per position account and margin rate per position account

Parameters ​

ParameterTypeDescription
params?{ currency_pair?: string; }Optional parameters for filtering by currency pair
params.currency_pair?string-

Returns ​

Promise<MarginUserAccount[]>

Promise with array of margin account details


getMarginUserLoanTiers() ​

ts
getMarginUserLoanTiers(params: object): Promise<object[]>;

Check the user's own leverage lending gradient in the current market

Parameters ​

ParameterTypeDescription
params{ currency_pair: string; }Parameters containing currency pair to query
params.currency_pairstring-

Returns ​

Promise<object[]>

Promise with array of market gradient information


getMultiLoanAdjustmentRecords() ​

ts
getMultiLoanAdjustmentRecords(params?: GetMultiLoanAdjustmentRecordsReq): Promise<MultiLoanAdjustmentRecord[]>;

Query collateral adjustment records

Parameters ​

ParameterTypeDescription
params?GetMultiLoanAdjustmentRecordsReqParameters for querying collateral adjustment records

Returns ​

Promise<MultiLoanAdjustmentRecord[]>

Promise<GetMultiLoanAdjustmentRecordsResp[]>


getMultiLoanCurrencyQuota() ​

ts
getMultiLoanCurrencyQuota(params: object): Promise<MultiLoanCurrencyQuota[]>;

List User Currency Quota

Parameters ​

ParameterTypeDescription
params{ currency: string; type: "borrow" | "collateral"; }Parameters for listing user currency quota
params.currencystring-
params.type"borrow" | "collateral"-

Returns ​

Promise<MultiLoanCurrencyQuota[]>

Promise<GetMultiLoanCurrencyQuotaResp[]>


getMultiLoanCurrentRates() ​

ts
getMultiLoanCurrentRates(params: object): Promise<object[]>;

Query the current interest rate of currencies

Query the current interest rate of currencies in the last hour. The current interest rate is updated every hour.

Parameters ​

ParameterTypeDescription
params{ currencies: string[]; vip_level?: string; }Parameters containing currencies to query and optional VIP level
params.currenciesstring[]-
params.vip_level?string-

Returns ​

Promise<object[]>

Promise<MultiLoanCurrentRate[]>


getMultiLoanFixedRates() ​

ts
getMultiLoanFixedRates(): Promise<MultiLoanFixedRate[]>;

Query fixed interest rates for the currency for 7 days and 30 days

Returns ​

Promise<MultiLoanFixedRate[]>

Promise<GetMultiLoanFixedRatesResp[]>


getMultiLoanOrder() ​

ts
getMultiLoanOrder(params: object): Promise<MultiLoanOrder>;

Get Multi-Collateral Order Detail

Parameters ​

ParameterTypeDescription
params{ order_id: string; }Parameters for retrieving a multi-collateral order detail
params.order_idstring-

Returns ​

Promise<MultiLoanOrder>

Promise<GetMultiLoanOrdersResp>


getMultiLoanOrders() ​

ts
getMultiLoanOrders(params?: GetMultiLoanOrdersReq): Promise<MultiLoanOrder[]>;

List Multi-Collateral Orders

Parameters ​

ParameterTypeDescription
params?GetMultiLoanOrdersReqParameters for listing multi-collateral orders

Returns ​

Promise<MultiLoanOrder[]>

Promise<GetMultiLoanOrdersResp[]>


getMultiLoanRatio() ​

ts
getMultiLoanRatio(): Promise<MultiLoanRatio>;

Get Multi-Collateral ratio

Returns ​

Promise<MultiLoanRatio>

Promise<GetMultiLoanRatioResp>


getMultiLoanRepayRecords() ​

ts
getMultiLoanRepayRecords(params: GetMultiLoanRepayRecordsReq): Promise<MultiLoanRepayRecord[]>;

List Multi-Collateral Repay Records

Parameters ​

ParameterTypeDescription
paramsGetMultiLoanRepayRecordsReqParameters for listing multi-collateral repay records

Returns ​

Promise<MultiLoanRepayRecord[]>

Promise<GetMultiLoanRepayRecordsResp[]>


getMultiLoanSupportedCurrencies() ​

ts
getMultiLoanSupportedCurrencies(): Promise<MultiLoanSupportedCurrencies>;

Query supported borrowing and collateral currencies in Multi-Collateral

Returns ​

Promise<MultiLoanSupportedCurrencies>

Promise<GetMultiLoanSupportedCurrenciesResp>


getOptionsAccount() ​

ts
getOptionsAccount(): Promise<OptionsAccount>;

List options account

Indicates support for querying both classic options accounts and unified accounts

Returns ​

Promise<OptionsAccount>

Promise<GetOptionsAccountResp>


getOptionsAccountChange() ​

ts
getOptionsAccountChange(params?: GetOptionsAccountChangeReq): Promise<OptionsAccountChangeRecord[]>;

List account changing history

Parameters ​

ParameterTypeDescription
params?GetOptionsAccountChangeReqParameters for listing account changing history

Returns ​

Promise<OptionsAccountChangeRecord[]>

Promise<GetOptionsAccountChangeResp[]>


getOptionsCandles() ​

ts
getOptionsCandles(params: GetOptionsCandlesReq): Promise<OptionsCandle[]>;

Get options Candles

Parameters ​

ParameterTypeDescription
paramsGetOptionsCandlesReqParameters for retrieving options Candles

Returns ​

Promise<OptionsCandle[]>

Promise<GetOptionsCandlesResp[]>


getOptionsContract() ​

ts
getOptionsContract(params: object): Promise<OptionsContract>;

Query specified contract detail

Parameters ​

ParameterTypeDescription
params{ contract: string; }Parameters for querying specified contract detail
params.contractstring-

Returns ​

Promise<OptionsContract>

Promise<GetOptionsContractsResp>


getOptionsContracts() ​

ts
getOptionsContracts(params: object): Promise<OptionsContract[]>;

List all the contracts with specified underlying and expiration time

Parameters ​

ParameterTypeDescription
params{ expiration?: number; underlying: string; }Parameters for listing contracts
params.expiration?number-
params.underlyingstring-

Returns ​

Promise<OptionsContract[]>

Promise<GetOptionsContractsResp[]>


getOptionsContractSettlement() ​

ts
getOptionsContractSettlement(params: object): Promise<OptionsSettlementHistoryRecord>;

Get specified contract's settlement

Parameters ​

ParameterTypeDescription
params{ at: number; contract: string; underlying: string; }Parameters for retrieving specified contract's settlement
params.atnumber-
params.contractstring-
params.underlyingstring-

Returns ​

Promise<OptionsSettlementHistoryRecord>

Promise<GetOptionsSettlementHistoryResp}>


getOptionsExpirationTimes() ​

ts
getOptionsExpirationTimes(params: object): Promise<number[]>;

List all expiration times

Parameters ​

ParameterTypeDescription
params{ underlying: string; }Parameters for listing expiration times
params.underlyingstring-

Returns ​

Promise<number[]>

Promise<number[]>


getOptionsLiquidation() ​

ts
getOptionsLiquidation(params: object): Promise<GetOptionsLiquidationResp[]>;

List user's liquidation history of specified underlying

Parameters ​

ParameterTypeDescription
params{ contract?: string; underlying: string; }Parameters for listing user's liquidation history of specified underlying
params.contract?string-
params.underlyingstring-

Returns ​

Promise<GetOptionsLiquidationResp[]>

Promise<GetOptionsLiquidationResp[]>


getOptionsMMPSettings() ​

ts
getOptionsMMPSettings(params?: object): Promise<OptionsMMPSettings[]>;

Query MMP (Market Maker Protection) settings

Parameters ​

ParameterTypeDescription
params?{ underlying?: string; }Parameters for querying MMP settings
params.underlying?string-

Returns ​

Promise<OptionsMMPSettings[]>

Promise<OptionsMMPSetings[]>


getOptionsMySettlements() ​

ts
getOptionsMySettlements(params: GetOptionsMySettlementsReq): Promise<OptionsUserSettlement[]>;

List my options settlements

Parameters ​

ParameterTypeDescription
paramsGetOptionsMySettlementsReqParameters for listing my options settlements

Returns ​

Promise<OptionsUserSettlement[]>

Promise<GetOptionsMySettlementsResp[]>


getOptionsOrder() ​

ts
getOptionsOrder(params: object): Promise<SubmitOptionsOrderResp>;

Get a single order

Parameters ​

ParameterTypeDescription
params{ order_id: number; }Parameters for retrieving a single order
params.order_idnumber-

Returns ​

Promise<SubmitOptionsOrderResp>

Promise<SubmitOptionsOrderResp>


getOptionsOrderBook() ​

ts
getOptionsOrderBook(params: GetOptionsOrderBookReq): Promise<OptionsOrderBook>;

Options order book

Bids will be sorted by price from high to low, while asks sorted reversely

Parameters ​

ParameterTypeDescription
paramsGetOptionsOrderBookReqParameters for retrieving options order book

Returns ​

Promise<OptionsOrderBook>

Promise<GetOptionsOrderBookResp>


getOptionsOrders() ​

ts
getOptionsOrders(params: GetOptionsOrdersReq): Promise<SubmitOptionsOrderResp[]>;

List options orders

Parameters ​

ParameterTypeDescription
paramsGetOptionsOrdersReqParameters for listing options orders

Returns ​

Promise<SubmitOptionsOrderResp[]>

Promise<SubmitOptionsOrderResp[]>


getOptionsPersonalHistory() ​

ts
getOptionsPersonalHistory(params: GetOptionsPersonalHistoryReq): Promise<OptionsUserHistoryRecord[]>;

List personal trading history

Parameters ​

ParameterTypeDescription
paramsGetOptionsPersonalHistoryReqParameters for listing personal trading history

Returns ​

Promise<OptionsUserHistoryRecord[]>

Promise<GetOptionsPersonalHistoryResp[]>


getOptionsPositionContract() ​

ts
getOptionsPositionContract(params: object): Promise<OptionsPositionsUnderlying>;

Get specified contract position

Parameters ​

ParameterTypeDescription
params{ contract: string; }Parameters for retrieving specified contract position
params.contractstring-

Returns ​

Promise<OptionsPositionsUnderlying>

Promise<GetOptionsPositionsUnderlyingResp>


getOptionsPositionsUnderlying() ​

ts
getOptionsPositionsUnderlying(params: object): Promise<OptionsPositionsUnderlying[]>;

List user's positions of specified underlying

Parameters ​

ParameterTypeDescription
params{ underlying?: string; }Parameters for listing user's positions of specified underlying
params.underlying?string-

Returns ​

Promise<OptionsPositionsUnderlying[]>

Promise<GetOptionsPositionsUnderlyingResp[]>


getOptionsSettlementHistory() ​

ts
getOptionsSettlementHistory(params: GetOptionsSettlementHistoryReq): Promise<OptionsSettlementHistoryRecord[]>;

List settlement history

Parameters ​

ParameterTypeDescription
paramsGetOptionsSettlementHistoryReqParameters for listing settlement history

Returns ​

Promise<OptionsSettlementHistoryRecord[]>

Promise<GetOptionsSettlementHistoryResp[]>


getOptionsTickers() ​

ts
getOptionsTickers(params: object): Promise<OptionsTicker[]>;

List tickers of options contracts

Parameters ​

ParameterTypeDescription
params{ underlying: string; }Parameters for listing tickers of options contracts
params.underlyingstring-

Returns ​

Promise<OptionsTicker[]>

Promise<GetOptionsTickersResp[]>


getOptionsTrades() ​

ts
getOptionsTrades(params: GetOptionsTradesReq): Promise<OptionsTrade[]>;

Options trade history

Parameters ​

ParameterTypeDescription
paramsGetOptionsTradesReqParameters for retrieving options trade history

Returns ​

Promise<OptionsTrade[]>

Promise<GetOptionsTradesResp[]>


getOptionsUnderlyingCandles() ​

ts
getOptionsUnderlyingCandles(params: GetOptionsUnderlyingCandlesReq): Promise<OptionsUnderlyingCandle[]>;

Mark price Candles of an underlying

Parameters ​

ParameterTypeDescription
paramsGetOptionsUnderlyingCandlesReqParameters for retrieving mark price Candles of an underlying

Returns ​

Promise<OptionsUnderlyingCandle[]>

Promise<GetOptionsUnderlyingCandlesResp[]>


getOptionsUnderlyings() ​

ts
getOptionsUnderlyings(): Promise<object[]>;

List all underlyings

Returns ​

Promise<object[]>

Promise<{ name: string; index_price: string }[]>


getOptionsUnderlyingTicker() ​

ts
getOptionsUnderlyingTicker(params: object): Promise<{
  index_price: string;
  trade_call: number;
  trade_put: number;
}>;

Get underlying ticker

Parameters ​

ParameterTypeDescription
params{ underlying: string; }Parameters for retrieving underlying ticker
params.underlyingstring-

Returns ​

Promise<{ index_price: string; trade_call: number; trade_put: number; }>

Promise<{ trade_put: number; trade_call: number; index_price: string; }>


getOTCBankList() ​

ts
getOTCBankList(): Promise<GetOTCBankListResp>;

Get user bank card list (use is_default=1 for default card)

Returns ​

Promise<GetOTCBankListResp>


getOTCBankListLegacy() ​

ts
getOTCBankListLegacy(): Promise<GetOTCBankListResp>;

Get user bank card list (Inner-aligned alias of getOTCBankList)

Returns ​

Promise<GetOTCBankListResp>


getOTCBankSupplementChecklist() ​

ts
getOTCBankSupplementChecklist(params: GetOTCBankSupplementChecklistReq): Promise<GetOTCBankSupplementChecklistResp>;

Bank card supplement checklist

Parameters ​

ParameterType
paramsGetOTCBankSupplementChecklistReq

Returns ​

Promise<GetOTCBankSupplementChecklistResp>


getOTCFiatOrderDetail() ​

ts
getOTCFiatOrderDetail(params: GetOTCFiatOrderDetailReq): Promise<GetOTCFiatOrderDetailResp>;

Fiat order details

Query fiat order details

Parameters ​

ParameterTypeDescription
paramsGetOTCFiatOrderDetailReqParameters with order_id

Returns ​

Promise<GetOTCFiatOrderDetailResp>

Promise with fiat order details


getOTCFiatOrderList() ​

ts
getOTCFiatOrderList(params?: GetOTCFiatOrderListReq): Promise<GetOTCFiatOrderListResp>;

Fiat order list

Query the fiat order list with filters such as type, currency, time range, and status

Parameters ​

ParameterTypeDescription
params?GetOTCFiatOrderListReqFilter parameters for fiat order list

Returns ​

Promise<GetOTCFiatOrderListResp>

Promise with paginated fiat order list


getOTCStablecoinOrderList() ​

ts
getOTCStablecoinOrderList(params?: GetOTCStablecoinOrderListReq): Promise<GetOTCStablecoinOrderListResp>;

Stablecoin order list

Query stablecoin order list with filtering by currency, time range, status, etc.

Parameters ​

ParameterTypeDescription
params?GetOTCStablecoinOrderListReqFilter parameters for stablecoin order list

Returns ​

Promise<GetOTCStablecoinOrderListResp>

Promise with paginated stablecoin order list


getP2PMerchantAdsDetail() ​

ts
getP2PMerchantAdsDetail(params: P2PMerchantAdsDetailReq): Promise<P2PMerchantApiResp<P2PMerchantAdsDetail>>;

Get ad details

Parameters ​

ParameterType
paramsP2PMerchantAdsDetailReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantAdsDetail>>


getP2PMerchantAdsList() ​

ts
getP2PMerchantAdsList(params: P2PMerchantGetAdsListReq): Promise<P2PMerchantApiResp<P2PMerchantAdsListItem[]>>;

Get advertisement list

Parameters ​

ParameterType
paramsP2PMerchantGetAdsListReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantAdsListItem[]>>


getP2PMerchantChatsList() ​

ts
getP2PMerchantChatsList(params: P2PMerchantGetChatsListReq): Promise<P2PMerchantApiResp<P2PMerchantChatsListData>>;

Get chat history

Parameters ​

ParameterType
paramsP2PMerchantGetChatsListReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantChatsListData>>


getP2PMerchantCompletedTransactionList() ​

ts
getP2PMerchantCompletedTransactionList(params: P2PMerchantGetCompletedTransactionListReq): Promise<P2PMerchantApiResp<P2PMerchantTransactionListData>>;

Get completed/historical orders

Parameters ​

ParameterType
paramsP2PMerchantGetCompletedTransactionListReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantTransactionListData>>


getP2PMerchantCounterpartyUserInfo() ​

ts
getP2PMerchantCounterpartyUserInfo(params: P2PMerchantGetCounterpartyUserInfoReq): Promise<P2PMerchantApiResp<P2PMerchantCounterpartyUserInfo>>;

Get counterparty information

Parameters ​

ParameterType
paramsP2PMerchantGetCounterpartyUserInfoReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantCounterpartyUserInfo>>


getP2PMerchantMyAdsList() ​

ts
getP2PMerchantMyAdsList(params?: P2PMerchantMyAdsListReq): Promise<P2PMerchantApiResp<P2PMerchantMyAdsListData>>;

Get my ads list

Parameters ​

ParameterType
params?P2PMerchantMyAdsListReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantMyAdsListData>>


getP2PMerchantMyselfPayment() ​

ts
getP2PMerchantMyselfPayment(params?: P2PMerchantGetMyselfPaymentReq): Promise<P2PMerchantApiResp<P2PMerchantPaymentMethod[]>>;

Get payment method list

Parameters ​

ParameterType
params?P2PMerchantGetMyselfPaymentReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantPaymentMethod[]>>


getP2PMerchantPendingTransactionList() ​

ts
getP2PMerchantPendingTransactionList(params: P2PMerchantGetPendingTransactionListReq): Promise<P2PMerchantApiResp<P2PMerchantTransactionListData>>;

Get pending orders

Parameters ​

ParameterType
paramsP2PMerchantGetPendingTransactionListReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantTransactionListData>>


getP2PMerchantSpotBalance() ​

ts
getP2PMerchantSpotBalance(params?: object): Promise<SpotAccount[]>;

Query spot account balance for P2P merchant (v4.106.103)

Guide entry — uses Spot API GET /spot/accounts.

Parameters ​

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

Returns ​

Promise<SpotAccount[]>


getP2PMerchantTransactionDetails() ​

ts
getP2PMerchantTransactionDetails(params: P2PMerchantGetTransactionDetailsReq): Promise<P2PMerchantApiResp<P2PMerchantTransactionDetails>>;

Get order details

Parameters ​

ParameterType
paramsP2PMerchantGetTransactionDetailsReq

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantTransactionDetails>>


getP2PMerchantUserInfo() ​

ts
getP2PMerchantUserInfo(): Promise<P2PMerchantApiResp<P2PMerchantUserInfo>>;

Get account information

Returns ​

Promise<P2PMerchantApiResp<P2PMerchantUserInfo>>


getPartnerAgentDataAggregated() ​

ts
getPartnerAgentDataAggregated(params?: GetPartnerAgentDataAggregatedReq): Promise<PartnerDataAggregatedResponse>;

Aggregated partner agent statistics (rebate amount, volume, net fee, customer count; optional trading user count by business type).

Parameters ​

ParameterType
params?GetPartnerAgentDataAggregatedReq

Returns ​

Promise<PartnerDataAggregatedResponse>


getPartnerCommissionHistory() ​

ts
getPartnerCommissionHistory(params?: PartnerTransactionReq): Promise<{
  list: PartnerCommission[];
  total: number;
}>;

Partner obtains commission records of recommended users

Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
params?PartnerTransactionReqParameters for retrieving commission records

Returns ​

Promise<{ list: PartnerCommission[]; total: number; }>

Promise<GetPartnerCommissionHistoryResp>


getPartnerSubordinateList() ​

ts
getPartnerSubordinateList(params?: GetPartnerSubordinateListReq): Promise<{
  list: PartnerSubordinate[];
  total: number;
}>;

Partner subordinate list

Including sub-agents, direct customers, indirect customers

Parameters ​

ParameterTypeDescription
params?GetPartnerSubordinateListReqParameters for retrieving partner subordinate list

Returns ​

Promise<{ list: PartnerSubordinate[]; total: number; }>

Promise<{ total: number; list: { user_id: number; user_join_time: number; type: number; desc: string; }[]; }>


getPartnerTransactionHistory() ​

ts
getPartnerTransactionHistory(params?: PartnerTransactionReq): Promise<{
  list: PartnerTransaction[];
  total: number;
}>;

Partner obtains transaction records of recommended users

Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
params?PartnerTransactionReqParameters for retrieving transaction records

Returns ​

Promise<{ list: PartnerTransaction[]; total: number; }>

Promise<GetPartnerTransactionHistoryResp>


getPremiumIndexKLines() ​

ts
getPremiumIndexKLines(params: GetFuturesCandlesReq): Promise<PremiumIndexKLine[]>;

Premium Index K-Line

Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval.

Parameters ​

ParameterTypeDescription
paramsGetFuturesCandlesReqParameters for retrieving premium index K-Line

Returns ​

Promise<PremiumIndexKLine[]>

Promise<GetPremiumIndexKLineResp[]>


getPriceTriggeredOrder() ​

ts
getPriceTriggeredOrder(params: object): Promise<SpotPriceTriggeredOrder>;

Get a price-triggered order

Parameters ​

ParameterTypeDescription
params{ order_id: string; }Parameters for getting a price-triggered order
params.order_idstring-

Returns ​

Promise<SpotPriceTriggeredOrder>

Promise<SpotPriceTriggeredOrder>


getPushOrders() ​

ts
getPushOrders(params?: ListPushOrdersReq): Promise<PushOrder[]>;

List push orders

Parameters ​

ParameterTypeDescription
params?ListPushOrdersReqParameters for listing push orders

Returns ​

Promise<PushOrder[]>

Promise<PushOrder[]>


getRiskLimitTable() ​

ts
getRiskLimitTable(params: GetRiskLimitTableReq): Promise<RiskLimitTableTier[]>;

Query risk limit table by table_id

Parameters ​

ParameterTypeDescription
paramsGetRiskLimitTableReqParameters for querying risk limit table

Returns ​

Promise<RiskLimitTableTier[]>

Promise<RiskLimitTableTier[]>


getRiskLimitTiers() ​

ts
getRiskLimitTiers(params: GetRiskLimitTiersReq): Promise<RiskLimitTier[]>;

List risk limit tiers

When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the 'contract' parameter is empty.

Parameters ​

ParameterTypeDescription
paramsGetRiskLimitTiersReqParameters for listing risk limit tiers

Returns ​

Promise<RiskLimitTier[]>

Promise<GetRiskLimitTiersResp[]>


getSavedAddresses() ​

ts
getSavedAddresses(params: GetSavedAddressReq): Promise<SavedAddress[]>;

Query saved addresses

Parameters ​

ParameterTypeDescription
paramsGetSavedAddressReqParameters for querying saved address

Returns ​

Promise<SavedAddress[]>

Promise<GetSavedAddressResp[]>


getServerTime() ​

ts
getServerTime(): Promise<{
  server_time: number;
}>;

Get server current time

Returns ​

Promise<{ server_time: number; }>

Promise<{ server_time: number; }>


getSignTimestampMs() ​

ts
getSignTimestampMs(): number;

Timestamp used to sign the request. Override this method to implement your own timestamp/sync mechanism

Returns ​

number

Inherited from ​

BaseRestClient.getSignTimestampMs


getSmallBalanceHistory() ​

ts
getSmallBalanceHistory(params?: GetSmallBalanceHistoryReq): Promise<SmallBalanceHistoryRecord[]>;

List small balance history

Parameters ​

ParameterTypeDescription
params?GetSmallBalanceHistoryReqParameters for listing small balance history

Returns ​

Promise<SmallBalanceHistoryRecord[]>

Promise<GetSmallBalanceHistoryResp[]>


getSmallBalances() ​

ts
getSmallBalances(): Promise<SmallBalanceRecord>;

List small balance

Returns ​

Promise<SmallBalanceRecord>

Promise<GetSmallBalancesResp>


getSpotAccountBook() ​

ts
getSpotAccountBook(params?: GetSpotAccountBookReq): Promise<SpotAccountBook[]>;

Query account book

Record time range cannot exceed 30 days.

Parameters ​

ParameterTypeDescription
params?GetSpotAccountBookReqParameters for querying account book

Returns ​

Promise<SpotAccountBook[]>

Promise<GetSpotAccountBookResp[]>


getSpotAccounts() ​

ts
getSpotAccounts(params?: object): Promise<SpotAccount[]>;

List spot accounts

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Parameters for listing spot accounts
params.currency?string-

Returns ​

Promise<SpotAccount[]>

Promise<GetSpotAccountsResp[]>

Example ​

ts
import { client } from './authenticated-client.js';

async function main() {
  console.log('Spot balances:', await client.getSpotAccounts());
  console.log(
    'Open BTC_USDT orders:',
    await client.getSpotOrders({
      currency_pair: 'BTC_USDT',
      status: 'open',
      account: 'spot',
      page: 1,
      limit: 100,
    }),
  );
}

main().catch(() => {
  console.error(
    'Account request failed. Check credentials, permissions and environment.',
  );
  process.exitCode = 1;
});

See ​

Read Spot balances


getSpotAutoOrders() ​

ts
getSpotAutoOrders(params: GetSpotAutoOrdersReq): Promise<SpotPriceTriggeredOrder[]>;

Retrieve running auto order list

Parameters ​

ParameterTypeDescription
paramsGetSpotAutoOrdersReqParameters for retrieving running auto order list

Returns ​

Promise<SpotPriceTriggeredOrder[]>

Promise<SpotPriceTriggeredOrder[]>


getSpotBatchFeeRates() ​

ts
getSpotBatchFeeRates(params: object): Promise<Record<string, SpotFeeRates>>;

Query a batch of user trading fee rates

Parameters ​

ParameterTypeDescription
params{ currency_pairs: string; }Parameters for querying a batch of user trading fee rates
params.currency_pairsstring-

Returns ​

Promise<Record<string, SpotFeeRates>>


getSpotCandles() ​

ts
getSpotCandles(params: GetSpotCandlesReq): Promise<SpotCandle[]>;

Market Candles

Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval.

Parameters ​

ParameterTypeDescription
paramsGetSpotCandlesReqParameters for retrieving market Candles

Returns ​

Promise<SpotCandle[]>

Promise<GetSpotCandlesResp>


getSpotCurrencies() ​

ts
getSpotCurrencies(): Promise<SpotCurrency[]>;

List all currencies' details

Currency has two forms:

  • Only currency name, e.g., BTC, USDT
  • <currency>_<chain>, e.g., HT_ETH

The latter one occurs when one currency has multiple chains. Currency detail contains a chain field whatever the form is. To retrieve all chains of one currency, you can use all the details which have the name of the currency or name starting with <currency>_.

Returns ​

Promise<SpotCurrency[]>

Promise<GetSpotCurrenciesResp[]>


getSpotCurrency() ​

ts
getSpotCurrency(params: object): Promise<SpotCurrency>;

Get details of a specific currency

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for retrieving details of a specific currency
params.currencystring-

Returns ​

Promise<SpotCurrency>

Promise<GetSpotCurrenciesResp>


getSpotCurrencyPair() ​

ts
getSpotCurrencyPair(params: object): Promise<CurrencyPair>;

Get details of a specific currency pair

Parameters ​

ParameterTypeDescription
params{ currency_pair: string; }Parameters for retrieving details of a specific currency pair
params.currency_pairstring-

Returns ​

Promise<CurrencyPair>

Promise<CurrencyPair>


getSpotCurrencyPairs() ​

ts
getSpotCurrencyPairs(): Promise<CurrencyPair[]>;

List all currency pairs supported

Returns ​

Promise<CurrencyPair[]>

Promise<CurrencyPair[]>


getSpotFeeRates() ​

ts
getSpotFeeRates(params?: object): Promise<SpotFeeRates>;

Query user trading fee rates

This API is deprecated in favour of new fee retrieving API /wallet/fee.

Parameters ​

ParameterTypeDescription
params?{ currency_pair?: string; }Parameters for querying user trading fee rates
params.currency_pair?string-

Returns ​

Promise<SpotFeeRates>

Promise<GetSpotFeeRatesResp>


getSpotInsuranceHistory() ​

ts
getSpotInsuranceHistory(params: GetSpotInsuranceHistoryReq): Promise<SpotInsuranceHistory[]>;

Query spot insurance fund historical data

Parameters ​

ParameterTypeDescription
paramsGetSpotInsuranceHistoryReqParameters for querying spot insurance fund history

Returns ​

Promise<SpotInsuranceHistory[]>

Promise<{ currency: string; balance: string; time: number; }[]>


getSpotOpenOrders() ​

ts
getSpotOpenOrders(params?: object): Promise<GetSpotOpenOrdersResp[]>;

List all open orders

List open orders in all currency pairs. Note that pagination parameters affect record number in each currency pair's open order list. No pagination is applied to the number of currency pairs returned. All currency pairs with open orders will be returned. Spot, portfolio, and margin orders are returned by default. To list cross margin orders, account must be set to cross_margin.

Parameters ​

ParameterTypeDescription
params?{ account?: "spot" | "margin" | "cross_margin" | "unified"; limit?: number; page?: number; }Parameters for listing all open orders
params.account?"spot" | "margin" | "cross_margin" | "unified"-
params.limit?number-
params.page?number-

Returns ​

Promise<GetSpotOpenOrdersResp[]>

Promise<GetSpotOpenOrdersResp[]>


getSpotOrder() ​

ts
getSpotOrder(params: GetSpotOrderReq): Promise<SpotOrder>;

Get a single order

Spot, portfolio and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin.

Parameters ​

ParameterTypeDescription
paramsGetSpotOrderReqParameters for getting a single order

Returns ​

Promise<SpotOrder>

Promise<Order>

See ​

Spot order management


getSpotOrderBook() ​

ts
getSpotOrderBook(params: GetSpotOrderBookReq): Promise<SpotOrderBook>;

Retrieve order book

Order book will be sorted by price from high to low on bids; low to high on asks.

Parameters ​

ParameterTypeDescription
paramsGetSpotOrderBookReqParameters for retrieving order book

Returns ​

Promise<SpotOrderBook>

Promise<GetSpotOrderBookResp>

Example ​

ts
import { RestClient } from 'gateio-api';

const client = new RestClient({}, { timeout: 10000 });

async function main() {
  console.log(
    'Pair rules:',
    await client.getSpotCurrencyPair({ currency_pair: 'BTC_USDT' }),
  );
  console.log(
    'Order book:',
    await client.getSpotOrderBook({
      currency_pair: 'BTC_USDT',
      limit: 10,
      with_id: true,
    }),
  );
  console.log(
    'Candles:',
    await client.getSpotCandles({
      currency_pair: 'BTC_USDT',
      interval: '1m',
      limit: 5,
    }),
  );
}

main().catch(() => {
  console.error('Unable to read market data.');
  process.exitCode = 1;
});

See ​

Read an order book


getSpotOrders() ​

ts
getSpotOrders(params: GetSpotOrdersReq): Promise<SpotOrder[]>;

List orders

Spot, portfolio and margin orders are returned by default. If cross margin orders are needed, account must be set to cross_margin.

Parameters ​

ParameterTypeDescription
paramsGetSpotOrdersReqParameters for listing orders

Returns ​

Promise<SpotOrder[]>

Promise<Order[]>

See ​

Spot order management


getSpotPovOrder() ​

ts
getSpotPovOrder(params: object): Promise<SpotPovOrder>;

Query Spot POV order details

Supports the order ID returned after creation, or the custom ID specified in the text field.

Parameters ​

ParameterTypeDescription
params{ order_id: string; }Parameters containing the order ID
params.order_idstring-

Returns ​

Promise<SpotPovOrder>

Promise<SpotPovOrder>


getSpotPovOrders() ​

ts
getSpotPovOrders(params: GetSpotPovOrdersReq): Promise<SpotPovOrder[]>;

List Spot POV orders

List percentage-of-volume strategy orders. Status defaults to open when listing active orders.

Parameters ​

ParameterTypeDescription
paramsGetSpotPovOrdersReqParameters for listing Spot POV orders

Returns ​

Promise<SpotPovOrder[]>

Promise<SpotPovOrder[]>


getSpotRpiOrderBook() ​

ts
getSpotRpiOrderBook(params: GetSpotOrderBookReq): Promise<SpotOrderBook>;

Spot RPI order book

Public. No API key. Bids are sorted by descending price, asks by ascending price. Same query parameters as getSpotOrderBook.

Parameters ​

ParameterTypeDescription
paramsGetSpotOrderBookReqcurrency_pair, optional interval, limit, with_id

Returns ​

Promise<SpotOrderBook>


getSpotTicker() ​

ts
getSpotTicker(params?: object): Promise<SpotTicker[]>;

Retrieve ticker information

Return only related data if currency_pair is specified; otherwise return all of them.

Parameters ​

ParameterTypeDescription
params?{ currency_pair?: string; timezone?: "all" | "utc0" | "utc8"; }Parameters for retrieving ticker information
params.currency_pair?string-
params.timezone?"all" | "utc0" | "utc8"-

Returns ​

Promise<SpotTicker[]>

Promise<GetSpotTickerResp[]>

Example ​

ts
import { RestClient } from 'gateio-api';

const client = new RestClient({}, { timeout: 10000 });

async function main() {
  const tickers = await client.getSpotTicker({ currency_pair: 'BTC_USDT' });
  const ticker = tickers[0];
  if (!ticker) {
    throw new Error('No BTC_USDT ticker returned.');
  }
  console.log('BTC_USDT last price:', ticker.last);
}

main().catch(() => {
  console.error('Unable to read the public ticker.');
  process.exitCode = 1;
});

See ​

Read a public ticker


getSpotTrades() ​

ts
getSpotTrades(params: GetSpotTradesReq): Promise<SpotTrade[]>;

Retrieve market trades

You can use from and to to query by time range, or use last_id by scrolling page. The default behavior is by time range. Scrolling query using last_id is not recommended any more. If last_id is specified, time range query parameters will be ignored.

Parameters ​

ParameterTypeDescription
paramsGetSpotTradesReqParameters for retrieving market trades

Returns ​

Promise<SpotTrade[]>

Promise<GetSpotTradesResp[]>


getSpotTradingHistory() ​

ts
getSpotTradingHistory(params?: GetSpotTradingHistoryReq): Promise<SpotHistoricTradeRecord[]>;

List personal trading history

By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts.

The history within a specified time range can be queried by specifying from or (and) to.

If no time parameters are specified, only data for the last 7 days can be obtained. If only any parameter of from or to is specified, only 7-day data from the start (or end) of the specified time is returned. The range not allowed to exceed 30 days. The parameters of the time range filter are processed according to the order end time.

The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0.

Parameters ​

ParameterTypeDescription
params?GetSpotTradingHistoryReqParameters for listing personal trading history

Returns ​

Promise<SpotHistoricTradeRecord[]>

Promise<GetSpotTradingHistoryResp[]>

See ​

Spot order management


getStakingCoins() ​

ts
getStakingCoins(params?: object): Promise<string[]>;

List staking coins

Parameters ​

ParameterTypeDescription
params?{ coin?: string; cointype?: string; }Parameters for listing staking coins
params.coin?string-
params.cointype?string-

Returns ​

Promise<string[]>

Promise<string[]>


getStockBalanceRecords() ​

ts
getStockBalanceRecords(params?: GetStockBalanceRecordsReq): Promise<StockApiResp<StockListData<StockBalanceRecordItem>>>;

Query user stock balance records

Parameters ​

ParameterTypeDescription
params?GetStockBalanceRecordsReqOptional filters, time range, sort direction, details, and pagination

Returns ​

Promise<StockApiResp<StockListData<StockBalanceRecordItem>>>

Promise with paginated balance records; detail is returned only when include_detail=true


getStockExchanges() ​

ts
getStockExchanges(): Promise<StockApiResp<StockListData<StockExchangeItem>>>;

Query supported stock exchanges

Returns ​

Promise<StockApiResp<StockListData<StockExchangeItem>>>

Promise with exchange list


getStockFeeRate() ​

ts
getStockFeeRate(): Promise<StockApiResp<StockListData<StockFeeRateItem>>>;

Query stock fee rates

Maker/taker fee fields apply to Japanese and Korean stocks.

Returns ​

Promise<StockApiResp<StockListData<StockFeeRateItem>>>

Promise with fee rate list by VIP level


getStockOrderBook() ​

ts
getStockOrderBook(symbol: string): Promise<StockApiResp<StockOrderBook>>;

Query stock market order book

Parameters ​

ParameterTypeDescription
symbolstringSymbol

Returns ​

Promise<StockApiResp<StockOrderBook>>

Promise with order book data


getStockOrderDeals() ​

ts
getStockOrderDeals(params: GetStockOrderDealsReq): Promise<StockApiResp<StockListData<StockOrderDealItem>>>;

Query stock order trade records

Parameters ​

ParameterTypeDescription
paramsGetStockOrderDealsReqOrder ID and optional pagination

Returns ​

Promise<StockApiResp<StockListData<StockOrderDealItem>>>

Promise with paginated trade records


getStockOrderHistory() ​

ts
getStockOrderHistory(params?: GetStockOrderHistoryReq): Promise<StockApiResp<StockListData<StockOrderHistoryItem>>>;

Query stock order history

Parameters ​

ParameterTypeDescription
params?GetStockOrderHistoryReqOptional filters for symbol, order IDs, time range, side, and pagination

Returns ​

Promise<StockApiResp<StockListData<StockOrderHistoryItem>>>

Promise with paginated historical order list


getStockOrders() ​

ts
getStockOrders(params?: GetStockOrdersReq): Promise<StockApiResp<StockListData<StockOrderItem>>>;

Query open stock orders

Parameters ​

ParameterTypeDescription
params?GetStockOrdersReqOptional symbol filter

Returns ​

Promise<StockApiResp<StockListData<StockOrderItem>>>

Promise with open order list


getStockPositions() ​

ts
getStockPositions(params?: GetStockPositionsReq): Promise<StockApiResp<StockListData<StockPositionItem>>>;

Query current stock positions

Parameters ​

ParameterTypeDescription
params?GetStockPositionsReqOptional filters for PnL calc, symbol, and exchange

Returns ​

Promise<StockApiResp<StockListData<StockPositionItem>>>

Promise with position list


getStockSymbolDetail() ​

ts
getStockSymbolDetail(params?: GetStockSymbolDetailReq): Promise<StockApiResp<StockListData<StockSymbolDetailItem>>>;

Query stock symbol details

Parameters ​

ParameterTypeDescription
params?GetStockSymbolDetailReqOptional filters for symbols, exchange, and pagination

Returns ​

Promise<StockApiResp<StockListData<StockSymbolDetailItem>>>

Promise with paginated symbol detail list


getStockSymbols() ​

ts
getStockSymbols(params?: GetStockSymbolsReq): Promise<StockApiResp<StockListData<StockSymbolItem>>>;

Query stock symbol list

Parameters ​

ParameterTypeDescription
params?GetStockSymbolsReqOptional filters for symbols, exchange, and pagination

Returns ​

Promise<StockApiResp<StockListData<StockSymbolItem>>>

Promise with paginated symbol list


getStockTransactions() ​

ts
getStockTransactions(params?: GetStockTransactionsReq): Promise<StockApiResp<StockListData<StockTransactionItem>>>;

Query stock transaction records

Parameters ​

ParameterTypeDescription
params?GetStockTransactionsReqOptional filters for time range, ref_id, type, and pagination

Returns ​

Promise<StockApiResp<StockListData<StockTransactionItem>>>

Promise with paginated transaction list


getStockUserAssets() ​

ts
getStockUserAssets(params?: GetStockUserAssetsReq): Promise<StockApiResp<StockUserAssets>>;

Query user stock assets

Parameters ​

ParameterTypeDescription
params?GetStockUserAssetsReqOptional PnL calculation parameters

Returns ​

Promise<StockApiResp<StockUserAssets>>

Promise with user asset details


getStpGroups() ​

ts
getStpGroups(params?: object): Promise<StpGroup[]>;

List STP Groups

Parameters ​

ParameterTypeDescription
params?{ name?: string; }Parameters for listing STP groups
params.name?string-

Returns ​

Promise<StpGroup[]>

Promise<CreateStpGroupResp[]>


getStpGroupUsers() ​

ts
getStpGroupUsers(params: object): Promise<StpGroupUser[]>;

List users of the STP group

Parameters ​

ParameterTypeDescription
params{ stp_id: number; }Parameters for listing users of the STP group
params.stp_idnumber-

Returns ​

Promise<StpGroupUser[]>

Promise<StpResp[]>


getSubAccount() ​

ts
getSubAccount(params: object): Promise<SubAccount>;

Get the sub-account

Parameters ​

ParameterTypeDescription
params{ user_id: number; }Parameters containing the sub-account user ID
params.user_idnumber-

Returns ​

Promise<SubAccount>

Promise<SubAccountResp>


getSubAccountApiKey() ​

ts
getSubAccountApiKey(params: object): Promise<SubAccountAPIKey>;

Get the API Key of the sub-account

Parameters ​

ParameterTypeDescription
params{ key: string; user_id: number; }Parameters containing the sub-account user ID and API key
params.keystring-
params.user_idnumber-

Returns ​

Promise<SubAccountAPIKey>

Promise<SubAccountKey>


getSubAccountApiKeys() ​

ts
getSubAccountApiKeys(params: object): Promise<SubAccountAPIKey[]>;

List all API Key of the sub-account

Parameters ​

ParameterTypeDescription
params{ user_id: number; }Parameters containing the sub-account user ID
params.user_idnumber-

Returns ​

Promise<SubAccountAPIKey[]>

Promise<SubAccountKey[]>


getSubAccountMode() ​

ts
getSubAccountMode(): Promise<SubAccountMode>;

Get sub-account mode

Unified account mode:

  • classic: Classic account mode
  • multi_currency: Multi-currency margin mode
  • portfolio: Portfolio margin mode

Returns ​

Promise<SubAccountMode>

Promise<SubAccountMode>


getSubAccounts() ​

ts
getSubAccounts(params?: object): Promise<SubAccount[]>;

List sub-accounts

Parameters ​

ParameterTypeDescription
params?{ type?: string; }Parameters for listing sub-accounts
params.type?string-

Returns ​

Promise<SubAccount[]>

Promise<GetSubAccountsResp[]>


getSubBalance() ​

ts
getSubBalance(params?: GetSubAccountBalancesReq): Promise<SubAccountBalance[]>;

Retrieve sub account balances

Parameters ​

ParameterTypeDescription
params?GetSubAccountBalancesReqParameters for retrieving sub account balances

Returns ​

Promise<SubAccountBalance[]>

Promise<SubAccountBalance[]>


getSubCrossMarginBalances() ​

ts
getSubCrossMarginBalances(params?: object): Promise<SubAccountCrossMarginBalancesResp[]>;

Query subaccount's cross_margin account info

Parameters ​

ParameterTypeDescription
params?{ sub_uid?: string; }Parameters for querying subaccount's cross_margin account info
params.sub_uid?string-

Returns ​

Promise<SubAccountCrossMarginBalancesResp[]>

Promise<SubAccountCrossMarginBalancesResp[]>


getSubFuturesBalances() ​

ts
getSubFuturesBalances(params?: object): Promise<SubAccountFuturesBalancesResp[]>;

Query sub accounts' futures account balances

Parameters ​

ParameterTypeDescription
params?{ settle?: string; sub_uid?: string; }Parameters for querying sub accounts' futures account balances
params.settle?string-
params.sub_uid?string-

Returns ​

Promise<SubAccountFuturesBalancesResp[]>

Promise<SubAccountFuturesBalancesResp[]>


getSubMarginBalances() ​

ts
getSubMarginBalances(params?: object): Promise<{
  available: SubAccountMarginBalance[];
  uid: string;
}>;

Query sub accounts' margin balances

Parameters ​

ParameterTypeDescription
params?{ sub_uid?: string; }Parameters for querying sub accounts' margin balances
params.sub_uid?string-

Returns ​

Promise<{ available: SubAccountMarginBalance[]; uid: string; }>

Promise<SubAccountMarginBalancesResp[]>


getSystemMaintenanceStatus() ​

ts
getSystemMaintenanceStatus(): Promise<any>;

Returns ​

Promise<any>


getTradFiAssets() ​

ts
getTradFiAssets(): Promise<TradFiApiResp<TradFiAssets>>;

Returns ​

Promise<TradFiApiResp<TradFiAssets>>


getTradFiKlines() ​

ts
getTradFiKlines(symbol: string, params: TradFiGetKlinesParams): Promise<TradFiApiResp<TradFiListData<TradFiKlineItem>>>;

TradFi symbol klines

symbol is the path parameter (for example XAUUSD). Query rules are on TradFiGetKlinesParams: times are Unix seconds, limit max 500, and limit cannot be combined with begin_time and end_time (INVALID_ARGUMENT). begin_time without end_time returns HTTP 400, label INTERNAL_SERVER_ERROR, message "Service is busy. Please try again later."

Parameters ​

ParameterType
symbolstring
paramsTradFiGetKlinesParams

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiKlineItem>>>


getTradFiMT5Account() ​

ts
getTradFiMT5Account(): Promise<TradFiApiResp<TradFiMT5Account>>;

Returns ​

Promise<TradFiApiResp<TradFiMT5Account>>


getTradFiOrderHistory() ​

ts
getTradFiOrderHistory(params?: TradFiGetOrderHistoryParams): Promise<TradFiApiResp<TradFiListData<TradFiOrderHistoryItem>>>;

Parameters ​

ParameterType
params?TradFiGetOrderHistoryParams

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiOrderHistoryItem>>>


getTradFiOrderLog() ​

ts
getTradFiOrderLog(params: object): Promise<TradFiApiResp<TradFiOrderLog>>;

Query order details by log_id from order placement (v4.106.94)

Parameters ​

ParameterType
params{ log_id: string | number; }
params.log_idstring | number

Returns ​

Promise<TradFiApiResp<TradFiOrderLog>>


getTradFiOrders() ​

ts
getTradFiOrders(): Promise<TradFiApiResp<TradFiListData<TradFiOrderItem>>>;

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiOrderItem>>>


getTradFiPositionHistory() ​

ts
getTradFiPositionHistory(params?: TradFiGetPositionHistoryParams): Promise<TradFiApiResp<TradFiListData<TradFiPositionHistoryItem>>>;

Parameters ​

ParameterType
params?TradFiGetPositionHistoryParams

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiPositionHistoryItem>>>


getTradFiPositions() ​

ts
getTradFiPositions(): Promise<TradFiApiResp<TradFiListData<TradFiPositionItem>>>;

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiPositionItem>>>


getTradFiSymbolCategories() ​

ts
getTradFiSymbolCategories(): Promise<TradFiApiResp<TradFiListData<TradFiCategoryItem>>>;

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiCategoryItem>>>


getTradFiSymbolCommissions() ​

ts
getTradFiSymbolCommissions(params?: TradFiGetSymbolCommissionsParams): Promise<TradFiApiResp<TradFiListData<TradFiSymbolCommissionItem>>>;

Query CFD symbol commission rates

At least one of symbols or category_code is required. When both are provided, symbols are filtered by category.

Parameters ​

ParameterTypeDescription
params?TradFiGetSymbolCommissionsParamsOptional filters for symbols and/or category codes

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiSymbolCommissionItem>>>

Promise with list of symbol commission rates


getTradFiSymbolDetail() ​

ts
getTradFiSymbolDetail(params: TradFiGetSymbolDetailParams): Promise<TradFiApiResp<TradFiListData<TradFiSymbolDetailItem>>>;

Parameters ​

ParameterType
paramsTradFiGetSymbolDetailParams

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiSymbolDetailItem>>>


getTradFiSymbols() ​

ts
getTradFiSymbols(): Promise<TradFiApiResp<TradFiListData<TradFiSymbolItem>>>;

Returns ​

Promise<TradFiApiResp<TradFiListData<TradFiSymbolItem>>>


getTradFiTicker() ​

ts
getTradFiTicker(symbol: string): Promise<TradFiApiResp<TradFiTicker>>;

Parameters ​

ParameterType
symbolstring

Returns ​

Promise<TradFiApiResp<TradFiTicker>>


getTradFiTransactions() ​

ts
getTradFiTransactions(params?: TradFiGetTransactionsParams): Promise<TradFiApiResp<TradFiTransactionListData>>;

Parameters ​

ParameterType
params?TradFiGetTransactionsParams

Returns ​

Promise<TradFiApiResp<TradFiTransactionListData>>


getTradingFees() ​

ts
getTradingFees(params?: object): Promise<TradingFees>;

Retrieve personal trading fee

Parameters ​

ParameterTypeDescription
params?{ currency_pair?: string; settle?: "BTC" | "USDT" | "USD"; }Parameters for retrieving personal trading fee
params.currency_pair?string-
params.settle?"BTC" | "USDT" | "USD"-

Returns ​

Promise<TradingFees>

Promise<GetTradingFeesResp>


getTrailOrderChangeLog() ​

ts
getTrailOrderChangeLog(params: GetTrailOrderChangeLogReq): Promise<{
  code?: number;
  data?: {
     change_log?: TrailChangeLog[];
  };
  message?: string;
  timestamp?: number;
}>;

Get trail order user modification records

Parameters ​

ParameterTypeDescription
paramsGetTrailOrderChangeLogReqsettle, id and optional pagination

Returns ​

Promise<{ code?: number; data?: { change_log?: TrailChangeLog[]; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.change_log


getTrailOrderDetail() ​

ts
getTrailOrderDetail(params: GetTrailOrderDetailReq): Promise<{
  code?: number;
  data?: {
     order?: TrailOrder;
  };
  message?: string;
  timestamp?: number;
}>;

Get trail order details

Parameters ​

ParameterTypeDescription
paramsGetTrailOrderDetailReqsettle and order id

Returns ​

Promise<{ code?: number; data?: { order?: TrailOrder; }; message?: string; timestamp?: number; }>

Promise with code, message, data.order


getTrailOrderList() ​

ts
getTrailOrderList(params: GetTrailOrderListReq): Promise<{
  code?: number;
  data?: {
     orders?: TrailOrder[];
  };
  message?: string;
  timestamp?: number;
}>;

Get trail order list

Parameters ​

ParameterTypeDescription
paramsGetTrailOrderListReqquery parameters

Returns ​

Promise<{ code?: number; data?: { orders?: TrailOrder[]; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.orders


getTransfer() ​

ts
getTransfer(params: GetTransferReq): Promise<AccountTransferDetail>;

Get trading account transfer details

Retrieve the current user's trading account transfer details by tx_id. Response includes transfer status, currency, amount, source and destination account types, and applicable settlement currency or margin currency pair.

Parameters ​

ParameterTypeDescription
paramsGetTransferReqParameters containing the transfer transaction ID

Returns ​

Promise<AccountTransferDetail>

Promise<AccountTransferDetail>


getTransferStatus() ​

ts
getTransferStatus(params: object): Promise<{
  status: "PENDING" | "FAIL" | "SUCCESS" | "PARTIAL_SUCCESS";
  tx_id: string;
}>;

Query transfer status based on client_order_id or tx_id

Parameters ​

ParameterTypeDescription
params{ client_order_id?: string; tx_id?: string; }Parameters for querying transfer status
params.client_order_id?string-
params.tx_id?string-

Returns ​

Promise<{ status: "PENDING" | "FAIL" | "SUCCESS" | "PARTIAL_SUCCESS"; tx_id: string; }>

Promise<{ tx_id: string; status: 'PENDING' | 'SUCCESS' | 'FAIL' | 'PARTIAL_SUCCESS'; }>


getUnifiedAccountInfo() ​

ts
getUnifiedAccountInfo(params?: object): Promise<UnifiedAccountInfo>;

Get unified account information

The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account.

For specific formulas, please refer to Margin Formula

Parameters ​

ParameterTypeDescription
params?{ currency?: string; sub_uid?: string; }Parameters for retrieving unified account information
params.currency?string-
params.sub_uid?string-

Returns ​

Promise<UnifiedAccountInfo>

Promise<UnifiedAccountInfo>


getUnifiedAccountMode() ​

ts
getUnifiedAccountMode(): Promise<SetUnifiedAccountModeReq>;

Query mode of the unified account

Returns ​

Promise<SetUnifiedAccountModeReq>

Promise<SetUnifiedAccountModeReq>


getUnifiedBatchMaxBorrowable() ​

ts
getUnifiedBatchMaxBorrowable(params: object): Promise<any>;

Parameters ​

ParameterType
params{ currencies: string[]; }
params.currenciesstring[]

Returns ​

Promise<any>


getUnifiedCurrencyDiscountTiers() ​

ts
getUnifiedCurrencyDiscountTiers(): Promise<UnifiedCurrencyDiscountTiers[]>;

List currency discount tiers

Returns ​

Promise<UnifiedCurrencyDiscountTiers[]>

Promise<GetUnifiedCurrencyDiscountTiersResp[]>


getUnifiedDeltaNeutral() ​

ts
getUnifiedDeltaNeutral(): Promise<DeltaNeutralEnabled>;

Query Delta-neutral strategy mode setting (v4.106.97)

Returns ​

Promise<DeltaNeutralEnabled>


getUnifiedEstimateRate() ​

ts
getUnifiedEstimateRate(params: object): Promise<Record<string, string>>;

Get unified estimate rate

Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string.

Parameters ​

ParameterTypeDescription
params{ currencies: string[]; }Parameters for querying estimate rates
params.currenciesstring[]-

Returns ​

Promise<Record<string, string>>

Promise<Record<string, string>>


getUnifiedInterestRecords() ​

ts
getUnifiedInterestRecords(params?: GetUnifiedInterestRecordsReq): Promise<UnifiedInterestRecord[]>;

List interest records

Parameters ​

ParameterTypeDescription
params?GetUnifiedInterestRecordsReqParameters for listing interest records

Returns ​

Promise<UnifiedInterestRecord[]>

Promise<GetUnifiedInterestRecordsResp[]>


getUnifiedLoanCurrencies() ​

ts
getUnifiedLoanCurrencies(params?: object): Promise<UnifiedLoanCurrency[]>;

List loan currencies supported by unified account

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Optional parameters for filtering
params.currency?string-

Returns ​

Promise<UnifiedLoanCurrency[]>

Promise with array of loan currencies


getUnifiedLoanRecords() ​

ts
getUnifiedLoanRecords(params?: GetUnifiedLoanRecordsReq): Promise<UnifiedLoanRecord[]>;

Get loan records

Parameters ​

ParameterTypeDescription
params?GetUnifiedLoanRecordsReqParameters for getting loan records

Returns ​

Promise<UnifiedLoanRecord[]>

Promise<GetUnifiedLoanRecordsResp[]>


getUnifiedLoans() ​

ts
getUnifiedLoans(params?: GetUnifiedLoansReq): Promise<UnifiedLoan[]>;

List loans

Parameters ​

ParameterTypeDescription
params?GetUnifiedLoansReqParameters for listing loans

Returns ​

Promise<UnifiedLoan[]>

Promise<GetUnifiedLoansResp[]>


getUnifiedMaxBorrow() ​

ts
getUnifiedMaxBorrow(params: object): Promise<{
  amount: string;
  currency: string;
}>;

Query about the maximum borrowing for the unified account

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for querying the maximum borrowing for the unified account
params.currencystring-

Returns ​

Promise<{ amount: string; currency: string; }>

Promise<{ currency: string; amount: string; }>


getUnifiedMaxTransferable() ​

ts
getUnifiedMaxTransferable(params: object): Promise<{
  amount: string;
  currency: string;
}>;

Query about the maximum transferable for the unified account

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters for querying the maximum transferable for the unified account
params.currencystring-

Returns ​

Promise<{ amount: string; currency: string; }>

Promise<{ currency: string; amount: string; }>


getUnifiedMaxTransferables() ​

ts
getUnifiedMaxTransferables(params: object): Promise<object[]>;

Batch query maximum transferable amounts for unified accounts

After withdrawing currency, the transferable amount will change.

Parameters ​

ParameterTypeDescription
params{ currencies: string; }Parameters containing currencies to query (up to 100 at once)
params.currenciesstring-

Returns ​

Promise<object[]>

Promise with array of currency and maximum transferable amount


getUnifiedRiskUnitDetails() ​

ts
getUnifiedRiskUnitDetails(): Promise<UnifiedRiskUnitDetails>;

Retrieve user risk unit details, only valid in portfolio margin mode

Returns ​

Promise<UnifiedRiskUnitDetails>

Promise<GetUnifiedRiskUnitDetailsResp>


getUserCurrencyLeverageConfig() ​

ts
getUserCurrencyLeverageConfig(params: object): Promise<UserCurrencyLeverageConfig>;

Query user currency leverage configuration

Get the maximum and minimum leverage multiples that users can set for a currency type

Parameters ​

ParameterTypeDescription
params{ currency: string; }Parameters containing the currency
params.currencystring-

Returns ​

Promise<UserCurrencyLeverageConfig>

Promise<UserCurrencyLeverageConfig>


getUserCurrencyLeverageSettings() ​

ts
getUserCurrencyLeverageSettings(params?: object): Promise<object[]>;

Get the user's currency leverage

If currency is not passed, query all currencies.

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Optional parameters containing the currency
params.currency?string-

Returns ​

Promise<object[]>

Promise<UserCurrencyLeverageSetting[]>


getUserRebateInfo() ​

ts
getUserRebateInfo(): Promise<{
  invite_uid: number;
}>;

User retrieves rebate information.

Returns ​

Promise<{ invite_uid: number; }>


getUserSubordinateRelationships() ​

ts
getUserSubordinateRelationships(params: object): Promise<{
  list: object[];
}>;

Query user-subordinate relationship

Checks whether specified users are in the system and their relationship status

Parameters ​

ParameterType
params{ user_id_list: string; }
params.user_id_liststring

Returns ​

Promise<{ list: object[]; }>


getWithdrawalRecords() ​

ts
getWithdrawalRecords(params?: GetWithdrawalRecordsReq): Promise<WithdrawalRecord[]>;

Retrieve withdrawal records

Record time range cannot exceed 30 days. withdraw_id returns that one record and disables the time filter. withdraw_order_id returns the user-defined order.

Parameters ​

ParameterTypeDescription
params?GetWithdrawalRecordsReqParameters for filtering withdrawal records

Returns ​

Promise<WithdrawalRecord[]>

Promise<Withdraw[]>


getWithdrawalStatus() ​

ts
getWithdrawalStatus(params?: object): Promise<WithdrawalStatus[]>;

Retrieve withdrawal status

Parameters ​

ParameterTypeDescription
params?{ currency?: string; }Parameters for retrieving withdrawal status
params.currency?string-

Returns ​

Promise<WithdrawalStatus[]>

Promise<WithdrawalStatus[]>


listAnnouncementArticles() ​

ts
listAnnouncementArticles(params?: ListAnnouncementArticlesReq): Promise<AnnouncementArticleListResponse>;

Parameters ​

ParameterType
params?ListAnnouncementArticlesReq

Returns ​

Promise<AnnouncementArticleListResponse>


listFuturesADLRiskStates() ​

ts
listFuturesADLRiskStates(params: GetFuturesADLRiskStatesReq): Promise<FuturesADLRiskStates>;

Parameters ​

ParameterType
paramsGetFuturesADLRiskStatesReq

Returns ​

Promise<FuturesADLRiskStates>


lockSubAccount() ​

ts
lockSubAccount(params: object): Promise<any>;

Lock the sub-account

Parameters ​

ParameterTypeDescription
params{ user_id: number; }Parameters containing the sub-account user ID
params.user_idnumber-

Returns ​

Promise<any>

Promise<any>


markOTCOrderAsPaid() ​

ts
markOTCOrderAsPaid(params: MarkOTCOrderAsPaidReq): Promise<OTCActionResp>;

Mark fiat order as paid

Mark fiat order as paid

Parameters ​

ParameterTypeDescription
paramsMarkOTCOrderAsPaidReqParameters with order_id

Returns ​

Promise<OTCActionResp>

Promise with confirmation


modifyCrossExOrder() ​

ts
modifyCrossExOrder(order_id: string, params: ModifyCrossExOrderReq): Promise<ModifyCrossExOrderResp>;

Modify Order

Modify an existing order. Rate Limit: 100 requests per 10 seconds

Parameters ​

ParameterTypeDescription
order_idstringOrder ID or Text for Modify Order
paramsModifyCrossExOrderReqModification parameters

Returns ​

Promise<ModifyCrossExOrderResp>

Promise with modification confirmation


modifyTradFiOrder() ​

ts
modifyTradFiOrder(orderId: number, params: TradFiModifyOrderReq): Promise<TradFiApiResp<TradFiModifyOrderResult>>;

Parameters ​

ParameterType
orderIdnumber
paramsTradFiModifyOrderReq

Returns ​

Promise<TradFiApiResp<TradFiModifyOrderResult>>


modifyTradFiPosition() ​

ts
modifyTradFiPosition(positionId: number, params: TradFiModifyPositionReq): Promise<TradFiApiResp<Record<string, never>>>;

Parameters ​

ParameterType
positionIdnumber
paramsTradFiModifyPositionReq

Returns ​

Promise<TradFiApiResp<Record<string, never>>>


placeP2PMerchantBizPushOrder() ​

ts
placeP2PMerchantBizPushOrder(params: P2PMerchantPlaceBizPushOrderReq): Promise<P2PMerchantApiResp<Record<string, unknown>>>;

Place ad order

Parameters ​

ParameterType
paramsP2PMerchantPlaceBizPushOrderReq

Returns ​

Promise<P2PMerchantApiResp<Record<string, unknown>>>


portfolioMarginCalculate() ​

ts
portfolioMarginCalculate(params: PortfolioMarginCalculatorReq): Promise<PortfolioMarginCalculation>;

Portfolio margin calculator

Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included.

Parameters ​

ParameterTypeDescription
paramsPortfolioMarginCalculatorReqParameters for portfolio margin calculator

Returns ​

Promise<PortfolioMarginCalculation>

Promise<PortfolioMarginCalculatorResp>


repayMultiLoan() ​

ts
repayMultiLoan(params: RepayMultiLoanReq): Promise<RepayMultiLoanResp>;

Repay Multi-Collateral Loan

Parameters ​

ParameterTypeDescription
paramsRepayMultiLoanReqParameters for repaying a multi-collateral loan

Returns ​

Promise<RepayMultiLoanResp>

Promise<RepayMultiLoanResp>


resetOptionsMMPSettings() ​

ts
resetOptionsMMPSettings(params: object): Promise<OptionsMMPSettings>;

Reset MMP (Market Maker Protection) settings

Parameters ​

ParameterTypeDescription
params{ underlying: string; }Parameters for resetting MMP settings
params.underlyingstring-

Returns ​

Promise<OptionsMMPSettings>

Promise<OptionsMMPSettings>


sendP2PMerchantChatMessage() ​

ts
sendP2PMerchantChatMessage(params: P2PMerchantSendChatMessageReq): Promise<P2PMerchantApiResp<{
  SRVTM: number;
}>>;

Send chat message

Parameters ​

ParameterType
paramsP2PMerchantSendChatMessageReq

Returns ​

Promise<P2PMerchantApiResp<{ SRVTM: number; }>>


setCollateralCurrency() ​

ts
setCollateralCurrency(params: object): Promise<{
  is_success: boolean;
}>;

Set collateral currency

Parameters ​

ParameterTypeDescription
params{ collateral_type: 0 | 1; disable_list?: string[]; enable_list?: string[]; }Parameters for setting collateral currency
params.collateral_type0 | 1-
params.disable_list?string[]-
params.enable_list?string[]-

Returns ​

Promise<{ is_success: boolean; }>

Promise<{ is_success: boolean; }>


setCrossExMarginPositionLeverage() ​

ts
setCrossExMarginPositionLeverage(params: SetCrossExMarginPositionLeverageReq): Promise<SetCrossExMarginPositionLeverageResp>;

Modify Leveraged Trading Pair Leverage Multiplier

Modify leverage for margin trading pair. Rate Limit: 100 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsSetCrossExMarginPositionLeverageReqLeverage modification parameters

Returns ​

Promise<SetCrossExMarginPositionLeverageResp>

Promise with leverage update confirmation


setCrossExPositionLeverage() ​

ts
setCrossExPositionLeverage(params: SetCrossExPositionLeverageReq): Promise<SetCrossExPositionLeverageResp>;

Modify Contract Trading Pair Leverage Multiplier

Modify leverage for contract trading pair. Rate Limit: 100 requests per 10 seconds

Parameters ​

ParameterTypeDescription
paramsSetCrossExPositionLeverageReqLeverage modification parameters

Returns ​

Promise<SetCrossExPositionLeverageResp>

Promise with leverage update confirmation


setDefaultOTCBank() ​

ts
setDefaultOTCBank(params: OTCBankIdReq): Promise<OTCActionResp>;

Set default bank card

Parameters ​

ParameterType
paramsOTCBankIdReq

Returns ​

Promise<OTCActionResp>


setFuturesOrderCancelCountdown() ​

ts
setFuturesOrderCancelCountdown(params: object): Promise<{
  triggerTime: number;
}>;

Countdown cancel orders

When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown. For example, call this endpoint at 30s intervals, each countdown timeout is set to 30s. If this endpoint is not called again within 30 seconds, all pending orders on the specified market will be automatically cancelled, if no market is specified, all market pending orders will be cancelled. If the timeout is set to 0 within 30 seconds, the countdown timer will expire and the cancel function will be cancelled.

Parameters ​

ParameterTypeDescription
params{ contract?: string; settle: FuturesSettle; timeout: number; }Parameters for setting countdown cancel orders
params.contract?string-
params.settleFuturesSettle-
params.timeoutnumber-

Returns ​

Promise<{ triggerTime: number; }>

Promise<{ triggerTime: number }>


setGTDeduction() ​

ts
setGTDeduction(params: object): Promise<void>;

Set GT deduction

Enable or disable GT deduction for the current account.

Parameters ​

ParameterTypeDescription
params{ enabled: boolean; }Parameters for setting GT deduction
params.enabledboolean-

Returns ​

Promise<void>

Promise<void>


setMarginUserLeverage() ​

ts
setMarginUserLeverage(params: object): Promise<any>;

Set the user market leverage multiple

Parameters ​

ParameterTypeDescription
params{ currency_pair: string; leverage: string; }Parameters containing currency pair and leverage value
params.currency_pairstring-
params.leveragestring-

Returns ​

Promise<any>

Promise<void> - Returns nothing on success (204 No Content)


setOptionsMMPSettings() ​

ts
setOptionsMMPSettings(params: OptionsMMPSettingsReq): Promise<OptionsMMPSettings>;

Set MMP (Market Maker Protection) settings

Parameters ​

ParameterTypeDescription
paramsOptionsMMPSettingsReqParameters for setting MMP settings

Returns ​

Promise<OptionsMMPSettings>

Promise<OptionsMMPSetings>


setP2PMerchantWorkHours() ​

ts
setP2PMerchantWorkHours(params: P2PMerchantSetMerchantWorkHoursReq): Promise<P2PMerchantApiResp<{
  work_status: number;
}>>;

Set merchant working status and custom working hours (v4.106.96)

Parameters ​

ParameterType
paramsP2PMerchantSetMerchantWorkHoursReq

Returns ​

Promise<P2PMerchantApiResp<{ work_status: number; }>>


setStockMarginFeature() ​

ts
setStockMarginFeature(params: SetStockMarginFeatureReq): Promise<StockApiResp<Record<string, never>>>;

Set stock margin financing availability

Parameters ​

ParameterTypeDescription
paramsSetStockMarginFeatureReqWhether to enable margin financing

Returns ​

Promise<StockApiResp<Record<string, never>>>

Promise with empty data on success


setUnifiedAccountMode() ​

ts
setUnifiedAccountMode(params: SetUnifiedAccountModeReq): Promise<any>;

Set mode of the unified account

Switching between different account modes requires only passing the parameters corresponding to the target account mode. It also supports opening or closing configuration switches for the corresponding account mode when switching.

Parameters ​

ParameterTypeDescription
paramsSetUnifiedAccountModeReqParameters for setting the mode of the unified account

Returns ​

Promise<any>

Promise<any>


setUnifiedDeltaNeutral() ​

ts
setUnifiedDeltaNeutral(params: SetUnifiedDeltaNeutralReq): Promise<DeltaNeutralEnabled>;

Set Delta-neutral strategy mode (v4.106.97)

Requires VIP level >= 4 and cross-currency margin mode.

Parameters ​

ParameterType
paramsSetUnifiedDeltaNeutralReq

Returns ​

Promise<DeltaNeutralEnabled>


setUserLeverage() ​

ts
setUserLeverage(params: SetUserLeverageReq): Promise<LeverageFailedCurrency[]>;

Set leverage for all borrowed currencies

Set leverage for all of a user's borrowed currencies. Currencies with outstanding loans cannot be changed. Values above a currency's leverage limit are capped. The response lists currencies whose updates failed together with the failure reason.

Parameters ​

ParameterTypeDescription
paramsSetUserLeverageReqParameters containing the leverage value

Returns ​

Promise<LeverageFailedCurrency[]>

Promise<LeverageFailedCurrency[]>


stopAllChaseOrders() ​

ts
stopAllChaseOrders(params: StopAllChaseOrdersReq): Promise<StopAllChaseOrdersResp>;

Stop chase orders in batch

Parameters ​

ParameterType
paramsStopAllChaseOrdersReq

Returns ​

Promise<StopAllChaseOrdersResp>


stopAutoInvestPlan() ​

ts
stopAutoInvestPlan(params: StopAutoInvestPlanReq): Promise<unknown>;

Stop auto invest plan

Parameters ​

ParameterType
paramsStopAutoInvestPlanReq

Returns ​

Promise<unknown>


stopChaseOrder() ​

ts
stopChaseOrder(params: StopChaseOrderReq): Promise<StopChaseOrderResp>;

Stop a chase order

Parameters ​

ParameterType
paramsStopChaseOrderReq

Returns ​

Promise<StopChaseOrderResp>


submitCrossMarginBorrowLoan() ​

ts
submitCrossMarginBorrowLoan(params: SubmitCrossMarginBorrowLoanReq): Promise<CrossMarginMorrowLoanRecord>;

Parameters ​

ParameterTypeDescription
paramsSubmitCrossMarginBorrowLoanReqParameters for creating a cross margin borrow loan

Returns ​

Promise<CrossMarginMorrowLoanRecord>

Promise<SubmitCrossMarginBorrowLoanResp>

Deprecated ​

as of 2025-02-10 Create a cross margin borrow loan

Borrow amount cannot be less than currency minimum borrow amount.


submitCrossMarginRepayment() ​

ts
submitCrossMarginRepayment(params: object): Promise<CrossMarginMorrowLoanRecord[]>;

Parameters ​

ParameterTypeDescription
params{ amount: string; currency: string; }Parameters for cross margin repayments
params.amountstring-
params.currencystring-

Returns ​

Promise<CrossMarginMorrowLoanRecord[]>

Promise<SubmitCrossMarginBorrowLoanResp[]>

Deprecated ​

as of 2025-02-10 Cross margin repayments

When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred. When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first.


submitDeliveryOrder() ​

ts
submitDeliveryOrder(params: SubmitDeliveryFuturesOrderReq): Promise<FuturesOrder>;

Create a futures order

Zero-filled order cannot be retrieved 10 minutes after order cancellation

Parameters ​

ParameterTypeDescription
paramsSubmitDeliveryFuturesOrderReqParameters for creating a futures order

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


submitDeliveryTriggeredOrder() ​

ts
submitDeliveryTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<TriggerOrderResponse>;

Create a price-triggered order

Parameters ​

ParameterTypeDescription
paramsSubmitFuturesTriggeredOrderReqParameters for creating a price-triggered order

Returns ​

Promise<TriggerOrderResponse>

Promise<TriggerOrderResponse>


submitDualInvestmentOrder() ​

ts
submitDualInvestmentOrder(params: PlaceDualInvestmentOrderParams): Promise<DualInvestmentOrder>;

Place Dual Investment order

Parameters ​

ParameterTypeDescription
paramsPlaceDualInvestmentOrderParamsplan_id, amount (or copies), optional text

Returns ​

Promise<DualInvestmentOrder>

Promise<DualInvestmentOrder>


submitDualOrderRefund() ​

ts
submitDualOrderRefund(params: SubmitDualOrderRefundParams): Promise<DualInvestmentOrder>;

Dual-currency order early redemption

Parameters ​

ParameterType
paramsSubmitDualOrderRefundParams

Returns ​

Promise<DualInvestmentOrder>


submitDualStockOrder() ​

ts
submitDualStockOrder(params: PlaceDualStockInvestmentOrderParams): Promise<DualInvestmentOrder>;

Place a stock dual investment order

hit_spot, hit_stock, and hit_simple apply to buy-low (put) subscriptions. 1 selects that funding account.

Parameters ​

ParameterType
paramsPlaceDualStockInvestmentOrderParams

Returns ​

Promise<DualInvestmentOrder>


submitDualStockOrderRefund() ​

ts
submitDualStockOrderRefund(params: SubmitDualOrderRefundParams): Promise<DualInvestmentOrder>;

Redeem a stock dual investment order

Parameters ​

ParameterType
paramsSubmitDualOrderRefundParams

Returns ​

Promise<DualInvestmentOrder>


submitFlashSwapOrder() ​

ts
submitFlashSwapOrder(params: SubmitFlashSwapOrderReq): Promise<FlashSwapOrder>;

Create a flash swap order

Initiate a flash swap preview in advance because order creation requires a preview result.

Parameters ​

ParameterTypeDescription
paramsSubmitFlashSwapOrderReqParameters for creating a flash swap order

Returns ​

Promise<FlashSwapOrder>

Promise<SubmitFlashSwapOrderResp>


submitFlashSwapOrderPreview() ​

ts
submitFlashSwapOrderPreview(params: SubmitFlashSwapOrderPreviewReq): Promise<SubmitFlashSwapOrderPreviewResp>;

Initiate a flash swap order preview

Parameters ​

ParameterTypeDescription
paramsSubmitFlashSwapOrderPreviewReqParameters for initiating a flash swap order preview

Returns ​

Promise<SubmitFlashSwapOrderPreviewResp>

Promise<SubmitFlashSwapOrderPreviewResp>


submitFuturesBatchOrders() ​

ts
submitFuturesBatchOrders(params: object): Promise<FuturesOrder[]>;

Create a batch of futures orders

Up to 10 orders per request. If any of the order's parameters are missing or in the wrong format, all of them will not be executed, and a http status 400 error will be returned directly. If the parameters are checked and passed, all are executed. Even if there is a business logic error in the middle (such as insufficient funds), it will not affect other execution orders. The returned result is in array format, and the order corresponds to the orders in the request body. In the returned result, the succeeded field of type bool indicates whether the execution was successful or not. If the execution is successful, the normal order content is included; if the execution fails, the label field is included to indicate the cause of the error. In the rate limiting, each order is counted individually.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
params{ orders: SubmitFuturesOrderReq[]; settle: FuturesSettle; xGateExptime?: number; }Parameters for creating a batch of futures orders
params.ordersSubmitFuturesOrderReq[]-
params.settleFuturesSettle-
params.xGateExptime?number-

Returns ​

Promise<FuturesOrder[]>

Promise<FuturesOrder[]>


submitFuturesOrder() ​

ts
submitFuturesOrder(params: SubmitFuturesOrderReq): Promise<FuturesOrder>;

Create a futures order

Creating futures orders requires size, which is the number of contracts instead of currency amount. You can use quanto_multiplier in the contract detail response to know how much currency 1 size contract represents. Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders. Set reduce_only to true to keep the position from changing side when reducing position size. In single position mode, to close a position, you need to set size to 0 and close to true. In dual position mode, to close one side position, you need to set auto_size side, reduce_only to true, and size to 0. Set stp_act to decide the strategy of self-trade prevention. For detailed usage, refer to the stp_act parameter in the request body.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsSubmitFuturesOrderReqParameters for creating a futures order

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


submitFuturesPriceTriggeredOrder() ​

ts
submitFuturesPriceTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<TriggerOrderResponse>;

Create a price-triggered order

Parameters ​

ParameterTypeDescription
paramsSubmitFuturesTriggeredOrderReqParameters for creating a price-triggered order

Returns ​

Promise<TriggerOrderResponse>

Promise<TriggerOrderResponse>


submitLendOrRedeemOrder() ​

ts
submitLendOrRedeemOrder(params: SubmitLendOrRedeemReq): Promise<any>;

Lend or redeem

Parameters ​

ParameterTypeDescription
paramsSubmitLendOrRedeemReqParameters for lending or redeeming

Returns ​

Promise<any>

Promise<any>


submitMainSubTransfer() ​

ts
submitMainSubTransfer(params: SubmitMainSubTransferReq): Promise<any>;

Transfer between main and sub accounts

Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated.

On HTTP 5xx or SERVER_ERROR, the transfer may still have been accepted. Set client_order_id, then check getTransferStatus({ client_order_id }) before sending it again.

Parameters ​

ParameterTypeDescription
paramsSubmitMainSubTransferReqTransfer parameters

Returns ​

Promise<any>

Promise<any>


submitMarginUNIBorrowOrRepay() ​

ts
submitMarginUNIBorrowOrRepay(params: object): Promise<any>;

Borrow or repay

Parameters ​

ParameterTypeDescription
params{ amount: string; currency: string; currency_pair: string; repaid_all?: boolean; type: "borrow" | "repay"; }Parameters for borrowing or repaying
params.amountstring-
params.currencystring-
params.currency_pairstring-
params.repaid_all?boolean-
params.type"borrow" | "repay"-

Returns ​

Promise<any>

Promise<any>


submitMultiLoanOrder() ​

ts
submitMultiLoanOrder(params: SubmitMultiLoanOrderReq): Promise<{
  order_id: number;
}>;

Create Multi-Collateral Order

Parameters ​

ParameterTypeDescription
paramsSubmitMultiLoanOrderReqParameters for creating a multi-collateral order

Returns ​

Promise<{ order_id: number; }>

Promise<{ order_id: number }>


submitOptionsCountdownCancel() ​

ts
submitOptionsCountdownCancel(params: object): Promise<{
  triggerTime: number;
}>;

Countdown cancel orders for options

Option order heartbeat detection. When the timeout set by the user is reached, if there is no cancel or new countdown set, related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown.

Parameters ​

ParameterTypeDescription
params{ contract?: string; timeout: number; underlying?: string; }Parameters for setting countdown cancel orders
params.contract?string-
params.timeoutnumber-
params.underlying?string-

Returns ​

Promise<{ triggerTime: number; }>

Promise<{ triggerTime: number; }>


submitOptionsOrder() ​

ts
submitOptionsOrder(params: SubmitOptionsOrderReq): Promise<SubmitOptionsOrderResp>;

Create an options order

Parameters ​

ParameterTypeDescription
paramsSubmitOptionsOrderReqParameters for creating an options order

Returns ​

Promise<SubmitOptionsOrderResp>

Promise<SubmitOptionsOrderResp>


submitOTCBankEnterpriseSupplement() ​

ts
submitOTCBankEnterpriseSupplement(params: SubmitOTCBankEnterpriseSupplementReq): Promise<OTCActionResp>;

Submit enterprise bank card supplement materials (multipart/form-data)

Parameters ​

ParameterType
paramsSubmitOTCBankEnterpriseSupplementReq

Returns ​

Promise<OTCActionResp>


submitOTCBankPersonalSupplement() ​

ts
submitOTCBankPersonalSupplement(params: SubmitOTCBankPersonalSupplementReq): Promise<OTCActionResp>;

Submit personal bank card supplement materials (multipart/form-data)

Parameters ​

ParameterType
paramsSubmitOTCBankPersonalSupplementReq

Returns ​

Promise<OTCActionResp>


submitSpotBatchOrders() ​

ts
submitSpotBatchOrders(body: SpotOrder[], params?: object): Promise<SubmitSpotBatchOrdersResp[]>;

Create a batch of orders

Batch orders requirements:

  • custom order field text is required
  • At most 4 currency pairs, maximum 10 orders each, are allowed in one request
  • No mixture of spot orders and margin orders, i.e. account must be identical for all orders

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
bodySpotOrder[]-
params?{ xGateExptime?: number; }Parameters for creating a batch of orders
params.xGateExptime?number-

Returns ​

Promise<SubmitSpotBatchOrdersResp[]>

Promise<SubmitSpotBatchOrdersResp[]>


submitSpotClosePosCrossDisabled() ​

ts
submitSpotClosePosCrossDisabled(params: SubmitSpotClosePosCrossDisabledReq): Promise<SpotOrder>;

Close position when cross-currency is disabled

Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998

Parameters ​

ParameterTypeDescription
paramsSubmitSpotClosePosCrossDisabledReqParameters for closing position when cross-currency is disabled

Returns ​

Promise<SpotOrder>

Promise<Order>


submitSpotCountdownOrders() ​

ts
submitSpotCountdownOrders(params: object): Promise<{
  triggerTime: number;
}>;

Countdown cancel orders

When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown.

Parameters ​

ParameterTypeDescription
params{ currency_pair?: string; timeout: number; }Parameters for setting countdown cancel orders
params.currency_pair?string-
params.timeoutnumber-

Returns ​

Promise<{ triggerTime: number; }>

Promise<{ triggerTime: number; }>


submitSpotMainAccountTransfer() ​

ts
submitSpotMainAccountTransfer(params: object): Promise<{
  id: number;
}>;

Transfer between spot main accounts

Both parties cannot be sub-accounts.

Parameters ​

ParameterTypeDescription
params{ amount: string; currency: string; receive_uid: number; }Transfer parameters
params.amountstring-
params.currencystring-
params.receive_uidnumber-

Returns ​

Promise<{ id: number; }>

Promise<{ id: number; }>


submitSpotOrder() ​

ts
submitSpotOrder(params: SubmitSpotOrderReq): Promise<SpotOrder>;

Create an order

You can place orders with spot, portfolio, margin or cross margin account through setting the account field. It defaults to spot, which means spot account is used to place orders. If the user is using unified account, it defaults to the unified account.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsSubmitSpotOrderReqParameters for creating an order

Returns ​

Promise<SpotOrder>

Promise<Order>

See ​

Spot order management


submitSpotPriceTriggerOrder() ​

ts
submitSpotPriceTriggerOrder(params: SpotPriceTriggeredOrder): Promise<{
  id: number;
}>;

Create a price-triggered order

Parameters ​

ParameterTypeDescription
paramsSpotPriceTriggeredOrderParameters for creating a price-triggered order

Returns ​

Promise<{ id: number; }>

Promise<{ id: number; }>


submitStakingSwap() ​

ts
submitStakingSwap(params: object): Promise<any>;

On-chain Token Swap for Earned Coins

Parameters ​

ParameterTypeDescription
params{ amount: string; coin: string; pid?: number; side: "0" | "1"; }Parameters for staking swap
params.amountstring-
params.coinstring-
params.pid?number-
params.side"0" | "1"-

Returns ​

Promise<any>

Promise<any>


submitSubToSubTransfer() ​

ts
submitSubToSubTransfer(params: SubmitSubToSubTransferReq): Promise<any>;

Sub-account transfers to sub-account

It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer.

Parameters ​

ParameterTypeDescription
paramsSubmitSubToSubTransferReqTransfer parameters

Returns ​

Promise<any>

Promise<any>


submitTransfer() ​

ts
submitTransfer(params: SubmitTransferReq): Promise<{
  tx_id: number;
}>;

Transfer between trading accounts

Transfer between different accounts. Currently support transfers between the following:

  • spot - margin
  • spot - futures(perpetual)
  • spot - delivery
  • spot - cross margin
  • spot - options

Parameters ​

ParameterTypeDescription
paramsSubmitTransferReqTransfer parameters

Returns ​

Promise<{ tx_id: number; }>

Promise<TransferResponse>


submitUnifiedBorrowOrRepay() ​

ts
submitUnifiedBorrowOrRepay(params: SubmitUnifiedBorrowOrRepayReq): Promise<any>;

Borrow or repay

When borrowing, it is essential to ensure that the borrowed amount is not below the minimum borrowing threshold for the specific cryptocurrency and does not exceed the maximum borrowing limit set by the platform and the user.

The interest on the loan will be automatically deducted from the account at regular intervals. It is the user's responsibility to manage the repayment of the borrowed amount.

For repayment, the option to repay the entire borrowed amount is available by setting the parameter repaid_all=true

Parameters ​

ParameterTypeDescription
paramsSubmitUnifiedBorrowOrRepayReqParameters for borrowing or repaying

Returns ​

Promise<any>

Promise<any>


submitUnifiedLoanRepay() ​

ts
submitUnifiedLoanRepay(params: SubmitUnifiedLoanRepayReq): Promise<any>;

Parameters ​

ParameterType
paramsSubmitUnifiedLoanRepayReq

Returns ​

Promise<any>


submitWithdrawal() ​

ts
submitWithdrawal(params: SubmitWithdrawalReq): Promise<WithdrawalRecord>;

Withdraw

Withdrawals to Gate addresses do not incur transaction fees.

On HTTP 5xx or SERVER_ERROR, the withdrawal may still have been accepted. Set withdraw_order_id, then check getWithdrawalRecords({ withdraw_order_id }) before sending it again.

Parameters ​

ParameterTypeDescription
paramsSubmitWithdrawalReqWithdrawal parameters

Returns ​

Promise<WithdrawalRecord>

Promise<Withdraw>


terminateTrailOrder() ​

ts
terminateTrailOrder(params: TerminateTrailOrderReq): Promise<{
  code?: number;
  data?: {
     order?: TrailOrder;
  };
  message?: string;
  timestamp?: number;
}>;

Terminate trail order

Parameters ​

ParameterTypeDescription
paramsTerminateTrailOrderReqsettle and id or text

Returns ​

Promise<{ code?: number; data?: { order?: TrailOrder; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.order


unlockSubAccount() ​

ts
unlockSubAccount(params: object): Promise<any>;

Unlock the sub-account

Parameters ​

ParameterTypeDescription
params{ user_id: number; }Parameters containing the sub-account user ID
params.user_idnumber-

Returns ​

Promise<any>

Promise<any>


updateAutoInvestPlan() ​

ts
updateAutoInvestPlan(params: UpdateAutoInvestPlanReq): Promise<unknown>;

Update auto invest plan

Parameters ​

ParameterType
paramsUpdateAutoInvestPlanReq

Returns ​

Promise<unknown>


updateAutoRepaymentSetting() ​

ts
updateAutoRepaymentSetting(params: object): Promise<{
  status: "on" | "off";
}>;

Update user's auto repayment setting

Parameters ​

ParameterTypeDescription
params{ status: "on" | "off"; }Parameters for updating auto repayment setting
params.status"on" | "off"-

Returns ​

Promise<{ status: "on" | "off"; }>

Promise<{ status: 'on' | 'off' }>


updateCrossExAccount() ​

ts
updateCrossExAccount(params: UpdateCrossExAccountReq): Promise<UpdateCrossExAccountResp>;

Modify Account Contract Position Mode and Account Mode

Modify account settings. Rate Limit: 100 requests per 60 seconds

Parameters ​

ParameterTypeDescription
paramsUpdateCrossExAccountReqAccount modification parameters

Returns ​

Promise<UpdateCrossExAccountResp>

Promise with update confirmation


updateCrossExPositionsMargin() ​

ts
updateCrossExPositionsMargin(params: UpdateCrossExPositionsMarginReq): Promise<UpdateCrossExPositionsMarginResp>;

Parameters ​

ParameterType
paramsUpdateCrossExPositionsMarginReq

Returns ​

Promise<UpdateCrossExPositionsMarginResp>


updateDeliveryLeverage() ​

ts
updateDeliveryLeverage(params: object): Promise<FuturesPosition>;

Update position leverage

Parameters ​

ParameterTypeDescription
params{ contract: string; leverage: string; settle: "usdt"; }Parameters for updating position leverage
params.contractstring-
params.leveragestring-
params.settle"usdt"-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateDeliveryMargin() ​

ts
updateDeliveryMargin(params: object): Promise<FuturesPosition>;

Update position margin

Parameters ​

ParameterTypeDescription
params{ change: string; contract: string; settle: "usdt"; }Parameters for updating position margin
params.changestring-
params.contractstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateDeliveryRiskLimit() ​

ts
updateDeliveryRiskLimit(params: object): Promise<FuturesPosition>;

Update position risk limit

Parameters ​

ParameterTypeDescription
params{ contract: string; risk_limit: string; settle: "usdt"; }Parameters for updating position risk limit
params.contractstring-
params.risk_limitstring-
params.settle"usdt"-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateDualModePositionLeverage() ​

ts
updateDualModePositionLeverage(params: UpdateDualModePositionLeverageReq): Promise<FuturesPosition[]>;

Update position leverage in dual mode

Parameters ​

ParameterTypeDescription
paramsUpdateDualModePositionLeverageReqParameters for updating position leverage in dual mode

Returns ​

Promise<FuturesPosition[]>

Promise<Position[]>


updateDualModePositionMargin() ​

ts
updateDualModePositionMargin(params: UpdateDualModePositionMarginReq): Promise<FuturesPosition[]>;

Update position margin in dual mode

Parameters ​

ParameterTypeDescription
paramsUpdateDualModePositionMarginReqParameters for updating position margin in dual mode

Returns ​

Promise<FuturesPosition[]>

Promise<Position[]>


updateDualModePositionRiskLimit() ​

ts
updateDualModePositionRiskLimit(params: object): Promise<FuturesPosition[]>;

Update position risk limit in dual mode

See risk limit rules for more information

Parameters ​

ParameterTypeDescription
params{ contract: string; risk_limit: string; settle: FuturesSettle; }Parameters for updating position risk limit in dual mode
params.contractstring-
params.risk_limitstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition[]>

Promise<FuturesPosition[]>


updateDualOrderReinvest() ​

ts
updateDualOrderReinvest(params: UpdateDualOrderReinvestParams): Promise<unknown>;

Update dual-currency order reinvest settings

Parameters ​

ParameterType
paramsUpdateDualOrderReinvestParams

Returns ​

Promise<unknown>


updateDualStockOrderReinvest() ​

ts
updateDualStockOrderReinvest(params: UpdateDualOrderReinvestParams): Promise<unknown>;

Update reinvestment settings for a stock dual investment order

Parameters ​

ParameterType
paramsUpdateDualOrderReinvestParams

Returns ​

Promise<unknown>


updateFuturesDualMode() ​

ts
updateFuturesDualMode(params: object): Promise<FuturesAccount>;

Enable or disable dual mode

Before setting dual mode, make sure all positions are closed and no orders are open.

Parameters ​

ParameterTypeDescription
params{ dual_mode: boolean; settle: FuturesSettle; }Parameters for enabling or disabling dual mode
params.dual_modeboolean-
params.settleFuturesSettle-

Returns ​

Promise<FuturesAccount>

Promise<FuturesAccount>


updateFuturesLeverage() ​

ts
updateFuturesLeverage(params: object): Promise<FuturesPosition>;

Update position leverage

Position Mode Switching Rules:

  • leverage ≠ 0: Isolated Margin Mode (Regardless of whether cross_leverage_limit is filled, this parameter will be ignored)
  • leverage = 0: Cross Margin Mode (Use cross_leverage_limit to set the leverage multiple)

Examples:

  • Set isolated margin with 10x leverage: leverage=10
  • Set cross margin with 10x leverage: leverage=0&cross_leverage_limit=10
  • leverage=5&cross_leverage_limit=10 → Result: Isolated margin with 5x leverage (cross_leverage_limit is ignored)

Warning: Incorrect settings may cause unexpected position mode switching, affecting risk management.

Parameters ​

ParameterTypeDescription
params{ contract: string; cross_leverage_limit?: string; leverage: string; pid?: number; settle: FuturesSettle; }Parameters for updating position leverage
params.contractstring-
params.cross_leverage_limit?string-
params.leveragestring-
params.pid?number-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateFuturesMargin() ​

ts
updateFuturesMargin(params: object): Promise<FuturesPosition>;

Update position margin

Under the new risk limit rules, the position limit is related to the leverage you set; a lower leverage will result in a higher position limit. Please use the leverage adjustment api to adjust the position limit.

Parameters ​

ParameterTypeDescription
params{ change: string; contract: string; settle: FuturesSettle; }Parameters for updating position margin
params.changestring-
params.contractstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateFuturesOrder() ​

ts
updateFuturesOrder(params: UpdateFuturesOrderReq): Promise<FuturesOrder>;

Amend an order

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsUpdateFuturesOrderReqParameters for amending an order

Returns ​

Promise<FuturesOrder>

Promise<FuturesOrder>


updateFuturesPositionMode() ​

ts
updateFuturesPositionMode(params: object): Promise<FuturesPosition>;

Update position by store mode

Parameters ​

ParameterTypeDescription
params{ contract: string; mode: "CROSS" | "ISOLATED"; settle: "usdt" | "btc"; }Parameters for updating position by store mode
params.contractstring-
params.mode"CROSS" | "ISOLATED"-
params.settle"usdt" | "btc"-

Returns ​

Promise<FuturesPosition>

Promise<FuturesPosition>


updateFuturesPriceTriggeredOrder() ​

ts
updateFuturesPriceTriggeredOrder(params: UpdateFuturesPriceTriggeredOrderReq): Promise<TriggerOrderResponse>;

Update a single price-triggered order

v4.106.160: PUT /futures/{settle}/price_orders/amend/{order_id}. order_id is required in the path and is still sent in the JSON body.

Parameters ​

ParameterTypeDescription
paramsUpdateFuturesPriceTriggeredOrderReqParameters for updating a price-triggered order

Returns ​

Promise<TriggerOrderResponse>

Promise<TriggerOrderResponse>


updateInterestReinvestment() ​

ts
updateInterestReinvestment(params: object): Promise<any>;

Set interest reinvestment toggle

Parameters ​

ParameterTypeDescription
params{ currency: string; status: boolean; }Parameters for setting interest reinvestment toggle
params.currencystring-
params.statusboolean-

Returns ​

Promise<any>

Promise<any>

Deprecated ​

as of v4.99.0, 23-06-2025


updateLendingOrder() ​

ts
updateLendingOrder(params: object): Promise<any>;

Amend lending order

Currently only supports amending the minimum interest rate (hour)

Parameters ​

ParameterTypeDescription
params{ currency?: string; min_rate?: string; }Parameters for amending lending order
params.currency?string-
params.min_rate?string-

Returns ​

Promise<any>

Promise<any>


updateMultiLoan() ​

ts
updateMultiLoan(params: UpdateMultiLoanReq): Promise<UpdateMultiLoanResp>;

Operate Multi-Collateral

Parameters ​

ParameterTypeDescription
paramsUpdateMultiLoanReqParameters for operating multi-collateral

Returns ​

Promise<UpdateMultiLoanResp>

Promise<UpdateMultiLoanResp>


updateP2PMerchantAdsStatus() ​

ts
updateP2PMerchantAdsStatus(params: P2PMerchantAdsUpdateStatusReq): Promise<P2PMerchantApiResp<{
  status: number;
}>>;

Update ad status

Parameters ​

ParameterType
paramsP2PMerchantAdsUpdateStatusReq

Returns ​

Promise<P2PMerchantApiResp<{ status: number; }>>


updatePositionRiskLimit() ​

ts
updatePositionRiskLimit(params: object): Promise<FuturesPosition>;

Update position risk limit

Parameters ​

ParameterTypeDescription
params{ contract: string; risk_limit: string; settle: FuturesSettle; }Parameters for updating position risk limit
params.contractstring-
params.risk_limitstring-
params.settleFuturesSettle-

Returns ​

Promise<FuturesPosition>

Promise<Position>


updateSpotOrder() ​

ts
updateSpotOrder(params: UpdateSpotOrderReq): Promise<SpotOrder>;

Amend an order

By default, the orders of spot, portfolio and margin account are updated. If you need to modify orders of the cross-margin account, you must specify account as cross_margin. For portfolio margin account, only cross_margin account is supported.

Currently, only supports modification of price or amount fields.

NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.

Parameters ​

ParameterTypeDescription
paramsUpdateSpotOrderReqParameters for amending an order

Returns ​

Promise<SpotOrder>

Promise<Order>

See ​

Spot order management


updateStockOrder() ​

ts
updateStockOrder(orderId: number, params: UpdateStockOrderReq): Promise<StockApiResp<StockUpdateOrderResult>>;

Modify a stock order

Parameters ​

ParameterTypeDescription
orderIdnumberOrder ID
paramsUpdateStockOrderReqModified volume and price

Returns ​

Promise<StockApiResp<StockUpdateOrderResult>>

Promise with updated order ID


updateSubAccountApiKey() ​

ts
updateSubAccountApiKey(params: UpdateSubAccountApiKeyReq): Promise<any>;

Update API key of the sub-account

Note: This interface cannot modify the mode account type attribute

Parameters ​

ParameterTypeDescription
paramsUpdateSubAccountApiKeyReqParameters for updating API key of the sub-account

Returns ​

Promise<any>

Promise<any>


updateTrailOrder() ​

ts
updateTrailOrder(params: UpdateTrailOrderReq): Promise<{
  code?: number;
  data?: {
     order?: TrailOrder;
  };
  message?: string;
  timestamp?: number;
}>;

Update trail order

Parameters ​

ParameterTypeDescription
paramsUpdateTrailOrderReqsettle, id and fields to update

Returns ​

Promise<{ code?: number; data?: { order?: TrailOrder; }; message?: string; timestamp?: number; }>

Promise with code, message, timestamp and data.order


updateUserCurrencyLeverage() ​

ts
updateUserCurrencyLeverage(params: object): Promise<any>;

Set the currency leverage ratio

Parameters ​

ParameterTypeDescription
params{ currency: string; leverage: string; }Parameters for setting currency leverage ratio
params.currencystring-
params.leveragestring-

Returns ​

Promise<any>

Promise<any> Returns nothing on success (204 No Content)


uploadP2PMerchantChatFile() ​

ts
uploadP2PMerchantChatFile(params: P2PMerchantUploadChatFileReq): Promise<P2PMerchantApiResp<{
  file_key: string;
}>>;

Upload chat file

Parameters ​

ParameterType
paramsP2PMerchantUploadChatFileReq

Returns ​

Promise<P2PMerchantApiResp<{ file_key: string; }>>

Built by Siebly. Open source SDKs for exchange APIs.