btcchina

package
v0.0.0-...-2bdd7b4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains all exchange information

func New

func New(key, secret, symbol, currency string, priority int, fee, availShort, availFunds float64) *Client

New returns a pointer to a Client instance

func (*Client) AvailFunds

func (client *Client) AvailFunds() float64

AvailFunds returns the exchange available funds

func (*Client) AvailShort

func (client *Client) AvailShort() float64

AvailShort returns the exchange quantity available for short selling

func (*Client) CancelOrder

func (client *Client) CancelOrder(id int64) (bool, error)

CancelOrder cancels an order on the exchange

func (*Client) CommunicateBook

func (client *Client) CommunicateBook(bookChan chan<- exchange.Book) exchange.Book

CommunicateBook sends the latest available book data on the supplied channel

func (*Client) Currency

func (client *Client) Currency() string

Currency returns the exchange currency

func (*Client) CurrencyCode

func (client *Client) CurrencyCode() byte

CurrencyCode returns the exchange currency code

func (*Client) Done

func (client *Client) Done()

Done closes all connections

func (*Client) Fee

func (client *Client) Fee() float64

Fee returns the exchange order fee

func (*Client) GetOrderStatus

func (client *Client) GetOrderStatus(id int64) (exchange.Order, error)

GetOrderStatus gets the status of an order on the exchange

func (*Client) HasCryptoFee

func (client *Client) HasCryptoFee() bool

HasCrytpoFee returns true if fee is taken in cryptocurrency on buys

func (*Client) MaxPos

func (client *Client) MaxPos() float64

MaxPos returns the exchange max position

func (*Client) Position

func (client *Client) Position() float64

Position returns the exchange position

func (*Client) Priority

func (client *Client) Priority() int

Priority returns the exchange priority for order execution

func (*Client) SendOrder

func (client *Client) SendOrder(action, otype string, amount, price float64) (int64, error)

SendOrder sends an order to the exchange

func (*Client) SetMaxPos

func (client *Client) SetMaxPos(maxPos float64)

SetMaxPos sets the exchange max position

func (*Client) SetPosition

func (client *Client) SetPosition(pos float64)

SetPosition sets the exchange position

func (*Client) String

func (client *Client) String() string

String implements the Stringer interface

Jump to

Keyboard shortcuts

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