Concepts
Key concepts and terminology used in Cadenza.
Venue
A venue represents a cryptocurrency exchange (e.g., Binance, OKX, Bybit). Each venue has its own:
- Trading pairs and instruments
- API rate limits
- Order types supported
- Fee structures
BINANCE, OKX, BYBIT
Instrument
An instrument represents a tradeable asset pair on a specific venue. Instruments are identified by a composite ID:
{VENUE}:{SYMBOL}
Examples:
BINANCE:BTC/USDT- Bitcoin/USDT on BinanceOKX:ETH/USDT- Ethereum/USDT on OKX
Instrument Properties
| Property | Description |
|---|---|
instrumentId | Unique identifier (VENUE:SYMBOL) |
venue | Exchange name |
symbol | Trading pair (e.g., BTC/USDT) |
baseAsset | Base currency (e.g., BTC) |
quoteAsset | Quote currency (e.g., USDT) |
status | Trading status (active/inactive) |
Trading Account
A trading account represents your connected exchange account with API credentials. You can have multiple trading accounts per venue (e.g., different Binance sub-accounts).
Trading Account Properties
| Property | Description |
|---|---|
tradingAccountId | Unique identifier (UUID) |
venue | Exchange name |
status | Connection status |
createdAt | When the account was connected |
Trade Order
A trade order represents a buy or sell order submitted through Cadenza.
Order Properties
| Property | Description |
|---|---|
tradeOrderId | Unique identifier (UUID) |
tradingAccountId | Associated trading account |
instrumentId | Trading pair |
orderSide | BUY or SELL |
orderType | LIMIT or MARKET |
quantity | Order size |
limitPrice | Price for limit orders |
status | Order status |
Order Status Flow
PENDING → OPEN → FILLED
↘ PARTIALLY_FILLED → FILLED
↘ CANCELLED
→ REJECTED
| Status | Description |
|---|---|
PENDING | Order submitted, awaiting exchange confirmation |
OPEN | Order active on exchange order book |
PARTIALLY_FILLED | Order partially executed |
FILLED | Order fully executed |
CANCELLED | Order cancelled by user or system |
REJECTED | Order rejected by exchange |
Portfolio
A portfolio represents the asset balances in a trading account.
Portfolio Properties
| Property | Description |
|---|---|
asset | Asset symbol (e.g., BTC, USDT) |
free | Available balance for trading |
locked | Balance locked in open orders |
total | Total balance (free + locked) |
Order Book
An order book shows the current buy (bid) and sell (ask) orders for an instrument.
| Property | Description |
|---|---|
bids | Buy orders sorted by price (highest first) |
asks | Sell orders sorted by price (lowest first) |
timestamp | Order book snapshot time |
Each level contains:
price- Order pricequantity- Order size at this price
Credential
A credential represents exchange API keys stored securely in Cadenza.
| Property | Description |
|---|---|
credentialId | Unique identifier |
venue | Exchange name |
apiKey | Public API key (partially masked) |
status | Credential status |
API secrets are encrypted and never returned in API responses.