bitstamp

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TradingStatusEnabled  = "Enabled"
	TradingStatusDisabled = "Disabled"
)
View Source
const (
	Endpoint = "https://www.bitstamp.net/api/v2/"
)
View Source
const (
	QuoteSymbol = "USD"
)

Variables

This section is empty.

Functions

func DecodeResponse

func DecodeResponse(resp *resty.Response) ([]byte, error)

func New

func New() core.Exchange

func Request

func Request(ctx context.Context) *resty.Request

func UnmarshalResponse

func UnmarshalResponse(resp *resty.Response, v interface{}) error

Types

type Error

type Error struct {
	Code int    `json:"code,omitempty"`
	Msg  string `json:"message,omitempty"`
}

func (*Error) Error

func (err *Error) Error() string

type Pair added in v0.0.6

type Pair struct {
	Name          string        `json:"name,omitempty"`
	UrlSymbol     string        `json:"url_symbol,omitempty"`
	Trading       TradingStatus `json:"trading,omitempty"`
	BaseCurrency  string        `json:"base_currency,omitempty"`
	QuoteCurrency string        `json:"quote_currency,omitempty"`
}

func (Pair) IsOnline added in v1.0.6

func (pair Pair) IsOnline() bool

type Pairs added in v1.0.6

type Pairs []*Pair

type Ticker

type Ticker struct {
	Timestamp string          `json:"timestamp"`
	High      decimal.Decimal `json:"high"`
	Low       decimal.Decimal `json:"low"`
	Last      decimal.Decimal `json:"last"`
	Open      decimal.Decimal `json:"open"`
	VWAP      decimal.Decimal `json:"vwap"`
	Bid       decimal.Decimal `json:"bid"`
	Ask       decimal.Decimal `json:"ask"`
	Volume    decimal.Decimal `json:"volume"`
}

type TradingStatus added in v0.0.6

type TradingStatus string

Jump to

Keyboard shortcuts

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