Documentation
¶
Index ¶
- Constants
- func HttpGet(client *http.Client, reqUrl string, headers map[string]string, ...) error
- func HttpPostForm(client *http.Client, reqUrl string, postData map[string]string, ...) ([]byte, error)
- func NewHttpRequest(client *http.Client, reqType string, reqUrl string, postData string, ...) ([]byte, error)
- type AccountResp
- type Bigone
- func (bo *Bigone) CancelOrder(orderId string, currencyPair string) (*CancelOrderResp, error)
- func (bo *Bigone) GetAccount() (*AccountResp, error)
- func (bo *Bigone) GetDepth(currencyPair string) (*DepthResp, error)
- func (bo *Bigone) GetOrderHistorys(currencyPair string) (*OrderListResp, error)
- func (bo *Bigone) GetTicker(currencyPair string) (*TickerResp, error)
- func (bo *Bigone) GetUnfinishOrders(currencyPair string) (*OrderListResp, error)
- func (bo *Bigone) LimitBuy(amount, price string, currencyPair string) (*PlaceOrderResp, error)
- func (bo *Bigone) LimitSell(amount, price string, currencyPair string) (*PlaceOrderResp, error)
- func (bo *Bigone) MarketBuy(amount, price string, currencyPair string) (*PlaceOrderResp, error)
- func (bo *Bigone) MarketSell(amount, price string, currencyPair string) (*PlaceOrderResp, error)
- type CancelOrderResp
- type DepthResp
- type OrderListResp
- type PlaceOrderResp
- type TickerResp
Constants ¶
View Source
const ( API_BASE_URL = "https://big.one/api/v2" TICKER_URI = API_BASE_URL + "/markets/%s/ticker" DEPTH_URI = API_BASE_URL + "/markets/%s/depth" ACCOUNT_URI = API_BASE_URL + "/viewer/accounts" ORDERS_URI = API_BASE_URL + "/viewer/orders" )
Variables ¶
This section is empty.
Functions ¶
func HttpPostForm ¶
Types ¶
type AccountResp ¶
type AccountResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data []struct { AssetID string `json:"asset_id"` AssetUUID string `json:"asset_uuid"` Balance string `json:"balance"` LockedBalance string `json:"locked_balance"` } `json:"data"` }
type Bigone ¶
type Bigone struct {
// contains filtered or unexported fields
}
func (*Bigone) CancelOrder ¶
func (bo *Bigone) CancelOrder(orderId string, currencyPair string) (*CancelOrderResp, error)
func (*Bigone) GetAccount ¶
func (bo *Bigone) GetAccount() (*AccountResp, error)
func (*Bigone) GetOrderHistorys ¶
func (bo *Bigone) GetOrderHistorys(currencyPair string) (*OrderListResp, error)
func (*Bigone) GetUnfinishOrders ¶
func (bo *Bigone) GetUnfinishOrders(currencyPair string) (*OrderListResp, error)
func (*Bigone) LimitBuy ¶
func (bo *Bigone) LimitBuy(amount, price string, currencyPair string) (*PlaceOrderResp, error)
func (*Bigone) LimitSell ¶
func (bo *Bigone) LimitSell(amount, price string, currencyPair string) (*PlaceOrderResp, error)
func (*Bigone) MarketBuy ¶
func (bo *Bigone) MarketBuy(amount, price string, currencyPair string) (*PlaceOrderResp, error)
func (*Bigone) MarketSell ¶
func (bo *Bigone) MarketSell(amount, price string, currencyPair string) (*PlaceOrderResp, error)
type CancelOrderResp ¶
type CancelOrderResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data struct { ID string `json:"id"` MarketUUID string `json:"market_uuid"` Price string `json:"price"` Amount string `json:"amount"` FilledAmount string `json:"filled_amount"` AvgDealPrice string `json:"avg_deal_price"` Side string `json:"side"` State string `json:"state"` } }
type DepthResp ¶
type DepthResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data struct { MarketID string `json:"market_id"` Bids []struct { Price string `json:"price"` OrderCount int `json:"order_count"` Amount string `json:"amount"` } `json:"bids"` Asks []struct { Price string `json:"price"` OrderCount int `json:"order_count"` Amount string `json:"amount"` } `json:"asks"` } }
type OrderListResp ¶
type OrderListResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data struct { Edges []struct { Cursor string `json:"cursor"` Node struct { Amount string `json:"amount"` AvgDealPrice string `json:"avg_deal_price"` FilledAmount string `json:"filled_amount"` ID string `json:"id"` InsertedAt string `json:"inserted_at"` MarketID string `json:"market_id"` MarketUUID string `json:"market_uuid"` Price string `json:"price"` Side string `json:"side"` State string `json:"state"` UpdatedAt string `json:"updated_at"` } `json:"node"` } `json:"edges"` PageInfo struct { EndCursor string `json:"end_cursor"` HasNextPage bool `json:"has_next_page"` HasPreviousPage bool `json:"has_previous_page"` StartCursor string `json:"start_cursor"` } `json:"page_info"` } `json:"data"` }
type PlaceOrderResp ¶
type PlaceOrderResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data struct { Amount string `json:"amount"` AvgDealPrice string `json:"avg_deal_price"` FilledAmount string `json:"filled_amount"` ID string `json:"id"` InsertedAt string `json:"inserted_at"` MarketID string `json:"market_id"` MarketUUID string `json:"market_uuid"` Price string `json:"price"` Side string `json:"side"` State string `json:"state"` UpdatedAt string `json:"updated_at"` } `json:"data"` }
type TickerResp ¶
type TickerResp struct { Errors []struct { Code int `json:"code"` Locations []struct { Column int `json:"column"` Line int `json:"line"` } `json:"locations"` Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data struct { Ask struct { Amount string `json:"amount"` Price string `json:"price"` } `json:"ask"` Bid struct { Amount string `json:"amount"` Price string `json:"price"` } `json:"bid"` Close string `json:"close"` DailyChange string `json:"daily_change"` DailyChangePerc string `json:"daily_change_perc"` High string `json:"high"` Low string `json:"low"` MarketID string `json:"market_id"` MarketUUID string `json:"market_uuid"` Open string `json:"open"` Volume string `json:"volume"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.