get https://api.syve.ai/v1/wallet-api/latest-performance-per-token
The trading performance of a wallet broken down by each token they traded.
Method: GET
Endpoint: https://api.syve.ai/v1/wallet-api/latest-performance-per-token
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.
Request Parameters
Name | Type(s) | Description |
---|---|---|
wallet_address | string | The wallet address for which to calculate performance. This is a required parameter. |
chain | string | Use eth for Ethereum, and base for Base.Default: eth |
total_exclude | boolean | If true will exclude stable coins from the total profit calculation.Default: false |
max_size_ok | boolean | If 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 Field | Type | Description |
---|---|---|
data.token_address | string | .The address of the token traded. |
data.token_symbol | string | The symbol of the token traded. |
data.token_name | string | The name of the token traded. |
data.pnl | double | The difference between realized_value and total_investment , which is the same as the difference between total_sell_volume and total_buy_volume . |
data.total_profit | double | The sum of realized_profit and unrealized_profit . |
data.total_value | double | The sum of realized_value and unrealized_value . |
data.total_investment | double | The sum of realized_investment and unrealized_investment . |
data.total_return | double | The total_profit relative to total_investment expressed as a percentage.It is the same as the sum of realized_return and unrealized_return . |
data.realized_profit | double | The difference between realized_value and realized_investment . |
data.realized_value | double | The total dollar revenue generated by the wallet from the total_sell_amount sold of the token.It is calculated by multiplying the total_sell_amount by the avg_sell_price of the token. |
data.realized_investment | double | The total dollar cost of purchasing the tokens that were sold. It is calculated by multiplying the total_sell_amount by the avg_buy_price of the token. |
data.realized_return | double | The realized_profit relative to total_invesment expressed as a percentage. |
data.unrealized_profit | double | The difference between unrealized_value and unrealized_investment . |
data.unrealized_value | double | The unrealized value is the dollar value of the quantity of the token bought but not sold yet. |
data.unrealized_investment | double | The total dollar cost of purchasing the tokens not sold yet. It is calculated by multiplying the quantity not sold yet by the avg_buy_price of the token. |
data.unrealized_return | double | The unrealized_profit relative to the total_investment expressed as a percentage. |
data.win_rate | double | The fraction of tokens for which the total profit is positive. |
data.total_trades | integer | The total number of DEX trades for the token made by the wallet. |
data.total_buys | integer | The total amount of buy trades for the token made by the wallet. |
data.total_sells | integer | The total number of sell trades for the token made by the wallet. |
data.first_trade_timestamp | integer | The earliest DEX trade of the token made by the wallet (in UNIX seconds timestamp format). |
data.last_trade_timestamp | integer | The most recent DEX trade of the token made by the wallet (in UNIX seconds timestamp format). |
data.avg_buy_price | double | The average purchase price of a token, calculated by dividing the total dollar amount spent on the token by the number of tokens acquired. |
data.avg_sell_price | double | The average selling price of a token, calculated by dividing the total dollar revenue from selling the token by the number of tokens sold. |
data.current_price | double | The current dollar market price of the token. |
data.total_buy_amount | double | The total quantity of the token purchased. |
data.total_sell_amount | double | The total quantity of the token sold. |
data.trading_balance | double | The quantity of the token bought but not sold yet. It is the difference between total_buy_amount and total_sell_amount . |
data.total_buy_volume | double | The total dollar value of all DEX purchases of the token by the wallet. |
data.total_sell_volume | double | The total dollar value of all DEX sales of the token by the wallet. |
excluded.total | string | If total_exclude is true , it contains the list of token addresses excluded from the calculation. |
Example
Try it out
In the Live Example section you can try out the request with different arguments.
Query
Example GET Request
Response
{
"data": [
{
"token_address": "0xabea7663c472648d674bd3403d94c858dfeef728",
"token_symbol": "PUDGY",
"token_name": "Pudgy Penguins",
"pnl": -13844.339617842956,
"total_profit": 89106.80660562252,
"total_value": 102951.14622346548,
"total_investment": 13844.339617842956,
"total_return": 643.6334925703446,
"realized_profit": 0,
"realized_value": 0,
"realized_investment": 0,
"realized_return": 0.0,
"unrealized_profit": 89106.80660562252,
"unrealized_value": 102951.14622346548,
"unrealized_investment": 13844.339617842956,
"unrealized_return": 643.6334925703446,
"total_trades": 3,
"total_buys": 3,
"total_sells": 0,
"first_trade_timestamp": 1628397607,
"last_trade_timestamp": 1682180891,
"avg_buy_price": 4409.0253560009405,
"avg_sell_price": null,
"current_price": 32786.98924314186,
"total_buy_amount": 3.1400000000000006,
"total_sell_amount": 0,
"trading_balance": 3.1400000000000006,
"total_buy_volume": 13844.339617842956,
"total_sell_volume": 0
},
...
{
"token_address": "0xb6ca7399b4f9ca56fc27cbff44f4d2e4eef1fc81",
"token_symbol": "MUSE",
"token_name": "Muse",
"pnl": -64755.11484450988,
"total_profit": -29151.492872389135,
"total_value": 35603.621972120745,
"total_investment": 64755.11484450988,
"total_return": -45.01805446934618,
"realized_profit": 0,
"realized_value": 0,
"realized_investment": 0,
"realized_return": 0.0,
"unrealized_profit": -29151.492872389135,
"unrealized_value": 35603.621972120745,
"unrealized_investment": 64755.11484450988,
"unrealized_return": -45.01805446934618,
"total_trades": 3,
"total_buys": 3,
"total_sells": 0,
"first_trade_timestamp": 1621414673,
"last_trade_timestamp": 1621439002,
"avg_buy_price": 17.452588601819574,
"avg_sell_price": null,
"current_price": 9.595772758741536,
"total_buy_amount": 3710.3444263711476,
"total_sell_amount": 0,
"trading_balance": 3710.3444263711476,
"total_buy_volume": 64755.11484450988,
"total_sell_volume": 0
}
],
"excluded": {
"total": [
"0x6b175474e89094c44da98b954eedeac495271d0f",
"0xdac17f958d2ee523a2206206994597c13d831ec7",
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"unrealized": []
}
}
Live Example
Press Try It to make a request and see what the response looks like. Feel free to try different query parameters.