Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt

Use this file to discover all available pages before exploring further.

Portfolio Endpoints

Your positions, your history, your profit and loss. The wallet address is the only identity the protocol recognizes.

Get Portfolio Summary

address
string
required
User wallet address (e.g., 0x...).
All Dex Traded Fund (DTF) positions, total value, and profit/loss for a wallet. The numbers do not flatter.
curl "https://generalmarket.io/api/portfolio?address=0xYourWalletAddress"
FieldTypeDescription
addressstringUser wallet address
total_value_usdnumberTotal portfolio value in USD
total_pnl_usdnumberTotal profit/loss in USD
total_pnl_pctnumberTotal profit/loss as a percentage
positionsarrayArray of DTF positions held by the user
Position fields:
FieldTypeDescription
itp_idstringDTF identifier
namestringDTF name
symbolstringDTF ticker symbol
sharesstringNumber of shares held in wei
nav_per_sharenumberCurrent NAV per share
value_usdnumberCurrent position value in USD
cost_basis_usdnumberTotal cost basis in USD
pnl_usdnumberUnrealized profit/loss in USD
pnl_pctnumberUnrealized profit/loss as a percentage

Get Portfolio History

address
string
required
User wallet address (e.g., 0x...).
Portfolio value over time. The chart you will either celebrate or avoid looking at.
curl "https://generalmarket.io/api/portfolio/history?address=0xYourWalletAddress"
FieldTypeDescription
timestampnumberUnix timestamp of the data point
value_usdnumberTotal portfolio value in USD at that point in time

Get Trade History

address
string
required
User wallet address (e.g., 0x...).
Every trade. Every fill. Every fee. The ledger does not forget.
curl "https://generalmarket.io/api/portfolio/trades?address=0xYourWalletAddress"
FieldTypeDescription
tx_hashstringTransaction hash on-chain
timestampnumberUnix timestamp of the trade
typestringTrade type: buy or sell
itp_idstringDTF identifier
itp_symbolstringDTF ticker symbol
sharesstringNumber of shares traded in wei
price_per_sharenumberExecution price per share in USD
total_usdnumberTotal trade value in USD
fee_usdnumberFee charged in USD