secure

package
v0.0.0-...-5e12142 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceCurrency

type BalanceCurrency struct {
	Currency  string  `json:"currency"`
	Balance   float32 `json:"balance"`
	Reserved  float32 `json:"reserved"`
	Available float32 `json:"available"`
}

Balance currency data

type Balances

type Balances struct {
	Client coinmate.ClientInterface
}

func (*Balances) GetBalances

func (b *Balances) GetBalances() (BalancesResponse, error)

Balances endpoint

type BalancesResponse

type BalancesResponse struct {
	Error        bool
	ErrorMessage string
	Data         map[string]BalanceCurrency
}

Order book response

type BuyAndSellResponse

type BuyAndSellResponse struct {
	Error        bool
	ErrorMessage string
	OrderId      uint64
}

type BuyInstantResponse

type BuyInstantResponse struct {
	Error        bool
	ErrorMessage string
	Data         uint64
}

Buy instant response

type BuyLimit

type BuyLimit struct {
	Error        bool
	ErrorMessage string
	OrderId      uint64
}

type BuyLimitResponse

type BuyLimitResponse struct {
	Error        bool
	ErrorMessage string
	Data         uint64
}

Buy limit response

type BuySell

type BuySell struct {
	Error        bool
	ErrorMessage string
	Data         uint64
}

type CancelOrderResponse

type CancelOrderResponse struct {
	Error        bool
	ErrorMessage string
	Data         bool
}

Cancel order

type CancelOrderWithInfoData

type CancelOrderWithInfoData struct {
	Success         bool    `json:"success"`
	RemainingAmount float64 `json:"remainingAmount"`
}

Cancel order info data

type CancelOrderWithInfoResponse

type CancelOrderWithInfoResponse struct {
	Error        bool
	ErrorMessage string
	Data         CancelOrderWithInfoData
}

Cancel order with info response

type OpenOrdersData

type OpenOrdersData struct {
	Id             uint64  `json:"id"`
	Timestamp      int64   `json:"timestamp"`
	Type           string  `json:"type"`
	CurrencyPair   string  `json:"currencyPair"`
	Price          float64 `json:"price"`
	Amount         float64 `json:"amount"`
	OrderTradeType string  `json:"orderTradeType"`
	StopPrice      float64 `json:"stopPrice"`
	Hidden         bool    `json:"hidden"`
}

Open orders data

type OpenOrdersResponse

type OpenOrdersResponse struct {
	Error        bool
	ErrorMessage string
	Data         []OpenOrdersData
}

Open orders history response

type Order

type Order struct {
	Client coinmate.ClientInterface
}

func (*Order) BuyInstant

func (o *Order) BuyInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)

Buy instantly

func (*Order) BuyLimit

func (o *Order) BuyLimit(amount, price, stopPrice float64, currencyPair string, hidden, immediateOrCancel bool, clientOrderId uint64) (BuyLimit, error)

Buy limit

func (*Order) CancelOrder

func (o *Order) CancelOrder(orderId uint64) (CancelOrderResponse, error)

Cancel order

func (*Order) CancelOrderWithInfo

func (o *Order) CancelOrderWithInfo(orderId uint64) (CancelOrderWithInfoResponse, error)

Cancel order with info

func (*Order) GetHistory

func (o *Order) GetHistory(currencyPair string, limit int64) (OrderHistoryResponse, error)

Order history

func (*Order) GetOpenOrders

func (o *Order) GetOpenOrders(currencyPair string) (OpenOrdersResponse, error)

Order history

func (*Order) SellInstant

func (o *Order) SellInstant(total float64, cp string, clientOrderId uint64) (BuyAndSellResponse, error)

Sell instantly

func (*Order) SellLimit

func (o *Order) SellLimit(amount, price, stopPrice float64, currencyPair string, hidden, immediateOrCancel bool, clientOrderId uint64) (SellLimit, error)

Sell limit

type OrderHistoryData

type OrderHistoryData struct {
	Id              uint64  `json:"id"`
	Timestamp       int64   `json:"timestamp"`
	Type            string  `json:"type"`
	Price           float64 `json:"price"`
	RemainingAmount float64 `json:"remainingAmount"`
	OriginalAmount  float64 `json:"originalAmount"`
	Status          string  `json:"status"`
	StopPrice       float64 `json:"stopPrice"`
	OrderTradeType  string  `json:"orderTradeType"`
	Hidden          bool    `json:"hidden"`
}

Order history data

type OrderHistoryResponse

type OrderHistoryResponse struct {
	Error        bool
	ErrorMessage string
	Data         []OrderHistoryData
}

Order history response

type SellLimit

type SellLimit struct {
	Error        bool
	ErrorMessage string
	OrderId      uint64
}

type SellLimitResponse

type SellLimitResponse struct {
	Error        bool
	ErrorMessage string
	Data         uint64
}

Sell limit response

Jump to

Keyboard shortcuts

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