Glossary
Quick reference for key terms used in the Boros API. For portfolio concepts (leverage, margin, PnL, liquidation), see the Boros User Glossary.
Core Conceptsβ
| Term | Description |
|---|---|
| Market | A trading market uniquely identified by marketId, with one collateral token and specific parameters |
| Asset | Any token in the system, identified by tokenId (e.g., USDT has 6 decimals, BTC has 8) |
| Root | EVM address (0x-prefixed) serving as the primary trading identity |
| Account | Sub-account under a root (IDs 0-255). Account 0 is default for trading; 255 is reserved for AMM |
| Agent | Wallet authorized to trade on your behalf but cannot withdraw funds |
| Market Account | Unique trading context: (root, subaccountId, tokenId, marketId). Use CROSS_MARKET_ID (16777215) for cross-margin, or specific marketId for isolated |
| Decimals | Deposits/withdrawals use native token decimals; trading/balances always use 18 decimals internally |
Trading Conceptsβ
| Term | Description |
|---|---|
| OrderBook | Primary liquidity source with Long/Short sides organized by price ticks. Learn more |
| Order | Trade instruction with orderId, tick (price level), side, size (18 decimals), and tif |
| Tick | Integer price level. Formula: rate = 1.00005^(tick Γ tickStep) - 1. Use SDK helpers to convert |
| Slippage | Max acceptable price impact as percentage (market orders only) |
| AMM | Automated market maker providing continuous liquidity |
Enumsβ
Sideβ
| Value | Name | Description |
|---|---|---|
0 | LONG | Betting on rate increase |
1 | SHORT | Betting on rate decrease |
Time In Force (TIF)β
| Value | Name | Description |
|---|---|---|
0 | GOOD_TIL_CANCELLED | Remains active until filled or cancelled |
1 | IMMEDIATE_OR_CANCEL | Fill what's possible, cancel the rest |
2 | FILL_OR_KILL | Must fill completely immediately or cancel |
3 | POST_ONLY | Only add liquidity, reject if would take |
4 | POST_ONLY_SLIDE | Post-only with price adjustment |
SDK Helpersβ
import { MarketAccLib, CROSS_MARKET_ID, estimateTickForRate, getRateAtTick } from "@pendle/sdk-boros";
import { FixedX18 } from "@pendle/boros-offchain-math";
// Pack market account
const marketAcc = MarketAccLib.pack(walletAddress, accountId, tokenId, CROSS_MARKET_ID);
// Convert between tick and rate
const tick = estimateTickForRate(FixedX18.fromNumber(0.05), tickStep, false);
const rate = getRateAtTick(tick, tickStep);
// Convert decimals
const size = FixedX18.fromNumber(100).value.toString();
const amount = FixedX18.fromBigIntString(balanceString).toNumber();
Additional Resourcesβ
- Boros User Glossary - Portfolio and general trading terms
- OrderBook Mechanics - How the orderbook works
- Custom Types - Contract type definitions