Versions in this module Expand all Collapse all v0 v0.0.3 Oct 1, 2024 v0.0.2 Jun 16, 2023 Changes in this version + const ACCEPT + const APPLICATION_JSON + const APPLICATION_JSON_UTF8 + const CONTENT_TYPE + const ENDPOINT + var GATE_PLACE_TYPE_CONVERTER = map[PlaceType]string + var GATE_PLACE_TYPE_REVERTER = map[string]PlaceType + type Gate struct + Spot *Spot + Swap *Swap + func New(config *APIConfig) *Gate + func (*Gate) GetExchangeName() string + func (gate *Gate) DoRequest(httpMethod, uri, rawQuery string, reqBody string, response interface{}) ([]byte, error) + func (gate *Gate) DoSignRequest(httpMethod, uri, rawQuery string, reqBody string, response interface{}) ([]byte, error) + type Spot struct + func (spot *Spot) CancelOrder(order *Order) ([]byte, error) + func (spot *Spot) GetAccount() (*Account, []byte, error) + func (spot *Spot) GetDepth(pair Pair, size int) (*Depth, []byte, error) + func (spot *Spot) GetExchangeRule(pair Pair) (*Rule, []byte, error) + func (spot *Spot) GetKlineRecords(pair Pair, period, size, since int) ([]*Kline, []byte, error) + func (spot *Spot) GetOHLCs(symbol string, period, size, since int) ([]*OHLC, []byte, error) + func (spot *Spot) GetOrder(order *Order) ([]byte, error) + func (spot *Spot) GetOrders(pair Pair) ([]*Order, error) + func (spot *Spot) GetTicker(pair Pair) (*Ticker, []byte, error) + func (spot *Spot) GetTrades(pair Pair, since int64) ([]*Trade, error) + func (spot *Spot) GetUnFinishOrders(pair Pair) ([]*Order, []byte, error) + func (spot *Spot) KeepAlive() + func (spot *Spot) PlaceOrder(order *Order) ([]byte, error) + type Swap struct + func (swap *Swap) AddMargin(pair Pair, openType FutureType, marginAmount float64) ([]byte, error) + func (swap *Swap) CancelOrder(order *SwapOrder) ([]byte, error) + func (swap *Swap) GetAccount() (*SwapAccount, []byte, error) + func (swap *Swap) GetAccountFlow() ([]*SwapAccountItem, []byte, error) + func (swap *Swap) GetContract(pair Pair) *SwapContract + func (swap *Swap) GetDepth(pair Pair, size int) (*SwapDepth, []byte, error) + func (swap *Swap) GetFundingFee(pair Pair) (float64, error) + func (swap *Swap) GetFundingFees(pair Pair) ([][]interface{}, []byte, error) + func (swap *Swap) GetKline(pair Pair, period, size, since int) ([]*SwapKline, []byte, error) + func (swap *Swap) GetLimit(pair Pair) (float64, float64, error) + func (swap *Swap) GetOpenAmount(pair Pair) (float64, int64, []byte, error) + func (swap *Swap) GetOrder(order *SwapOrder) ([]byte, error) + func (swap *Swap) GetOrders(pair Pair) ([]*SwapOrder, []byte, error) + func (swap *Swap) GetPosition(pair Pair, openType FutureType) (*SwapPosition, []byte, error) + func (swap *Swap) GetTicker(pair Pair) (*SwapTicker, []byte, error) + func (swap *Swap) GetUnFinishOrders(pair Pair) ([]*SwapOrder, []byte, error) + func (swap *Swap) KeepAlive() + func (swap *Swap) PlaceOrder(order *SwapOrder) ([]byte, error) + func (swap *Swap) ReduceMargin(pair Pair, openType FutureType, marginAmount float64) ([]byte, error) + type SwapOrderGate struct + Close bool + Contract string + CreateTime int64 + FillPrice float64 + FinishAt string + FinishTime int64 + Id int64 + IsReduceOnly bool + Left int64 + Price float64 + ReduceOnly bool + Size int64 + Status string + Text string + Tif string + User int64 + func (sog *SwapOrderGate) Merge(order *SwapOrder) + func (sog *SwapOrderGate) New(loc *time.Location) *SwapOrder