---
title: "Create a rule (paid plans: Basic 3, Pro 20)"
method: POST
path: "/v1/me/rules"
tags: ["account"]
---

# Create a rule (paid plans: Basic 3, Pro 20)

`POST /v1/me/rules`

## Request

- Base URL: `https://api.lpsignal.app`
- URL: `https://api.lpsignal.app/v1/me/rules`
- Auth: HTTP bearer

## Request body

- RuleInput: kind net_apr needs minNet7d; depeg needs minDeviation; tvl_outflow needs minDrop. Thresholds are fractions.
  - `name` string, required
  - `kind` 'net_apr' | 'depeg' | 'tvl_outflow', required
  - `enabled` boolean
  - `chains` string[]
  - `pools` string[]
  - `pairClasses` string[]
  - `minTvlUsd` number
  - `cooldownHours` integer
  - `minNet7d` number
  - `minNet24h` number
  - `minInRange7d` number
  - `minDeviation` number
  - `minDrop` number
  - `windowHours` integer

## Response `201`

OK

- Rule: kind net_apr needs minNet7d; depeg needs minDeviation; tvl_outflow needs minDrop. Thresholds are fractions.
  - `name` string, required
  - `kind` 'net_apr' | 'depeg' | 'tvl_outflow', required
  - `enabled` boolean
  - `chains` string[]
  - `pools` string[]
  - `pairClasses` string[]
  - `minTvlUsd` number
  - `cooldownHours` integer
  - `minNet7d` number
  - `minNet24h` number
  - `minInRange7d` number
  - `minDeviation` number
  - `minDrop` number
  - `windowHours` integer
  - `id` string
  - `active` boolean: within the plan's limit (rules past it are kept but do not run)
  - `createdAt` string
  - `updatedAt` string

## Other responses

- `400`: invalid request
- `401`: missing or invalid API key
- `403`: the plan does not include this

---

[API](https://skmtc.dev/lpsignal/apis/lpsignal-api.md) · [All operations](https://skmtc.dev/lpsignal/apis/lpsignal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lpsignal/apis/lpsignal-api/revisions/5fb8c06b1930?raw)
