Overview
ThePortfolioFetcher 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
Useget_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
Useget_profile() to retrieve a profile by wallet address:
Fetching All Positions
Useget_positions() to retrieve your portfolio:
CLOB Positions
Useget_clob_positions() for CLOB-only positions:
AMM Positions
Useget_amm_positions() for AMM-only positions:
User History
The Rust SDK uses the current cursor-based history API:- pass
Nonefor the first request - the SDK sends
cursor=with an empty value on that first call - subsequent requests use the returned
next_cursor limitdefaults to20when 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 returnLimitlessError::AuthenticationRequired before making the HTTP request: