Documentation ¶
Index ¶
- Variables
- type AvailableBook
- type Balance
- type BalanceRes
- type BitsoErrRes
- type BitsoError
- type BookOrder
- type CancelOrderParams
- type OpenOrder
- type OpenOrderParams
- type OrderBook
- type OrderBookParams
- type PlaceOrderParams
- type PlacedOrder
- type Service
- func (srv *Service) Ask(ctx context.Context, amount, price, book string) (r placeOrderResponse, err error)
- func (srv *Service) AvailableBooks(ctx context.Context) (r availableBooksResponse, err error)
- func (srv *Service) Balance(ctx context.Context) (r balanceResponse, err error)
- func (srv *Service) Bid(ctx context.Context, amount, price, book string) (r placeOrderResponse, err error)
- func (srv *Service) CancelOrder(ctx context.Context, params CancelOrderParams) (r cancelOrderResponse, err error)
- func (srv *Service) OpenOrders(ctx context.Context, params OpenOrderParams) (r openOrdersResponse, err error)
- func (srv *Service) OrderBook(ctx context.Context, params OrderBookParams) (r orderBookResponse, err error)
- func (srv *Service) PlaceOrder(ctx context.Context, params PlaceOrderParams) (r placeOrderResponse, err error)
- func (srv *Service) Ticker(ctx context.Context, book string) (r tickResponse, err error)
- type Tick
- type TickerParams
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BaseURL = "https://api.bitso.com"
)
Functions ¶
This section is empty.
Types ¶
type AvailableBook ¶
type AvailableBook struct { Book string `json:"book"` MinimumAmount string `json:"minimum_amount"` MaximumAmount string `json:"maximum_amount"` MinimumPrice string `json:"minimum_price"` MaximumPrice string `json:"maximum_price"` MinimumValue string `json:"minimum_value"` MaximumValue string `json:"maximum_value"` }
type BalanceRes ¶
type BalanceRes struct {
List []Balance `json:"balances"`
}
type BitsoErrRes ¶
type BitsoErrRes struct {
Wrap *BitsoError `json:"error"`
}
func (BitsoErrRes) Error ¶
func (e BitsoErrRes) Error() string
type BitsoError ¶
type CancelOrderParams ¶
type OpenOrder ¶
type OpenOrder struct { OID string `json:"oid"` Book string `json:"book"` OriginalAmount string `json:"original_amount"` UnfilledAmount string `json:"unfilled_amount"` OriginalValue string `json:"original_value"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Price string `json:"price"` Side string `json:"side"` Status string `json:"status"` Type string `json:"type"` }
type OpenOrderParams ¶
type OrderBookParams ¶
type PlaceOrderParams ¶
type PlaceOrderParams struct { Book string `json:"book"` Side string `json:"side"` Type string `json:"type"` Major string `json:"major,omitempty"` Minor string `json:"minor,omitempty"` Price string `json:"price,omitempty"` Stop string `json:"stop,omitempty"` TimeInForce string `json:"time_in_force,omitempty"` OriginID string `json:"origin_id,omitempty"` }
type PlacedOrder ¶
type PlacedOrder struct {
OID string `json:"oid"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the API gateway struct.
func (*Service) AvailableBooks ¶
AvailableBooks performs a request to bitso:v3/available_books
func (*Service) CancelOrder ¶
func (srv *Service) CancelOrder(ctx context.Context, params CancelOrderParams) (r cancelOrderResponse, err error)
CancelOrder performs a request to bitso:v3/orders
func (*Service) OpenOrders ¶
func (srv *Service) OpenOrders(ctx context.Context, params OpenOrderParams) (r openOrdersResponse, err error)
func (*Service) OrderBook ¶
func (srv *Service) OrderBook(ctx context.Context, params OrderBookParams) (r orderBookResponse, err error)
OrderBook performs a request to bitso:v3/order_book
func (*Service) PlaceOrder ¶
func (srv *Service) PlaceOrder(ctx context.Context, params PlaceOrderParams) (r placeOrderResponse, err error)
PlaceOrder performs a request to bitso:v3/orders
type TickerParams ¶
type TickerParams struct {
Book string `url:"book"`
}
Click to show internal directories.
Click to hide internal directories.