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 POSTrequest. GET requests are limited to 25 addresses per request. Look at the example at the bottom of this page for how to construct a POST request.

Request Parameters

NameType(s)Description
wallet_addressstringThe 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.

Response Fields

Response FieldTypeDescription
wallet_addressstringThe given wallet address for which trading performance was calculated.
realized_profitdoubleThe total profit made from completed trades.
realized_investmentdoubleThe sum of investments across all completed (realized) trades.
realized_returndoubleThe actual return on investment from completed trades, calculated as realized_profit / investment multiplied by 100.
unrealized_profitdoubleThe closing token balance for the given interval and wallet address.
unrealized_investmentdoubleThe closing token balance (in base format) for the given interval and wallet address.
unrealized_returndoubleThe potential return on investment if the token is sold at the current price; calculated as unrealized_profit / unrealized_investment multiplied by 100.
total_profitdoubleThe sum of all profits from both completed trades and unrealized gains.
total_investmentdoubleThe sum of all investments made in both completed and ongoing trades.
total_returndoubleThe overall financial performance, obtained by dividing the total profit by the total investment and adding 1.
win_ratedoubleThe percentage of trades (both realized and unrealized) that were profitable.
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).

The remainder response field

The 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

Request: https://api.syve.ai/v1/wallet-api/batch-latest-total-performance?wallet_address=0xa9abc362000d3c95f79d4c1e7d7d2545c22a3fee,0x6c325a587f4fc663b23d51668015f7b8ed9d3264

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": [
        {
            "wallet_address": "0xa9abc362000d3c95f79d4c1e7d7d2545c22a3fee",
            "total_tokens_traded": 1,
            "realized_profit": -36651.92014849604,
            "realized_investment": 38153.58720099299,
            "realized_return": -96.06415238340193,
            "unrealized_profit": 0,
            "unrealized_investment": 0,
            "unrealized_return": null,
            "total_profit": -36651.92014849604,
            "total_investment": 38153.58720099299,
            "total_return": -96.06415238340193,
            "win_rate": 0.0,
            "total_trades": 21,
            "total_buys": 18,
            "total_sells": 3,
            "first_trade_timestamp": 1606375244,
            "last_trade_timestamp": 1609151641
        },
        {
            "wallet_address": "0x6c325a587f4fc663b23d51668015f7b8ed9d3264",
            "total_tokens_traded": 79,
            "realized_profit": -200938.0596071,
            "realized_investment": 695961.1142832197,
            "realized_return": -28.872023951230236,
            "unrealized_profit": -31130.061740530335,
            "unrealized_investment": 124435.90654742483,
            "unrealized_return": -25.016944549414355,
            "total_profit": -232068.12134763034,
            "total_investment": 820397.0208306445,
            "total_return": -28.28729449951726,
            "win_rate": 0.3346938775510204,
            "total_trades": 668,
            "total_buys": 443,
            "total_sells": 225,
            "first_trade_timestamp": 1613335612,
            "last_trade_timestamp": 1704478247
        }
    ],
    "remainder": []
}

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!