Documentation ¶
Index ¶
- Constants
- type BuyOrSell
- type CryptoExchange
- type DefaultCryptoExchangeClient
- type MarketCode
- type MarketCurrentPrice
- type Option
- type OrderResp
- type OrderType
- type UpbitAccount
- type UpbitError
- type UpbitErrorBody
- type UpbitService
- func (s *UpbitService) CreateOrder(marketCode string, side BuyOrSell, volume float64, price float64, ...) (*OrderResp, error)
- func (s *UpbitService) ListAccounts() ([]UpbitAccount, error)
- func (s *UpbitService) ListCurrentPriceByMarketCodes(marketCodes []string) ([]MarketCurrentPrice, error)
- func (s *UpbitService) ListMarketCodes() ([]MarketCode, error)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoExchange ¶
type CryptoExchange int
type DefaultCryptoExchangeClient ¶
type DefaultCryptoExchangeClient struct { UpbitService *UpbitService // contains filtered or unexported fields }
type MarketCode ¶
type MarketCurrentPrice ¶
type MarketCurrentPrice struct { // ex) KRW-BTC, BTC-ETC Market string `json:"market,omitempty"` TradeDate string `json:"trade_date,omitempty"` TradeTime string `json:"trade_time,omitempty"` TradeDateKst string `json:"trade_date_kst,omitempty"` TradeTimeKst string `json:"trade_time_kst,omitempty"` TradeTimestamp int64 `json:"trade_timestamp,omitempty"` OpeningPrice float64 `json:"opening_price,omitempty"` HighPrice float64 `json:"high_price,omitempty"` LowPrice float64 `json:"low_price,omitempty"` TradePrice float64 `json:"trade_price,omitempty"` PrevClosingPrice float64 `json:"prev_closing_price,omitempty"` Change string `json:"change,omitempty"` ChangePrice float64 `json:"change_price,omitempty"` ChangeRate float64 `json:"change_rate,omitempty"` SignedChangePrice float64 `json:"signed_change_price,omitempty"` SignedChangeRate float64 `json:"signed_change_rate,omitempty"` TradeVolume float64 `json:"trade_volume,omitempty"` AccTradePrice float64 `json:"acc_trade_price,omitempty"` AccTradePrice24H float64 `json:"acc_trade_price_24h,omitempty"` AccTradeVolume float64 `json:"acc_trade_volume,omitempty"` AccTradeVolume24H float64 `json:"acc_trade_volume_24h,omitempty"` Highest52WeekPrice float64 `json:"highest_52_week_price,omitempty"` Highest52WeekDate string `json:"highest_52_week_date,omitempty"` Lowest52WeekPrice float64 `json:"lowest_52_week_price,omitempty"` Lowest52WeekDate string `json:"lowest_52_week_date,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` }
type Option ¶
type Option func(*DefaultCryptoExchangeClient)
func WithAccessKey ¶
func WithSecretKey ¶
type OrderResp ¶
type OrderResp struct { Uuid string `json:"uuid,omitempty"` Side string `json:"side,omitempty"` OrdType string `json:"ord_type,omitempty"` Price string `json:"price,omitempty"` AvgPrice string `json:"avg_price,omitempty"` State string `json:"state,omitempty"` Market string `json:"market,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` Volume string `json:"volume,omitempty"` RemainingVolume string `json:"remaining_volume,omitempty"` ReservedFee string `json:"reserved_fee,omitempty"` RemainingFee string `json:"remaining_fee,omitempty"` PaidFee string `json:"paid_fee,omitempty"` Locked string `json:"locked,omitempty"` ExecutedVolume string `json:"executed_volume,omitempty"` TradesCount int `json:"trades_count,omitempty"` }
type UpbitAccount ¶
type UpbitAccount struct { Currency string `json:"currency,omitempty"` Balance string `json:"balance,omitempty"` Locked string `json:"locked,omitempty"` AvgBuyPrice string `json:"avg_buy_price,omitempty"` AvgBuyPriceModified bool `json:"avg_buy_price_modified,omitempty"` UnitCurrency string `json:"unit_currency,omitempty"` }
type UpbitError ¶
type UpbitError struct {
Error UpbitErrorBody `json:"error,omitempty"`
}
type UpbitErrorBody ¶
type UpbitService ¶
type UpbitService service
func (*UpbitService) CreateOrder ¶
func (*UpbitService) ListAccounts ¶
func (s *UpbitService) ListAccounts() ([]UpbitAccount, error)
func (*UpbitService) ListCurrentPriceByMarketCodes ¶
func (s *UpbitService) ListCurrentPriceByMarketCodes(marketCodes []string) ([]MarketCurrentPrice, error)
func (*UpbitService) ListMarketCodes ¶
func (s *UpbitService) ListMarketCodes() ([]MarketCode, error)
Click to show internal directories.
Click to hide internal directories.