bitso

package
v0.0.0-...-491abd5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL    = "https://api.bitso.com/v2/"
	BTCMXN = "btc_mxn"
	ETHMXN = "eth_mxn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

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

Account allows you to access to the Bitso API

func Authenticate

func Authenticate(keys *Keys) *Account

Authenticate receives a Keys used to authenticate into the private endpoints.

func (*Account) Balance

func (c *Account) Balance() (*Balance, error)

func (*Account) LookupOrder

func (c *Account) LookupOrder(id string) ([]*Order, error)

func (*Account) OpenOrders

func (c *Account) OpenOrders() ([]*Order, error)

type Balance

type Balance struct {
	Fee          string `json:"fee,omitempty"`
	MXNBalance   string `json:"mxn_balance,omitempty"`
	BTCBalance   string `json:"btc_balance,omitempty"`
	MXNReserved  string `json:"mxn_reserved,omitempty"`
	BTCReserved  string `json:"btc_reserved,omitempty"`
	MXNAvailable string `json:"mxn_available,omitempty"`
	BTCAvailable string `json:"btc_available,omitempty"`
	// contains filtered or unexported fields
}

type Error

type Error struct {
	Code    int    `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
	Status  int    `json:"status,omitempty"`
}

func (*Error) Error

func (e *Error) Error() string

type Keys

type Keys struct {
	Key      string
	Secret   string
	ClientId string
}

Keys stores the information needed to access to the private endpoints.

type Order

type Order struct {
	Id       string `json:"id,omitempty"`
	Type     string `json:"type,omitempty"`
	Price    string `json:"price,omitempty"`
	Amount   string `json:"amount,omitempty"`
	Datetime string `json:"datetime,omitempty"`
	Status   string `json:"status,omitempty"`
	Book     string `json:"book,omitempty"`
	// contains filtered or unexported fields
}

type OrderBookInfo

type OrderBookInfo struct {
	Asks [][]string
	Bids [][]string
}

func OrderBook

func OrderBook(book string, group bool) (*OrderBookInfo, error)

type TickerInfo

type TickerInfo struct {
	High      string
	Last      string
	Timestamp string
	Volume    string
	Vwap      string
	Low       string
	Ask       string
	Bid       string
}

func Ticker

func Ticker(book string) (*TickerInfo, error)

type Transaction

type Transaction struct {
	Amount string
	Date   string
	Price  string
	Tid    int
	Side   string
}

func Transactions

func Transactions(book string, time string) ([]*Transaction, error)

GetTransactions returns a list of recent trades from the specified book and the specified time frame.

Valid time frames are hour and minute. Leaving time blank will set hour as the default frame.

Jump to

Keyboard shortcuts

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