api

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitmexClient

type BitmexClient struct {
	Client *http.Client
	// contains filtered or unexported fields
}

BitmexClient with direct API methods.

func NewBitmexClient added in v4.1.6

func NewBitmexClient(hc *http.Client) *BitmexClient

NewBitmexClient is the constructor of the BitmexClient.

func (*BitmexClient) GetBuckets

func (c *BitmexClient) GetBuckets(symbol string, from time.Time, binSize string) ([]TradeBucketedResponse, error)

GetBuckets from bitmex Trade API.

func (*BitmexClient) GetInstruments

func (c *BitmexClient) GetInstruments() ([]string, error)

GetInstruments from bitmex API.

type TradeBucketedResponse

type TradeBucketedResponse struct {
	Timestamp       string  `json:"timestamp"`
	Symbol          string  `json:"symbol"`
	Open            float64 `json:"open"`
	High            float64 `json:"high"`
	Low             float64 `json:"low"`
	Close           float64 `json:"close"`
	Trades          float64 `json:"trades"`
	Volume          float64 `json:"volume"`
	Vwap            float64 `json:"vwap"`
	LastSize        float64 `json:"lastSize"`
	Turnover        float64 `json:"turnover"`
	HomeNotional    float64 `json:"homeNotional"`
	ForeignNotional float64 `json:"foreignNotional"`
}

TradeBucketedResponse json from bitMEX bucketed trade API.

Jump to

Keyboard shortcuts

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