Documentation ¶
Index ¶
- Constants
- type APIClient
- func (api APIClient) GetAccounts() (accounts Accounts, err error)
- func (api APIClient) GetBalance() (balance Balance, err error)
- func (api APIClient) GetLeverageBalance() (leverageBalance LeverageBalance, err error)
- func (api APIClient) GetOpenOrders() (orders OpenOrders, err error)
- func (api APIClient) GetOrderBook() (orderBook OrderBook, err error)
- func (api APIClient) GetTicker() (ticker Ticker, err error)
- func (api APIClient) GetTrades() (trades []Trade, err error)
- func (api APIClient) NewOrder(order Order) (newOrder Order, err error)
- type Accounts
- type Balance
- type LeverageBalance
- type OpenOrders
- type Order
- type OrderBook
- type Ticker
- type Trade
Constants ¶
View Source
const URL = "https://coincheck.jp"
URL is a Coincheck API base URL
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient struct represents Coincheck API client
func (APIClient) GetAccounts ¶
GetAccounts returns accounts
func (APIClient) GetBalance ¶
GetBalance returns account balance
func (APIClient) GetLeverageBalance ¶
func (api APIClient) GetLeverageBalance() (leverageBalance LeverageBalance, err error)
GetLeverageBalance returns account leverage balance
func (APIClient) GetOpenOrders ¶
func (api APIClient) GetOpenOrders() (orders OpenOrders, err error)
GetOpenOrders returns all open orders.
func (APIClient) GetOrderBook ¶
GetOrderBook returns Coincheck order book
type Accounts ¶
type Accounts struct { BitcoinAddress string `json:"bitcoin_address"` Email string `json:"email"` ID int `json:"id"` IdentityStatus string `json:"identity_status"` LendingLeverage string `json:"lending_leverage"` MakerFee string `json:"maker_fee"` Success bool `json:"success"` TakerFee string `json:"taker_fee"` Error string `json:"error"` }
Accounts represents Coincheck accounts
type Balance ¶
type Balance struct { BTC string `json:"btc"` BTCDebt string `json:"btc_debt"` BTCLendInUse string `json:"btc_lend_in_use"` BTCLent string `json:"btc_lent"` BTCReserved string `json:"btc_reserved"` JPY string `json:"jpy"` JPYDebt string `json:"jpy_debt"` JPYLendInUse string `json:"jpy_lend_in_use"` JPYLent string `json:"jpy_lent"` JPYReserved string `json:"jpy_reserved"` Success bool `json:"success"` Error string `json:"error"` }
Balance represents account balance
type LeverageBalance ¶
type LeverageBalance struct { Margin struct { JPY float64 `json:"jpy"` } `json:"margin"` MarginAvailable struct { JPY string `json:"jpy"` } `json:"margin_available"` MarginLevel string `json:"margin_level"` Success bool `json:"success"` Error string `json:"error"` }
LeverageBalance represents account leverage balance
type OpenOrders ¶
OpenOrders represents list of open orders.
type Order ¶
type Order struct { ID int `json:"id"` Rate string `json:"rate"` Amount string `json:"amount"` OrderType string `json:"order_type"` Pair string `json:"pair"` PendingAmount string `json:"pending_amount"` PendingMarketBuyAmount string `json:"pending_marker_buy_amount"` StopLossRate string `json:"stop_loss_rate"` CreatedAt string `json:"created_at"` Success bool `json:"success"` Error string `json:"error"` }
Order represents a new order.
Click to show internal directories.
Click to hide internal directories.