bitstamp

package
v0.0.0-...-3c53fe9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BITSTAMP_API_URL                 = "https://www.bitstamp.net/api"
	BITSTAMP_API_VERSION             = "2"
	BITSTAMP_API_TICKER              = "ticker"
	BITSTAMP_API_TICKER_HOURLY       = "ticker_hour"
	BITSTAMP_API_ORDERBOOK           = "order_book"
	BITSTAMP_API_TRANSACTIONS        = "transactions"
	BITSTAMP_API_EURUSD              = "eur_usd"
	BITSTAMP_API_BALANCE             = "balance"
	BITSTAMP_API_USER_TRANSACTIONS   = "user_transactions"
	BITSTAMP_API_OPEN_ORDERS         = "open_orders"
	BITSTAMP_API_ORDER_STATUS        = "order_status"
	BITSTAMP_API_CANCEL_ORDER        = "cancel_order"
	BITSTAMP_API_CANCEL_ALL_ORDERS   = "cancel_all_orders"
	BITSTAMP_API_BUY                 = "buy"
	BITSTAMP_API_SELL                = "sell"
	BITSTAMP_API_MARKET              = "market"
	BITSTAMP_API_WITHDRAWAL_REQUESTS = "withdrawal_requests"
	BITSTAMP_API_BITCOIN_WITHDRAWAL  = "bitcoin_withdrawal"
	BITSTAMP_API_BITCOIN_DEPOSIT     = "bitcoin_deposit_address"
	BITSTAMP_API_UNCONFIRMED_BITCOIN = "unconfirmed_btc"
	BITSTAMP_API_RIPPLE_WITHDRAWAL   = "ripple_withdrawal"
	BITSTAMP_API_RIPPLE_DESPOIT      = "ripple_address"
	BITSTAMP_API_TRANSFER_TO_MAIN    = "transfer-to-main"
	BITSTAMP_API_TRANSFER_FROM_MAIN  = "transfer-from-main"
	BITSTAMP_API_XRP_WITHDRAWAL      = "xrp_withdrawal"
	BITSTAMP_API_XRP_DESPOIT         = "xrp_address"
)
View Source
const (
	BITSTAMP_PUSHER_KEY = "de504dc5763aeef9ff52"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitstamp

type Bitstamp struct {
	exchange.ExchangeBase
	Balance BitstampBalances
}

func (*Bitstamp) BitcoinWithdrawal

func (b *Bitstamp) BitcoinWithdrawal(amount float64, address string, instant bool) (string, error)

func (*Bitstamp) CancelAllOrders

func (b *Bitstamp) CancelAllOrders() (bool, error)

func (*Bitstamp) CancelOrder

func (b *Bitstamp) CancelOrder(OrderID int64) (bool, error)

func (*Bitstamp) GetBalance

func (b *Bitstamp) GetBalance() (BitstampBalances, error)

func (*Bitstamp) GetBitcoinDepositAddress

func (b *Bitstamp) GetBitcoinDepositAddress() (string, error)

func (*Bitstamp) GetEURUSDConversionRate

func (b *Bitstamp) GetEURUSDConversionRate() (BitstampEURUSDConversionRate, error)

func (*Bitstamp) GetExchangeAccountInfo

func (e *Bitstamp) GetExchangeAccountInfo() (exchange.ExchangeAccountInfo, error)

GetExchangeAccountInfo : Retrieves balances for all enabled currencies for the Bitstamp exchange

func (*Bitstamp) GetFee

func (b *Bitstamp) GetFee(currency string) float64

func (*Bitstamp) GetOpenOrders

func (b *Bitstamp) GetOpenOrders(currency string) ([]BitstampOrder, error)

func (*Bitstamp) GetOrderStatus

func (b *Bitstamp) GetOrderStatus(OrderID int64) (BitstampOrderStatus, error)

func (*Bitstamp) GetOrderbook

func (b *Bitstamp) GetOrderbook(currency string) (BitstampOrderbook, error)

func (*Bitstamp) GetOrderbookEx

func (b *Bitstamp) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)

func (*Bitstamp) GetRippleDepositAddress

func (b *Bitstamp) GetRippleDepositAddress() (string, error)

func (*Bitstamp) GetTicker

func (b *Bitstamp) GetTicker(currency string, hourly bool) (BitstampTicker, error)

func (*Bitstamp) GetTickerPrice

func (b *Bitstamp) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)

func (*Bitstamp) GetTransactions

func (b *Bitstamp) GetTransactions(currency string, values url.Values) ([]BitstampTransactions, error)

func (*Bitstamp) GetUnconfirmedBitcoinDeposits

func (b *Bitstamp) GetUnconfirmedBitcoinDeposits() ([]BitstampUnconfirmedBTCTransactions, error)

func (*Bitstamp) GetUserTransactions

func (b *Bitstamp) GetUserTransactions(values url.Values) ([]BitstampUserTransactions, error)

func (*Bitstamp) GetWithdrawalRequests

func (b *Bitstamp) GetWithdrawalRequests(values url.Values) ([]BitstampWithdrawalRequests, error)

func (*Bitstamp) GetXRPDepositAddress

func (b *Bitstamp) GetXRPDepositAddress() (BitstampXRPDepositResponse, error)

func (*Bitstamp) PlaceOrder

func (b *Bitstamp) PlaceOrder(currency string, price float64, amount float64, buy, market bool) (BitstampOrder, error)

func (*Bitstamp) PusherClient

func (b *Bitstamp) PusherClient()

func (*Bitstamp) RippleWithdrawal

func (b *Bitstamp) RippleWithdrawal(amount float64, address, currency string) (bool, error)

func (*Bitstamp) Run

func (b *Bitstamp) Run()

func (*Bitstamp) SendAuthenticatedHTTPRequest

func (b *Bitstamp) SendAuthenticatedHTTPRequest(path string, v2 bool, values url.Values, result interface{}) (err error)

func (*Bitstamp) SetDefaults

func (b *Bitstamp) SetDefaults()

func (*Bitstamp) Setup

func (b *Bitstamp) Setup(exch config.ExchangeConfig)

func (*Bitstamp) Start

func (b *Bitstamp) Start()

func (*Bitstamp) TransferAccountBalance

func (b *Bitstamp) TransferAccountBalance(amount float64, currency, subAccount string, toMain bool) (bool, error)

func (*Bitstamp) XRPWithdrawal

func (b *Bitstamp) XRPWithdrawal(amount float64, address, destTag string) (string, error)

type BitstampBalances

type BitstampBalances struct {
	BTCReserved  float64 `json:"btc_reserved,string"`
	BTCEURFee    float64 `json:"btceur_fee,string"`
	BTCAvailable float64 `json:"btc_available,string"`
	XRPAvailable float64 `json:"xrp_available,string"`
	EURAvailable float64 `json:"eur_available,string"`
	USDReserved  float64 `json:"usd_reserved,string"`
	EURReserved  float64 `json:"eur_reserved,string"`
	XRPEURFee    float64 `json:"xrpeur_fee,string"`
	XRPReserved  float64 `json:"xrp_reserved,string"`
	XRPBalance   float64 `json:"xrp_balance,string"`
	XRPUSDFee    float64 `json:"xrpusd_fee,string"`
	EURBalance   float64 `json:"eur_balance,string"`
	BTCBalance   float64 `json:"btc_balance,string"`
	BTCUSDFee    float64 `json:"btcusd_fee,string"`
	USDBalance   float64 `json:"usd_balance,string"`
	USDAvailable float64 `json:"usd_available,string"`
	EURUSDFee    float64 `json:"eurusd_fee,string"`
}

type BitstampEURUSDConversionRate

type BitstampEURUSDConversionRate struct {
	Buy  float64 `json:"buy,string"`
	Sell float64 `json:"sell,string"`
}

type BitstampOrder

type BitstampOrder struct {
	ID     int64   `json:"id"`
	Date   string  `json:"datetime"`
	Type   int     `json:"type"`
	Price  float64 `json:"price"`
	Amount float64 `json:"amount"`
}

type BitstampOrderStatus

type BitstampOrderStatus struct {
	Status       string
	Transactions []struct {
		TradeID int64   `json:"tid"`
		USD     float64 `json:"usd,string"`
		Price   float64 `json:"price,string"`
		Fee     float64 `json:"fee,string"`
		BTC     float64 `json:"btc,string"`
	}
}

type BitstampOrderbook

type BitstampOrderbook struct {
	Timestamp int64 `json:"timestamp,string"`
	Bids      []BitstampOrderbookBase
	Asks      []BitstampOrderbookBase
}

type BitstampOrderbookBase

type BitstampOrderbookBase struct {
	Price  float64
	Amount float64
}

type BitstampPusherOrderbook

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

type BitstampPusherTrade

type BitstampPusherTrade struct {
	Price  float64 `json:"price"`
	Amount float64 `json:"amount"`
	ID     int64   `json:"id"`
}

type BitstampTicker

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

type BitstampTransactions

type BitstampTransactions struct {
	Date    int64   `json:"date,string"`
	TradeID int64   `json:"tid,string"`
	Price   float64 `json:"price,string"`
	Type    int     `json:"type,string"`
	Amount  float64 `json:"amount,string"`
}

type BitstampUnconfirmedBTCTransactions

type BitstampUnconfirmedBTCTransactions struct {
	Amount        float64 `json:"amount,string"`
	Address       string  `json:"address"`
	Confirmations int     `json:"confirmations"`
}

type BitstampUserTransactions

type BitstampUserTransactions struct {
	Date    string  `json:"datetime"`
	TransID int64   `json:"id"`
	Type    int     `json:"type,string"`
	USD     float64 `json:"usd"`
	EUR     float64 `json:"eur"`
	BTC     float64 `json:"btc"`
	XRP     float64 `json:"xrp"`
	BTCUSD  float64 `json:"btc_usd"`
	Fee     float64 `json:"fee,string"`
	OrderID int64   `json:"order_id"`
}

type BitstampWithdrawalRequests

type BitstampWithdrawalRequests struct {
	OrderID int64   `json:"id"`
	Date    string  `json:"datetime"`
	Type    int     `json:"type"`
	Amount  float64 `json:"amount,string"`
	Status  int     `json:"status"`
	Data    interface{}
}

type BitstampXRPDepositResponse

type BitstampXRPDepositResponse struct {
	Address        string `json:"address"`
	DestinationTag int64  `json:"destination_tag"`
}

Jump to

Keyboard shortcuts

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