[
{
"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": {}
}
]{
"message": "<string>",
"domain": "<string>",
"provider": "<string>",
"details": "<unknown>"
}{
"message": "<string>",
"domain": "<string>",
"provider": "<string>",
"details": "<unknown>"
}Coinbase
list_positions
List Coinbase positions as canonical Position models. Coinbase positions are derived from portfolio breakdown and flattened across spot/perp/futures positions.
GET
/
tools
/
coinbase
/
list_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": {}
}
]{
"message": "<string>",
"domain": "<string>",
"provider": "<string>",
"details": "<unknown>"
}{
"message": "<string>",
"domain": "<string>",
"provider": "<string>",
"details": "<unknown>"
}coinbase_list_positions
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_list_positions"],
)
- Optional
portfolio_type: choose which Coinbase portfolio to derive positions from. - Optional
currency: valuation currency (e.g.USD).
include/exclude: filter which tools are exposed (use full names likecoinbase_list_positions).minimal: omitproviderandprovider_fieldswhenTrue.
Body
application/json
This is a request to obtain information. Your API keys are required.
Response
List of positions (OpenTools trading schema).
Trading provider identifier. Omitted when minimal=True.
Instrument symbol (e.g. "AAPL", "BTCUSD").
Position size.
Average entry price.
Latest price used for valuation.
Current position market value.
Unrealized profit/loss.
Unrealized profit/loss percent (factor of 1, not 100).
Position direction.
Available options:
long, short Extra provider-specific fields (omitted when minimal=True).
⌘I