Skip to main content

Overview

The PortfolioFetcher retrieves your profile, open positions, and trading history. It requires an authenticated client.

Setup

PortfolioFetcher requires authentication. Configure scoped API-token HMAC credentials (or a legacy LIMITLESS_API_KEY) before calling these endpoints.

Current profile

Use get_current_profile() to fetch the authenticated caller’s private profile via GET /profiles/me. This is the preferred helper when the client is already authenticated and you do not want to pass a wallet address.

Fetching a profile by address

Use get_profile() to retrieve a profile by wallet address:

Fetching all positions

Use get_positions() to retrieve your portfolio:

CLOB positions

Use get_clob_positions() for CLOB-only positions:

AMM positions

Use get_amm_positions() for AMM-only positions:

User history

The Rust SDK uses the current cursor-based history API:
  • pass None for the first request
  • the SDK sends cursor= with an empty value on that first call
  • subsequent requests use the returned next_cursor
  • limit defaults to 20 when omitted

HistoryResponse

HistoryEntry

The first cursor request is not page=1. The Rust SDK intentionally opts into the new backend flow by sending cursor= empty on the first request.

Authentication errors

If the client is missing credentials, portfolio methods return LimitlessError::AuthenticationRequired before making the HTTP request: