Documentation ¶
Index ¶
- func CancelOrder(orderId int64)
- func OpenOrders() (*[]OpenOrder, error)
- func SetAuth(clientId, key, secret string)
- func SetDebug(debug bool)
- func SetUrl(url string)
- func UserTransactions() (*[]UserTransactionsResult, error)
- type AccountBalanceResult
- type BuyOrderResult
- type ErrorResult
- type Event
- type OpenOrder
- type OrderBookItem
- type OrderBookResult
- type OrderStatusResult
- type SellOrderResult
- type TickerResult
- type UserTransactionsResult
- type WebSocket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelOrder ¶
func CancelOrder(orderId int64)
func OpenOrders ¶
func UserTransactions ¶
func UserTransactions() (*[]UserTransactionsResult, error)
Types ¶
type AccountBalanceResult ¶
type AccountBalanceResult struct { UsdBalance float64 `json:"usd_balance,string"` BtcBalance float64 `json:"btc_balance,string"` EurBalance float64 `json:"eur_balance,string"` XrpBalance float64 `json:"xrp_balance,string"` LtcBalance float64 `json:"ltc_balance,string"` EthBalance float64 `json:"eth_balance,string"` BchBalance float64 `json:"bch_balance,string"` UsdReserved float64 `json:"usd_reserved,string"` BtcReserved float64 `json:"btc_reserved,string"` EurReserved float64 `json:"eur_reserved,string"` XrpReserved float64 `json:"xrp_reserved,string"` LtcReserved float64 `json:"ltc_reserved,string"` EthReserved float64 `json:"eth_reserved,string"` BchReserved float64 `json:"bch_reserved,string"` UsdAvailable float64 `json:"usd_available,string"` BtcAvailable float64 `json:"btc_available,string"` EurAvailable float64 `json:"eur_available,string"` XrpAvailable float64 `json:"xrp_available,string"` LtcAvailable float64 `json:"ltc_available,string"` EthAvailable float64 `json:"eth_available,string"` BchAvailable float64 `json:"bch_available,string"` BtcUsdFee float64 `json:"btcusd_fee,string"` BtcEurFee float64 `json:"btceur_fee,string"` EurUsdFee float64 `json:"eurusd_fee,string"` XrpUsdFee float64 `json:"xrpusd_fee,string"` XrpEurFee float64 `json:"xrpeur_fee,string"` XrpBtcFee float64 `json:"xrpbtc_fee,string"` LtcUsdFee float64 `json:"ltcusd_fee,string"` LtcEurFee float64 `json:"ltceur_fee,string"` LtcBtcFee float64 `json:"ltcbtc_fee,string"` EthUsdFee float64 `json:"ethusd_fee,string"` EthEurFee float64 `json:"etheur_fee,string"` EthBtcFee float64 `json:"ethbtc_fee,string"` BchUsdFee float64 `json:"bchusd_fee,string"` BchEurFee float64 `json:"bcheur_fee,string"` BchBtcFee float64 `json:"bchbtc_fee,string"` }
func AccountBalance ¶
func AccountBalance() (*AccountBalanceResult, error)
type BuyOrderResult ¶
type BuyOrderResult struct { Id int64 `json:"id,string"` DateTime string `json:"datetime"` Type int `json:"type,string"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` }
func BuyLimitOrder ¶
func BuyMarketOrder ¶
func BuyMarketOrder(pair string, amount float64) (*BuyOrderResult, error)
type ErrorResult ¶
type OrderBookItem ¶
func (*OrderBookItem) UnmarshalJSON ¶
func (o *OrderBookItem) UnmarshalJSON(data []byte) error
UnmarshalJSON takes a json array and converts it into an OrderBookItem.
type OrderBookResult ¶
type OrderBookResult struct { Timestamp string `json:"timestamp"` Bids []OrderBookItem `json:"bids"` Asks []OrderBookItem `json:"asks"` }
func OrderBook ¶
func OrderBook(pair string) (*OrderBookResult, error)
type OrderStatusResult ¶
type OrderStatusResult struct {
Status string `json:"status"`
}
func OrderStatus ¶
func OrderStatus(orderId int64) (*OrderStatusResult, error)
type SellOrderResult ¶
type SellOrderResult struct { Id int64 `json:"id,string"` DateTime string `json:"datetime"` Type int `json:"type,string"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` }
func SellLimitOrder ¶
func SellMarketOrder ¶
func SellMarketOrder(pair string, amount float64) (*SellOrderResult, error)
type TickerResult ¶
type TickerResult 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 string `json:"timestamp"` Open float64 `json:"open,string"` }
func Ticker ¶
func Ticker(pair string) (*TickerResult, error)
type UserTransactionsResult ¶
type UserTransactionsResult struct { Fee float64 `json:"fee"` Id int64 `json:"id"` OrderId int64 `json:"order_id"` Usd float64 `json:"usd"` Eur float64 `json:"eur"` Btc float64 `json:"btc"` Xrp float64 `json:"xrp"` Eth float64 `json:"eth"` Ltc float64 `json:"ltc"` BtcUsd float64 `json:"btc_usd"` BtcEur float64 `json:"btc_eur"` EthUsd float64 `json:"eth_usd"` EthEur float64 `json:"eth_eur"` XrpUsd float64 `json:"xrp_usd"` XrpEur float64 `json:"xrp_eur"` LtcUsd float64 `json:"ltc_usd"` LtcEur float64 `json:"ltc_eur"` DateTime string `json:"datetime"` Type int `json:"type,string"` }
func (*UserTransactionsResult) UnmarshalJSON ¶
func (u *UserTransactionsResult) UnmarshalJSON(data []byte) error
bitstamp API is not consistant in its way of sending numeric values of the same key, sometimes they're strings, sometimes ints, sometimes floats
Click to show internal directories.
Click to hide internal directories.