> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting a player's Value-to-Date (VTD) in Economy (Legacy)

> Retrieve a PlayFab player's lifetime spend using GetPlayerProfile and read totalValueToDateInUSD and valuesToDate from the PlayerProfileModel.

# Getting a player's Value-to-Date (VTD) (Legacy Economy)

<Info>
  Economy v1 APIs are in maintenance mode and will not be receiving any new features, only bug fixes. **The v1 APIs will be maintained for the foreseeable future.** See the [Economy v2 Overview](/services/playfab/economy-monetization/economy-v2/overview) to learn more about the next version of PlayFab Economy!
</Info>

PlayFab tracks the total amount spent by a player in the [player profile model](xref:titleid.playfabapi.com.client.accountmanagement.getplayerprofile#playerprofilemodel), which is retrieved by calling the [GetPlayerProfile](xref:titleid.playfabapi.com.client.accountmanagement.getplayerprofile) API.

Within the `PlayerProfileModel`, a player's VTD is tracked in two different fields:

1. `totalValueToDateInUSD` - The sum of the player's purchases made with real-money currencies, converted to the US dollars (**USD**) equivalent and represented as a whole number of cents (1/100 USD).
2. `valuesToDate` - An array of [ValueToDateModel](xref:titleid.playfabapi.com.client.accountmanagement.getplayerprofile#valuetodatemodel) objects that contain the player's lifetime purchase totals, summed for each real-money currency in which they have made a purchase. The `TotalValue` field in each object expresses the total for that currency as a whole number of 1/100 monetary units.

The following JSON shows these two fields with example values.

```json theme={null}
{
    …
    totalValueToDateInUSD: 1700
    valuesToDate: [{ "USD", 1200 }, { "EUR", 320 }]
    …
}
```

## Using VTD to define player segments

In the PlayFab Game Manager, you can use either totalValueToDateInUSD or valuesToDate as *segment predicates* - criteria that can be used to define player segments.

When creating or editing a player segment, the two predicates are included in the dropdown list:

1. **Total value to date in USD** - The `TotalValueToDateInUSD` value.
2. **Value to date** - The `ValuesToDate` totals. When you select this predicate, you'll see additional fields to specify the currency and the amount for that currency.

## Segment examples

The following examples show segments created using each of the VTD totals.

1. Create a segment of all players who have purchased more than **15 USD** in any currency.

   <img src="https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/economy-monetization/economy/tutorials/create-segment-mid-rollers-filter-1.png?fit=max&auto=format&n=Oa_DP1q6U1lat7c2&q=85&s=fa15a6d1b2d3ffbd840f6bb1af492501" alt="Create a Segment - Mid Rollers - Filter 1" width="1280" height="1500" data-path="images/playfab/economy-monetization/economy/tutorials/create-segment-mid-rollers-filter-1.png" />

2. Create a segment of all players who have spent more than **15 USD** in any currency *or* **15 Chinese Yuan**.

   <img src="https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/economy-monetization/economy/tutorials/create-segment-mid-rollers-filter-2.png?fit=max&auto=format&n=Oa_DP1q6U1lat7c2&q=85&s=2369e1383568c3fe81d6f8def958289e" alt="Create a Segment - Mid Rollers - Filter 2" width="1280" height="1500" data-path="images/playfab/economy-monetization/economy/tutorials/create-segment-mid-rollers-filter-2.png" />


## Related topics

- [Economy (Legacy) quickstart](/services/playfab/economy-monetization/economy/quickstart.md)
- [Items (Legacy Economy)](/services/playfab/economy-monetization/economy/items/index.md)
- [Stores (Legacy Economy)](/services/playfab/economy-monetization/economy/stores/index.md)
- [Catalogs (Legacy Economy)](/services/playfab/economy-monetization/economy/items/catalogs.md)
- [Items (Legacy Economy) quickstart](/services/playfab/economy-monetization/economy/items/quickstart.md)
