candles based alerts

This commit is contained in:
yash 2026-02-26 16:02:11 +03:00
parent bec3b7de5b
commit 999f675da9
11 changed files with 316 additions and 15 deletions

View file

@ -30,3 +30,21 @@ type marketOrderbookResp struct {
Seq int `json:"seq"` // Cross sequence.
Cts int64 `json:"cts"` // The timestamp from the matching engine when this orderbook data is produced. It can be correlated with T from public trade channel.
}
type marketKlineReq struct {
Category string `json:"category"` // Product type. spot,linear,inverse
Symbol string `json:"symbol"` // Symbol name, like BTCUSDT, uppercase only
Interval string `json:"interval"` // Kline interval. 1,3,5,15,30,60,120,240,360,720,D,W,M
Start string `json:"start,omitempty"` // unix timestamp in ms
End string `json:"end,omitempty"` // unix timestamp in ms
Limit *int `json:"limit,omitempty"` // Limit for data size per page. [1, 1000]. Default: 200
}
// marketKlineResp contains the result of /v5/market/kline.
// List entries: [startTime, open, high, low, close, volume, turnover].
// Returned in descending order (newest first).
type marketKlineResp struct {
Symbol string `json:"symbol"`
Category string `json:"category"`
List [][]string `json:"list"`
}