bitflyer

package
v0.0.0-...-787e22e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TimestampFormat = "2006-01-02T15:04:05"

Variables

This section is empty.

Functions

func NewBitFlyerBalanceMockRepository

func NewBitFlyerBalanceMockRepository() repository.BalanceRepository

func NewBitFlyerBalanceRepository

func NewBitFlyerBalanceRepository(apiClient *Client) repository.BalanceRepository

func NewBitflyerOrderMockRepository

func NewBitflyerOrderMockRepository() repository.OrderRepository

func NewBitflyerOrderRepository

func NewBitflyerOrderRepository(apiClient *Client) repository.OrderRepository

func NewBitflyerTickerMockRepository

func NewBitflyerTickerMockRepository() repository.TickerRepository

func NewBitflyerTickerRepository

func NewBitflyerTickerRepository(apiClient *Client) repository.TickerRepository

Types

type Balance

type Balance struct {
	CurrencyCode string  `json:"currency_code"`
	Amount       float64 `json:"amount"`
	Available    float64 `json:"available"`
}

type BoardState

type BoardState string

板の状態

const (
	BoardStateRunning      BoardState = "RUNNING"       // 通常稼働中
	BoardStateClosed       BoardState = "CLOSED"        // 取引停止中
	BoardStateStarting     BoardState = "STARTING"      // 再起動中
	BoardStatePreopen      BoardState = "PREOPEN"       // 板寄せ中
	BoardStateCircuitBreak BoardState = "CIRCUIT BREAK" // サーキットブレイク発動中
	BoardStateAwaitingSQ   BoardState = "AWAITING SQ"   // Lightning Futures の取引終了後 SQ(清算値)の確定前
	BoardStateMatured      BoardState = "MATURED"       // Lightning Futures の満期に到達
)

type Client

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

func NewClient

func NewClient(key, secret string) *Client

type OrderSide

type OrderSide string
const (
	OrderSideBuy  OrderSide = "BUY"  // 買い注文
	OrderSideSell OrderSide = "SELL" // 売り注文
)

type OrderState

type OrderState string
const (
	OrderStateActive    OrderState = "ACTIVE"    // オープンな注文
	OrderStateCompleted OrderState = "COMPLETED" // 全額が取引完了した注文
	OrderStateCanceled  OrderState = "CANCELED"  // キャンセルした注文
	OrderStateExpired   OrderState = "EXPIRED"   // 有効期限に到達したため取り消された注文
	OrderStateRejected  OrderState = "REJECTED"  // 失敗した注文
)

type ResponseSendChildOrder

type ResponseSendChildOrder struct {
	ChildOrderAcceptanceID string `json:"child_order_acceptance_id"`
}

type Ticker

type Ticker struct {
	ProductCode     string     `json:"product_code"`
	State           BoardState `json:"state"`
	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"`
	MarketBidSize   float64    `json:"market_bid_size"`
	MarketAskSize   float64    `json:"market_ask_size"`
	Ltp             float64    `json:"ltp"`
	Volume          float64    `json:"volume"`
	VolumeByProduct float64    `json:"volume_by_product"`
}

Jump to

Keyboard shortcuts

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