API Reference

Retrieve a summary of the total trading performance of a wallet.

Method: GET

Endpoint: https://api.syve.ai/v1/wallet-api/latest-total-performance

📘

Methodology

For a detailed explanation of how profit and loss is calculated read our blog here.

📘

Dashboard

See the API in action by trying our wallet performance dashboard here.

📘

Supported chains

Supported chains are Ethereum and Base.

Request Parameters

NameType(s)Description
wallet_addressstringThe wallet address for which to calculate performance.

This is a required parameter.
chainstringUse eth for Ethereum, and base for Base.

Default: eth
total_excludebooleanIf truewill exclude stable coins from the total profit calculation.

Default: false
max_size_okbooleanIf true the most recent 10,000 trades are processed. If false and the wallet has more than 10,000 trades, and error message is returned.

Default: false

Response Fields

Response FieldTypeDescription
wallet_addressstringThe given wallet address for which trading performance was calculated.
total_tokens_tradedintegerThe number of unique tokens the wallet bought or sold using a DEX.
pnldoubleThe difference between realized_value and total_investment, which is the same as the difference between total_sell_volume and total_buy_volume.
total_profitdoubleThe sum of realized_profit and unrealized_profit.
total_valuedoubleThe sum of realized_value and unrealized_value.
total_investmentdoubleThe sum of realized_investment and unrealized_investment.
total_returndoubleThe total_profit relative to total_investment expressed as a percentage.

It is the same as the sum of realized_return and unrealized_return.
realized_profitdoubleThe difference between realized_value and realized_investment.
realized_valuedoubleThe total dollar revenue generated by the wallet across all tokens.

For a given token, it is calculated by multiplying the quantity sold by the average selling price across all trades.
realized_investmentdoubleThe total dollar cost of purchasing the tokens that were sold.

For a given token, it is calculated by multiplying the quantity sold by the average buying price.
realized_returndoubleThe realized_profit relative to total_invesment expressed as a percentage.
unrealized_profitdoubleThe difference between unrealized_value and unrealized_investment.
unrealized_valuedoubleThe unrealized value is the dollar value of all tokens that were bought but are not sold yet.
unrealized_investmentdoubleThe total dollar cost of purchasing the tokens not sold yet.

For a given token, it is calculated by multiplying the quantity not sold yet by the average buying price.
unrealized_returndoubleThe unrealized_profit relative to the total_investment expressed as a percentage.
win_ratedoubleThe fraction of tokens for which the total profit is positive.
total_tradesintegerThe total number of DEX trades made by the wallet.
total_buysintegerThe total number of buy trades made by the wallet.
total_sellsintegerThe total number of sell trades made by the wallet.
first_trade_timestampintegerThe time of the earliest DEX trade made by the wallet (in UNIX seconds timestamp format).
last_trade_timestampintegerThe time of the most recent DEX trade made by the wallet (in UNIX seconds timestamp format).
total_buy_volumedoubleThe total dollar value of all DEX purchases made by a wallet.
total_sell_volumedoubleThe total dollar value of all DEX sales made by a wallet.
excluded.totalstringIf total_exclude is true, it contains the list of token addresses excluded from the calculation.

Live Example

Press Try It to make a request and see what the response looks like. Feel free to try different query parameters.

Language
Click Try It! to start a request and see the response here!