Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddOrReduceMargin(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) AmendOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) BaseURI() string
- func (c *Client) CancelAllOrders(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) CancelOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) ComputeFee(tradeType string, volume float64, level, liquidity string) float64
- func (c *Client) ConfirmNewRiskLimit(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) CreateOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) Endpoint() string
- func (c *Client) GetAccountInfo() (map[string]interface{}, error)
- func (c *Client) GetAccountInstrumentsInfo(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetClosedOptionsPositions(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetClosedPnL(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetFundingRateHistory(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetHistoricalVolatility(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetHistoryOrders(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetInsurance(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetKline(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetMovePositionHistory(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetOpenInterest(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetOpenOrders(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetOrderbook(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetPositions(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetRPIOrderbook(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetRecentTrades(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetRiskLimit(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetServerTime() (map[string]interface{}, error)
- func (c *Client) GetTickers(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetTransactionLog(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetTransferableAmount(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) GetWalletBalance(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) MovePosition(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) PlaceOrder(params PlaceOrderParams) (map[string]interface{}, error)
- func (c *Client) Request(method, path string, params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) SetAutoAddMargin(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) SetLeverage(category, symbol string, leverage float64, side *string) (map[string]interface{}, error)
- func (c *Client) SetTradingStop(params map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) SwitchPositionMode(params map[string]interface{}) (map[string]interface{}, error)
- type ClientConfig
- type DemoClient
- func (dc *DemoClient) AddOrReduceMargin(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) AmendOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) ApplyForDemoFunds(adjustType int, funds []DemoFundRequest) (map[string]interface{}, error)
- func (dc *DemoClient) ApplyForDemoFundsSimple(coin string, amount string) (map[string]interface{}, error)
- func (dc *DemoClient) BaseURI() string
- func (dc *DemoClient) BatchAmendOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) BatchCancelOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) BatchPlaceOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) CancelAllOrders(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) CancelOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) CreateDemoAPIKey(mainnetClient *Client, demoUID string, params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) CreateDemoAccount(mainnetClient *Client) (map[string]interface{}, error)
- func (dc *DemoClient) CreateOrder(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) DeleteDemoAPIKey(mainnetClient *Client, params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetAPIKeyInfo() (map[string]interface{}, error)
- func (dc *DemoClient) GetAccountInfo() (map[string]interface{}, error)
- func (dc *DemoClient) GetBorrowHistory(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetClosedPnL(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetCoinGreeks(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetCollateralInfo(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetDeliveryRecord(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetOpenOrders(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetOrderHistory(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetPositions(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetSpotMarginStatus() (map[string]interface{}, error)
- func (dc *DemoClient) GetTradeHistory(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetTransactionLog(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetUSDCSettlement(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) GetWalletBalance(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) Request(method, path string, params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetAutoAddMargin(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetCollateralCoin(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetLeverage(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetMarginMode(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetSpotHedging(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetSpotMarginLeverage(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SetTradingStop(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) SwitchPositionMode(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) ToggleMarginTrade(params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) UpdateDemoAPIKey(mainnetClient *Client, params map[string]interface{}) (map[string]interface{}, error)
- func (dc *DemoClient) WebSocketURL() string
- type DemoFundRequest
- type PlaceOrderParams
- type SlTpParams
- type WebSocket
- func (ws *WebSocket) Close() error
- func (ws *WebSocket) Connect() error
- func (ws *WebSocket) GetSubscriptions() []string
- func (ws *WebSocket) IsConnected() bool
- func (ws *WebSocket) Listen() error
- func (ws *WebSocket) OnMessage(callback func(map[string]interface{}))
- func (ws *WebSocket) Ping() error
- func (ws *WebSocket) Send(message map[string]interface{}) error
- func (ws *WebSocket) Subscribe(topics []string) error
- func (ws *WebSocket) SubscribeExecution() error
- func (ws *WebSocket) SubscribeKline(symbol, interval string) error
- func (ws *WebSocket) SubscribeOrder() error
- func (ws *WebSocket) SubscribeOrderbook(symbol string, depth int) error
- func (ws *WebSocket) SubscribePosition() error
- func (ws *WebSocket) SubscribeTicker(symbol string) error
- func (ws *WebSocket) SubscribeTrade(symbol string) error
- func (ws *WebSocket) SubscribeWallet() error
- func (ws *WebSocket) Unsubscribe(topics []string) error
- type WebSocketConfig
Constants ¶
View Source
const ( DemoBaseURL = "https://api-demo.bybit.com" DemoWebSocketURL = "wss://stream-demo.bybit.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
func (*Client) AddOrReduceMargin ¶ added in v1.1.16
func (*Client) AmendOrder ¶
func (*Client) CancelAllOrders ¶
func (*Client) CancelOrder ¶
func (*Client) ComputeFee ¶
func (*Client) ConfirmNewRiskLimit ¶ added in v1.1.16
func (*Client) CreateOrder ¶
func (*Client) GetAccountInfo ¶ added in v1.1.16
func (*Client) GetAccountInstrumentsInfo ¶ added in v1.1.16
func (*Client) GetClosedOptionsPositions ¶ added in v1.1.16
func (*Client) GetClosedPnL ¶ added in v1.1.16
func (*Client) GetFundingRateHistory ¶ added in v1.1.16
func (*Client) GetHistoricalVolatility ¶ added in v1.1.16
func (*Client) GetHistoryOrders ¶
func (*Client) GetInsurance ¶ added in v1.1.16
func (*Client) GetMovePositionHistory ¶ added in v1.1.16
func (*Client) GetOpenInterest ¶ added in v1.1.16
func (*Client) GetOpenOrders ¶
func (*Client) GetOrderbook ¶ added in v1.1.16
func (*Client) GetPositions ¶
func (*Client) GetRPIOrderbook ¶ added in v1.1.16
func (*Client) GetRecentTrades ¶ added in v1.1.16
func (*Client) GetRiskLimit ¶ added in v1.1.16
func (*Client) GetServerTime ¶
func (*Client) GetTickers ¶
func (*Client) GetTransactionLog ¶ added in v1.1.16
func (*Client) GetTransferableAmount ¶ added in v1.1.16
func (*Client) GetWalletBalance ¶
func (*Client) MovePosition ¶ added in v1.1.16
func (*Client) PlaceOrder ¶
func (c *Client) PlaceOrder(params PlaceOrderParams) (map[string]interface{}, error)
func (*Client) SetAutoAddMargin ¶ added in v1.1.16
func (*Client) SetLeverage ¶
func (*Client) SetTradingStop ¶
type ClientConfig ¶
type DemoClient ¶ added in v1.1.16
type DemoClient struct {
*Client
}
func NewDemoClient ¶ added in v1.1.16
func NewDemoClient(config ClientConfig) (*DemoClient, error)
func (*DemoClient) AddOrReduceMargin ¶ added in v1.2.23
func (dc *DemoClient) AddOrReduceMargin(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) AmendOrder ¶ added in v1.2.23
func (dc *DemoClient) AmendOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) ApplyForDemoFunds ¶ added in v1.1.16
func (dc *DemoClient) ApplyForDemoFunds(adjustType int, funds []DemoFundRequest) (map[string]interface{}, error)
func (*DemoClient) ApplyForDemoFundsSimple ¶ added in v1.2.23
func (dc *DemoClient) ApplyForDemoFundsSimple(coin string, amount string) (map[string]interface{}, error)
func (*DemoClient) BaseURI ¶ added in v1.1.16
func (dc *DemoClient) BaseURI() string
func (*DemoClient) BatchAmendOrder ¶ added in v1.2.23
func (dc *DemoClient) BatchAmendOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) BatchCancelOrder ¶ added in v1.2.23
func (dc *DemoClient) BatchCancelOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) BatchPlaceOrder ¶ added in v1.2.23
func (dc *DemoClient) BatchPlaceOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) CancelAllOrders ¶ added in v1.2.23
func (dc *DemoClient) CancelAllOrders(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) CancelOrder ¶ added in v1.2.23
func (dc *DemoClient) CancelOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) CreateDemoAPIKey ¶ added in v1.2.23
func (*DemoClient) CreateDemoAccount ¶ added in v1.2.23
func (dc *DemoClient) CreateDemoAccount(mainnetClient *Client) (map[string]interface{}, error)
func (*DemoClient) CreateOrder ¶ added in v1.2.23
func (dc *DemoClient) CreateOrder(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) DeleteDemoAPIKey ¶ added in v1.2.23
func (dc *DemoClient) DeleteDemoAPIKey(mainnetClient *Client, params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetAPIKeyInfo ¶ added in v1.2.23
func (dc *DemoClient) GetAPIKeyInfo() (map[string]interface{}, error)
func (*DemoClient) GetAccountInfo ¶ added in v1.2.23
func (dc *DemoClient) GetAccountInfo() (map[string]interface{}, error)
func (*DemoClient) GetBorrowHistory ¶ added in v1.2.23
func (dc *DemoClient) GetBorrowHistory(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetClosedPnL ¶ added in v1.2.23
func (dc *DemoClient) GetClosedPnL(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetCoinGreeks ¶ added in v1.2.23
func (dc *DemoClient) GetCoinGreeks(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetCollateralInfo ¶ added in v1.2.23
func (dc *DemoClient) GetCollateralInfo(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetDeliveryRecord ¶ added in v1.2.23
func (dc *DemoClient) GetDeliveryRecord(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetOpenOrders ¶ added in v1.2.23
func (dc *DemoClient) GetOpenOrders(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetOrderHistory ¶ added in v1.2.23
func (dc *DemoClient) GetOrderHistory(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetPositions ¶ added in v1.2.23
func (dc *DemoClient) GetPositions(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetSpotMarginStatus ¶ added in v1.2.23
func (dc *DemoClient) GetSpotMarginStatus() (map[string]interface{}, error)
func (*DemoClient) GetTradeHistory ¶ added in v1.2.23
func (dc *DemoClient) GetTradeHistory(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetTransactionLog ¶ added in v1.2.23
func (dc *DemoClient) GetTransactionLog(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetUSDCSettlement ¶ added in v1.2.23
func (dc *DemoClient) GetUSDCSettlement(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) GetWalletBalance ¶ added in v1.2.23
func (dc *DemoClient) GetWalletBalance(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) Request ¶ added in v1.1.16
func (dc *DemoClient) Request(method, path string, params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetAutoAddMargin ¶ added in v1.2.23
func (dc *DemoClient) SetAutoAddMargin(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetCollateralCoin ¶ added in v1.2.23
func (dc *DemoClient) SetCollateralCoin(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetLeverage ¶ added in v1.2.23
func (dc *DemoClient) SetLeverage(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetMarginMode ¶ added in v1.2.23
func (dc *DemoClient) SetMarginMode(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetSpotHedging ¶ added in v1.2.23
func (dc *DemoClient) SetSpotHedging(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetSpotMarginLeverage ¶ added in v1.2.23
func (dc *DemoClient) SetSpotMarginLeverage(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SetTradingStop ¶ added in v1.2.23
func (dc *DemoClient) SetTradingStop(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) SwitchPositionMode ¶ added in v1.2.23
func (dc *DemoClient) SwitchPositionMode(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) ToggleMarginTrade ¶ added in v1.2.23
func (dc *DemoClient) ToggleMarginTrade(params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) UpdateDemoAPIKey ¶ added in v1.2.23
func (dc *DemoClient) UpdateDemoAPIKey(mainnetClient *Client, params map[string]interface{}) (map[string]interface{}, error)
func (*DemoClient) WebSocketURL ¶ added in v1.2.23
func (dc *DemoClient) WebSocketURL() string
type DemoFundRequest ¶ added in v1.2.23
type PlaceOrderParams ¶
type SlTpParams ¶
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func NewWebSocket ¶
func NewWebSocket(config WebSocketConfig) *WebSocket
func (*WebSocket) GetSubscriptions ¶
func (*WebSocket) IsConnected ¶
func (*WebSocket) SubscribeExecution ¶
func (*WebSocket) SubscribeKline ¶
func (*WebSocket) SubscribeOrder ¶
func (*WebSocket) SubscribeOrderbook ¶
func (*WebSocket) SubscribePosition ¶
func (*WebSocket) SubscribeTicker ¶
func (*WebSocket) SubscribeTrade ¶
func (*WebSocket) SubscribeWallet ¶
func (*WebSocket) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.
