Versions in this module Expand all Collapse all v1 v1.0.13 May 3, 2020 Changes in this version + var ErrInvalidResponse = errors.New("invalid response") + var ErrInvalidStatusCode = errors.New("invalid status code") + type Bitflyer struct + func NewBitflyer() *Bitflyer + func (b *Bitflyer) GetPublicAPIClient() (*PublicAPIClient, error) + func (b *Bitflyer) GetRealtimeAPIClient() (*RealtimeAPIClient, error) + func (b *Bitflyer) PrivateAPIClient(key, secret string) (*PrivateAPIClient, error) + type Board struct + type Collateral struct + Collateral float64 + KeepRate float64 + OpenPositionPnl float64 + type Execution struct + BuyChildOrderAcceptanceID string + ExecDate string + ID int64 + Price float64 + SellChildOrderAcceptanceID string + Side string + Size float64 + Timestamp time.Time + type Order struct + AveragePrice float64 + CancelSize float64 + ChildOrderAcceptanceID string + ChildOrderDate string + ChildOrderID string + ChildOrderState string + ChildOrderType string + ExecutedSize float64 + ExpireDate string + ID int64 + OutstandingSize float64 + Price float64 + ProductCode string + Side string + Size float64 + TotalCommission float64 + type Position struct + Price float64 + Side string + Size float64 + type Price struct + Price float64 + Size float64 + type PrivateAPIClient struct + func (p *PrivateAPIClient) CancelAllOrder(product_code string) error + func (p *PrivateAPIClient) CancelOrder(product_code string, id string) error + func (p *PrivateAPIClient) CreateOrder(product_code string, side string, price, size float64, typ string) (string, error) + func (p *PrivateAPIClient) GetCollateral() (*Collateral, error) + func (p *PrivateAPIClient) GetOrder(product_code string, id string) (*Order, error) + func (p *PrivateAPIClient) GetPositions(product_code string) ([]*Position, error) + type PublicAPIClient struct + func (p *PublicAPIClient) GetTicker(productCode string) (*Ticker, error) + type RealtimeAPIClient struct + func (r *RealtimeAPIClient) AddOnBoardCallback(ctx context.Context, callback func(mid float64, bids []*Price, asks []*Price)) + func (r *RealtimeAPIClient) AddOnExecutionCallback(ctx context.Context, callback func([]*Execution)) + func (r *RealtimeAPIClient) Close() error + func (r *RealtimeAPIClient) GetBoard() (float64, []*Price, []*Price) + func (r *RealtimeAPIClient) GetExecutions(duration time.Duration) []*Execution + func (r *RealtimeAPIClient) Subscribe(ctx context.Context) error + type Ticker struct + BestAsk float64 + BestAskSize float64 + BestBid float64 + BestBidSize float64 + Ltp float64 + ProductCode string + TickID int + Timestamp time.Time + TotalAskDepth float64 + TotalBidDepth float64 + Volume float64 + VolumeByProduct float64