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) 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
- func (c *RestClient) Auth(key, secret, passphrase string)
- func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) NewRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
- 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 ¶ added in v1.21.1
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 ¶ added in v1.22.3
func (s *AccountService) NewGetAccountRequest(accountID string) *GetAccountRequest
func (*AccountService) NewListAccountsRequest ¶ added in v1.22.3
func (s *AccountService) NewListAccountsRequest() *ListAccountsRequest
func (*AccountService) NewListSubAccountsRequest ¶ added in v1.22.3
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 ¶ added in v1.21.2
func (r *CancelAllOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelAllOrderRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.21.2
func (r *CancelOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelOrderRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.22.0
type GetAccountRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountRequest) AccountID ¶ added in v1.22.0
func (g *GetAccountRequest) AccountID(accountID string) *GetAccountRequest
func (*GetAccountRequest) Do ¶ added in v1.22.0
func (g *GetAccountRequest) Do(ctx context.Context) (*Account, error)
func (*GetAccountRequest) GetParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetAccountRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountRequest) GetParametersQuery ¶ added in v1.22.0
func (g *GetAccountRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountRequest) GetQueryParameters ¶ added in v1.22.0
func (g *GetAccountRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetAccountRequest) GetSlugsMap() (map[string]string, error)
type GetAllTickersRequest ¶ added in v1.21.2
type GetAllTickersRequest struct {
// contains filtered or unexported fields
}
func (*GetAllTickersRequest) Do ¶ added in v1.21.2
func (g *GetAllTickersRequest) Do(ctx context.Context) (*AllTickers, error)
func (*GetAllTickersRequest) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (g *GetAllTickersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAllTickersRequest) GetParametersQuery ¶ added in v1.21.2
func (g *GetAllTickersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAllTickersRequest) GetQueryParameters ¶ added in v1.21.2
func (g *GetAllTickersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAllTickersRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.21.2
func (r *GetFillsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetFillsRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.22.2
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 ¶ added in v1.21.2
func (r *GetKLinesRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetKLinesRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.21.2
type GetOrderBookLevel2Depth100Request struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2Depth100Request) Do ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth100Request) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2Depth100Request) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth100Request) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2Depth100Request) GetParametersQuery ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth100Request) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2Depth100Request) GetQueryParameters ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth100Request) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2Depth100Request) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetOrderBookLevel2Depth100Request) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2Depth100Request) Symbol ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth100Request) Symbol(symbol string) *GetOrderBookLevel2Depth100Request
type GetOrderBookLevel2Depth20Request ¶ added in v1.21.2
type GetOrderBookLevel2Depth20Request struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2Depth20Request) Do ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth20Request) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2Depth20Request) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth20Request) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2Depth20Request) GetParametersQuery ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth20Request) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2Depth20Request) GetQueryParameters ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth20Request) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2Depth20Request) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetOrderBookLevel2Depth20Request) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2Depth20Request) Symbol ¶ added in v1.21.2
func (g *GetOrderBookLevel2Depth20Request) Symbol(symbol string) *GetOrderBookLevel2Depth20Request
type GetOrderBookLevel2DepthAllRequest ¶ added in v1.21.2
type GetOrderBookLevel2DepthAllRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderBookLevel2DepthAllRequest) Do ¶ added in v1.21.2
func (g *GetOrderBookLevel2DepthAllRequest) Do(ctx context.Context) (*OrderBook, error)
func (*GetOrderBookLevel2DepthAllRequest) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (g *GetOrderBookLevel2DepthAllRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderBookLevel2DepthAllRequest) GetParametersQuery ¶ added in v1.21.2
func (g *GetOrderBookLevel2DepthAllRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderBookLevel2DepthAllRequest) GetQueryParameters ¶ added in v1.21.2
func (g *GetOrderBookLevel2DepthAllRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderBookLevel2DepthAllRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetOrderBookLevel2DepthAllRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderBookLevel2DepthAllRequest) Symbol ¶ added in v1.21.2
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 ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetPrivateBulletRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetPrivateBulletRequest) GetParametersQuery ¶ added in v1.22.0
func (g *GetPrivateBulletRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetPrivateBulletRequest) GetQueryParameters ¶ added in v1.22.0
func (g *GetPrivateBulletRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetPrivateBulletRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetPublicBulletRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetPublicBulletRequest) GetParametersQuery ¶ added in v1.22.0
func (g *GetPublicBulletRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetPublicBulletRequest) GetQueryParameters ¶ added in v1.22.0
func (g *GetPublicBulletRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetPublicBulletRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetPublicBulletRequest) GetSlugsMap() (map[string]string, error)
type GetTickerRequest ¶ added in v1.21.2
type GetTickerRequest struct {
// contains filtered or unexported fields
}
func (*GetTickerRequest) Do ¶ added in v1.21.2
func (g *GetTickerRequest) Do(ctx context.Context) (*Ticker, error)
func (*GetTickerRequest) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (g *GetTickerRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTickerRequest) GetParametersQuery ¶ added in v1.21.2
func (g *GetTickerRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTickerRequest) GetQueryParameters ¶ added in v1.21.2
func (g *GetTickerRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTickerRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (g *GetTickerRequest) GetSlugsMap() (map[string]string, error)
func (*GetTickerRequest) Symbol ¶ added in v1.21.2
func (g *GetTickerRequest) Symbol(symbol string) *GetTickerRequest
type HistoryOrder ¶ added in v1.22.2
type HistoryOrderListPage ¶ added in v1.22.2
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 ¶ added in v1.22.0
type ListAccountsRequest struct {
// contains filtered or unexported fields
}
func (*ListAccountsRequest) Do ¶ added in v1.22.0
func (l *ListAccountsRequest) Do(ctx context.Context) ([]Account, error)
func (*ListAccountsRequest) GetParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (l *ListAccountsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListAccountsRequest) GetParametersQuery ¶ added in v1.22.0
func (l *ListAccountsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListAccountsRequest) GetQueryParameters ¶ added in v1.22.0
func (l *ListAccountsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListAccountsRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (l *ListAccountsRequest) GetSlugsMap() (map[string]string, error)
type ListHistoryOrdersRequest ¶ added in v1.22.2
type ListHistoryOrdersRequest struct {
// contains filtered or unexported fields
}
func (*ListHistoryOrdersRequest) Do ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) Do(ctx context.Context) (*HistoryOrderListPage, error)
func (*ListHistoryOrdersRequest) EndAt ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) EndAt(endAt time.Time) *ListHistoryOrdersRequest
func (*ListHistoryOrdersRequest) GetParameters ¶ added in v1.22.2
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 ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListHistoryOrdersRequest) GetParametersQuery ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListHistoryOrdersRequest) GetQueryParameters ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListHistoryOrdersRequest) GetSlugParameters ¶ added in v1.22.2
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 ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*ListHistoryOrdersRequest) StartAt ¶ added in v1.22.2
func (l *ListHistoryOrdersRequest) StartAt(startAt time.Time) *ListHistoryOrdersRequest
func (*ListHistoryOrdersRequest) Symbol ¶ added in v1.22.2
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 ¶ added in v1.21.2
func (r *ListOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListOrdersRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
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 ¶ added in v1.22.0
type ListSubAccountsRequest struct {
// contains filtered or unexported fields
}
func (*ListSubAccountsRequest) Do ¶ added in v1.22.0
func (l *ListSubAccountsRequest) Do(ctx context.Context) ([]SubAccount, error)
func (*ListSubAccountsRequest) GetParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (l *ListSubAccountsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListSubAccountsRequest) GetParametersQuery ¶ added in v1.22.0
func (l *ListSubAccountsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListSubAccountsRequest) GetQueryParameters ¶ added in v1.22.0
func (l *ListSubAccountsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListSubAccountsRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (l *ListSubAccountsRequest) GetSlugsMap() (map[string]string, error)
type ListSymbolsRequest ¶ added in v1.21.2
type ListSymbolsRequest struct {
// contains filtered or unexported fields
}
func (*ListSymbolsRequest) Do ¶ added in v1.21.2
func (l *ListSymbolsRequest) Do(ctx context.Context) ([]Symbol, error)
func (*ListSymbolsRequest) GetParameters ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (l *ListSymbolsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*ListSymbolsRequest) GetParametersQuery ¶ added in v1.21.2
func (l *ListSymbolsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*ListSymbolsRequest) GetQueryParameters ¶ added in v1.21.2
func (l *ListSymbolsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*ListSymbolsRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (l *ListSymbolsRequest) GetSlugsMap() (map[string]string, error)
func (*ListSymbolsRequest) Market ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (s *MarketDataService) NewGetOrderBookRequest(symbol string, depth int) OrderBookRequest
func (*MarketDataService) NewGetTickerRequest ¶ added in v1.21.2
func (s *MarketDataService) NewGetTickerRequest(symbol string) *GetTickerRequest
func (*MarketDataService) NewListSymbolsRequest ¶ added in v1.21.2
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 ¶ added in v1.21.2
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 ¶ added in v1.21.2
func (r *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*PlaceOrderRequest) GetSlugParameters ¶ added in v1.22.0
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 ¶ added in v1.22.0
func (r *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
func (*PlaceOrderRequest) OrderType ¶
func (r *PlaceOrderRequest) OrderType(orderType OrderType) *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 { BaseURL *url.URL Key, Secret, Passphrase string KeyVersion string AccountService *AccountService MarketDataService *MarketDataService TradeService *TradeService BulletService *BulletService // contains filtered or unexported fields }
func NewClient ¶
func NewClient() *RestClient
func (*RestClient) Auth ¶
func (c *RestClient) Auth(key, secret, passphrase string)
func (*RestClient) NewAuthenticatedRequest ¶
func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, payload interface{}) (*http.Request, error)
newAuthenticatedRequest creates new http request for authenticated routes.
func (*RestClient) NewRequest ¶
func (c *RestClient) NewRequest(ctx context.Context, method, refURL string, params url.Values, payload interface{}) (*http.Request, error)
NewRequest create new API request. Relative url can be provided in refURL.
func (*RestClient) SendRequest ¶
func (c *RestClient) SendRequest(req *http.Request) (*requestgen.Response, error)
sendRequest sends the request to the API server and handle the response
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 ¶ added in v1.22.2
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