The historical-performance-per-trade endpoint gives a complete breakdown of the profit & loss for each trade made by a wallet.
Note: In the response, the trades of a wallet are grouped according to tokens that were traded.
Example: https://api.syve.ai/v1/wallet-api/historical-performance-per-trade?address=0x004baeac693aac11dcd1d7139338d32fbd87898a&breakdown=true
| Parameter | Type | Description |
|---|---|---|
address |
string | The address of the wallet for which to return profit & loss. |
breakdown |
boolean | If true the response provides a more detailed breakdown of the individual parts that went into calculating each field. |
| Parameter | Type | Description |
|---|---|---|
total.total_investment |
double | The sum of all investments made in both completed and ongoing trades. |
total.total_profit |
double | The sum of all profits from both completed trades and unrealized gains. |
total.total_return |
double | The overall financial performance, obtained by dividing the total profit by the total investment and adding 1. |
realized[i].investment |
double | The sum of initial investments across all completed (realized) trades. |
realized[i].realized_profit |
double | The actual profit made from completed trades, calculated as (sell_price - buy_price) multiplied by sell_amount. |
realized[i].realized_return |
double | The actual return on investment from completed trades, calculated as realized_profit / investment + 1. |
realized[i].buy_price |
double | The price at which the token was originally purchased. |
realized[i].sell_price |
double | The price at which the token was sold. |
realized[i].sell_amount |
integer | The quantity of the token sold in the trade. |
realized[i].sell_timestamp |
integer | The timestamp indicating when the token was sold, represented in Unix time. |
unrealized.buy_price |
double | The effective price at which the amount of a token currently held by a wallet was bought. |
unrealized.current_price |
double | The current price of the token. |
unrealized.current_balance_token |
double | The amount of a token currently held by the wallet. |
unrealized.unrealized_investment |
double | The value of the current holdings of a token, calculated as the buy_price multiplied by the current_balance_token. |
unrealized.unrealized_profit |
double | The potential profit that could be realized if the token is sold at the current price; calculated as (current_price - buy_price) multiplied by current_balance_token. |
unrealized.unrealized_return |
double | The potential return on investment if the token is sold at the current price; calculated as unrealized_profit / unrealized_investment + 1. |
realized[i].investmentThe realized[i].investment represents the total amount spent on buying tokens for a completed trade.