bitstamp

package
v0.0.0-...-ea289b0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func ReadOnly

func ReadOnly() *Client

func ReadWrite

func ReadWrite() (*Client, error)

func (*Client) BuyLimitOrder

func (self *Client) BuyLimitOrder(pair string, amount, price float64) (*Order, error)

func (*Client) CancelOrder

func (self *Client) CancelOrder(id string) error

func (*Client) GetOpenOrders

func (self *Client) GetOpenOrders(pair string) ([]Order, error)

func (*Client) GetPair

func (self *Client) GetPair(market string) (*Pair, error)

func (*Client) SellLimitOrder

func (client *Client) SellLimitOrder(pair string, amount, price float64) (*Order, error)

func (*Client) Ticker

func (self *Client) Ticker(pair string) (*Ticker, error)

func (*Client) TradingPairsInfo

func (self *Client) TradingPairsInfo() ([]Pair, error)

type Order

type Order struct {
	Id           string  `json:"id"`
	DateTime     string  `json:"datetime"`
	Type         int     `json:"type,string"`
	Price        float64 `json:"price,string"`
	Amount       float64 `json:"amount,string"`
	CurrencyPair string  `json:"currency_pair,omitempty"` // warning: NOT equal to market name
}

func (*Order) Side

func (self *Order) Side() consts.OrderSide

type Pair

type Pair struct {
	BaseDecimals    int    `json:"base_decimals"`    // size precision
	MinimumOrder    string `json:"minimum_order"`    // minimum order size
	CounterDecimals int    `json:"counter_decimals"` // price precision
	Trading         string `json:"trading"`          // enabled/disabled
	UrlSymbol       string `json:"url_symbol"`       // name
	Description     string `json:"description"`
}

type Ticker

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

Jump to

Keyboard shortcuts

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