bitstamp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ENDPOINT = "https://www.bitstamp.net"
)

Functions

This section is empty.

Types

type Bitstamp

type Bitstamp struct {
	Spot *Spot
	// contains filtered or unexported fields
}

func New

func New(config *APIConfig) *Bitstamp

func (*Bitstamp) DoRequest

func (bitstamp *Bitstamp) DoRequest(httpMethod, uri, reqBody string, response interface{}) ([]byte, error)

type Spot

type Spot struct {
	*Bitstamp
}

func (*Spot) CancelOrder

func (spot *Spot) CancelOrder(*Order) ([]byte, error)

func (*Spot) GetAccount

func (spot *Spot) GetAccount() (*Account, []byte, error)

private api

func (*Spot) GetDepth

func (spot *Spot) GetDepth(pair Pair, size int) (*Depth, []byte, error)

func (*Spot) GetExchangeName

func (spot *Spot) GetExchangeName() string

func (*Spot) GetExchangeRule

func (spot *Spot) GetExchangeRule(pair Pair) (*Rule, []byte, error)

func (*Spot) GetKlineRecords

func (spot *Spot) GetKlineRecords(pair Pair, period, size, since int) ([]*Kline, []byte, error)

bitstamp kline api can only return the nearly hour data. Cause it's api design.

func (*Spot) GetOHLCs

func (spot *Spot) GetOHLCs(symbol string, period, size, since int) ([]*OHLC, []byte, error)

func (*Spot) GetOrder

func (spot *Spot) GetOrder(*Order) ([]byte, error)

func (*Spot) GetOrders

func (spot *Spot) GetOrders(pair Pair) ([]*Order, error)

func (*Spot) GetTicker

func (spot *Spot) GetTicker(pair Pair) (*Ticker, []byte, error)

public api

func (*Spot) GetTrades

func (spot *Spot) GetTrades(pair Pair, since int64) ([]*Trade, error)

func (*Spot) GetUnFinishOrders

func (spot *Spot) GetUnFinishOrders(pair Pair) ([]*Order, []byte, error)

func (*Spot) KeepAlive

func (spot *Spot) KeepAlive()

util api

func (*Spot) PlaceOrder

func (spot *Spot) PlaceOrder(*Order) ([]byte, error)

Jump to

Keyboard shortcuts

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