# Managing your Data Sources

Data Sources are subgraphs used by Tide to gather activity data from tracked protocols and convert them to XP via Point Campaigns.

You can view and manage your project Data Sources from the [dedicated page](https://www.tideprotocol.xyz/projects/points-campaign?tab=dataSources) in your project area.

### How to create a Data Source

#### Select your template

Choose the template best suited for the activity you want to track (currently, "Swaps" is the only available template, but more are coming soon)

#### Get your subgraph ready and paste your API link

Data sources currently require a subgraph to fetch the activity info. The subgraph schema should match the selected template requirements. For example, the "Swaps" template requires the subgraph to save the activity data into one `Swap` entity defined as follows:&#x20;

```graphql
type Swap {
  id: Bytes!
  user: User!
  toToken: Token!
  toTokenAmount: BigInt!
  timestamp: BigInt!
  txHash: Bytes!
}

type User @entity {
  id: Bytes!
}

type Token @entity {
  id: Bytes!
  decimals: Int
}
```

#### Select the data source chain

You can then select which blockchain will the actions be associated to and a name to identify your Data Source.

### Use your Data Sources:

You're now ready to use the newly created data source to launch a Point Campaign, for more info, you can refer to the [dedicated section](/tide/projects/campaigns/create-a-campaign/points-campaign/how-to-create-a-point-campaign.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fiveelementslabs.gitbook.io/tide/projects/campaigns/create-a-campaign/points-campaign/managing-your-data-sources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
