restful

package
v0.0.0-...-1e0a6df Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIDE_BUY  = "Buy"
	SIDE_SELL = "Sell"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderApi

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

func NewOrderApi

func NewOrderApi(swaggerOrderApi *swagger.OrderApiService, ctx context.Context) *OrderApi

func (*OrderApi) GetAllordersHistory

func (o *OrderApi) GetAllordersHistory(symbol string, filter string, count float32, reverse bool, startTime time.Time, endTime time.Time) (resp *http.Response, order []swagger.Order, err error)

GetAllordersHistory returns the orders history

func (*OrderApi) LimitBuy

func (o *OrderApi) LimitBuy(symbol string, orderQty int, price float64, clientOrderIDPrefix string) (resp *http.Response, order swagger.Order, err error)

BUY

func (*OrderApi) LimitSell

func (o *OrderApi) LimitSell(symbol string, orderQty int, price float64, clientOrderIDPrefix string) (resp *http.Response, order swagger.Order, err error)

SELL

func (*OrderApi) MarketBuy

func (o *OrderApi) MarketBuy(symbol string, orderQty int, clientOrderIDPrefix string) (resp *http.Response, order swagger.Order, err error)

func (*OrderApi) MarketSell

func (o *OrderApi) MarketSell(symbol string, orderQty int, clientOrderIDPrefix string) (resp *http.Response, order swagger.Order, err error)

func (*OrderApi) SetAmendOrder

func (o *OrderApi) SetAmendOrder(symbol string, orderQty int, price float64, stopPx float64, OrderID string) (resp *http.Response, order swagger.Order, err error)

StopLimitAmend change a current order in place

func (*OrderApi) StopOrder

func (o *OrderApi) StopOrder(symbol string, orderQty int, price float64, stopPx float64, clientOrderIDPrefix string, positionSide string) (resp *http.Response, order swagger.Order, err error)

StopOrder: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an orderQty, stopPx, and price.

func (*OrderApi) TakeProfit

func (o *OrderApi) TakeProfit(symbol string, orderQty float64, price float64, stopPx float64, clientOrderIDPrefix string, positionSide string) (resp *http.Response, orderId string, err error)

TakeProfit

type OrderBookApi

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

func NewOrderBookApi

func NewOrderBookApi(swaggerOrderBookApi *swagger.OrderBookApiService) *OrderBookApi

func (OrderBookApi) OrderBookGetL2

func (a OrderBookApi) OrderBookGetL2(symbol string, depth float32) (*OrderBooks, error)

type OrderBooks

type OrderBooks struct {
	AskList,
	BidList []swagger.OrderBookL2
}

Jump to

Keyboard shortcuts

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