Documentation ¶
Overview ¶
Account Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-accountdata)
API Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-api)
Spot (https://bybit-exchange.github.io/docs/spot/v1)
Enums Definitions (https://bybit-exchange.github.io/docs/spot/v1/#t-enums)
Market Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-marketdata)
Wallet Data Endpoints (https://bybit-exchange.github.io/docs/spot/v1/#t-wallet)
Index ¶
- func Delete[T any](c *Client, path string, param any) (T, error)
- func Get[T any](c *Client, path string, param any) (T, error)
- func GetPublic[T any](c *Client, path string, param any) (T, error)
- func GetQuote[T any](c *Client, path string, param any) (T, error)
- func Post[T any](c *Client, path string, param any) (T, error)
- type Balance
- type BatchCancelOrder
- type BatchCancelOrderByID
- type BatchFastCancelOrder
- type BestBidAskPrice
- type BestBidAskPriceResult
- type CancelOrder
- type CancelOrderID
- type Client
- func (this *Client) BatchCancelOrder(v BatchCancelOrder) (bool, error)
- func (this *Client) BatchCancelOrderByID(ID []string) ([]CancelOrderID, error)
- func (this *Client) BatchFastCancelOrder(v BatchFastCancelOrder) (bool, error)
- func (this *Client) BestBidAskPrice(symbol string) (BestBidAskPriceResult, error)
- func (this *Client) CancelOrder(v CancelOrder) (OrderCancelled, error)
- func (this *Client) Delete(path string, param any, ret any) error
- func (this *Client) FastCancelOrder(v FastCancelOrder) (bool, error)
- func (this *Client) Get(path string, param any, ret any) error
- func (this *Client) GetOrder(v GetOrder) (Order, error)
- func (this *Client) GetPublic(path string, param any, ret any) error
- func (this *Client) GetQuote(path string, param any, ret any) error
- func (this *Client) LastTradedPrice(symbol string) (SymbolPrice, error)
- func (this *Client) MergedOrderBook(v MergedOrderBook) (OrderBookResult, error)
- func (this *Client) OpenOrders(v OpenOrders) ([]OrderBase, error)
- func (this *Client) OrderBook(v OrderBook) (OrderBookResult, error)
- func (this *Client) OrderHistory(v OrderHistory) ([]OrderHistoryResult, error)
- func (this *Client) PlaceOrder(v PlaceOrder) (OrderCreated, error)
- func (this *Client) Post(path string, param any, ret any) error
- func (this *Client) PublicTradingRecords(v PublicTradingRecords) ([]PublicTradingRecord, error)
- func (this *Client) QueryKline(v QueryKline) ([][]any, error)
- func (this *Client) QuerySymbol() ([]SymbolInfo, error)
- func (this *Client) QuerySymbolNames() ([]string, error)
- func (this *Client) ServerTime() (uint64, error)
- func (this *Client) SymbolLatestInformation(symbol *string) ([]LatestInformation, error)
- func (this *Client) TradeHistory(v TradeHistory) ([]Trade, error)
- func (this *Client) Transport() *transport.Client
- func (this *Client) WalletBalance() ([]Balance, error)
- type Error
- type FastCancelOrder
- type GetOrder
- type KlineInterval
- type LastTradedPrice
- type LatestInformation
- type LtOrderStatus
- type LtOrderType
- type LtStatus
- type MergedOrderBook
- type OpenOrders
- type Order
- type OrderBase
- type OrderBook
- type OrderBookResult
- type OrderCancelled
- type OrderCreated
- type OrderHistory
- type OrderHistoryResult
- type OrderStatus
- type OrderType
- type PlaceOrder
- type Price
- type PublicTradingRecord
- type PublicTradingRecords
- type Qty
- type QueryKline
- type Response
- type Side
- type SymbolInfo
- type SymbolLatestInformation
- type SymbolPrice
- type TimeInForce
- type Topic
- type TopicDataBookTicker
- type TopicDataDepth
- type TopicDataKline
- type TopicDataRealtimes
- type TopicDataTrade
- type TopicEvent
- type TopicName
- type TopicNotification
- type TopicParams
- type TopicSubscribtion
- type Trade
- type TradeFee
- type TradeHistory
- type WsPrivate
- type WsPublic
- func (this *WsPublic) Conf() *transport.WsConf
- func (this *WsPublic) Run()
- func (this *WsPublic) Shutdown()
- func (this *WsPublic) Subscribe(topic TopicName, symbol string)
- func (this *WsPublic) Unsubscribe(topic TopicName, symbol string)
- func (this *WsPublic) WithLog(log *ulog.Log) *WsPublic
- func (this *WsPublic) WithProxy(proxy string) *WsPublic
- type WsPublicTiny
- func (this *WsPublicTiny) Conf() *transport.WsConf
- func (this *WsPublicTiny) Connected() bool
- func (this *WsPublicTiny) Run()
- func (this *WsPublicTiny) SetOnConnected(onConnected func())
- func (this *WsPublicTiny) Shutdown()
- func (this *WsPublicTiny) Subscribe(topic TopicName, symbol string) bool
- func (this *WsPublicTiny) Unsubscribe(topic TopicName, symbol string) bool
- func (this *WsPublicTiny) WithLog(log *ulog.Log) *WsPublicTiny
- func (this *WsPublicTiny) WithProxy(proxy string) *WsPublicTiny
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Balance ¶
type Balance struct { Coin string `json:"coin"` CoinID string `json:"coinId"` CoinName string `json:"coinName"` Total string `json:"total"` Free string `json:"free"` Locked string `json:"locked"` }
Get Wallet Balance (https://bybit-exchange.github.io/docs/spot/v1/#t-balance)
type BatchCancelOrder ¶
type BatchCancelOrder struct { Symbol string `param:"symbol"` Side *Side `param:"side"` Type *OrderType `param:"orderTypes"` }
Batch Cancel Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-batchcancelactiveorder)
symbol Required string Name of the trading pair side string Order direction orderTypes string Order type. Use commas to indicate multiple order types, eg LIMIT,LIMIT_MAKER. Default: LIMIT
type BatchCancelOrderByID ¶
type BatchCancelOrderByID struct {
ID []string `param:"orderIds"`
}
Batch Cancel Active Order By IDs (https://bybit-exchange.github.io/docs/spot/v1/#t-batchcancelactiveorderbyids)
orderIds Required string Order ID, use commas to indicate multiple orderIds. Maximum of 100 ids.
func (BatchCancelOrderByID) Do ¶
func (this BatchCancelOrderByID) Do(client *Client) ([]CancelOrderID, error)
type BatchFastCancelOrder ¶
type BatchFastCancelOrder struct { Symbol string `param:"symbol"` Side *Side `param:"side"` Type *OrderType `param:"orderTypes"` }
Batch Fast Cancel Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-batchfastcancelactiveorder)
type BestBidAskPrice ¶
type BestBidAskPrice struct {
Symbol string `param:"symbol"`
}
Best Bid/Ask Price (https://bybit-exchange.github.io/docs/spot/v1/#t-bestbidask)
func (BestBidAskPrice) Do ¶
func (this BestBidAskPrice) Do(client *Client) (BestBidAskPriceResult, error)
type BestBidAskPriceResult ¶
type CancelOrder ¶
type CancelOrder struct { OrderID *string `param:"orderId"` OrderLinkID *string `param:"orderLinkId"` }
Cancel Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-cancelactive)
orderId string Order ID. Required if not passing orderLinkId orderLinkId string Unique user-set order ID. Required if not passing orderId
func (CancelOrder) Do ¶
func (this CancelOrder) Do(client *Client) (OrderCancelled, error)
type CancelOrderID ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Spot HTTP client
func (*Client) BatchCancelOrder ¶
func (this *Client) BatchCancelOrder(v BatchCancelOrder) (bool, error)
func (*Client) BatchCancelOrderByID ¶
func (this *Client) BatchCancelOrderByID(ID []string) ([]CancelOrderID, error)
func (*Client) BatchFastCancelOrder ¶
func (this *Client) BatchFastCancelOrder(v BatchFastCancelOrder) (bool, error)
func (*Client) BestBidAskPrice ¶
func (this *Client) BestBidAskPrice(symbol string) (BestBidAskPriceResult, error)
func (*Client) CancelOrder ¶
func (this *Client) CancelOrder(v CancelOrder) (OrderCancelled, error)
func (*Client) FastCancelOrder ¶
func (this *Client) FastCancelOrder(v FastCancelOrder) (bool, error)
func (*Client) LastTradedPrice ¶
func (this *Client) LastTradedPrice(symbol string) (SymbolPrice, error)
func (*Client) MergedOrderBook ¶
func (this *Client) MergedOrderBook(v MergedOrderBook) (OrderBookResult, error)
func (*Client) OpenOrders ¶
func (this *Client) OpenOrders(v OpenOrders) ([]OrderBase, error)
func (*Client) OrderHistory ¶
func (this *Client) OrderHistory(v OrderHistory) ([]OrderHistoryResult, error)
func (*Client) PlaceOrder ¶
func (this *Client) PlaceOrder(v PlaceOrder) (OrderCreated, error)
func (*Client) PublicTradingRecords ¶
func (this *Client) PublicTradingRecords(v PublicTradingRecords) ([]PublicTradingRecord, error)
func (*Client) QueryKline ¶
func (this *Client) QueryKline(v QueryKline) ([][]any, error)
func (*Client) QuerySymbol ¶
func (this *Client) QuerySymbol() ([]SymbolInfo, error)
func (*Client) QuerySymbolNames ¶
func (*Client) ServerTime ¶
Server Time (https://bybit-exchange.github.io/docs/spot/v1/#t-servertime)
func (*Client) SymbolLatestInformation ¶
func (this *Client) SymbolLatestInformation(symbol *string) ([]LatestInformation, error)
func (*Client) TradeHistory ¶
func (this *Client) TradeHistory(v TradeHistory) ([]Trade, error)
func (*Client) WalletBalance ¶
type FastCancelOrder ¶
type FastCancelOrder struct { Symbol string `param:"symbolId"` OrderID *string `param:"orderId"` OrderLinkID *string `param:"orderLinkId"` }
Fast Cancel Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-fastcancelactiveorder)
symbolId Required string Name of the trading pair orderId string Order ID. Required if not passing orderLinkId orderLinkId string Unique user-set order ID. Required if not passing orderId
type GetOrder ¶
type GetOrder struct { OrderID *string `param:"orderId"` OrderLinkID *string `param:"orderLinkId"` }
Get Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-getactive)
orderId string Order ID. Required if not passing orderLinkId orderLinkId string Unique user-set order ID. Required if not passing orderId
type KlineInterval ¶
type KlineInterval string
Kline interval (interval) (https://bybit-exchange.github.io/docs/spot/v1/#kline-interval-interval)
1m - 1 minute 3m - 3 minutes 5m - 5 minutes 15m - 15 minutes 30m - 30 minutes 1h - 1 hour 2h - 2 hours 4h - 4 hours 6h - 6 hours 12h - 12 hours 1d - 1 day 1w - 1 week 1M - 1 month
const ( Interval1m KlineInterval = "1m" Interval3m KlineInterval = "3m" Interval5m KlineInterval = "5m" Interval15m KlineInterval = "15m" Interval30m KlineInterval = "30m" Interval1h KlineInterval = "1h" Interval2h KlineInterval = "2h" Interval4h KlineInterval = "4h" Interval6h KlineInterval = "6h" Interval12h KlineInterval = "12h" Interval1d KlineInterval = "1d" Interval1w KlineInterval = "1w" Interval1M KlineInterval = "1M" )
type LastTradedPrice ¶
type LastTradedPrice struct {
Symbol string `param:"symbol"`
}
Last Traded Price (https://bybit-exchange.github.io/docs/spot/v1/#t-lasttradedprice)
func (LastTradedPrice) Do ¶
func (this LastTradedPrice) Do(client *Client) (SymbolPrice, error)
type LatestInformation ¶
type LatestInformation struct { Time uint64 `json:"time"` Symbol string `json:"symbol"` BestBidPrice string `json:"bestBidPrice"` BestAskPrice string `json:"bestAskPrice"` Volume string `json:"volume"` QuoteVolume string `json:"quoteVolume"` LastPrice string `json:"lastPrice"` HighPrice string `json:"highPrice"` LowPrice string `json:"lowPrice"` OpenPrice string `json:"openPrice"` }
type LtOrderStatus ¶
type LtOrderStatus string
LT order status (orderStatus) (https://bybit-exchange.github.io/docs/spot/v1/#lt-order-status-orderstatus)
1 - Completed 2 - In progress 3 - Failed
const ( Completed LtOrderStatus = "1" InProgress LtOrderStatus = "2" Failed LtOrderStatus = "3" )
type LtOrderType ¶
type LtOrderType string
LT order type (orderType) (https://bybit-exchange.github.io/docs/spot/v1/#lt-order-type-ordertype)
1 - Purchase 2 - Redemption
const ( Purchase LtOrderType = "1" Redemption LtOrderType = "2" )
type LtStatus ¶
type LtStatus string
LT status (status) (https://bybit-exchange.github.io/docs/spot/v1/#lt-status-status)
1 - ETP can be purchased and redeemed 2 - ETP can be purchased, but not redeemed 3 - ETP can be redeemed, but not purchased 4 - ETP cannot be purchased nor redeemed
type MergedOrderBook ¶
type MergedOrderBook struct { Symbol string `param:"symbol"` Scale *int `param:"scale"` Limit *int `param:"limit"` }
Merged Order Book (https://bybit-exchange.github.io/docs/spot/v1/#t-mergedorderbook)
symbol Required string Name of the trading pair scale int Precision of the merged orderbook, 1 means 1 digit limit integer Default value is 100
func (MergedOrderBook) Do ¶
func (this MergedOrderBook) Do(client *Client) (OrderBookResult, error)
type OpenOrders ¶
type OpenOrders struct { Symbol *string `param:"symbol"` OrderID *string `param:"orderId"` Limit *int `param:"limit"` }
Open Orders (https://bybit-exchange.github.io/docs/spot/v1/#t-openorders)
symbol string Name of the trading pair orderId string Specify orderId to return all the orders that orderId of which are smaller than this particular one for pagination purpose limit integer Default value is 500, max 500
type Order ¶
type Order struct { OrderHistoryResult Locked string `json:"locked"` }
type OrderBase ¶
type OrderBase struct { AccountID string `json:"accountId"` OrderID string `json:"orderId"` OrderLinkID string `json:"orderLinkId"` Symbol string `json:"symbol"` SymbolName string `json:"symbolName"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` OrderType OrderType `json:"type"` OrderStatus OrderStatus `json:"status"` TimeInForce TimeInForce `json:"timeInForce"` }
type OrderBook ¶
Order Book (https://bybit-exchange.github.io/docs/spot/v1/#t-orderbook)
symbol Required string Name of the trading pair limit integer Default value is 100
type OrderBookResult ¶
type OrderCancelled ¶
type OrderCancelled struct { OrderCreated Side string `json:"side"` }
type OrderCreated ¶
type OrderHistory ¶
type OrderHistory struct { Symbol *string `param:"symbol"` OrderID *string `param:"orderId"` Limit *int `param:"limit"` StartTime *uint64 `param:"startTime"` EndTime *uint64 `param:"endTime"` }
Order History (https://bybit-exchange.github.io/docs/spot/v1/#t-orderhistory)
symbol string Name of the trading pair orderId string Specify orderId to return all the orders that orderId of which are smaller than this particular one for pagination purpose limit integer Default value is 500, max 500 startTime long Start time, unit in millisecond endTime long End time, unit in millisecond
func (OrderHistory) Do ¶
func (this OrderHistory) Do(client *Client) ([]OrderHistoryResult, error)
type OrderHistoryResult ¶
type OrderHistoryResult struct { OrderBase ExchangeId string `json:"exchangeId"` CummulativeQuoteQty string `json:"cummulativeQuoteQty"` AvgPrice string `json:"avgPrice"` StopPrice string `json:"stopPrice"` IcebergQty string `json:"icebergQty"` Time string `json:"time"` UpdateTime string `json:"updateTime"` IsWorking bool `json:"isWorking"` }
type OrderStatus ¶
type OrderStatus string
Order status (status) (https://bybit-exchange.github.io/docs/spot/v1/#order-status-status)
ORDER_NEW - Untriggered ORDER_FILLED - Triggered ORDER_FAILED - fail to trigger
const ( New OrderStatus = "NEW" PartiallyFilled OrderStatus = "PARTIALLY_FILLED" Filled OrderStatus = "FILLED" Canceled OrderStatus = "CANCELED" PendingCancel OrderStatus = "PENDING_CANCEL" PendingNew OrderStatus = "PENDING_NEW" Rejected OrderStatus = "REJECTED" // The below status for tp/sl order only OrderNew OrderStatus = "ORDER_NEW" OrderCanceled OrderStatus = "ORDER_CANCELED" OrderFilled OrderStatus = "ORDER_FILLED" OrderFailed OrderStatus = "ORDER_FAILED" )
type OrderType ¶
type OrderType string
Order type (type/orderTypes) (https://bybit-exchange.github.io/docs/spot/v1/#order-type-type-ordertypes)
type PlaceOrder ¶
type PlaceOrder struct { Symbol string `param:"symbol"` Qty int `param:"qty"` Side Side `param:"side"` Type OrderType `param:"type"` TimeInForce *TimeInForce `param:"timeInForce"` Price *Price `param:"price"` OrderLinkID *string `param:"orderLinkId"` }
Place Active Order (https://bybit-exchange.github.io/docs/spot/v1/#t-placeactive)
symbol Required string Name of the trading pair qty Required number Order quantity (for market orders: when side is Buy, this is in the quote currency. Otherwise, qty is in the base currency. For example, on BTCUSDT a Buy order is in USDT, otherwise it's in BTC. For limit orders, the qty is always in the base currency.) side Required string Order direction type Required string Order type timeInForce string Time in force price number Order price. When the type field is MARKET, the price field is optional. When the type field is LIMIT or LIMIT_MAKER, the price field is required orderLinkId string User-generated order ID
func (PlaceOrder) Do ¶
func (this PlaceOrder) Do(client *Client) (OrderCreated, error)
type Price ¶
type Price float64
Price (price) (https://bybit-exchange.github.io/docs/spot/v1/#price-price)
type PublicTradingRecord ¶
type PublicTradingRecords ¶
Public Trading Records (https://bybit-exchange.github.io/docs/spot/v1/#t-publictradingrecords)
symbol Required string Name of the trading pair limit integer Default value is 60, max 60
func (PublicTradingRecords) Do ¶
func (this PublicTradingRecords) Do(client *Client) ([]PublicTradingRecord, error)
type Qty ¶
type Qty uint64
Quantity (qty) (https://bybit-exchange.github.io/docs/spot/v1/#quantity-qty)
type QueryKline ¶
type QueryKline struct { Symbol string `param:"symbol"` Interval KlineInterval `param:"interval"` Limit *int `param:"limit"` StartTime *int `param:"startTime"` EndTime *int `param:"endTime"` }
Query Kline (https://bybit-exchange.github.io/docs/spot/v1/#t-querykline)
symbol Required string Name of the trading pair interval Required string Chart interval limit integer Default value is 1000, max 1000 startTime number Start time, unit in millisecond endTime number End time, unit in millisecond
type SymbolInfo ¶
type SymbolInfo struct { Name string `json:"name"` Alias string `json:"alias"` BaseCurrency string `json:"baseCurrency"` QuoteCurrency string `json:"quoteCurrency"` BasePrecision string `json:"basePrecision"` QuotePrecision string `json:"quotePrecision"` MinTradeQuantity string `json:"minTradeQuantity"` MinTradeAmount string `json:"minTradeAmount"` MaxTradeQuantity string `json:"maxTradeQuantity"` MaxTradeAmount string `json:"maxTradeAmount"` MinPricePrecision string `json:"minPricePrecision"` Category int `json:"category"` ShowStatus bool `json:"showStatus"` Innovation bool `json:"innovation"` }
Query Symbol (https://bybit-exchange.github.io/docs/spot/v1/#t-spot_querysymbol)
type SymbolLatestInformation ¶
type SymbolLatestInformation struct {
Symbol *string `param:"symbol"`
}
Latest Information for Symbol (https://bybit-exchange.github.io/docs/spot/v1/#t-spot_latestsymbolinfo)
func (SymbolLatestInformation) Do ¶
func (this SymbolLatestInformation) Do(client *Client) ([]LatestInformation, error)
type SymbolPrice ¶
type TimeInForce ¶
type TimeInForce string
Time in force (time_in_force) (https://bybit-exchange.github.io/docs/spot/v1/#time-in-force-time_in_force)
GTC - Good Till Canceled FOK - Fill or Kill IOC - Immediate or Cancel
const ( GoodTillCanceled TimeInForce = "GTC" FillOrKill TimeInForce = "FOK" ImmediateOrCancel TimeInForce = "IOC" )
type Topic ¶
type Topic struct { Name TopicName `json:"topic"` Params TopicParams `json:"params"` Event TopicEvent `json:"event"` }
type TopicDataBookTicker ¶
type TopicDataBookTicker struct { Symbol string `json:"s"` // Trading pair BidPrice string `json:"bidPrice"` // Best bid price BidQty string `json:"bidQty"` // Bid quantity AskPrice string `json:"askPrice"` // Best ask price AskQty string `json:"askQty"` // Ask quantity Timestamp uint64 `json:"time"` // Timestamp (last update time of the order book) }
type TopicDataDepth ¶
type TopicDataKline ¶
type TopicDataKline struct { Timestamp uint64 `json:"t"` // Starting time Symbol string `json:"s"` // Trading pair SymbolName string `json:"sn"` // Trading pair ClosePrice string `json:"c"` // Close price HighPrice string `json:"h"` // High price LowPrice string `json:"l"` // Low price OpenPrice string `json:"o"` // Open price TradingVolume string `json:"v"` // Trading volume }
type TopicDataRealtimes ¶
type TopicDataRealtimes struct { Timestamp uint64 `json:"t"` // Timestamp (trading time in the match box) Symbol string `json:"s"` // Trading pair ClosePrice string `json:"c"` // Close price HighPrice string `json:"h"` // High price LowPrice string `json:"l"` // Low price OpenPrice string `json:"o"` // Open price TradingVolume string `json:"v"` // Trading volume TradingQuoteVolume string `json:"qv"` // Trading quote volume Change string `json:"m"` // Change }
type TopicDataTrade ¶
type TopicDataTrade struct { TradeID string `json:"v"` // Trade ID Timestamp uint64 `json:"t"` // Timestamp (trading time in the match box) Price string `json:"p"` // Price Quantity string `json:"q"` // Quantity M bool `json:"m"` // True indicates buy side is taker, false indicates sell side is taker }
type TopicEvent ¶
type TopicEvent string
const ( TopicEventSub TopicEvent = "sub" TopicEventCancel TopicEvent = "cancel" )
type TopicNotification ¶
type TopicNotification[T any] struct { Topic TopicName `json:"topic"` Params TopicParams `json:"params"` Data T `json:"data"` }
type TopicParams ¶
type TopicParams struct { Symbol string `json:"symbol"` Binary string `json:"binary"` SymbolName string `json:"symbolName"` KlineType KlineInterval `json:"klineType"` }
type TopicSubscribtion ¶
func (*TopicSubscribtion) HasCode ¶
func (this *TopicSubscribtion) HasCode() bool
func (*TopicSubscribtion) Ok ¶
func (this *TopicSubscribtion) Ok() bool
type Trade ¶
type Trade struct { ID string `json:"id"` Symbol string `json:"symbol"` SymbolName string `json:"symbolName"` OrderID string `json:"orderId"` TicketID string `json:"ticketId"` MatchOrderID string `json:"matchOrderId"` Price string `json:"price"` Qty string `json:"qty"` Commission string `json:"commission"` CommissionAsset string `json:"commissionAsset"` Time string `json:"time"` IsBuyer bool `json:"isBuyer"` IsMaker bool `json:"isMaker"` Fee TradeFee `json:"fee"` FeeTokenID string `json:"feeTokenId"` FeeAmount string `json:"feeAmount"` MakerRebate string `json:"makerRebate"` ExecutionTime string `json:"executionTime"` }
type TradeHistory ¶
type TradeHistory struct { Symbol *string `param:"symbol"` Limit *int `param:"limit"` FromTicketID *int `param:"fromTicketId"` ToTicketID *int `param:"toTicketId"` OrderID *string `param:"orderId"` StartTime *uint64 `param:"startTime"` EndTime *uint64 `param:"endTime"` }
Trade History (https://bybit-exchange.github.io/docs/spot/v1/#t-tradehistory)
symbol string Name of the trading pair limit integer Default value is 50, max 50 fromTicketId integer Query greater than the trade ID. (fromTicketId < trade ID) toTicketId integer Query smaller than the trade ID. (trade ID < toTicketId) orderId integer Order ID startTime long Start time, unit in millisecond endTime long End time, unit in millisecond
type WsPublic ¶
type WsPublic struct {
// contains filtered or unexported fields
}
func NewWsPublic ¶
func (*WsPublic) Unsubscribe ¶
type WsPublicTiny ¶
type WsPublicTiny struct {
// contains filtered or unexported fields
}
func NewWsPublicTiny ¶
func NewWsPublicTiny(url string) *WsPublicTiny
func (*WsPublicTiny) Conf ¶
func (this *WsPublicTiny) Conf() *transport.WsConf
func (*WsPublicTiny) Connected ¶
func (this *WsPublicTiny) Connected() bool
func (*WsPublicTiny) Run ¶
func (this *WsPublicTiny) Run()
func (*WsPublicTiny) SetOnConnected ¶
func (this *WsPublicTiny) SetOnConnected(onConnected func())
func (*WsPublicTiny) Shutdown ¶
func (this *WsPublicTiny) Shutdown()
func (*WsPublicTiny) Subscribe ¶
func (this *WsPublicTiny) Subscribe(topic TopicName, symbol string) bool
func (*WsPublicTiny) Unsubscribe ¶
func (this *WsPublicTiny) Unsubscribe(topic TopicName, symbol string) bool
func (*WsPublicTiny) WithLog ¶
func (this *WsPublicTiny) WithLog(log *ulog.Log) *WsPublicTiny
func (*WsPublicTiny) WithProxy ¶
func (this *WsPublicTiny) WithProxy(proxy string) *WsPublicTiny