> For the complete documentation index, see [llms.txt](https://fiveelementslabs.gitbook.io/tide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fiveelementslabs.gitbook.io/tide/projects/campaigns/create-a-campaign/points-campaign/managing-your-data-sources.md).

# 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).
