Skip to main content

Entities Explained

The xRocket Exchange API enables programmatic interaction with our trading platform by providing access to a set of core entities. It is important to understand these entities and how they relate to building an application with the API. This article describes all key xRocket Exchange API entities.

Account

The account represents a single xRocket user's wallet and complete financial position on the exchange. This is a top-level entity that holds all other user-related data, including balances across different assets.

  • API Interaction: The account entity is typically accessed through private API endpoints that require a Bearer Token for authorization. These endpoints allow you to retrieve account details, settings, and permissions.

Balance

balance is a sub-entity of an account and tracks the amount of a specific asset held by a user. On xRocket, a user's total balance for an asset can be split into two types:

  • Funding Balance: This is the balance held in the user's primary wallet. It is used for deposits, withdrawals, and internal transfers between users.
  • Trading Balance: This is the balance allocated for use in the exchange's trading engine. It can be used to place orders.
  • API Interaction: The balance can be retrieved via private wallet endpoints, allowing you to check the current available and locked amounts of each asset.
Funding vs Trading Balance

You must transfer funds from your Funding balance to your Trading balance before you can place orders. These are separate balances and funds in one are not automatically available in the other.

Symbol

symbol represents a single trading pair on the xRocket exchange, such as BTC-USDT or TON-USDT. It is the fundamental identifier for all trading activities and market data.

  • API Interaction: The symbol is a crucial parameter used in nearly all market data and trading endpoints to specify which asset pair the request or data relates to.

Order

An order is an instruction placed by a user to buy or sell a specific quantity of an asset at user-specified conditions. An order's lifecycle includes being created, potentially matched, and ultimately completed or canceled.

  • API Interaction: Orders are managed through private trading endpoints. You can create new orders (market, limit), cancel existing ones, and retrieve your order history.

Trade

trade represents a completed order or a portion of an order that has been successfully executed on the exchange. When an order is filled, one or more trades are generated.

  • API Interaction: The trade entity is accessed via private trading endpoints to retrieve a history of your past executed trades, which includes details like price, quantity, and timestamp.
Public vs Private Endpoints

Market data entities (Symbol, Ticker, Candle, Orderbook) are available through public endpoints that require no authentication. Account, Balance, Order, and Transfer entities require a Bearer Token.

Ticker

The ticker provides real-time, high-level market data for a specified symbol over a defined time interval. It gives you a quick snapshot of a pair's performance.

  • API Interaction: The ticker can be retrieved via a public API endpoint, providing information such as the last traded price, 24-hour high, 24-hour low, and 24-hour volume.

Candle

candle (or candlestick) represents aggregated trading data for a specified symbol over a specific time interval (e.g., 1 hour, 1 day). It consolidates the high, low, open, and close prices, as well as the volume, for that period.

  • API InteractionCandle data is available through a public API endpoint, which is essential for technical analysis and backtesting trading strategies.

Orderbook

The orderbook is a list of all outstanding orders for a specific symbol, sorted by price. It is composed of two sides:

  • Bids: Orders from buyers to buy an asset, sorted from highest to lowest price.
  • Asks: Orders from sellers to sell an asset, sorted from lowest to highest price.
  • API Interaction: The orderbook can be retrieved via a public endpoint. You can specify the desired depth and precision of the data.

Transfer

transfer represents the movement of an asset between a user's internal balances, specifically from the funding balance to the trading balance or vice-versa.

  • API Interaction: Transfers are managed via private wallet endpoints. This functionality is crucial for developers building applications that need to move funds into and out of the active trading balance.