Documentation ¶
Index ¶
- Constants
- type APIResponse
- type Account
- type AccountService
- type AccountType
- type AllTickers
- type BatchPlaceOrderRequest
- type Bullet
- type BulletService
- type CancelAllOrderRequest
- func (r *CancelAllOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
- func (r *CancelAllOrderRequest) GetParameters() (map[string]interface{}, error)
- func (r *CancelAllOrderRequest) GetParametersJSON() ([]byte, error)
- func (r *CancelAllOrderRequest) GetParametersQuery() (url.Values, error)
- func (r *CancelAllOrderRequest) GetQueryParameters() (url.Values, error)
- func (r *CancelAllOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *CancelAllOrderRequest) GetSlugsMap() (map[string]string, error)
- func (r *CancelAllOrderRequest) Symbol(symbol string) *CancelAllOrderRequest
- func (r *CancelAllOrderRequest) TradeType(tradeType string) *CancelAllOrderRequest
- type CancelOrderRequest
- func (r *CancelOrderRequest) ClientOrderID(clientOrderID string) *CancelOrderRequest
- func (r *CancelOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
- func (r *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
- func (r *CancelOrderRequest) GetParametersJSON() ([]byte, error)
- func (r *CancelOrderRequest) GetParametersQuery() (url.Values, error)
- func (r *CancelOrderRequest) GetQueryParameters() (url.Values, error)
- func (r *CancelOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
- func (r *CancelOrderRequest) OrderID(orderID string) *CancelOrderRequest
- type CancelOrderResponse
- type Fill
- type FillListPage
- type GetAccountRequest
- func (g *GetAccountRequest) AccountID(accountID string) *GetAccountRequest
- func (g *GetAccountRequest) Do(ctx context.Context) (*Account, error)
- func (g *GetAccountRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountRequest) GetSlugsMap() (map[string]string, error)
- type GetAllTickersRequest
- func (g *GetAllTickersRequest) Do(ctx context.Context) (*AllTickers, error)
- func (g *GetAllTickersRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAllTickersRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAllTickersRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAllTickersRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAllTickersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAllTickersRequest) GetSlugsMap() (map[string]string, error)
- type GetFillsRequest
- func (r *GetFillsRequest) Do(ctx context.Context) (*FillListPage, error)
- func (r *GetFillsRequest) EndAt(endAt time.Time) *GetFillsRequest
- func (r *GetFillsRequest) GetParameters() (map[string]interface{}, error)
- func (r *GetFillsRequest) GetParametersJSON() ([]byte, error)
- func (r *GetFillsRequest) GetParametersQuery() (url.Values, error)
- func (r *GetFillsRequest) GetQueryParameters() (url.Values, error)
- func (r *GetFillsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *GetFillsRequest) GetSlugsMap() (map[string]string, error)
- func (r *GetFillsRequest) OrderID(orderID string) *GetFillsRequest
- func (r *GetFillsRequest) OrderType(orderType string) *GetFillsRequest
- func (r *GetFillsRequest) Side(side string) *GetFillsRequest
- func (r *GetFillsRequest) StartAt(startAt time.Time) *GetFillsRequest
- func (r *GetFillsRequest) Symbol(symbol string) *GetFillsRequest
- func (r *GetFillsRequest) TradeType(tradeType string) *GetFillsRequest
- type GetKLinesRequest
- func (r *GetKLinesRequest) Do(ctx context.Context) ([]KLine, error)
- func (r *GetKLinesRequest) EndAt(endAt time.Time) *GetKLinesRequest
- func (r *GetKLinesRequest) GetParameters() (map[string]interface{}, error)
- func (r *GetKLinesRequest) GetParametersJSON() ([]byte, error)
- func (r *GetKLinesRequest) GetParametersQuery() (url.Values, error)
- func (r *GetKLinesRequest) GetQueryParameters() (url.Values, error)
- func (r *GetKLinesRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *GetKLinesRequest) GetSlugsMap() (map[string]string, error)
- func (r *GetKLinesRequest) Interval(interval string) *GetKLinesRequest
- func (r *GetKLinesRequest) StartAt(startAt time.Time) *GetKLinesRequest
- func (r *GetKLinesRequest) Symbol(symbol string) *GetKLinesRequest
- type GetOrderBookLevel2Depth100Request
- func (g *GetOrderBookLevel2Depth100Request) Do(ctx context.Context) (*OrderBook, error)
- func (g *GetOrderBookLevel2Depth100Request) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2Depth100Request) GetParametersJSON() ([]byte, error)
- func (g *GetOrderBookLevel2Depth100Request) GetParametersQuery() (url.Values, error)
- func (g *GetOrderBookLevel2Depth100Request) GetQueryParameters() (url.Values, error)
- func (g *GetOrderBookLevel2Depth100Request) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2Depth100Request) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderBookLevel2Depth100Request) Symbol(symbol string) *GetOrderBookLevel2Depth100Request
- type GetOrderBookLevel2Depth20Request
- func (g *GetOrderBookLevel2Depth20Request) Do(ctx context.Context) (*OrderBook, error)
- func (g *GetOrderBookLevel2Depth20Request) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2Depth20Request) GetParametersJSON() ([]byte, error)
- func (g *GetOrderBookLevel2Depth20Request) GetParametersQuery() (url.Values, error)
- func (g *GetOrderBookLevel2Depth20Request) GetQueryParameters() (url.Values, error)
- func (g *GetOrderBookLevel2Depth20Request) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2Depth20Request) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderBookLevel2Depth20Request) Symbol(symbol string) *GetOrderBookLevel2Depth20Request
- type GetOrderBookLevel2DepthAllRequest
- func (g *GetOrderBookLevel2DepthAllRequest) Do(ctx context.Context) (*OrderBook, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderBookLevel2DepthAllRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderBookLevel2DepthAllRequest) Symbol(symbol string) *GetOrderBookLevel2DepthAllRequest
- type GetPrivateBulletRequest
- func (g *GetPrivateBulletRequest) Do(ctx context.Context) (*Bullet, error)
- func (g *GetPrivateBulletRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetPrivateBulletRequest) GetParametersJSON() ([]byte, error)
- func (g *GetPrivateBulletRequest) GetParametersQuery() (url.Values, error)
- func (g *GetPrivateBulletRequest) GetQueryParameters() (url.Values, error)
- func (g *GetPrivateBulletRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetPrivateBulletRequest) GetSlugsMap() (map[string]string, error)
- type GetPublicBulletRequest
- func (g *GetPublicBulletRequest) Do(ctx context.Context) (*Bullet, error)
- func (g *GetPublicBulletRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetPublicBulletRequest) GetParametersJSON() ([]byte, error)
- func (g *GetPublicBulletRequest) GetParametersQuery() (url.Values, error)
- func (g *GetPublicBulletRequest) GetQueryParameters() (url.Values, error)
- func (g *GetPublicBulletRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetPublicBulletRequest) GetSlugsMap() (map[string]string, error)
- type GetTickerRequest
- func (g *GetTickerRequest) Do(ctx context.Context) (*Ticker, error)
- func (g *GetTickerRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetTickerRequest) GetParametersJSON() ([]byte, error)
- func (g *GetTickerRequest) GetParametersQuery() (url.Values, error)
- func (g *GetTickerRequest) GetQueryParameters() (url.Values, error)
- func (g *GetTickerRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetTickerRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetTickerRequest) Symbol(symbol string) *GetTickerRequest
- type HistoryOrder
- type HistoryOrderListPage
- type KLine
- type LiquidityType
- type ListAccountsRequest
- func (l *ListAccountsRequest) Do(ctx context.Context) ([]Account, error)
- func (l *ListAccountsRequest) GetParameters() (map[string]interface{}, error)
- func (l *ListAccountsRequest) GetParametersJSON() ([]byte, error)
- func (l *ListAccountsRequest) GetParametersQuery() (url.Values, error)
- func (l *ListAccountsRequest) GetQueryParameters() (url.Values, error)
- func (l *ListAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (l *ListAccountsRequest) GetSlugsMap() (map[string]string, error)
- type ListHistoryOrdersRequest
- func (l *ListHistoryOrdersRequest) Do(ctx context.Context) (*HistoryOrderListPage, error)
- func (l *ListHistoryOrdersRequest) EndAt(endAt time.Time) *ListHistoryOrdersRequest
- func (l *ListHistoryOrdersRequest) GetParameters() (map[string]interface{}, error)
- func (l *ListHistoryOrdersRequest) GetParametersJSON() ([]byte, error)
- func (l *ListHistoryOrdersRequest) GetParametersQuery() (url.Values, error)
- func (l *ListHistoryOrdersRequest) GetQueryParameters() (url.Values, error)
- func (l *ListHistoryOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (l *ListHistoryOrdersRequest) GetSlugsMap() (map[string]string, error)
- func (l *ListHistoryOrdersRequest) StartAt(startAt time.Time) *ListHistoryOrdersRequest
- func (l *ListHistoryOrdersRequest) Symbol(symbol string) *ListHistoryOrdersRequest
- type ListOrdersRequest
- func (r *ListOrdersRequest) Do(ctx context.Context) (*OrderListPage, error)
- func (r *ListOrdersRequest) EndAt(endAt time.Time) *ListOrdersRequest
- func (r *ListOrdersRequest) GetParameters() (map[string]interface{}, error)
- func (r *ListOrdersRequest) GetParametersJSON() ([]byte, error)
- func (r *ListOrdersRequest) GetParametersQuery() (url.Values, error)
- func (r *ListOrdersRequest) GetQueryParameters() (url.Values, error)
- func (r *ListOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *ListOrdersRequest) GetSlugsMap() (map[string]string, error)
- func (r *ListOrdersRequest) OrderType(orderType OrderType) *ListOrdersRequest
- func (r *ListOrdersRequest) Side(side SideType) *ListOrdersRequest
- func (r *ListOrdersRequest) StartAt(startAt time.Time) *ListOrdersRequest
- func (r *ListOrdersRequest) Status(status string) *ListOrdersRequest
- func (r *ListOrdersRequest) Symbol(symbol string) *ListOrdersRequest
- func (r *ListOrdersRequest) TradeType(tradeType TradeType) *ListOrdersRequest
- type ListSubAccountsRequest
- func (l *ListSubAccountsRequest) Do(ctx context.Context) ([]SubAccount, error)
- func (l *ListSubAccountsRequest) GetParameters() (map[string]interface{}, error)
- func (l *ListSubAccountsRequest) GetParametersJSON() ([]byte, error)
- func (l *ListSubAccountsRequest) GetParametersQuery() (url.Values, error)
- func (l *ListSubAccountsRequest) GetQueryParameters() (url.Values, error)
- func (l *ListSubAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (l *ListSubAccountsRequest) GetSlugsMap() (map[string]string, error)
- type ListSymbolsRequest
- func (l *ListSymbolsRequest) Do(ctx context.Context) ([]Symbol, error)
- func (l *ListSymbolsRequest) GetParameters() (map[string]interface{}, error)
- func (l *ListSymbolsRequest) GetParametersJSON() ([]byte, error)
- func (l *ListSymbolsRequest) GetParametersQuery() (url.Values, error)
- func (l *ListSymbolsRequest) GetQueryParameters() (url.Values, error)
- func (l *ListSymbolsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (l *ListSymbolsRequest) GetSlugsMap() (map[string]string, error)
- func (l *ListSymbolsRequest) Market(market string) *ListSymbolsRequest
- type MarketDataService
- func (s *MarketDataService) GetOrderBook(symbol string, depth int) (*OrderBook, error)
- func (s *MarketDataService) GetTicker24HStat(symbol string) (*Ticker24H, error)
- func (s *MarketDataService) ListSymbols(market ...string) ([]Symbol, error)
- func (s *MarketDataService) ListTickers() (*AllTickers, error)
- func (s *MarketDataService) NewGetKLinesRequest() *GetKLinesRequest
- func (s *MarketDataService) NewGetOrderBookRequest(symbol string, depth int) OrderBookRequest
- func (s *MarketDataService) NewGetTickerRequest(symbol string) *GetTickerRequest
- func (s *MarketDataService) NewListSymbolsRequest() *ListSymbolsRequest
- type Order
- type OrderBook
- type OrderBookRequest
- type OrderListPage
- type OrderResponse
- type OrderState
- type OrderType
- type PlaceOrderRequest
- func (r *PlaceOrderRequest) ClientOrderID(clientOrderID string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Do(ctx context.Context) (*OrderResponse, error)
- func (r *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
- func (r *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
- func (r *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
- func (r *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
- func (r *PlaceOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
- func (r *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
- func (r *PlaceOrderRequest) PostOnly(postOnly bool) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Side(side SideType) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Size(size string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Symbol(symbol string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Tag(tag string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) TimeInForce(timeInForce TimeInForceType) *PlaceOrderRequest
- type RestClient
- type SideType
- type SubAccount
- type Symbol
- type Ticker
- type Ticker24H
- type TimeInForceType
- type TradeService
- func (c *TradeService) NewBatchPlaceOrderRequest() *BatchPlaceOrderRequest
- func (c *TradeService) NewCancelAllOrderRequest() *CancelAllOrderRequest
- func (c *TradeService) NewCancelOrderRequest() *CancelOrderRequest
- func (c *TradeService) NewGetFillsRequest() *GetFillsRequest
- func (c *TradeService) NewListHistoryOrdersRequest() *ListHistoryOrdersRequest
- func (c *TradeService) NewListOrdersRequest() *ListOrdersRequest
- func (c *TradeService) NewPlaceOrderRequest() *PlaceOrderRequest
- type TradeType
Constants ¶
const RestBaseURL = "https://api.kucoin.com/api"
const SandboxRestBaseURL = "https://openapi-sandbox.kucoin.com/api"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct { Code string `json:"code"` Message string `json:"msg"` Data json.RawMessage `json:"data"` }
type Account ¶
type Account struct { ID string `json:"id"` Currency string `json:"currency"` Type AccountType `json:"type"` Balance fixedpoint.Value `json:"balance"` Available fixedpoint.Value `json:"available"` Holds fixedpoint.Value `json:"holds"` }
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func (*AccountService) NewGetAccountRequest ¶
func (s *AccountService) NewGetAccountRequest(accountID string) *GetAccountRequest
func (*AccountService) NewListAccountsRequest ¶
func (s *AccountService) NewListAccountsRequest() *ListAccountsRequest
func (*AccountService) NewListSubAccountsRequest ¶
func (s *AccountService) NewListSubAccountsRequest() *ListSubAccountsRequest
type AccountType ¶
type AccountType string
const ( AccountTypeMain AccountType = "main" AccountTypeTrade AccountType = "trade" AccountTypeMargin AccountType = "margin" AccountTypePool AccountType = "pool" )
type AllTickers ¶
type AllTickers struct { Time types.MillisecondTimestamp `json:"time"` Ticker []Ticker24H `json:"ticker"` }
type BatchPlaceOrderRequest ¶
type BatchPlaceOrderRequest struct {
// contains filtered or unexported fields
}
Request via this endpoint to place 5 orders at the same time. The order type must be a limit order of the same symbol. The interface currently only supports spot trading
func (*BatchPlaceOrderRequest) Add ¶
func (r *BatchPlaceOrderRequest) Add(reqs ...*PlaceOrderRequest) *BatchPlaceOrderRequest
func (*BatchPlaceOrderRequest) Do ¶
func (r *BatchPlaceOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
func (*BatchPlaceOrderRequest) Symbol ¶
func (r *BatchPlaceOrderRequest) Symbol(symbol string) *BatchPlaceOrderRequest
type Bullet ¶
type Bullet struct { InstanceServers []struct { Endpoint string `json:"endpoint"` Protocol string `json:"protocol"` Encrypt bool `json:"encrypt"` PingInterval int `json:"pingInterval"` PingTimeout int `json:"pingTimeout"` } `json:"instanceServers"` Token string `json:"token"` }
func (*Bullet) PingInterval ¶
func (*Bullet) PingTimeout ¶
type BulletService ¶
type BulletService struct {
// contains filtered or unexported fields
}
func (*BulletService) NewGetPrivateBulletRequest ¶
func (s *BulletService) NewGetPrivateBulletRequest() *GetPrivateBulletRequest
func (*BulletService) NewGetPublicBulletRequest ¶
func (s *BulletService) NewGetPublicBulletRequest() *GetPublicBulletRequest
type CancelAllOrderRequest ¶
type CancelAllOrderRequest struct {
// contains filtered or unexported fields
}
func (*CancelAllOrderRequest) Do ¶
func (r *CancelAllOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
func (*CancelAllOrderRequest) GetParameters ¶
func (r *CancelAllOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CancelAllOrderRequest) GetParametersJSON ¶
func (r *CancelAllOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CancelAllOrderRequest) GetParametersQuery ¶
func (r *CancelAllOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CancelAllOrderRequest) GetQueryParameters ¶
func (r *CancelAllOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelAllOrderRequest) GetSlugParameters ¶
func (r *CancelAllOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*CancelAllOrderRequest) GetSlugsMap ¶
func (r *CancelAllOrderRequest) GetSlugsMap() (map[string]string, error)
func (*CancelAllOrderRequest) Symbol ¶
func (r *CancelAllOrderRequest) Symbol(symbol string) *CancelAllOrderRequest
func (*CancelAllOrderRequest) TradeType ¶
func (r *CancelAllOrderRequest) TradeType(tradeType string) *CancelAllOrderRequest
type CancelOrderRequest ¶
type CancelOrderRequest struct {
// contains filtered or unexported fields
}
func (*CancelOrderRequest) ClientOrderID ¶
func (r *CancelOrderRequest) ClientOrderID(clientOrderID string) *CancelOrderRequest
func (*CancelOrderRequest) Do ¶
func (r *CancelOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
func (*CancelOrderRequest) GetParameters ¶
func (r *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CancelOrderRequest) GetParametersJSON ¶
func (r *CancelOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CancelOrderRequest) GetParametersQuery ¶
func (r *CancelOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CancelOrderRequest) GetQueryParameters ¶
func (r *CancelOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelOrderRequest) GetSlugParameters ¶
func (r *CancelOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*CancelOrderRequest) GetSlugsMap ¶
func (r *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
func (*CancelOrderRequest) OrderID ¶
func (r *CancelOrderRequest) OrderID(orderID string) *CancelOrderRequest
type CancelOrderResponse ¶
type Fill ¶
type Fill struct { Symbol string `json:"symbol"` TradeId string `json:"tradeId"` OrderId string `json:"orderId"` CounterOrderId string `json:"counterOrderId"` Side SideType `json:"side"` Liquidity LiquidityType `json:"liquidity"` ForceTaker bool `json:"forceTaker"` Price fixedpoint.Value `json:"price"` Size fixedpoint.Value `json:"size"` Funds fixedpoint.Value `json:"funds"` Fee fixedpoint.Value `json:"fee"` FeeRate fixedpoint.Value `json:"feeRate"` FeeCurrency string `json:"feeCurrency"` Stop string `json:"stop"` Type OrderType `json:"type"` CreatedAt types.MillisecondTimestamp `json:"createdAt"` TradeType TradeType `json:"tradeType"` }
type FillListPage ¶
type GetAccountRequest ¶
type GetAccountRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountRequest) AccountID ¶
func (g *GetAccountRequest) AccountID(accountID string) *GetAccountRequest
func (*GetAccountRequest) Do ¶
func (g *GetAccountRequest) Do(ctx context.Context) (*Account, error)
func (*GetAccountRequest) GetParameters ¶
func (g *GetAccountRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountRequest) GetParametersJSON ¶
func (g *GetAccountRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountRequest) GetParametersQuery ¶
func (g *GetAccountRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountRequest) GetQueryParameters ¶
func (g *GetAccountRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountRequest) GetSlugParameters ¶
func (g *GetAccountRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountRequest) GetSlugsMap ¶
func (g *GetAccountRequest) GetSlugsMap() (map[string]string, error)
type GetAllTickersRequest ¶
type GetAllTickersRequest struct {
// contains filtered or unexported fields
}
func (*GetAllTickersRequest) Do ¶
func (g *GetAllTickersRequest) Do(ctx context.Context) (*AllTickers, error)
func (*GetAllTickersRequest) GetParameters ¶
func (g *GetAllTickersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAllTickersRequest) GetParametersJSON ¶
func (g *GetAllTickersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAllTickersRequest) GetParametersQuery ¶
func (g *GetAllTickersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAllTickersRequest) GetQueryParameters ¶
func (g *GetAllTickersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAllTickersRequest) GetSlugParameters ¶
func (g *GetAllTickersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAllTickersRequest) GetSlugsMap ¶
func (g *GetAllTickersRequest) GetSlugsMap() (map[string]string, error)
type GetFillsRequest ¶
type GetFillsRequest struct {
// contains filtered or unexported fields
}
func (*GetFillsRequest) Do ¶
func (r *GetFillsRequest) Do(ctx context.Context) (*FillListPage, error)
func (*GetFillsRequest) EndAt ¶
func (r *GetFillsRequest) EndAt(endAt time.Time) *GetFillsRequest
func (*GetFillsRequest) GetParameters ¶
func (r *GetFillsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetFillsRequest) GetParametersJSON ¶
func (r *GetFillsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetFillsRequest) GetParametersQuery ¶
func (r *GetFillsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetFillsRequest) GetQueryParameters ¶
func (r *GetFillsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetFillsRequest) GetSlugParameters ¶
func (r *GetFillsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetFillsRequest) GetSlugsMap ¶
func (r *GetFillsRequest) GetSlugsMap() (map[string]string, error)
func (*GetFillsRequest) OrderID ¶
func (r *GetFillsRequest) OrderID(orderID string) *GetFillsRequest
func (*GetFillsRequest) OrderType ¶
func (r *GetFillsRequest) OrderType(orderType string) *GetFillsRequest
func (*GetFillsRequest) Side ¶
func (r *GetFillsRequest) Side(side string) *GetFillsRequest
func (*GetFillsRequest) StartAt ¶
func (r *GetFillsRequest) StartAt(startAt time.Time) *GetFillsRequest
func (*GetFillsRequest) Symbol ¶
func (r *GetFillsRequest) Symbol(symbol string) *GetFillsRequest
func (*GetFillsRequest) TradeType ¶
func (r *GetFillsRequest) TradeType(tradeType string) *GetFillsRequest
type GetKLinesRequest ¶
type GetKLinesRequest struct {
// contains filtered or unexported fields
}
func (*GetKLinesRequest) EndAt ¶
func (r *GetKLinesRequest) EndAt(endAt time.Time) *GetKLinesRequest
func (*GetKLinesRequest) GetParameters ¶
func (r *GetKLinesRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetKLinesRequest) GetParametersJSON ¶
func (r *GetKLinesRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetKLinesRequest) GetParametersQuery ¶
func (r *GetKLinesRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetKLinesRequest) GetQueryParameters ¶
func (r *GetKLinesRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetKLinesRequest) GetSlugParameters ¶
func (r *GetKLinesRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetKLinesRequest) GetSlugsMap ¶
func (r *GetKLinesRequest) GetSlugsMap() (map[string]string, error)
func (*GetKLinesRequest) Interval ¶
func (r *GetKLinesRequest) Interval(interval string) *GetKLinesRequest
func (*GetKLinesRequest) StartAt ¶
func (r *GetKLinesRequest) StartAt(startAt time.Time) *GetKLinesRequest
func (*GetKLinesRequest) Symbol ¶
func (r *GetKLinesRequest) Symbol(symbol string) *GetKLinesRequest
type GetOrderBookLevel2Depth100Request ¶
type GetOrderBookLevel2Depth100Request struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2Depth100Request) Do ¶
func (g *GetOrderBookLevel2Depth100Request) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2Depth100Request) GetParameters ¶
func (g *GetOrderBookLevel2Depth100Request) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderBookLevel2Depth100Request) GetParametersJSON ¶
func (g *GetOrderBookLevel2Depth100Request) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2Depth100Request) GetParametersQuery ¶
func (g *GetOrderBookLevel2Depth100Request) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2Depth100Request) GetQueryParameters ¶
func (g *GetOrderBookLevel2Depth100Request) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2Depth100Request) GetSlugParameters ¶
func (g *GetOrderBookLevel2Depth100Request) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderBookLevel2Depth100Request) GetSlugsMap ¶
func (g *GetOrderBookLevel2Depth100Request) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2Depth100Request) Symbol ¶
func (g *GetOrderBookLevel2Depth100Request) Symbol(symbol string) *GetOrderBookLevel2Depth100Request
type GetOrderBookLevel2Depth20Request ¶
type GetOrderBookLevel2Depth20Request struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2Depth20Request) Do ¶
func (g *GetOrderBookLevel2Depth20Request) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2Depth20Request) GetParameters ¶
func (g *GetOrderBookLevel2Depth20Request) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderBookLevel2Depth20Request) GetParametersJSON ¶
func (g *GetOrderBookLevel2Depth20Request) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2Depth20Request) GetParametersQuery ¶
func (g *GetOrderBookLevel2Depth20Request) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2Depth20Request) GetQueryParameters ¶
func (g *GetOrderBookLevel2Depth20Request) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2Depth20Request) GetSlugParameters ¶
func (g *GetOrderBookLevel2Depth20Request) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderBookLevel2Depth20Request) GetSlugsMap ¶
func (g *GetOrderBookLevel2Depth20Request) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2Depth20Request) Symbol ¶
func (g *GetOrderBookLevel2Depth20Request) Symbol(symbol string) *GetOrderBookLevel2Depth20Request
type GetOrderBookLevel2DepthAllRequest ¶
type GetOrderBookLevel2DepthAllRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2DepthAllRequest) Do ¶
func (g *GetOrderBookLevel2DepthAllRequest) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2DepthAllRequest) GetParameters ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderBookLevel2DepthAllRequest) GetParametersJSON ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2DepthAllRequest) GetParametersQuery ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2DepthAllRequest) GetQueryParameters ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2DepthAllRequest) GetSlugParameters ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderBookLevel2DepthAllRequest) GetSlugsMap ¶
func (g *GetOrderBookLevel2DepthAllRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2DepthAllRequest) Symbol ¶
func (g *GetOrderBookLevel2DepthAllRequest) Symbol(symbol string) *GetOrderBookLevel2DepthAllRequest
type GetPrivateBulletRequest ¶
type GetPrivateBulletRequest struct {
// contains filtered or unexported fields
}
func (*GetPrivateBulletRequest) Do ¶
func (g *GetPrivateBulletRequest) Do(ctx context.Context) (*Bullet, error)
func (*GetPrivateBulletRequest) GetParameters ¶
func (g *GetPrivateBulletRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetPrivateBulletRequest) GetParametersJSON ¶
func (g *GetPrivateBulletRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetPrivateBulletRequest) GetParametersQuery ¶
func (g *GetPrivateBulletRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetPrivateBulletRequest) GetQueryParameters ¶
func (g *GetPrivateBulletRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetPrivateBulletRequest) GetSlugParameters ¶
func (g *GetPrivateBulletRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetPrivateBulletRequest) GetSlugsMap ¶
func (g *GetPrivateBulletRequest) GetSlugsMap() (map[string]string, error)
type GetPublicBulletRequest ¶
type GetPublicBulletRequest struct {
// contains filtered or unexported fields
}
func (*GetPublicBulletRequest) Do ¶
func (g *GetPublicBulletRequest) Do(ctx context.Context) (*Bullet, error)
func (*GetPublicBulletRequest) GetParameters ¶
func (g *GetPublicBulletRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetPublicBulletRequest) GetParametersJSON ¶
func (g *GetPublicBulletRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetPublicBulletRequest) GetParametersQuery ¶
func (g *GetPublicBulletRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetPublicBulletRequest) GetQueryParameters ¶
func (g *GetPublicBulletRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetPublicBulletRequest) GetSlugParameters ¶
func (g *GetPublicBulletRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetPublicBulletRequest) GetSlugsMap ¶
func (g *GetPublicBulletRequest) GetSlugsMap() (map[string]string, error)
type GetTickerRequest ¶
type GetTickerRequest struct {
// contains filtered or unexported fields
}
func (*GetTickerRequest) GetParameters ¶
func (g *GetTickerRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetTickerRequest) GetParametersJSON ¶
func (g *GetTickerRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTickerRequest) GetParametersQuery ¶
func (g *GetTickerRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTickerRequest) GetQueryParameters ¶
func (g *GetTickerRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTickerRequest) GetSlugParameters ¶
func (g *GetTickerRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetTickerRequest) GetSlugsMap ¶
func (g *GetTickerRequest) GetSlugsMap() (map[string]string, error)
func (*GetTickerRequest) Symbol ¶
func (g *GetTickerRequest) Symbol(symbol string) *GetTickerRequest
type HistoryOrder ¶
type HistoryOrderListPage ¶
type HistoryOrderListPage struct { CurrentPage int `json:"currentPage"` PageSize int `json:"pageSize"` TotalNum int `json:"totalNum"` TotalPage int `json:"totalPage"` Items []HistoryOrder `json:"items"` }
type KLine ¶
type KLine struct { Symbol string Interval string StartTime time.Time Open fixedpoint.Value High fixedpoint.Value Low fixedpoint.Value Close fixedpoint.Value Volume, QuoteVolume fixedpoint.Value }
type LiquidityType ¶
type LiquidityType string
const ( LiquidityTypeMaker LiquidityType = "maker" LiquidityTypeTaker LiquidityType = "taker" )
type ListAccountsRequest ¶
type ListAccountsRequest struct {
// contains filtered or unexported fields
}
func (*ListAccountsRequest) Do ¶
func (l *ListAccountsRequest) Do(ctx context.Context) ([]Account, error)
func (*ListAccountsRequest) GetParameters ¶
func (l *ListAccountsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*ListAccountsRequest) GetParametersJSON ¶
func (l *ListAccountsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListAccountsRequest) GetParametersQuery ¶
func (l *ListAccountsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListAccountsRequest) GetQueryParameters ¶
func (l *ListAccountsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListAccountsRequest) GetSlugParameters ¶
func (l *ListAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*ListAccountsRequest) GetSlugsMap ¶
func (l *ListAccountsRequest) GetSlugsMap() (map[string]string, error)
type ListHistoryOrdersRequest ¶
type ListHistoryOrdersRequest struct {
// contains filtered or unexported fields
}
func (*ListHistoryOrdersRequest) Do ¶
func (l *ListHistoryOrdersRequest) Do(ctx context.Context) (*HistoryOrderListPage, error)
func (*ListHistoryOrdersRequest) EndAt ¶
func (l *ListHistoryOrdersRequest) EndAt(endAt time.Time) *ListHistoryOrdersRequest
func (*ListHistoryOrdersRequest) GetParameters ¶
func (l *ListHistoryOrdersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*ListHistoryOrdersRequest) GetParametersJSON ¶
func (l *ListHistoryOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListHistoryOrdersRequest) GetParametersQuery ¶
func (l *ListHistoryOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListHistoryOrdersRequest) GetQueryParameters ¶
func (l *ListHistoryOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListHistoryOrdersRequest) GetSlugParameters ¶
func (l *ListHistoryOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*ListHistoryOrdersRequest) GetSlugsMap ¶
func (l *ListHistoryOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*ListHistoryOrdersRequest) StartAt ¶
func (l *ListHistoryOrdersRequest) StartAt(startAt time.Time) *ListHistoryOrdersRequest
func (*ListHistoryOrdersRequest) Symbol ¶
func (l *ListHistoryOrdersRequest) Symbol(symbol string) *ListHistoryOrdersRequest
type ListOrdersRequest ¶
type ListOrdersRequest struct {
// contains filtered or unexported fields
}
func (*ListOrdersRequest) Do ¶
func (r *ListOrdersRequest) Do(ctx context.Context) (*OrderListPage, error)
func (*ListOrdersRequest) EndAt ¶
func (r *ListOrdersRequest) EndAt(endAt time.Time) *ListOrdersRequest
func (*ListOrdersRequest) GetParameters ¶
func (r *ListOrdersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*ListOrdersRequest) GetParametersJSON ¶
func (r *ListOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListOrdersRequest) GetParametersQuery ¶
func (r *ListOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListOrdersRequest) GetQueryParameters ¶
func (r *ListOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListOrdersRequest) GetSlugParameters ¶
func (r *ListOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*ListOrdersRequest) GetSlugsMap ¶
func (r *ListOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*ListOrdersRequest) OrderType ¶
func (r *ListOrdersRequest) OrderType(orderType OrderType) *ListOrdersRequest
func (*ListOrdersRequest) Side ¶
func (r *ListOrdersRequest) Side(side SideType) *ListOrdersRequest
func (*ListOrdersRequest) StartAt ¶
func (r *ListOrdersRequest) StartAt(startAt time.Time) *ListOrdersRequest
func (*ListOrdersRequest) Status ¶
func (r *ListOrdersRequest) Status(status string) *ListOrdersRequest
func (*ListOrdersRequest) Symbol ¶
func (r *ListOrdersRequest) Symbol(symbol string) *ListOrdersRequest
func (*ListOrdersRequest) TradeType ¶
func (r *ListOrdersRequest) TradeType(tradeType TradeType) *ListOrdersRequest
type ListSubAccountsRequest ¶
type ListSubAccountsRequest struct {
// contains filtered or unexported fields
}
func (*ListSubAccountsRequest) Do ¶
func (l *ListSubAccountsRequest) Do(ctx context.Context) ([]SubAccount, error)
func (*ListSubAccountsRequest) GetParameters ¶
func (l *ListSubAccountsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*ListSubAccountsRequest) GetParametersJSON ¶
func (l *ListSubAccountsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListSubAccountsRequest) GetParametersQuery ¶
func (l *ListSubAccountsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListSubAccountsRequest) GetQueryParameters ¶
func (l *ListSubAccountsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListSubAccountsRequest) GetSlugParameters ¶
func (l *ListSubAccountsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*ListSubAccountsRequest) GetSlugsMap ¶
func (l *ListSubAccountsRequest) GetSlugsMap() (map[string]string, error)
type ListSymbolsRequest ¶
type ListSymbolsRequest struct {
// contains filtered or unexported fields
}
func (*ListSymbolsRequest) Do ¶
func (l *ListSymbolsRequest) Do(ctx context.Context) ([]Symbol, error)
func (*ListSymbolsRequest) GetParameters ¶
func (l *ListSymbolsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*ListSymbolsRequest) GetParametersJSON ¶
func (l *ListSymbolsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListSymbolsRequest) GetParametersQuery ¶
func (l *ListSymbolsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListSymbolsRequest) GetQueryParameters ¶
func (l *ListSymbolsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListSymbolsRequest) GetSlugParameters ¶
func (l *ListSymbolsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*ListSymbolsRequest) GetSlugsMap ¶
func (l *ListSymbolsRequest) GetSlugsMap() (map[string]string, error)
func (*ListSymbolsRequest) Market ¶
func (l *ListSymbolsRequest) Market(market string) *ListSymbolsRequest
type MarketDataService ¶
type MarketDataService struct {
// contains filtered or unexported fields
}
func (*MarketDataService) GetOrderBook ¶
func (s *MarketDataService) GetOrderBook(symbol string, depth int) (*OrderBook, error)
func (*MarketDataService) GetTicker24HStat ¶
func (s *MarketDataService) GetTicker24HStat(symbol string) (*Ticker24H, error)
func (*MarketDataService) ListSymbols ¶
func (s *MarketDataService) ListSymbols(market ...string) ([]Symbol, error)
func (*MarketDataService) ListTickers ¶
func (s *MarketDataService) ListTickers() (*AllTickers, error)
func (*MarketDataService) NewGetKLinesRequest ¶
func (s *MarketDataService) NewGetKLinesRequest() *GetKLinesRequest
func (*MarketDataService) NewGetOrderBookRequest ¶
func (s *MarketDataService) NewGetOrderBookRequest(symbol string, depth int) OrderBookRequest
func (*MarketDataService) NewGetTickerRequest ¶
func (s *MarketDataService) NewGetTickerRequest(symbol string) *GetTickerRequest
func (*MarketDataService) NewListSymbolsRequest ¶
func (s *MarketDataService) NewListSymbolsRequest() *ListSymbolsRequest
type Order ¶
type Order struct { ID string `json:"id"` Symbol string `json:"symbol"` OperationType string `json:"opType"` Type string `json:"type"` Side string `json:"side"` Price fixedpoint.Value `json:"price"` Size fixedpoint.Value `json:"size"` Funds fixedpoint.Value `json:"funds"` DealFunds fixedpoint.Value `json:"dealFunds"` DealSize fixedpoint.Value `json:"dealSize"` Fee fixedpoint.Value `json:"fee"` FeeCurrency string `json:"feeCurrency"` StopType string `json:"stop"` StopTriggerred bool `json:"stopTriggered"` StopPrice fixedpoint.Value `json:"stopPrice"` TimeInForce TimeInForceType `json:"timeInForce"` PostOnly bool `json:"postOnly"` Hidden bool `json:"hidden"` Iceberg bool `json:"iceberg"` Channel string `json:"channel"` ClientOrderID string `json:"clientOid"` Remark string `json:"remark"` IsActive bool `json:"isActive"` CancelExist bool `json:"cancelExist"` CreatedAt types.MillisecondTimestamp `json:"createdAt"` }
type OrderBook ¶
type OrderBook struct { Sequence string `json:"sequence,omitempty"` Time types.MillisecondTimestamp `json:"time"` Bids types.PriceVolumeSlice `json:"bids,omitempty"` Asks types.PriceVolumeSlice `json:"asks,omitempty"` }
{ "sequence": "3262786978", "time": 1550653727731, "bids": [["6500.12", "0.45054140"], ["6500.11", "0.45054140"]], //[price,size] "asks": [["6500.16", "0.57753524"], ["6500.15", "0.57753524"]] }
type OrderBookRequest ¶
type OrderListPage ¶
type OrderResponse ¶
type OrderResponse struct {
OrderID string `json:"orderId"`
}
type OrderState ¶
type OrderState string
const ( OrderStateCanceled OrderState = "canceled" OrderStateLive OrderState = "live" OrderStatePartiallyFilled OrderState = "partially_filled" OrderStateFilled OrderState = "filled" )
type PlaceOrderRequest ¶
type PlaceOrderRequest struct {
// contains filtered or unexported fields
}
func (*PlaceOrderRequest) ClientOrderID ¶
func (r *PlaceOrderRequest) ClientOrderID(clientOrderID string) *PlaceOrderRequest
func (*PlaceOrderRequest) Do ¶
func (r *PlaceOrderRequest) Do(ctx context.Context) (*OrderResponse, error)
func (*PlaceOrderRequest) GetParameters ¶
func (r *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*PlaceOrderRequest) GetParametersJSON ¶
func (r *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*PlaceOrderRequest) GetParametersQuery ¶
func (r *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*PlaceOrderRequest) GetQueryParameters ¶
func (r *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*PlaceOrderRequest) GetSlugParameters ¶
func (r *PlaceOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*PlaceOrderRequest) GetSlugsMap ¶
func (r *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
func (*PlaceOrderRequest) OrderType ¶
func (r *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
func (*PlaceOrderRequest) PostOnly ¶
func (r *PlaceOrderRequest) PostOnly(postOnly bool) *PlaceOrderRequest
func (*PlaceOrderRequest) Price ¶
func (r *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
func (*PlaceOrderRequest) Side ¶
func (r *PlaceOrderRequest) Side(side SideType) *PlaceOrderRequest
func (*PlaceOrderRequest) Size ¶
func (r *PlaceOrderRequest) Size(size string) *PlaceOrderRequest
func (*PlaceOrderRequest) Symbol ¶
func (r *PlaceOrderRequest) Symbol(symbol string) *PlaceOrderRequest
func (*PlaceOrderRequest) Tag ¶
func (r *PlaceOrderRequest) Tag(tag string) *PlaceOrderRequest
func (*PlaceOrderRequest) TimeInForce ¶
func (r *PlaceOrderRequest) TimeInForce(timeInForce TimeInForceType) *PlaceOrderRequest
type RestClient ¶
type RestClient struct { requestgen.BaseAPIClient Key, Secret, Passphrase string KeyVersion string AccountService *AccountService MarketDataService *MarketDataService TradeService *TradeService BulletService *BulletService }
func NewClient ¶
func NewClient() *RestClient
func (*RestClient) Auth ¶
func (c *RestClient) Auth(key, secret, passphrase string)
type SubAccount ¶
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` Name string `json:"name"` BaseCurrency string `json:"baseCurrency"` QuoteCurrency string `json:"quoteCurrency"` FeeCurrency string `json:"feeCurrency"` Market string `json:"market"` BaseMinSize fixedpoint.Value `json:"baseMinSize"` QuoteMinSize fixedpoint.Value `json:"quoteMinSize"` BaseIncrement fixedpoint.Value `json:"baseIncrement"` QuoteIncrement fixedpoint.Value `json:"quoteIncrement"` PriceIncrement fixedpoint.Value `json:"priceIncrement"` PriceLimitRate fixedpoint.Value `json:"priceLimitRate"` IsMarginEnabled bool `json:"isMarginEnabled"` EnableTrading bool `json:"enableTrading"` }
type Ticker ¶
type Ticker struct { Sequence string `json:"sequence"` Size fixedpoint.Value `json:"size"` Price fixedpoint.Value `json:"price"` BestAsk fixedpoint.Value `json:"bestAsk"` BestBid fixedpoint.Value `json:"bestBid"` BestBidSize fixedpoint.Value `json:"bestBidSize"` Time types.MillisecondTimestamp `json:"time"` }
//Get Ticker
{ "sequence": "1550467636704", "bestAsk": "0.03715004", "size": "0.17", "price": "0.03715005", "bestBidSize": "3.803", "bestBid": "0.03710768", "bestAskSize": "1.788", "time": 1550653727731 }
type Ticker24H ¶
type Ticker24H struct { Symbol string `json:"symbol"` SymbolName string `json:"symbolName"` Buy fixedpoint.Value `json:"buy"` Sell fixedpoint.Value `json:"sell"` ChangeRate fixedpoint.Value `json:"changeRate"` ChangePrice fixedpoint.Value `json:"changePrice"` High fixedpoint.Value `json:"high"` Low fixedpoint.Value `json:"low"` Last fixedpoint.Value `json:"last"` AveragePrice fixedpoint.Value `json:"averagePrice"` Volume fixedpoint.Value `json:"vol"` // base volume VolumeValue fixedpoint.Value `json:"volValue"` // quote volume TakerFeeRate fixedpoint.Value `json:"takerFeeRate"` MakerFeeRate fixedpoint.Value `json:"makerFeeRate"` TakerCoefficient fixedpoint.Value `json:"takerCoefficient"` MakerCoefficient fixedpoint.Value `json:"makerCoefficient"` Time types.MillisecondTimestamp `json:"time"` }
type TimeInForceType ¶
type TimeInForceType string
const ( // GTC Good Till Canceled orders remain open on the book until canceled. This is the default behavior if no policy is specified. TimeInForceGTC TimeInForceType = "GTC" // GTT Good Till Time orders remain open on the book until canceled or the allotted cancelAfter is depleted on the matching engine. GTT orders are guaranteed to cancel before any other order is processed after the cancelAfter seconds placed in order book. TimeInForceGTT TimeInForceType = "GTT" // FOK Fill Or Kill orders are rejected if the entire size cannot be matched. TimeInForceFOK TimeInForceType = "FOK" // IOC Immediate Or Cancel orders instantly cancel the remaining size of the limit order instead of opening it on the book. TimeInForceIOC TimeInForceType = "IOC" )
type TradeService ¶
type TradeService struct {
// contains filtered or unexported fields
}
func (*TradeService) NewBatchPlaceOrderRequest ¶
func (c *TradeService) NewBatchPlaceOrderRequest() *BatchPlaceOrderRequest
func (*TradeService) NewCancelAllOrderRequest ¶
func (c *TradeService) NewCancelAllOrderRequest() *CancelAllOrderRequest
func (*TradeService) NewCancelOrderRequest ¶
func (c *TradeService) NewCancelOrderRequest() *CancelOrderRequest
func (*TradeService) NewGetFillsRequest ¶
func (c *TradeService) NewGetFillsRequest() *GetFillsRequest
func (*TradeService) NewListHistoryOrdersRequest ¶
func (c *TradeService) NewListHistoryOrdersRequest() *ListHistoryOrdersRequest
func (*TradeService) NewListOrdersRequest ¶
func (c *TradeService) NewListOrdersRequest() *ListOrdersRequest
func (*TradeService) NewPlaceOrderRequest ¶
func (c *TradeService) NewPlaceOrderRequest() *PlaceOrderRequest
Source Files ¶
- account.go
- bullet.go
- cancel_all_order_request_requestgen.go
- cancel_order_request_requestgen.go
- client.go
- get_account_request_requestgen.go
- get_all_tickers_request_requestgen.go
- get_fills_request_requestgen.go
- get_k_lines_request_requestgen.go
- get_order_book_level_2_depth_100_request_requestgen.go
- get_order_book_level_2_depth_20_request_requestgen.go
- get_order_book_level_2_depth_all_request_requestgen.go
- get_private_bullet_request_requestgen.go
- get_public_bullet_request_requestgen.go
- get_ticker_request_requestgen.go
- list_accounts_request_requestgen.go
- list_history_orders_request_requestgen.go
- list_orders_request_requestgen.go
- list_sub_accounts_request_requestgen.go
- list_symbols_request_requestgen.go
- marketdata.go
- place_order_request_requestgen.go
- trade.go
- types.go