bitgetapi

package
v0.0.0-...-ce66ebf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const PrivateWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
View Source
const PublicWebSocketURL = "wss://ws.bitget.com/spot/v1/stream"
View Source
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 Account

type Account struct {
	UserId      types.StrInt64 `json:"user_id"`
	InviterId   types.StrInt64 `json:"inviter_id"`
	Ips         string         `json:"ips"`
	Authorities []string       `json:"authorities"`
	ParentId    types.StrInt64 `json:"parentId"`
	Trader      bool           `json:"trader"`
}

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 (*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

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 (*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 CancelOrderResponse struct {
	OrderId       string `json:"orderId"`
	ClientOrderId string `json:"clientOrderId"`
}

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 (*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 (*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 (*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) Do

func (g *GetDepthRequest) Do(ctx context.Context) (*Depth, error)

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 (*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 (*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

type GetOrderDetailRequest

type GetOrderDetailRequest struct {
	// contains filtered or unexported fields
}

func (*GetOrderDetailRequest) ClientOrderId

func (g *GetOrderDetailRequest) ClientOrderId(clientOrderId string) *GetOrderDetailRequest

func (*GetOrderDetailRequest) Do

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

type GetOrderHistoryRequest

type GetOrderHistoryRequest struct {
	// contains filtered or unexported fields
}

func (*GetOrderHistoryRequest) After

func (*GetOrderHistoryRequest) Before

func (*GetOrderHistoryRequest) Do

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 (*GetOrderHistoryRequest) Symbol

type GetServerTimeRequest

type GetServerTimeRequest struct {
	// contains filtered or unexported fields
}

func (*GetServerTimeRequest) Do

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) Do

func (g *GetTickerRequest) Do(ctx context.Context) (*Ticker, error)

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 OrderResponse struct {
	OrderId       string `json:"orderId"`
	ClientOrderId string `json:"clientOrderId"`
}

type OrderSide

type OrderSide string
const (
	OrderSideBuy  OrderSide = "buy"
	OrderSideSell OrderSide = "sell"
)

type OrderStatus

type OrderStatus string
const (
	OrderStatusInit        OrderStatus = "init"
	OrderStatusNew         OrderStatus = "new"
	OrderStatusPartialFill OrderStatus = "partial_fill"
	OrderStatusFullFill    OrderStatus = "full_fill"
	OrderStatusCancelled   OrderStatus = "cancelled"
)

type OrderType

type OrderType string
const (
	OrderTypeLimit  OrderType = "limit"
	OrderTypeMarket OrderType = "market"
)

type PlaceOrderRequest

type PlaceOrderRequest struct {
	// contains filtered or unexported fields
}

func (*PlaceOrderRequest) ClientOrderId

func (p *PlaceOrderRequest) ClientOrderId(clientOrderId string) *PlaceOrderRequest

func (*PlaceOrderRequest) Do

func (*PlaceOrderRequest) Force

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 (*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 SideType

type SideType string
const (
	SideTypeBuy  SideType = "buy"
	SideTypeSell SideType = "sell"
)

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL