localbitcoins

package
v0.0.0-...-77ca9cc Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCALBITCOINS_API_URL             = "https://localbitcoins.com"
	LOCALBITCOINS_API_TICKER          = "/bitcoinaverage/ticker-all-currencies/"
	LOCALBITCOINS_API_BITCOINCHARTS   = "/bitcoincharts/"
	LOCALBITCOINS_API_PINCODE         = "pincode/"
	LOCALBITCOINS_API_WALLET          = "wallet/"
	LOCALBITCOINS_API_MYSELF          = "myself/"
	LOCALBITCOINS_API_WALLET_BALANCE  = "wallet-balance/"
	LOCALBITCOINS_API_WALLET_SEND     = "wallet-send/"
	LOCALBITCOINS_API_WALLET_SEND_PIN = "wallet-send-pin/"
	LOCALBITCOINS_API_WALLET_ADDRESS  = "wallet-addr/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalBitcoins

type LocalBitcoins struct {
	exchange.ExchangeBase
}

func (*LocalBitcoins) CheckPincode

func (l *LocalBitcoins) CheckPincode(pin int) (bool, error)

func (*LocalBitcoins) GetAccountInfo

func (l *LocalBitcoins) GetAccountInfo(username string, self bool) (LocalBitcoinsAccountInfo, error)

func (*LocalBitcoins) GetExchangeAccountInfo

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

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

func (*LocalBitcoins) GetFee

func (l *LocalBitcoins) GetFee(maker bool) float64

func (*LocalBitcoins) GetOrderbook

func (l *LocalBitcoins) GetOrderbook(currency string) (LocalBitcoinsOrderbook, error)

func (*LocalBitcoins) GetOrderbookEx

func (l *LocalBitcoins) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase, error)

func (*LocalBitcoins) GetTicker

func (l *LocalBitcoins) GetTicker() (map[string]LocalBitcoinsTicker, error)

func (*LocalBitcoins) GetTickerPrice

func (l *LocalBitcoins) GetTickerPrice(p pair.CurrencyPair) (ticker.TickerPrice, error)

func (*LocalBitcoins) GetTrades

func (l *LocalBitcoins) GetTrades(currency string, values url.Values) ([]LocalBitcoinsTrade, error)

func (*LocalBitcoins) GetWalletAddress

func (l *LocalBitcoins) GetWalletAddress() (string, error)

func (*LocalBitcoins) GetWalletBalance

func (l *LocalBitcoins) GetWalletBalance() (LocalBitcoinsWalletBalanceInfo, error)

func (*LocalBitcoins) GetWalletInfo

func (l *LocalBitcoins) GetWalletInfo() (LocalBitcoinsWalletInfo, error)

func (*LocalBitcoins) Run

func (l *LocalBitcoins) Run()

func (*LocalBitcoins) SendAuthenticatedHTTPRequest

func (l *LocalBitcoins) SendAuthenticatedHTTPRequest(method, path string, values url.Values, result interface{}) (err error)

func (*LocalBitcoins) SetDefaults

func (l *LocalBitcoins) SetDefaults()

func (*LocalBitcoins) Setup

func (l *LocalBitcoins) Setup(exch config.ExchangeConfig)

func (*LocalBitcoins) Start

func (l *LocalBitcoins) Start()

func (*LocalBitcoins) WalletSend

func (l *LocalBitcoins) WalletSend(address string, amount float64, pin int) (bool, error)

type LocalBitcoinsAccountInfo

type LocalBitcoinsAccountInfo struct {
	Username             string    `json:"username"`
	CreatedAt            time.Time `json:"created_at"`
	AgeText              string    `json:"age_text"`
	TradingPartners      int       `json:"trading_partners_count"`
	FeedbacksUnconfirmed int       `json:"feedbacks_unconfirmed_count"`
	TradeVolumeText      string    `json:"trade_volume_text"`
	HasCommonTrades      bool      `json:"has_common_trades"`
	HasFeedback          bool      `json:"has_feedback"`
	ConfirmedTradesText  string    `json:"confirmed_trade_count_text"`
	BlockedCount         int       `json:"blocked_count"`
	FeedbackScore        int       `json:"feedback_score"`
	FeedbackCount        int       `json:"feedback_count"`
	URL                  string    `json:"url"`
	TrustedCount         int       `json:"trusted_count"`
	IdentityVerifiedAt   time.Time `json:"identify_verified_at"`
}

type LocalBitcoinsBalance

type LocalBitcoinsBalance struct {
	Balance  float64 `json:"balance,string"`
	Sendable float64 `json:"Sendable,string"`
}

type LocalBitcoinsOrderbook

type LocalBitcoinsOrderbook struct {
	Bids []LocalBitcoinsOrderbookStructure `json:"bids"`
	Asks []LocalBitcoinsOrderbookStructure `json:"asks"`
}

type LocalBitcoinsOrderbookStructure

type LocalBitcoinsOrderbookStructure struct {
	Price  float64
	Amount float64
}

type LocalBitcoinsTicker

type LocalBitcoinsTicker struct {
	Avg12h float64 `json:"avg_12h,string"`
	Avg1h  float64 `json:"avg_1h,string"`
	Avg24h float64 `json:"avg_24h,string"`
	Rates  struct {
		Last float64 `json:"last,string"`
	} `json:"rates"`
	VolumeBTC float64 `json:"volume_btc,string"`
}

type LocalBitcoinsTrade

type LocalBitcoinsTrade struct {
	TID    int64   `json:"tid"`
	Date   int64   `json:"date"`
	Amount float64 `json:"amount,string"`
	Price  float64 `json:"price,string"`
}

type LocalBitcoinsWalletAddressList

type LocalBitcoinsWalletAddressList struct {
	Address  string  `json:"address"`
	Received float64 `json:"received,string"`
}

type LocalBitcoinsWalletBalanceInfo

type LocalBitcoinsWalletBalanceInfo struct {
	Message               string                           `json:"message"`
	Total                 LocalBitcoinsBalance             `json:"total"`
	ReceivingAddressCount int                              `json:"receiving_address_count"` // always 1
	ReceivingAddressList  []LocalBitcoinsWalletAddressList `json:"receiving_address_list"`
}

type LocalBitcoinsWalletInfo

type LocalBitcoinsWalletInfo struct {
	Message                 string                           `json:"message"`
	Total                   LocalBitcoinsBalance             `json:"total"`
	SentTransactions30d     []LocalBitcoinsWalletTransaction `json:"sent_transactions_30d"`
	ReceivedTransactions30d []LocalBitcoinsWalletTransaction `json:"received_transactions_30d"`
	ReceivingAddressCount   int                              `json:"receiving_address_count"`
	ReceivingAddressList    []LocalBitcoinsWalletAddressList `json:"receiving_address_list"`
}

type LocalBitcoinsWalletTransaction

type LocalBitcoinsWalletTransaction struct {
	TXID        string    `json:"txid"`
	Amount      float64   `json:"amount,string"`
	Description string    `json:"description"`
	TXType      int       `json:"tx_type"`
	CreatedAt   time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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