bitstamp

package module
v0.0.0-...-a030967 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2013 License: MIT Imports: 7 Imported by: 1

README

bitstamp-go

An api written in go (golang) for http://www.bitstamp.net/

Documentation

http://godoc.org/github.com/Narsil/bitstamp-go

Documentation

Index

Constants

View Source
const (
	API_URL = "https://www.bitstamp.net/api/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	User     string
	Password string
}

func New

func New(user, password string) (api *Api, err error)

func NewFromConfig

func NewFromConfig(cfgfile string) (api *Api, err error)

Creates a new api object given a config file. The config file must be json formated to inlude User and Password

func (*Api) GetOrderBook

func (api *Api) GetOrderBook() (orderbook *OrderBook, err error)

func (*Api) GetTicker

func (api *Api) GetTicker() (ticker *Ticker, err error)

func (*Api) GetTrades

func (api *Api) GetTrades() (trades []Trade, err error)

Get the list of last trades with default parameters

func (*Api) GetTradesParams

func (api *Api) GetTradesParams(offset, limit int64, sort string) (trades []Trade, err error)

Specify wich trades you want.

type Order

type Order struct {
	Type   string // "ask" or "bid"
	Price  float64
	Amount float64
}

type OrderBook

type OrderBook struct {
	Time   time.Time
	Orders []Order
}

type Ticker

type Ticker struct {
	Last float64 `json:",string"`
	High float64 `json:",string"`
	Low  float64 `json:",string"`
	Ask  float64 `json:",string"`
	Bid  float64 `json:",string"`
}

type Trade

type Trade struct {
	Time   time.Time
	Id     string
	Price  float64
	Amount float64
}

Jump to

Keyboard shortcuts

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