Documentation
¶
Index ¶
- type APIClient
- func (apiClient *APIClient) CancelOrder(order *Order) error
- func (apiClient *APIClient) GetActiveBuyOrders(product_code, order_status string) (*[]Order, error)
- func (apiClient *APIClient) GetBalance() ([]Balance, error)
- func (apiClient *APIClient) GetTicker(productCode string) (*Ticker, error)
- func (apiClient *APIClient) PlaceOrder(order *Order) (*PlaceOrderResponse, error)
- type Balance
- type CancelOrderResponse
- type JsonRPC2
- type Order
- type PlaceOrderResponse
- type SubscribeParams
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { Max_buy_orders int Max_sell_orders int // contains filtered or unexported fields }
func NewBitflyer ¶
func (*APIClient) CancelOrder ¶
func (*APIClient) GetActiveBuyOrders ¶
func (*APIClient) GetBalance ¶
func (*APIClient) PlaceOrder ¶
func (apiClient *APIClient) PlaceOrder(order *Order) (*PlaceOrderResponse, error)
type CancelOrderResponse ¶
type CancelOrderResponse struct {
OrderId string `json:"child_order_acceptance_id"`
}
type Order ¶
type Order struct { ID int `json:"id"` ChildOrderAcceptanceID string `json:"child_order_acceptance_id"` ProductCode string `json:"product_code"` ChildOrderType string `json:"child_order_type"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` MinuteToExpires int `json:"minute_to_expire"` TimeInForce string `json:"time_in_force"` Status string `json:"status"` ErrorMessage string `json:"error_message"` AveragePrice float64 `json:"average_price"` ChildOrderState string `json:"child_order_state"` ExpireDate string `json:"expire_date"` ChildOrderDate string `json:"child_order_date"` OutstandingSize float64 `json:"outstanding_size"` CancelSize float64 `json:"cancel_size"` ExecutedSize float64 `json:"executed_size"` TotalCommission float64 `json:"total_commission"` Count int `json:"count"` Before int `json:"before"` After int `json:"after"` }
type PlaceOrderResponse ¶
type PlaceOrderResponse struct {
OrderId string `json:"child_order_acceptance_id"`
}
type SubscribeParams ¶
type SubscribeParams struct {
Channel string `json:"channel"`
}
type Ticker ¶
type Ticker struct { ProductCode string `json:"product_code"` Timestamp string `json:"timestamp"` TickID int `json:"tick_id"` BestBid float64 `json:"best_bid"` BestAsk float64 `json:"best_ask"` BestBidSize float64 `json:"best_bid_size"` BestAskSize float64 `json:"best_ask_size"` TotalBidDepth float64 `json:"total_bid_depth"` TotalAskDepth float64 `json:"total_ask_depth"` Ltp float64 `json:"ltp"` Volume float64 `json:"volume"` VolumeByProduct float64 `json:"volume_by_product"` }
easy to convert json to struct with https://mholt.github.io/json-to-go/
func (*Ticker) GetMiddlePrice ¶
Click to show internal directories.
Click to hide internal directories.