Retrieve a summary of the total trading performance of a wallet.
Method: GET
Endpoint: https://api.syve.ai/v1/wallet-api/batch-latest-total-performance
Fetching 1,000 addresses in a single request
You have to use a
POST
request.GET
requests are limited to 25 addresses per request. Look at the example at the bottom of this page for how to construct aPOST
request.
Request Parameters
Name | Type(s) | Description |
---|---|---|
wallet_address | string | The wallet address or list of addresses for which to calculate performance. If making a GET request use a comma separated list to provide the list of addresses. If POST use a list in the request body.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 |
Response Fields
Response Field | Type | Description |
---|---|---|
wallet_address | string | The given wallet address for which trading performance was calculated. |
total_tokens_traded | integer | The number of unique tokens the wallet bought or sold using a DEX. |
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 . |
total_profit | double | The sum of realized_profit and unrealized_profit . |
total_value | double | The sum of realized_value and unrealized_value . |
total_investment | double | The sum of realized_investment and unrealized_investment . |
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 . |
realized_profit | double | The difference between realized_value and realized_investment . |
realized_value | double | The 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_investment | double | The 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_return | double | The realized_profit relative to total_invesment expressed as a percentage. |
unrealized_profit | double | The difference between unrealized_value and unrealized_investment . |
unrealized_value | double | The unrealized value is the dollar value of all tokens that were bought but are not sold yet. |
unrealized_investment | double | The 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_return | double | The unrealized_profit relative to the total_investment expressed as a percentage. |
win_rate | double | The fraction of tokens for which the total profit is positive. |
total_trades | integer | The total number of DEX trades made by the wallet. |
total_buys | integer | The total number of buy trades made by the wallet. |
total_sells | integer | The total number of sell trades made by the wallet. |
first_trade_timestamp | integer | The time of the earliest DEX trade made by the wallet (in UNIX seconds timestamp format). |
last_trade_timestamp | integer | The time of the most recent DEX trade made by the wallet (in UNIX seconds timestamp format). |
total_buy_volume | double | The total dollar value of all DEX purchases made by a wallet. |
total_sell_volume | double | The total dollar value of all DEX sales made by a wallet. |
excluded.total | string | If total_exclude is true , it contains the list of token addresses excluded from the calculation. |
The remainder
response field
remainder
response fieldThe remainder field contains the list of wallet addresses for which performance was not calculated. The endpoint is designed subject to the following two constraints:
- A maximum of
1,000
wallet addresses can be processed in a single request. - The total number of trades made by the list of wallet addresses must be less than or equal to
100,000
.
If the any of the above constraints are broken the response will return a list of wallet addresses in the remainder
field.
You can use the list of wallet addresses in the remainder to make a subsequent request to process the next batch of wallet addresses.
Example: Total performance for two wallets
Try it out
In the Live Example section you can try out the request with different arguments.
Query
Example GET Request
Example POST Request
curl --location --request POST 'https://api.syve.ai/v1/wallet-api/batch-latest-total-performance' \
--header 'Content-Type: application/json' \
--data '{
"wallet_address": [
"0xa9abc362000d3c95f79d4c1e7d7d2545c22a3fee",
"0x6c325a587f4fc663b23d51668015f7b8ed9d3264"
]
}'
Response
{
"data": {
"0xa9abc362000d3c95f79d4c1e7d7d2545c22a3fee": {
"wallet_address": "0xa9abc362000d3c95f79d4c1e7d7d2545c22a3fee",
"total_tokens_traded": 1,
"pnl": -36603.52165596647,
"total_profit": -36603.52165596647,
"total_value": 1503.1451927405913,
"total_investment": 38106.666848707064,
"total_return": -96.0554272597274,
"realized_profit": -36603.52165596647,
"realized_value": 1503.1451927405913,
"realized_investment": 38106.666848707064,
"realized_return": -96.0554272597274,
"unrealized_profit": 0.0,
"unrealized_value": 0.0,
"unrealized_investment": 0.0,
"unrealized_return": 0.0,
"win_rate": 0.0,
"total_trades": 21,
"total_buys": 18,
"total_sells": 3,
"first_trade_timestamp": 1606375244,
"last_trade_timestamp": 1609151641,
"total_buy_volume": 38106.666848707064,
"total_sell_volume": 1503.1451927405913
},
"0x6c325a587f4fc663b23d51668015f7b8ed9d3264": {
"wallet_address": "0x6c325a587f4fc663b23d51668015f7b8ed9d3264",
"total_tokens_traded": 96,
"pnl": -288982.9376481087,
"total_profit": -241204.3172669621,
"total_value": 675348.2709539961,
"total_investment": 916552.5882209579,
"total_return": -26.31647331171071,
"realized_profit": -174872.72976305848,
"realized_value": 627569.6505728492,
"realized_investment": 802442.3803359076,
"realized_return": -19.079399481320436,
"unrealized_profit": -66331.58750390362,
"unrealized_value": 47778.62038114686,
"unrealized_investment": 114110.20788505046,
"unrealized_return": -7.237073830390268,
"win_rate": 0.23958333333333334,
"total_trades": 760,
"total_buys": 490,
"total_sells": 270,
"first_trade_timestamp": 1613335612,
"last_trade_timestamp": 1722535127,
"total_buy_volume": 916552.5882209578,
"total_sell_volume": 627569.6505728492
}
},
"remainder": []
}
Live Example
Press Try It to make a request and see what the response looks like. Feel free to try different query parameters.