generated: '2026-08-06'
method: derived
source: openapi/ajaib-coin-exchange-openapi.yml
entities:
- name: TradingPair
schema: ExchangeInfo
identifier: symbol
identifier_format: '_, e.g. BTC_USDT'
description: >-
A tradable market on the exchange. Carries base_asset, base_precision,
quote_asset and quote_tick.
operations: [getExchangeInfo]
- name: Asset
schema: PortfolioAsset
identifier: asset
description: >-
A single currency or coin held by the exchange client, with free and locked
quantities and an optional equivalent valuation in another asset.
operations: [getPortfolio]
- name: Order
schema: Order
identifier: order_id
identifier_format: int64 generated by the exchange
description: >-
A spot trading instruction with side, type, price, quantity, status and
executed_quantity. Progresses through the documented status lifecycle.
operations:
- getOrder
- getOpenOrders
- createOrder
- createBatchOrders
- createSelfTradingOrder
- cancelOrder
- cancelBatchOrders
- cancelAllOpenOrders
- name: Trade
schema: Trade
identifier: trade_id
identifier_format: int64 generated by the exchange
description: >-
A single match execution against an order, with price, quantity, timestamp
and maker/self-trade flags.
operations: [getTrades]
- name: OrderBook
schema: Depth
identifier: null
description: >-
A point-in-time view of bids and asks for one trading pair. Not a persisted
entity; keyed only by symbol.
operations: [getDepth]
- name: Price
schema: Price
identifier: symbol
description: The latest quote value for one trading pair.
operations: [getPrice]
relationships:
- from: Trade
to: Order
kind: belongs_to
via: order_id
evidence: Trade.order_id is documented as the identifier of the trade's parent order.
- from: Order
to: Trade
kind: has_many
via: order_id
evidence: >-
Order.avg_price and Order.executed_quantity aggregate the trades matched
under the order.
- from: Order
to: TradingPair
kind: belongs_to
via: symbol
- from: Trade
to: TradingPair
kind: belongs_to
via: symbol
- from: OrderBook
to: TradingPair
kind: belongs_to
via: symbol
- from: Price
to: TradingPair
kind: belongs_to
via: symbol
- from: TradingPair
to: Asset
kind: has_one
via: base_asset
- from: TradingPair
to: Asset
kind: has_one
via: quote_asset
- from: PortfolioAsset
to: EquivalentAsset
kind: has_one
via: equivalent
enumerations:
OrderSide: [BUY, SELL]
OrderType: [LIMIT, MARKET, LIMIT_MAKER]
OrderStatus:
- NEW
- OPEN
- PARTIAL_FILLED
- FILLED
- PARTIAL_CANCELLED
- CANCELLED
- REJECTED
- EXPIRED
- EXPIRED_IN_MATCH
- PARTIALLY_EXPIRED_IN_MATCH
TimeInterval: ['1min', '5min', '15min', '30min', 1h, 4h, 1day, 1week, 1month]
notes:
- >-
The TimeInterval enumeration is published in the Definitions page but no
candlestick/kline endpoint is documented, so no entity uses it. This is a
documented-but-unreachable surface.
- >-
There are no sub-accounts. The portfolio and all order/trade queries are
scoped to a single exchange client identity, which is the API key itself.
- >-
Order ids are exchange-generated int64 values with no type prefix, so an order
id alone does not identify its trading pair; symbol is required on every
order lookup and cancel.