v3

package
v1.60.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse = bybitapi.APIResponse

type Client

type Client struct {
	Client requestgen.AuthenticatedAPIClient
}

func NewClient added in v1.52.0

func NewClient(client *bybitapi.RestClient) *Client

func (*Client) NewGetTradesRequest

func (c *Client) NewGetTradesRequest() *GetTradesRequest

type GetTradesRequest

type GetTradesRequest struct {
	// contains filtered or unexported fields
}

func (*GetTradesRequest) Do

Do generates the request object and send the request object to the API endpoint

func (*GetTradesRequest) EndTime

func (g *GetTradesRequest) EndTime(endTime time.Time) *GetTradesRequest

func (*GetTradesRequest) FromTradeId

func (g *GetTradesRequest) FromTradeId(fromTradeId string) *GetTradesRequest

func (*GetTradesRequest) GetParameters

func (g *GetTradesRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*GetTradesRequest) GetParametersJSON

func (g *GetTradesRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*GetTradesRequest) GetParametersQuery

func (g *GetTradesRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*GetTradesRequest) GetPath added in v1.53.0

func (g *GetTradesRequest) GetPath() string

GetPath returns the request path of the API

func (*GetTradesRequest) GetQueryParameters

func (g *GetTradesRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*GetTradesRequest) GetSlugParameters

func (g *GetTradesRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*GetTradesRequest) GetSlugsMap

func (g *GetTradesRequest) GetSlugsMap() (map[string]string, error)

func (*GetTradesRequest) Limit

func (g *GetTradesRequest) Limit(limit uint64) *GetTradesRequest

func (*GetTradesRequest) OrderId

func (g *GetTradesRequest) OrderId(orderId string) *GetTradesRequest

func (*GetTradesRequest) StartTime

func (g *GetTradesRequest) StartTime(startTime time.Time) *GetTradesRequest

func (*GetTradesRequest) Symbol

func (g *GetTradesRequest) Symbol(symbol string) *GetTradesRequest

func (*GetTradesRequest) ToTradeId

func (g *GetTradesRequest) ToTradeId(toTradeId string) *GetTradesRequest

type OrderType

type OrderType string
const (
	OrderTypeMaker OrderType = "0"
	OrderTypeTaker OrderType = "1"
)

type Side

type Side string
const (
	SideBuy  Side = "0"
	SideSell Side = "1"
)

type Trade

type Trade struct {
	Symbol        string                     `json:"symbol"`
	Id            string                     `json:"id"`
	OrderId       string                     `json:"orderId"`
	TradeId       string                     `json:"tradeId"`
	OrderPrice    fixedpoint.Value           `json:"orderPrice"`
	OrderQty      fixedpoint.Value           `json:"orderQty"`
	ExecFee       fixedpoint.Value           `json:"execFee"`
	FeeTokenId    string                     `json:"feeTokenId"`
	CreatTime     types.MillisecondTimestamp `json:"creatTime"`
	IsBuyer       Side                       `json:"isBuyer"`
	IsMaker       OrderType                  `json:"isMaker"`
	MatchOrderId  string                     `json:"matchOrderId"`
	MakerRebate   fixedpoint.Value           `json:"makerRebate"`
	ExecutionTime types.MillisecondTimestamp `json:"executionTime"`
	BlockTradeId  string                     `json:"blockTradeId"`
}

type TradesResponse

type TradesResponse struct {
	List []Trade `json:"list"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL