gitlabEdit

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/mearrow-up-right method.

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

chevron-rightAsync API Account Event Formathashtag
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/fundingarrow-up-right method, which returns an array of funding sources.

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

chevron-rightAsync API Funding Event Formathashtag

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/transferarrow-up-right 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.

chevron-rightAsync API Transfer Event Formathashtag

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-balancearrow-up-right method is used to query the amount of funds currently available for new orders creation or withdrawal, open positions and open orders.

chevron-rightAPI response samplehashtag

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/positionarrow-up-right method, which returns an array of user positions.

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

chevron-rightAsync API Position Event Formathashtag

Important: Compare snapshots by updatedAt for consistency.

Orders

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

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

chevron-rightAsync API Order Event Formathashtag

Important: Compare snapshots by updatedAt.

Order fills

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

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

chevron-rightWS OrderFill Event Formathashtag

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.

chevron-rightAsync API Order Fee Event Formathashtag

TpSl

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

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

chevron-rightAsync API TpSl Event Formathashtag

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