Skip to main content
GET
/
tools
/
coinbase
/
get_portfolio_breakdown
{
  "provider": "<string>",
  "portfolio": {
    "provider": "<string>",
    "id": "<string>",
    "name": "<string>",
    "type": "<string>",
    "deleted": true,
    "provider_fields": {}
  },
  "balances": {
    "total_balance": {
      "value": "<string>",
      "currency": "<string>"
    },
    "total_futures_balance": {
      "value": "<string>",
      "currency": "<string>"
    },
    "total_cash_equivalent_balance": {
      "value": "<string>",
      "currency": "<string>"
    },
    "total_crypto_balance": {
      "value": "<string>",
      "currency": "<string>"
    },
    "futures_unrealized_pnl": {
      "value": "<string>",
      "currency": "<string>"
    },
    "perp_unrealized_pnl": {
      "value": "<string>",
      "currency": "<string>"
    },
    "provider_fields": {}
  },
  "spot_positions": [
    {
      "provider": "<string>",
      "symbol": "<string>",
      "qty": "<string>",
      "avg_entry_price": "<string>",
      "current_price": "<string>",
      "market_value": "<string>",
      "unrealized_pl": "<string>",
      "unrealized_plpc": "<string>",
      "side": "long",
      "provider_fields": {}
    }
  ],
  "perp_positions": [
    {
      "provider": "<string>",
      "symbol": "<string>",
      "qty": "<string>",
      "avg_entry_price": "<string>",
      "current_price": "<string>",
      "market_value": "<string>",
      "unrealized_pl": "<string>",
      "unrealized_plpc": "<string>",
      "side": "long",
      "provider_fields": {}
    }
  ],
  "futures_positions": [
    {
      "provider": "<string>",
      "symbol": "<string>",
      "qty": "<string>",
      "avg_entry_price": "<string>",
      "current_price": "<string>",
      "market_value": "<string>",
      "unrealized_pl": "<string>",
      "unrealized_plpc": "<string>",
      "side": "long",
      "provider_fields": {}
    }
  ],
  "provider_fields": {}
}

coinbase_get_portfolio_breakdown

import os
from opentools import trading

tools = trading.coinbase(
    api_key=os.environ["COINBASE_KEY"],
    api_secret=os.environ["COINBASE_SECRET"],
    model="openai",
    minimal=True,
    include=["coinbase_get_portfolio_breakdown"],
)
Request
  • portfolio_uuid (required)
  • currency (optional, defaults to USD)
Options
  • include / exclude: filter which tools are exposed (use full names like coinbase_get_portfolio_breakdown).
  • minimal: omit provider and provider_fields when True.

Body

application/json

This is a request to obtain information. Your API keys are required.

portfolio_uuid
string
required

Coinbase portfolio UUID (required).

currency
string
default:USD

Quote currency for valuation (default: USD).

Response

PortfolioBreakdown (OpenTools trading schema).

provider
string | null
portfolio
object
balances
object
spot_positions
object[]
perp_positions
object[]
futures_positions
object[]
provider_fields
object