# Watchlist

## GET /watchlist

> Get the authenticated user watchlist baskets

```json
{"openapi":"3.0.0","info":{"title":"Pear Protocol Trading API","version":"1.0.0"},"servers":[{"url":"https://hl-v2.pearprotocol.io","description":"Production (Mainnet)"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"WatchlistResponseDto":{"type":"object","properties":{"items":{"description":"List of watchlist baskets","type":"array","items":{"$ref":"#/components/schemas/WatchlistBasketDto"}}},"required":["items"]},"WatchlistBasketDto":{"type":"object","properties":{"id":{"type":"string","description":"Basket ID"},"longAssets":{"description":"Long assets in the basket","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}},"shortAssets":{"description":"Short assets in the basket","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}}},"required":["id","longAssets","shortAssets"]},"WatchlistAssetDto":{"type":"object","properties":{"asset":{"type":"string"},"weight":{"type":"number"}},"required":["asset","weight"]}}},"paths":{"/watchlist":{"get":{"operationId":"WatchlistController_getWatchlist","parameters":[],"responses":{"200":{"description":"Current list of baskets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistResponseDto"}}}}},"summary":"Get the authenticated user watchlist baskets","tags":["Watchlist"]}}}}
```

## POST /watchlist

> Toggle a basket (pair) in the user watchlist: if exact pair exists, remove it; otherwise, add it. Order and casing are preserved.

```json
{"openapi":"3.0.0","info":{"title":"Pear Protocol Trading API","version":"1.0.0"},"servers":[{"url":"https://hl-v2.pearprotocol.io","description":"Production (Mainnet)"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ToggleWatchlistDto":{"type":"object","properties":{"longAssets":{"description":"Long assets for the basket (order preserved)","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}},"shortAssets":{"description":"Short assets for the basket (order preserved)","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}}},"required":["longAssets","shortAssets"]},"WatchlistAssetDto":{"type":"object","properties":{"asset":{"type":"string"},"weight":{"type":"number"}},"required":["asset","weight"]},"WatchlistResponseDto":{"type":"object","properties":{"items":{"description":"List of watchlist baskets","type":"array","items":{"$ref":"#/components/schemas/WatchlistBasketDto"}}},"required":["items"]},"WatchlistBasketDto":{"type":"object","properties":{"id":{"type":"string","description":"Basket ID"},"longAssets":{"description":"Long assets in the basket","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}},"shortAssets":{"description":"Short assets in the basket","type":"array","items":{"$ref":"#/components/schemas/WatchlistAssetDto"}}},"required":["id","longAssets","shortAssets"]}}},"paths":{"/watchlist":{"post":{"operationId":"WatchlistController_toggle","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleWatchlistDto"}}}},"responses":{"200":{"description":"Updated list of baskets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistResponseDto"}}}}},"summary":"Toggle a basket (pair) in the user watchlist: if exact pair exists, remove it; otherwise, add it. Order and casing are preserved.","tags":["Watchlist"]}}}}
```


---

# 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://docs.pearprotocol.io/api-integration/api-specification/watchlist.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.
