Documentation ¶
Index ¶
- Constants
- type APIResponse
- type Account
- type AccountAsset
- type CancelOrderBySymbolRequest
- func (c *CancelOrderBySymbolRequest) Do(ctx context.Context) (*CancelOrderBySymbolResponse, error)
- func (c *CancelOrderBySymbolRequest) GetParameters() (map[string]interface{}, error)
- func (c *CancelOrderBySymbolRequest) GetParametersJSON() ([]byte, error)
- func (c *CancelOrderBySymbolRequest) GetParametersQuery() (url.Values, error)
- func (c *CancelOrderBySymbolRequest) GetQueryParameters() (url.Values, error)
- func (c *CancelOrderBySymbolRequest) GetSlugParameters() (map[string]interface{}, error)
- func (c *CancelOrderBySymbolRequest) GetSlugsMap() (map[string]string, error)
- func (c *CancelOrderBySymbolRequest) Symbol(symbol string) *CancelOrderBySymbolRequest
- type CancelOrderBySymbolResponse
- type CancelOrderRequest
- func (c *CancelOrderRequest) ClientOrderId(clientOrderId string) *CancelOrderRequest
- func (c *CancelOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
- func (c *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
- func (c *CancelOrderRequest) GetParametersJSON() ([]byte, error)
- func (c *CancelOrderRequest) GetParametersQuery() (url.Values, error)
- func (c *CancelOrderRequest) GetQueryParameters() (url.Values, error)
- func (c *CancelOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (c *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
- func (c *CancelOrderRequest) OrderId(orderId string) *CancelOrderRequest
- func (c *CancelOrderRequest) Symbol(symbol string) *CancelOrderRequest
- type CancelOrderResponse
- type Candle
- type Depth
- type Fill
- type GetAccountAssetsRequest
- func (g *GetAccountAssetsRequest) Do(ctx context.Context) ([]AccountAsset, error)
- func (g *GetAccountAssetsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountAssetsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountAssetsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountAssetsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountAssetsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountAssetsRequest) GetSlugsMap() (map[string]string, error)
- type 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) ([]Ticker, 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 GetCandlesRequest
- func (g *GetCandlesRequest) Do(ctx context.Context) ([]Candle, error)
- func (g *GetCandlesRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetCandlesRequest) GetParametersJSON() ([]byte, error)
- func (g *GetCandlesRequest) GetParametersQuery() (url.Values, error)
- func (g *GetCandlesRequest) GetQueryParameters() (url.Values, error)
- func (g *GetCandlesRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetCandlesRequest) GetSlugsMap() (map[string]string, error)
- type GetDepthRequest
- func (g *GetDepthRequest) Do(ctx context.Context) (*Depth, error)
- func (g *GetDepthRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetDepthRequest) GetParametersJSON() ([]byte, error)
- func (g *GetDepthRequest) GetParametersQuery() (url.Values, error)
- func (g *GetDepthRequest) GetQueryParameters() (url.Values, error)
- func (g *GetDepthRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetDepthRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetDepthRequest) Limit(limit int) *GetDepthRequest
- func (g *GetDepthRequest) StepType(stepType string) *GetDepthRequest
- func (g *GetDepthRequest) Symbol(symbol string) *GetDepthRequest
- type GetFillsRequest
- func (g *GetFillsRequest) After(after string) *GetFillsRequest
- func (g *GetFillsRequest) Before(before string) *GetFillsRequest
- func (g *GetFillsRequest) Do(ctx context.Context) (*types.MillisecondTimestamp, error)
- func (g *GetFillsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetFillsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetFillsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetFillsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetFillsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetFillsRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetFillsRequest) Limit(limit string) *GetFillsRequest
- type GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Do(ctx context.Context) ([]OrderDetail, error)
- func (g *GetOpenOrdersRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOpenOrdersRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOpenOrdersRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOpenOrdersRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOpenOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOpenOrdersRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOpenOrdersRequest) Symbol(symbol string) *GetOpenOrdersRequest
- type GetOrderDetailRequest
- func (g *GetOrderDetailRequest) ClientOrderId(clientOrderId string) *GetOrderDetailRequest
- func (g *GetOrderDetailRequest) Do(ctx context.Context) (*OrderDetail, error)
- func (g *GetOrderDetailRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderDetailRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderDetailRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderDetailRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderDetailRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderDetailRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderDetailRequest) OrderId(orderId string) *GetOrderDetailRequest
- func (g *GetOrderDetailRequest) Symbol(symbol string) *GetOrderDetailRequest
- type GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) After(after string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Before(before string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]OrderDetail, error)
- func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderHistoryRequest) Limit(limit string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Symbol(symbol string) *GetOrderHistoryRequest
- type GetServerTimeRequest
- func (g *GetServerTimeRequest) Do(ctx context.Context) (*types.MillisecondTimestamp, error)
- func (g *GetServerTimeRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetServerTimeRequest) GetParametersJSON() ([]byte, error)
- func (g *GetServerTimeRequest) GetParametersQuery() (url.Values, error)
- func (g *GetServerTimeRequest) GetQueryParameters() (url.Values, error)
- func (g *GetServerTimeRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetServerTimeRequest) GetSlugsMap() (map[string]string, error)
- type GetSymbolsRequest
- func (g *GetSymbolsRequest) Do(ctx context.Context) ([]Symbol, error)
- func (g *GetSymbolsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetSymbolsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetSymbolsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetSymbolsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetSymbolsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetSymbolsRequest) 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 OrderDetail
- type OrderForce
- type OrderResponse
- type OrderSide
- type OrderStatus
- type OrderType
- type PlaceOrderRequest
- func (p *PlaceOrderRequest) ClientOrderId(clientOrderId string) *PlaceOrderRequest
- func (p *PlaceOrderRequest) Do(ctx context.Context) (*OrderResponse, error)
- func (p *PlaceOrderRequest) Force(force OrderForce) *PlaceOrderRequest
- func (p *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
- func (p *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
- func (p *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
- func (p *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
- func (p *PlaceOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (p *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
- func (p *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
- func (p *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
- func (p *PlaceOrderRequest) Quantity(quantity string) *PlaceOrderRequest
- func (p *PlaceOrderRequest) Side(side OrderSide) *PlaceOrderRequest
- func (p *PlaceOrderRequest) Symbol(symbol string) *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) NewCancelOrderBySymbolRequest() *CancelOrderBySymbolRequest
- func (c *RestClient) NewCancelOrderRequest() *CancelOrderRequest
- func (c *RestClient) NewGetAccountAssetsRequest() *GetAccountAssetsRequest
- func (c *RestClient) NewGetAccountRequest() *GetAccountRequest
- func (c *RestClient) NewGetAllTickersRequest() *GetAllTickersRequest
- func (c *RestClient) NewGetCandlesRequest() *GetCandlesRequest
- func (c *RestClient) NewGetDepthRequest() *GetDepthRequest
- func (c *RestClient) NewGetFillsRequest() *GetFillsRequest
- func (c *RestClient) NewGetOpenOrdersRequest() *GetOpenOrdersRequest
- func (c *RestClient) NewGetOrderDetailRequest() *GetOrderDetailRequest
- func (c *RestClient) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
- func (c *RestClient) NewGetServerTimeRequest() *GetServerTimeRequest
- func (c *RestClient) NewGetSymbolsRequest() *GetSymbolsRequest
- func (c *RestClient) NewGetTickerRequest() *GetTickerRequest
- func (c *RestClient) NewPlaceOrderRequest() *PlaceOrderRequest
- type ServerTime
- type SideType
- type Symbol
- type Ticker
Constants ¶
const PrivateWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
const PublicWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
const RestBaseURL = "https://api.bitget.com"
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 AccountAsset ¶
type AccountAsset struct { CoinId int64 `json:"coinId"` CoinName string `json:"coinName"` Available fixedpoint.Value `json:"available"` Frozen fixedpoint.Value `json:"frozen"` Lock fixedpoint.Value `json:"lock"` UTime types.MillisecondTimestamp `json:"uTime"` }
type CancelOrderBySymbolRequest ¶
type CancelOrderBySymbolRequest struct {
// contains filtered or unexported fields
}
func (*CancelOrderBySymbolRequest) Do ¶
func (c *CancelOrderBySymbolRequest) Do(ctx context.Context) (*CancelOrderBySymbolResponse, error)
func (*CancelOrderBySymbolRequest) GetParameters ¶
func (c *CancelOrderBySymbolRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CancelOrderBySymbolRequest) GetParametersJSON ¶
func (c *CancelOrderBySymbolRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CancelOrderBySymbolRequest) GetParametersQuery ¶
func (c *CancelOrderBySymbolRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CancelOrderBySymbolRequest) GetQueryParameters ¶
func (c *CancelOrderBySymbolRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelOrderBySymbolRequest) GetSlugParameters ¶
func (c *CancelOrderBySymbolRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*CancelOrderBySymbolRequest) GetSlugsMap ¶
func (c *CancelOrderBySymbolRequest) GetSlugsMap() (map[string]string, error)
func (*CancelOrderBySymbolRequest) Symbol ¶
func (c *CancelOrderBySymbolRequest) Symbol(symbol string) *CancelOrderBySymbolRequest
type CancelOrderBySymbolResponse ¶
type CancelOrderBySymbolResponse string
type CancelOrderRequest ¶
type CancelOrderRequest struct {
// contains filtered or unexported fields
}
func (*CancelOrderRequest) ClientOrderId ¶
func (c *CancelOrderRequest) ClientOrderId(clientOrderId string) *CancelOrderRequest
func (*CancelOrderRequest) Do ¶
func (c *CancelOrderRequest) Do(ctx context.Context) (*CancelOrderResponse, error)
func (*CancelOrderRequest) GetParameters ¶
func (c *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CancelOrderRequest) GetParametersJSON ¶
func (c *CancelOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CancelOrderRequest) GetParametersQuery ¶
func (c *CancelOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CancelOrderRequest) GetQueryParameters ¶
func (c *CancelOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelOrderRequest) GetSlugParameters ¶
func (c *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 (c *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
func (*CancelOrderRequest) OrderId ¶
func (c *CancelOrderRequest) OrderId(orderId string) *CancelOrderRequest
func (*CancelOrderRequest) Symbol ¶
func (c *CancelOrderRequest) Symbol(symbol string) *CancelOrderRequest
type CancelOrderResponse ¶
type Candle ¶
type Candle struct { Open fixedpoint.Value `json:"open"` High fixedpoint.Value `json:"high"` Low fixedpoint.Value `json:"low"` Close fixedpoint.Value `json:"close"` QuoteVol fixedpoint.Value `json:"quoteVol"` BaseVol fixedpoint.Value `json:"baseVol"` UsdtVol fixedpoint.Value `json:"usdtVol"` Ts types.MillisecondTimestamp `json:"ts"` }
type Depth ¶
type Depth struct { Asks [][]fixedpoint.Value `json:"asks"` Bids [][]fixedpoint.Value `json:"bids"` Timestamp types.MillisecondTimestamp `json:"timestamp"` }
type Fill ¶
type Fill struct { AccountId types.StrInt64 `json:"accountId"` Symbol string `json:"symbol"` OrderId types.StrInt64 `json:"orderId"` FillId types.StrInt64 `json:"fillId"` OrderType OrderType `json:"orderType"` Side OrderSide `json:"side"` FillPrice fixedpoint.Value `json:"fillPrice"` FillQuantity fixedpoint.Value `json:"fillQuantity"` FillTotalAmount fixedpoint.Value `json:"fillTotalAmount"` CreationTime types.MillisecondTimestamp `json:"cTime"` FeeCurrency string `json:"feeCcy"` Fees fixedpoint.Value `json:"fees"` }
type GetAccountAssetsRequest ¶
type GetAccountAssetsRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountAssetsRequest) Do ¶
func (g *GetAccountAssetsRequest) Do(ctx context.Context) ([]AccountAsset, error)
func (*GetAccountAssetsRequest) GetParameters ¶
func (g *GetAccountAssetsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountAssetsRequest) GetParametersJSON ¶
func (g *GetAccountAssetsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountAssetsRequest) GetParametersQuery ¶
func (g *GetAccountAssetsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountAssetsRequest) GetQueryParameters ¶
func (g *GetAccountAssetsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountAssetsRequest) GetSlugParameters ¶
func (g *GetAccountAssetsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountAssetsRequest) GetSlugsMap ¶
func (g *GetAccountAssetsRequest) GetSlugsMap() (map[string]string, error)
type GetAccountRequest ¶
type GetAccountRequest struct {
// contains filtered or unexported fields
}
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) ([]Ticker, 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 GetCandlesRequest ¶
type GetCandlesRequest struct {
// contains filtered or unexported fields
}
func (*GetCandlesRequest) Do ¶
func (g *GetCandlesRequest) Do(ctx context.Context) ([]Candle, error)
func (*GetCandlesRequest) GetParameters ¶
func (g *GetCandlesRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetCandlesRequest) GetParametersJSON ¶
func (g *GetCandlesRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetCandlesRequest) GetParametersQuery ¶
func (g *GetCandlesRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetCandlesRequest) GetQueryParameters ¶
func (g *GetCandlesRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetCandlesRequest) GetSlugParameters ¶
func (g *GetCandlesRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetCandlesRequest) GetSlugsMap ¶
func (g *GetCandlesRequest) GetSlugsMap() (map[string]string, error)
type GetDepthRequest ¶
type GetDepthRequest struct {
// contains filtered or unexported fields
}
func (*GetDepthRequest) GetParameters ¶
func (g *GetDepthRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetDepthRequest) GetParametersJSON ¶
func (g *GetDepthRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetDepthRequest) GetParametersQuery ¶
func (g *GetDepthRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetDepthRequest) GetQueryParameters ¶
func (g *GetDepthRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetDepthRequest) GetSlugParameters ¶
func (g *GetDepthRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetDepthRequest) GetSlugsMap ¶
func (g *GetDepthRequest) GetSlugsMap() (map[string]string, error)
func (*GetDepthRequest) Limit ¶
func (g *GetDepthRequest) Limit(limit int) *GetDepthRequest
func (*GetDepthRequest) StepType ¶
func (g *GetDepthRequest) StepType(stepType string) *GetDepthRequest
func (*GetDepthRequest) Symbol ¶
func (g *GetDepthRequest) Symbol(symbol string) *GetDepthRequest
type GetFillsRequest ¶
type GetFillsRequest struct {
// contains filtered or unexported fields
}
func (*GetFillsRequest) After ¶
func (g *GetFillsRequest) After(after string) *GetFillsRequest
func (*GetFillsRequest) Before ¶
func (g *GetFillsRequest) Before(before string) *GetFillsRequest
func (*GetFillsRequest) Do ¶
func (g *GetFillsRequest) Do(ctx context.Context) (*types.MillisecondTimestamp, error)
func (*GetFillsRequest) GetParameters ¶
func (g *GetFillsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetFillsRequest) GetParametersJSON ¶
func (g *GetFillsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetFillsRequest) GetParametersQuery ¶
func (g *GetFillsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetFillsRequest) GetQueryParameters ¶
func (g *GetFillsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetFillsRequest) GetSlugParameters ¶
func (g *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 (g *GetFillsRequest) GetSlugsMap() (map[string]string, error)
func (*GetFillsRequest) Limit ¶
func (g *GetFillsRequest) Limit(limit string) *GetFillsRequest
type GetOpenOrdersRequest ¶
type GetOpenOrdersRequest struct {
// contains filtered or unexported fields
}
func (*GetOpenOrdersRequest) Do ¶
func (g *GetOpenOrdersRequest) Do(ctx context.Context) ([]OrderDetail, error)
func (*GetOpenOrdersRequest) GetParameters ¶
func (g *GetOpenOrdersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOpenOrdersRequest) GetParametersJSON ¶
func (g *GetOpenOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOpenOrdersRequest) GetParametersQuery ¶
func (g *GetOpenOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOpenOrdersRequest) GetQueryParameters ¶
func (g *GetOpenOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOpenOrdersRequest) GetSlugParameters ¶
func (g *GetOpenOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOpenOrdersRequest) GetSlugsMap ¶
func (g *GetOpenOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*GetOpenOrdersRequest) Symbol ¶
func (g *GetOpenOrdersRequest) Symbol(symbol string) *GetOpenOrdersRequest
type GetOrderDetailRequest ¶
type GetOrderDetailRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderDetailRequest) ClientOrderId ¶
func (g *GetOrderDetailRequest) ClientOrderId(clientOrderId string) *GetOrderDetailRequest
func (*GetOrderDetailRequest) Do ¶
func (g *GetOrderDetailRequest) Do(ctx context.Context) (*OrderDetail, error)
func (*GetOrderDetailRequest) GetParameters ¶
func (g *GetOrderDetailRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderDetailRequest) GetParametersJSON ¶
func (g *GetOrderDetailRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderDetailRequest) GetParametersQuery ¶
func (g *GetOrderDetailRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderDetailRequest) GetQueryParameters ¶
func (g *GetOrderDetailRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderDetailRequest) GetSlugParameters ¶
func (g *GetOrderDetailRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderDetailRequest) GetSlugsMap ¶
func (g *GetOrderDetailRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderDetailRequest) OrderId ¶
func (g *GetOrderDetailRequest) OrderId(orderId string) *GetOrderDetailRequest
func (*GetOrderDetailRequest) Symbol ¶
func (g *GetOrderDetailRequest) Symbol(symbol string) *GetOrderDetailRequest
type GetOrderHistoryRequest ¶
type GetOrderHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderHistoryRequest) After ¶
func (g *GetOrderHistoryRequest) After(after string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Before ¶
func (g *GetOrderHistoryRequest) Before(before string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Do ¶
func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]OrderDetail, error)
func (*GetOrderHistoryRequest) GetParameters ¶
func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetParametersJSON ¶
func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderHistoryRequest) GetParametersQuery ¶
func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderHistoryRequest) GetQueryParameters ¶
func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderHistoryRequest) GetSlugParameters ¶
func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetSlugsMap ¶
func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderHistoryRequest) Limit ¶
func (g *GetOrderHistoryRequest) Limit(limit string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Symbol ¶
func (g *GetOrderHistoryRequest) Symbol(symbol string) *GetOrderHistoryRequest
type GetServerTimeRequest ¶
type GetServerTimeRequest struct {
// contains filtered or unexported fields
}
func (*GetServerTimeRequest) Do ¶
func (g *GetServerTimeRequest) Do(ctx context.Context) (*types.MillisecondTimestamp, error)
func (*GetServerTimeRequest) GetParameters ¶
func (g *GetServerTimeRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetServerTimeRequest) GetParametersJSON ¶
func (g *GetServerTimeRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetServerTimeRequest) GetParametersQuery ¶
func (g *GetServerTimeRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetServerTimeRequest) GetQueryParameters ¶
func (g *GetServerTimeRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetServerTimeRequest) GetSlugParameters ¶
func (g *GetServerTimeRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetServerTimeRequest) GetSlugsMap ¶
func (g *GetServerTimeRequest) GetSlugsMap() (map[string]string, error)
type GetSymbolsRequest ¶
type GetSymbolsRequest struct {
// contains filtered or unexported fields
}
func (*GetSymbolsRequest) Do ¶
func (g *GetSymbolsRequest) Do(ctx context.Context) ([]Symbol, error)
func (*GetSymbolsRequest) GetParameters ¶
func (g *GetSymbolsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetSymbolsRequest) GetParametersJSON ¶
func (g *GetSymbolsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetSymbolsRequest) GetParametersQuery ¶
func (g *GetSymbolsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetSymbolsRequest) GetQueryParameters ¶
func (g *GetSymbolsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetSymbolsRequest) GetSlugParameters ¶
func (g *GetSymbolsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetSymbolsRequest) GetSlugsMap ¶
func (g *GetSymbolsRequest) 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 OrderDetail ¶
type OrderDetail struct { AccountId types.StrInt64 `json:"accountId"` Symbol string `json:"symbol"` OrderId types.StrInt64 `json:"orderId"` ClientOrderId string `json:"clientOrderId"` Price fixedpoint.Value `json:"price"` Quantity fixedpoint.Value `json:"quantity"` OrderType OrderType `json:"orderType"` Side OrderSide `json:"side"` Status OrderStatus `json:"status"` FillPrice fixedpoint.Value `json:"fillPrice"` FillQuantity fixedpoint.Value `json:"fillQuantity"` FillTotalAmount fixedpoint.Value `json:"fillTotalAmount"` EnterPointSource string `json:"enterPointSource"` CTime types.MillisecondTimestamp `json:"cTime"` }
type OrderForce ¶
type OrderForce string
const ( OrderForceGTC OrderForce = "normal" OrderForcePostOnly OrderForce = "post_only" OrderForceFOK OrderForce = "fok" OrderForceIOC OrderForce = "ioc" )
type OrderResponse ¶
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusInit OrderStatus = "init" OrderStatusNew OrderStatus = "new" OrderStatusPartialFill OrderStatus = "partial_fill" OrderStatusFullFill OrderStatus = "full_fill" OrderStatusCancelled OrderStatus = "cancelled" )
type PlaceOrderRequest ¶
type PlaceOrderRequest struct {
// contains filtered or unexported fields
}
func (*PlaceOrderRequest) ClientOrderId ¶
func (p *PlaceOrderRequest) ClientOrderId(clientOrderId string) *PlaceOrderRequest
func (*PlaceOrderRequest) Do ¶
func (p *PlaceOrderRequest) Do(ctx context.Context) (*OrderResponse, error)
func (*PlaceOrderRequest) Force ¶
func (p *PlaceOrderRequest) Force(force OrderForce) *PlaceOrderRequest
func (*PlaceOrderRequest) GetParameters ¶
func (p *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*PlaceOrderRequest) GetParametersJSON ¶
func (p *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*PlaceOrderRequest) GetParametersQuery ¶
func (p *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*PlaceOrderRequest) GetQueryParameters ¶
func (p *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*PlaceOrderRequest) GetSlugParameters ¶
func (p *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 (p *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
func (*PlaceOrderRequest) OrderType ¶
func (p *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
func (*PlaceOrderRequest) Price ¶
func (p *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
func (*PlaceOrderRequest) Quantity ¶
func (p *PlaceOrderRequest) Quantity(quantity string) *PlaceOrderRequest
func (*PlaceOrderRequest) Side ¶
func (p *PlaceOrderRequest) Side(side OrderSide) *PlaceOrderRequest
func (*PlaceOrderRequest) Symbol ¶
func (p *PlaceOrderRequest) Symbol(symbol string) *PlaceOrderRequest
type RestClient ¶
type RestClient struct { requestgen.BaseAPIClient // 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) NewCancelOrderBySymbolRequest ¶
func (c *RestClient) NewCancelOrderBySymbolRequest() *CancelOrderBySymbolRequest
func (*RestClient) NewCancelOrderRequest ¶
func (c *RestClient) NewCancelOrderRequest() *CancelOrderRequest
func (*RestClient) NewGetAccountAssetsRequest ¶
func (c *RestClient) NewGetAccountAssetsRequest() *GetAccountAssetsRequest
func (*RestClient) NewGetAccountRequest ¶
func (c *RestClient) NewGetAccountRequest() *GetAccountRequest
func (*RestClient) NewGetAllTickersRequest ¶
func (c *RestClient) NewGetAllTickersRequest() *GetAllTickersRequest
func (*RestClient) NewGetCandlesRequest ¶
func (c *RestClient) NewGetCandlesRequest() *GetCandlesRequest
func (*RestClient) NewGetDepthRequest ¶
func (c *RestClient) NewGetDepthRequest() *GetDepthRequest
func (*RestClient) NewGetFillsRequest ¶
func (c *RestClient) NewGetFillsRequest() *GetFillsRequest
func (*RestClient) NewGetOpenOrdersRequest ¶
func (c *RestClient) NewGetOpenOrdersRequest() *GetOpenOrdersRequest
func (*RestClient) NewGetOrderDetailRequest ¶
func (c *RestClient) NewGetOrderDetailRequest() *GetOrderDetailRequest
func (*RestClient) NewGetOrderHistoryRequest ¶
func (c *RestClient) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
func (*RestClient) NewGetServerTimeRequest ¶
func (c *RestClient) NewGetServerTimeRequest() *GetServerTimeRequest
func (*RestClient) NewGetSymbolsRequest ¶
func (c *RestClient) NewGetSymbolsRequest() *GetSymbolsRequest
func (*RestClient) NewGetTickerRequest ¶
func (c *RestClient) NewGetTickerRequest() *GetTickerRequest
func (*RestClient) NewPlaceOrderRequest ¶
func (c *RestClient) NewPlaceOrderRequest() *PlaceOrderRequest
type ServerTime ¶
type ServerTime = types.MillisecondTimestamp
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` SymbolName string `json:"symbolName"` BaseCoin string `json:"baseCoin"` QuoteCoin string `json:"quoteCoin"` MinTradeAmount fixedpoint.Value `json:"minTradeAmount"` MaxTradeAmount fixedpoint.Value `json:"maxTradeAmount"` TakerFeeRate fixedpoint.Value `json:"takerFeeRate"` MakerFeeRate fixedpoint.Value `json:"makerFeeRate"` PriceScale fixedpoint.Value `json:"priceScale"` QuantityScale fixedpoint.Value `json:"quantityScale"` MinTradeUSDT fixedpoint.Value `json:"minTradeUSDT"` Status string `json:"status"` BuyLimitPriceRatio fixedpoint.Value `json:"buyLimitPriceRatio"` SellLimitPriceRatio fixedpoint.Value `json:"sellLimitPriceRatio"` }
type Ticker ¶
type Ticker struct { Symbol string `json:"symbol"` High24H fixedpoint.Value `json:"high24h"` Low24H fixedpoint.Value `json:"low24h"` Close fixedpoint.Value `json:"close"` QuoteVol fixedpoint.Value `json:"quoteVol"` BaseVol fixedpoint.Value `json:"baseVol"` UsdtVol fixedpoint.Value `json:"usdtVol"` Ts types.MillisecondTimestamp `json:"ts"` BuyOne fixedpoint.Value `json:"buyOne"` SellOne fixedpoint.Value `json:"sellOne"` BidSz fixedpoint.Value `json:"bidSz"` AskSz fixedpoint.Value `json:"askSz"` OpenUtc0 fixedpoint.Value `json:"openUtc0"` ChangeUtc fixedpoint.Value `json:"changeUtc"` Change fixedpoint.Value `json:"change"` }
Source Files ¶
- cancel_order_by_symbol_request.go
- cancel_order_by_symbol_request_requestgen.go
- cancel_order_request.go
- cancel_order_request_requestgen.go
- client.go
- get_account_assets_request.go
- get_account_assets_request_requestgen.go
- get_account_request.go
- get_account_request_requestgen.go
- get_all_tickers_request.go
- get_all_tickers_request_requestgen.go
- get_candles_request.go
- get_candles_request_requestgen.go
- get_depth_request.go
- get_depth_request_requestgen.go
- get_fills_request.go
- get_fills_request_requestgen.go
- get_open_orders_request.go
- get_open_orders_request_requestgen.go
- get_order_detail_request.go
- get_order_detail_request_requestgen.go
- get_order_history_request.go
- get_order_history_request_requestgen.go
- get_server_time_request.go
- get_server_time_request_requestgen.go
- get_symbols_request.go
- get_symbols_request_requestgen.go
- get_ticker_request.go
- get_ticker_request_requestgen.go
- place_order_request.go
- place_order_request_requestgen.go
- types.go