itbit

package
v0.0.0-...-3240a16 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ITBIT_API_URL     = "https://api.itbit.com/v1"
	ITBIT_API_VERSION = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ItBit

type ItBit struct {
	exchange.Base
}

func (*ItBit) CancelWalletOrder

func (i *ItBit) CancelWalletOrder(walletID, orderID string)

func (*ItBit) CreateWallet

func (i *ItBit) CreateWallet(walletName string)

func (*ItBit) GetDepositAddress

func (i *ItBit) GetDepositAddress(walletID, currency string)

func (*ItBit) GetExchangeAccountInfo

func (i *ItBit) GetExchangeAccountInfo() (exchange.AccountInfo, error)

GetExchangeAccountInfo retrieves balances for all enabled currencies for the ItBit exchange - to-do

func (*ItBit) GetFee

func (i *ItBit) GetFee(maker bool) float64

func (*ItBit) GetOrderbook

func (i *ItBit) GetOrderbook(currency string) (OrderbookResponse, error)

func (*ItBit) GetOrderbookEx

func (i *ItBit) GetOrderbookEx(p pair.CurrencyPair, assetType string) (orderbook.Base, error)

GetOrderbookEx returns orderbook base on the currency pair

func (*ItBit) GetTicker

func (i *ItBit) GetTicker(currency string) (Ticker, error)

func (*ItBit) GetTickerPrice

func (i *ItBit) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)

GetTickerPrice returns the ticker for a currency pair

func (*ItBit) GetTradeHistory

func (i *ItBit) GetTradeHistory(currency, timestamp string) bool

func (*ItBit) GetWallet

func (i *ItBit) GetWallet(walletID string)

func (*ItBit) GetWalletBalance

func (i *ItBit) GetWalletBalance(walletID, currency string)

func (*ItBit) GetWalletOrder

func (i *ItBit) GetWalletOrder(walletID, orderID string)

func (*ItBit) GetWalletOrders

func (i *ItBit) GetWalletOrders(walletID string, params url.Values)

func (*ItBit) GetWalletTrades

func (i *ItBit) GetWalletTrades(walletID string, params url.Values)

func (*ItBit) GetWallets

func (i *ItBit) GetWallets(params url.Values)

func (*ItBit) PlaceWalletOrder

func (i *ItBit) PlaceWalletOrder(walletID, side, orderType, currency string, amount, price float64, instrument string, clientRef string)

func (*ItBit) PlaceWithdrawalRequest

func (i *ItBit) PlaceWithdrawalRequest(walletID, currency, address string, amount float64)

func (*ItBit) Run

func (i *ItBit) Run()

Run implements the ItBit wrapper

func (*ItBit) SendAuthenticatedHTTPRequest

func (i *ItBit) SendAuthenticatedHTTPRequest(method string, path string, params map[string]interface{}) (err error)

func (*ItBit) SetDefaults

func (i *ItBit) SetDefaults()

func (*ItBit) Setup

func (i *ItBit) Setup(exch config.ExchangeConfig)

func (*ItBit) Start

func (i *ItBit) Start()

Start starts the ItBit go routine

func (*ItBit) UpdateOrderbook

func (i *ItBit) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderbook.Base, error)

UpdateOrderbook updates and returns the orderbook for a currency pair

func (*ItBit) UpdateTicker

func (i *ItBit) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)

UpdateTicker updates and returns the ticker for a currency pair

func (*ItBit) WalletTransfer

func (i *ItBit) WalletTransfer(walletID, sourceWallet, destWallet string, amount float64, currency string)

type OrderbookResponse

type OrderbookResponse struct {
	Bids [][]string `json:"bids"`
	Asks [][]string `json:"asks"`
}

type Ticker

type Ticker struct {
	Pair          string
	Bid           float64 `json:",string"`
	BidAmt        float64 `json:",string"`
	Ask           float64 `json:",string"`
	AskAmt        float64 `json:",string"`
	LastPrice     float64 `json:",string"`
	LastAmt       float64 `json:",string"`
	Volume24h     float64 `json:",string"`
	VolumeToday   float64 `json:",string"`
	High24h       float64 `json:",string"`
	Low24h        float64 `json:",string"`
	HighToday     float64 `json:",string"`
	LowToday      float64 `json:",string"`
	OpenToday     float64 `json:",string"`
	VwapToday     float64 `json:",string"`
	Vwap24h       float64 `json:",string"`
	ServertimeUTC string
}

Jump to

Keyboard shortcuts

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