Skip to main content
POST
/
v1
/
me
/
subs
`POST /v1/me/subs` — create (or re-activate) an alert subscription for an asset at a bps threshold. Idempotent on (asset, threshold, channel).
curl --request POST \
  --url https://api.pegana.xyz/v1/me/subs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "asset": "<string>",
  "threshold_bps": 123,
  "channel": "<string>"
}
'
{
  "asset": "<string>",
  "channel": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "id": 123,
  "is_active": true,
  "threshold_bps": 123,
  "last_fired_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Session JWT issued by POST /v1/auth/telegram (Telegram Login Widget) or POST /v1/auth/magic/consume. Send as Authorization: Bearer <jwt>.

Body

application/json
asset
string
required
threshold_bps
integer<int32>
required
channel
string

Response

Subscription created or re-activated

asset
string
required
channel
string
required
created_at
string<date-time>
required
id
integer<int64>
required
is_active
boolean
required
threshold_bps
integer<int32>
required
last_fired_at
string<date-time> | null