init; project structure & bybit provider

This commit is contained in:
yash 2026-02-24 22:28:29 +03:00
commit ae096d4820
14 changed files with 482 additions and 0 deletions

View file

@ -0,0 +1,32 @@
package bybit
const (
categorySpot string = "spot"
categoryLinear string = "linear"
categoryInverse string = "inverse"
categoryOption string = "option"
)
type marketOrderbookReq struct {
// Product type. spot, linear, inverse, option
Category string `json:"category"`
// Symbol name, like BTCUSDT, uppercase only
Symbol string `json:"symbol"`
/*
Limit size for each bid and ask
spot: [1, 200]. Default: 1.
linear&inverse: [1, 500]. Default: 25.
option: [1, 25]. Default: 1.
*/
Limit *int `json:"limit,omitempty"`
}
type marketOrderbookResp struct {
S string `json:"s"` // Symbol name.
A [][]string `json:"a"` // Ask, seller. Sorted by price in ascending order. a[0]: Ask price, a[1]: Ask size.
B [][]string `json:"b"` // Bid, buyer. Sorted by price in descending order. b[0]: Bid price, b[1]: Bid size.
Ts int64 `json:"ts"` // The timestamp (ms) that the system generates the data.
U int `json:"u"` // Update ID, is always in sequence.
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.
}