api

package
v0.0.0-...-75bd426 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BFCallableAPISpanSeconds int64 = 300
	BFCallableAPICount       int64 = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(httpClient *client.HTTPClient, authenticator Authenticator) *APIClient

func (*APIClient) PriCancelAllChildOrders

func (c *APIClient) PriCancelAllChildOrders(productCode types.ProductCode) (*http.Response, error)

func (*APIClient) PriCancelChildOrder

func (c *APIClient) PriCancelChildOrder(productCode types.ProductCode, idType types.IdType, orderId string) (*http.Response, error)

func (*APIClient) PriCancelParentOrder

func (c *APIClient) PriCancelParentOrder(productCode types.ProductCode, idType types.IdType, orderId string) (*http.Response, error)

func (*APIClient) PriGetBalance

func (c *APIClient) PriGetBalance() (*http.Response, private.GetBalanceResponse, error)

func (*APIClient) PriGetBalanceHistory

func (c *APIClient) PriGetBalanceHistory(currencyCode types.CurrencyCode, count int64, before int64, after int64) (*http.Response, private.GetBalanceHistoryResponse, error)

func (*APIClient) PriGetChildOrders

func (c *APIClient) PriGetChildOrders(productCode types.ProductCode, count int64, before int64, after int64, orderState types.OrderState) (*http.Response, private.GetChildOrdersResponse, error)

func (*APIClient) PriGetChildOrdersById

func (c *APIClient) PriGetChildOrdersById(productCode types.ProductCode, idType types.IdType, orderId string) (*http.Response, private.GetChildOrdersResponse, error)

func (*APIClient) PriGetCollateral

func (c *APIClient) PriGetCollateral() (*http.Response, *private.GetCollateralResponse, error)

func (*APIClient) PriGetCollateralAccounts

func (c *APIClient) PriGetCollateralAccounts() (*http.Response, private.GetCollateralAccountsResponse, error)

func (*APIClient) PriGetCollateralHistory

func (c *APIClient) PriGetCollateralHistory(count int64, before int64, after int64) (*http.Response, private.GetCollateralHistoryResponse, error)

func (*APIClient) PriGetExecutions

func (c *APIClient) PriGetExecutions(productCode types.ProductCode, count int64, before int64, after int64) (*http.Response, private.GetExecutionsResponse, error)

func (*APIClient) PriGetExecutionsById

func (c *APIClient) PriGetExecutionsById(productCode types.ProductCode, idType types.IdType, orderId string) (*http.Response, private.GetExecutionsResponse, error)

func (*APIClient) PriGetParentOrder

func (c *APIClient) PriGetParentOrder(IdType types.IdType, orderId string) (*http.Response, *private.GetParentOrderResponse, error)

func (*APIClient) PriGetParentOrders

func (c *APIClient) PriGetParentOrders(productCode types.ProductCode, count int64, before int64, after int64, orderState types.OrderState) (*http.Response, private.GetParentOrdersResponse, error)

func (*APIClient) PriGetPermissions

func (c *APIClient) PriGetPermissions() (*http.Response, *private.GetPermissionsResponse, error)

func (*APIClient) PriGetPositions

func (c *APIClient) PriGetPositions() (*http.Response, private.GetPositionsResponse, error)

func (*APIClient) PriGetTradingCommission

func (c *APIClient) PriGetTradingCommission(productCode types.ProductCode) (*http.Response, *private.GetTradingCommissionResponse, error)

func (*APIClient) PriSendChildOrder

func (c *APIClient) PriSendChildOrder(productCode types.ProductCode,
	childOrderType types.OrderType,
	side types.Side,
	price float64,
	size float64,
	minuteToExpire int64,
	timeInForce types.TimeInForce) (*http.Response, *private.SendChildOrderResponse, error)

func (*APIClient) PriSendParentOrder

func (c *APIClient) PriSendParentOrder(orderMethod types.OrderMethod,
	minuteToRxpire int64,
	timeInForce types.TimeInForce,
	parameters ...*private.SendParentOrderParameter) (*http.Response, *private.SendParentOrderResponse, error)

func (*APIClient) PubGetBoard

func (c *APIClient) PubGetBoard(productCode types.ProductCode) (*http.Response, *public.GetBoardResponse, error)

func (*APIClient) PubGetBoardState

func (c *APIClient) PubGetBoardState(productCode types.ProductCode) (*http.Response, *public.GetBoardStateResponse, error)

func (*APIClient) PubGetChats

func (c *APIClient) PubGetChats(fromDate int64) (*http.Response, *public.GetChatsResponse, error)

func (*APIClient) PubGetExecutions

func (c *APIClient) PubGetExecutions(productCode types.ProductCode, count int64, before int64, after int64) (*http.Response, public.GetExecutionsResponse, error)

func (*APIClient) PubGetHealth

func (c *APIClient) PubGetHealth(productCode types.ProductCode) (*http.Response, *public.GetHealthResponse, error)

func (*APIClient) PubGetMarkets

func (c *APIClient) PubGetMarkets() (*http.Response, public.GetMarketsResponse, error)

func (*APIClient) PubGetTicker

func (c *APIClient) PubGetTicker(productCode types.ProductCode) (*http.Response, *public.GetTickerResponse, error)

type Authenticator

type Authenticator interface {
	SetAuthHeaders(headers map[string]string, now time.Time, method string, path string, body []byte)
}

func NewAuthenticator

func NewAuthenticator(apiKeyFile string) (Authenticator, error)

type RealAPIClient

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

func NewRealAPIClient

func NewRealAPIClient(wsClient *client.WSClient) *RealAPIClient

func (*RealAPIClient) RealBoardSnapshotCallback

func (c *RealAPIClient) RealBoardSnapshotCallback(conn *websocket.Conn, calbackData interface{}) error

func (*RealAPIClient) RealBoardSnapshotStart

func (c *RealAPIClient) RealBoardSnapshotStart(productCode types.ProductCode, callback realtime.BoardSnapshotCallback, callbackData interface{}) error

func (*RealAPIClient) RealBoardStart

func (c *RealAPIClient) RealBoardStart(productCode types.ProductCode, callback realtime.BoardCallback, callbackData interface{}, merge bool) error

func (*RealAPIClient) RealExecutionsStart

func (c *RealAPIClient) RealExecutionsStart(productCode types.ProductCode, callback realtime.ExecutionsCallback, callbackData interface{}) error

func (*RealAPIClient) RealStop

func (c *RealAPIClient) RealStop() error

func (*RealAPIClient) RealTickerStart

func (c *RealAPIClient) RealTickerStart(productCode types.ProductCode, callback realtime.TickerCallback, callbackData interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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