Documentation ¶
Index ¶
- Constants
- type Balances
- type BalancesRequest
- type CancelAllOrders
- type CancelAllOrdersRequest
- type CancelOrder
- type CancelOrderRequest
- type Client
- type CompleteBalance
- type CompleteBalances
- type CompleteBalancesRequest
- type MoveOrder
- type MoveOrderRequest
- type OpenOrder
- type OpenOrders
- type OpenOrdersRequest
- type Order
- type OrderRequest
- func (r *OrderRequest) Amount(amount float64) *OrderRequest
- func (r *OrderRequest) ClientOrderID(clientOrderID int64) *OrderRequest
- func (r *OrderRequest) Do(ctx context.Context) (*Order, error)
- func (r *OrderRequest) FillOrKill(flag bool) *OrderRequest
- func (r *OrderRequest) ImmediateOrCancel(flag bool) *OrderRequest
- func (r *OrderRequest) PostOnly(flag bool) *OrderRequest
- func (r *OrderRequest) Rate(rate float64) *OrderRequest
- type OrderSide
- type OrderStatus
- type OrderStatusRequest
- type TradableBalancesRequest
- type TradableCurrencyBalances
- type TradableCurrencyPairBalances
- type Trade
Constants ¶
View Source
const (
Endpoint = "https://poloniex.com/tradingApi"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancesRequest ¶
type BalancesRequest struct {
// contains filtered or unexported fields
}
func NewBalancesRequest ¶
func NewBalancesRequest(client *Client) *BalancesRequest
type CancelAllOrders ¶
type CancelAllOrdersRequest ¶
type CancelAllOrdersRequest struct {
// contains filtered or unexported fields
}
func NewCancelAllOrdersRequest ¶
func NewCancelAllOrdersRequest(client *Client, currencyPair string) *CancelAllOrdersRequest
func (*CancelAllOrdersRequest) Do ¶
func (r *CancelAllOrdersRequest) Do(ctx context.Context) (*CancelAllOrders, error)
type CancelOrder ¶
type CancelOrderRequest ¶
type CancelOrderRequest struct {
// contains filtered or unexported fields
}
func NewCancelOrderRequest ¶
func NewCancelOrderRequest(client *Client) *CancelOrderRequest
func (*CancelOrderRequest) ClientOrderID ¶
func (r *CancelOrderRequest) ClientOrderID(clientOrderID int64) *CancelOrderRequest
func (*CancelOrderRequest) Do ¶
func (r *CancelOrderRequest) Do(ctx context.Context) (*CancelOrder, error)
func (*CancelOrderRequest) OrderNumber ¶
func (r *CancelOrderRequest) OrderNumber(orderNumber int64) *CancelOrderRequest
type Client ¶
type CompleteBalance ¶
type CompleteBalances ¶
type CompleteBalances map[string]CompleteBalance
type CompleteBalancesRequest ¶
type CompleteBalancesRequest struct {
// contains filtered or unexported fields
}
func NewCompleteBalancesRequest ¶
func NewCompleteBalancesRequest(client *Client) *CompleteBalancesRequest
func (*CompleteBalancesRequest) Account ¶
func (r *CompleteBalancesRequest) Account(account string) *CompleteBalancesRequest
func (*CompleteBalancesRequest) Do ¶
func (r *CompleteBalancesRequest) Do(ctx context.Context) (CompleteBalances, error)
type MoveOrderRequest ¶
type MoveOrderRequest struct {
// contains filtered or unexported fields
}
func NewMoveOrderRequest ¶
func NewMoveOrderRequest(client *Client, orderNumber int64, rate float64) *MoveOrderRequest
func (*MoveOrderRequest) Amount ¶
func (r *MoveOrderRequest) Amount(amount float64) *MoveOrderRequest
func (*MoveOrderRequest) ClientOrderID ¶
func (r *MoveOrderRequest) ClientOrderID(clientOrderID int64) *MoveOrderRequest
type OpenOrder ¶
type OpenOrder struct { OrderNumber int64 `json:"orderNumber,string"` Type string `json:"type"` Rate float64 `json:"rate,string"` StartingAmount float64 `json:"startingAmount,string"` Amount float64 `json:"amount,string"` Total float64 `json:"total,string"` Date string `json:"date"` Margin int `json:"margin"` }
type OpenOrders ¶
type OpenOrdersRequest ¶
type OpenOrdersRequest struct {
// contains filtered or unexported fields
}
func NewOpenOrdersRequest ¶
func NewOpenOrdersRequest(client *Client, currencyPair string) *OpenOrdersRequest
func (*OpenOrdersRequest) Do ¶
func (r *OpenOrdersRequest) Do(ctx context.Context) (OpenOrders, error)
type Order ¶
type Order struct { OrderNumber int64 `json:"orderNumber"` ResultingTrades []Trade `json:"resultingTrades"` Fee float64 `json:"fee,string"` ClientOrderID int64 `json:"clientOrderId,string"` CurrencyPair string `json:"currencyPair"` TokenFee float64 `json:"tokenFee,string"` TokenFeeCurrency string `json:"tokenFeeCurrency"` }
type OrderRequest ¶
type OrderRequest struct {
// contains filtered or unexported fields
}
func NewOrderRequest ¶
func NewOrderRequest(client *Client, side OrderSide, currencyPair string) *OrderRequest
func (*OrderRequest) Amount ¶
func (r *OrderRequest) Amount(amount float64) *OrderRequest
func (*OrderRequest) ClientOrderID ¶
func (r *OrderRequest) ClientOrderID(clientOrderID int64) *OrderRequest
func (*OrderRequest) FillOrKill ¶
func (r *OrderRequest) FillOrKill(flag bool) *OrderRequest
func (*OrderRequest) ImmediateOrCancel ¶
func (r *OrderRequest) ImmediateOrCancel(flag bool) *OrderRequest
func (*OrderRequest) PostOnly ¶
func (r *OrderRequest) PostOnly(flag bool) *OrderRequest
func (*OrderRequest) Rate ¶
func (r *OrderRequest) Rate(rate float64) *OrderRequest
type OrderStatus ¶
type OrderStatus struct { OrderNumber int64 Status string `json:"status"` Rate float64 `json:"rate,string"` Amount float64 `json:"amount,string"` CurrencyPair string `json:"currencyPair"` Date string `json:"date"` Total float64 `json:"total,string"` Type string `json:"type"` StartingAmount float64 `json:"startingAmount,string"` }
func (*OrderStatus) DateTime ¶
func (o *OrderStatus) DateTime() time.Time
func (*OrderStatus) IsOpen ¶
func (o *OrderStatus) IsOpen() bool
func (*OrderStatus) IsPartiallyFilled ¶
func (o *OrderStatus) IsPartiallyFilled() bool
type OrderStatusRequest ¶
type OrderStatusRequest struct {
// contains filtered or unexported fields
}
func NewOrderStatusRequest ¶
func NewOrderStatusRequest(client *Client, orderNumber int64) *OrderStatusRequest
func (*OrderStatusRequest) Do ¶
func (r *OrderStatusRequest) Do(ctx context.Context) (*OrderStatus, error)
type TradableBalancesRequest ¶
type TradableBalancesRequest struct {
// contains filtered or unexported fields
}
func NewTradableBalancesRequest ¶
func NewTradableBalancesRequest(client *Client) *TradableBalancesRequest
func (*TradableBalancesRequest) Do ¶
func (r *TradableBalancesRequest) Do(ctx context.Context) (TradableCurrencyPairBalances, error)
type TradableCurrencyPairBalances ¶
type TradableCurrencyPairBalances map[string]TradableCurrencyBalances
Click to show internal directories.
Click to hide internal directories.