Portfolio vs. Organization API
Definitive offers two API modes that share the same trading, portfolio, and bridge endpoints. The difference is scope and authentication.
When to Use Each
| Portfolio API | Organization API | |
|---|---|---|
| Use case | You manage a single portfolio (your own account or one end-user) | You manage many portfolios on behalf of users (app, bot, trading terminal) |
| API key scope | Bound to one portfolio | Bound to your organization — operates on any portfolio via {portfolioId} |
| Base path | /v2/portfolio/... | /v2/organization/portfolios/{portfolioId}/... |
| Auth | API key is bound to your portfolio | API key is bound to your organization |
Which should I pick?
- Building for yourself (one portfolio) → Portfolio API
- Building for others (multi-user app, Telegram bot, trading terminal) → Organization API
See Overview for a full integration walkthrough using the Organization API.
Authentication
Both APIs use the same HMAC signature scheme (x-definitive-api-key, x-definitive-signature, x-definitive-timestamp). Your API key determines whether you are using the Portfolio or Organization API.
See Making Your First Request for a full authentication walkthrough covering both modes.
Path Convention
Every shared endpoint page shows the Portfolio API path. To use the Organization API, replace the /v2/portfolio/ prefix with /v2/organization/portfolios/{portfolioId}/:
| Portfolio API | Organization API |
|---|---|
/v2/portfolio/trade/quote | /v2/organization/portfolios/{portfolioId}/trade/quote |
/v2/portfolio/orders | /v2/organization/portfolios/{portfolioId}/orders |
portfolioId is the UUID of the target portfolio (string, required).
Organization API Example
const json = await AuthHelpers.signAndSend({
path: `/v2/organization/portfolios/${portfolioId}/trade/quote`,
method: "POST",
body: { /* same body as Portfolio API */ },
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});Shared Endpoints
All of the following endpoints are available in both APIs — identical request/response shapes, just different base paths:
Portfolio Information
- Get Portfolio Details — Retrieve portfolio metadata and vault addresses
- List Positions — View current token positions and balances
- List Transfers — View deposit, withdrawal, and bridge history
- Get Deposit Address — Get vault deposit address for a chain
Orders
- List Orders — View order history with filtering and pagination
- Get Order Details — Get detailed order information and fill events
Trading
- Get Quote — Get a quote for market, limit, TWAP, stop, stop-loss, or take-profit orders
- Submit Order — Submit an order using a quote
- Cancel Order — Cancel an active order
QuickTrade
- Get Quote — Preview QuickTrade pricing
- Execute Trade — Execute a trade in a single API call
- Cancel Order — Cancel a QuickTrade order
Bridge
- Get Quote — Get quotes for cross-chain bridging
- Submit Bridge — Execute a cross-chain bridge
Perps
- Perps Overview — Market data, account state, orders, fills, funding, fees, order preview, and transfers in both directions
Organization-Only Endpoints
These endpoints are exclusive to the Organization API:
- List Portfolios — View all portfolios in your organization
- Create Portfolio — Create a new portfolio
- Withdraw — Withdraw funds from a portfolio
- Get Portfolio Fees — View fee structure for a portfolio
- Refresh Balance — Force balance refresh for native EVM assets