For the complete documentation index, see llms.txt. This page is also available as Markdown.

Personalized User Data

Personalized data is available only after user authorization and includes:

  1. Account

  2. Funding

  3. Transfer

  4. Available balance

  5. Positions

  6. Orders

  7. Order fills

  8. Orders Fees

  9. TpSl

Account

To get information about the current user's account, use the GET /api/user/me method.

The exchange signals account state updates via Async API using the user-{userExchangeId} channel.

Async API Account Event Format
interface AccountEvent {
  user: string;
  marginCall: boolean;
  updatedAt: string;
}

Important: The most critical account field is marginCall. If it's true, immediate action should be taken to reduce the risk of account liquidation.

Funding

To get information about the user's funding, use the the GET /api/user/funding method, which returns an array of funding sources.

Funding updates are signaled via Async API on the funding-{userExchangeId} channel.

Async API Funding Event Format

Important: To ensure consistency on the client, compare funding snapshots by the updatedAt field.

Important: Positions and open orders do not directly affect the user's funding, as they are accounted for in the trading account's funding.

Funding is affected by the following events:

  1. Trading balance top-up

  2. Trading balance withdrawal

  3. Position reduction with non-zero realized PnL

  4. Exchange fee payments

  5. Funding rate payments

  6. Liquidation fee payments to the reserve fund

Transfer

To get information about the user's withdrawal requests, use the GET /api/transfer method with parameters type=transfer-pfutures-balance&status=pending, returning pending withdrawal requests.

Updates are sent via Async API on the transfer-update-{userExchangeId} channel.

Async API Transfer Event Format

Important: For consistency, compare snapshots by updatedAt.

Important: Funds requested for withdrawal are locked immediately upon request and cannot be used as margin.

Available balance

The GET /api/market/available-balance method is used to query the amount of funds currently available for new orders creation or withdrawal, open positions and open orders.

API response sample

Important: Available balance is affected by your open orders and current trading results.

Positions

To get information about the user's open positions, use the GET /api/position method, which returns an array of user positions.

Updates are sent via Async API on the position-{userExchangeId} channel.

Async API Position Event Format

Important: Compare snapshots by updatedAt for consistency.

Orders

To get information about the user's open orders, use the GET /api/order/opened method, returning the user's open orders array.

Order updates are sent via Async API on the order-{userExchangeId} channel.

Async API Order Event Format

Important: Compare snapshots by updatedAt.

Order fills

To retrieve the fills for a specific order, use the GET /api/order/{orderId}/fill endpoint. The response returns an array of fills associated with the order.

Order fill events are sent via WS on the orderFills-{userExchangeId} channel.

WS OrderFill Event Format

Orders Fees

User orders received via the REST API include a fee field indicating the commission paid. Since commission processing is asynchronous, use the Async API channel order-fee-{userExchangeId} to track updates.

Async API Order Fee Event Format

TpSl

To get information about active TpSl (Take-Profit/Stop-Loss), use the GET /api/tpsl method, returning the user's open TpSls array.

Updates are sent via Async API on the tpsl-{userExchangeId} channel.

Async API TpSl Event Format

Important: Compare snapshots by updatedAt for consistency.

Important: TpSl is not the same as user orders. When triggered, it automatically creates a new market order on behalf of the user. The status field first changes to triggered, and then to done.

Last updated