Documentation ¶
Index ¶
- type APIBaseResponse
- type Announcement
- type AnnouncementsResponse
- type ApiResponse
- type DeliveryPrice
- type DeliveryPriceItem
- type FundingRateHistory
- type FundingRateHistoryItem
- type HistoricalVolatility
- type HistoricalVolatilityItem
- type InstrumentInfo
- type InstrumentsInfoResponse
- type Insurance
- type InsuranceItem
- type KlineRequest
- type KlineResponse
- type KlineResult
- type Market
- type OpenHistory
- type OpenHistoryItem
- type OrderBook
- type OrderBookResult
- type ResendTrade
- type ResendTradeItem
- type RiskLimit
- type RiskLimitResult
- type ServerTimeResponse
- type ServerTimeResult
- type TickerInfo
- type TickerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIBaseResponse ¶
type Announcement ¶
type Announcement struct { Total int `json:"total"` List []struct { Title string `json:"title"` Description string `json:"description"` Type struct { Title string `json:"title"` Key string `json:"key"` } `json:"type"` Tags []string `json:"tags"` Url string `json:"url"` DateTimestamp int64 `json:"dateTimestamp"` StartDateTimestamp int64 `json:"startDateTimestamp"` EndDateTimestamp int64 `json:"endDateTimestamp"` } `json:"list"` }
type AnnouncementsResponse ¶
type AnnouncementsResponse struct { APIBaseResponse Result Announcement `json:"result"` }
type ApiResponse ¶
type DeliveryPrice ¶
type DeliveryPrice struct { ApiResponse Result struct { Category string `json:"category"` NextPageCursor string `json:"nextPageCursor"` List []DeliveryPriceItem `json:"list"` } `json:"result"` }
type DeliveryPriceItem ¶
type FundingRateHistory ¶
type FundingRateHistory struct { ApiResponse Result struct { Category string `json:"category"` List []FundingRateHistoryItem `json:"list"` } `json:"result"` }
type FundingRateHistoryItem ¶
type HistoricalVolatility ¶
type HistoricalVolatility struct { ApiResponse Result []HistoricalVolatilityItem `json:"result"` }
type InstrumentInfo ¶
type InstrumentInfo struct { Symbol string `json:"symbol"` ContractType string `json:"contractType"` Status string `json:"status"` BaseCoin string `json:"baseCoin"` QuoteCoin string `json:"quoteCoin"` LaunchTime string `json:"launchTime"` DeliveryTime string `json:"deliveryTime"` DeliveryFeeRate string `json:"deliveryFeeRate"` PriceScale string `json:"priceScale"` LeverageFilter struct { MinLeverage string `json:"minLeverage"` MaxLeverage string `json:"maxLeverage"` LeverageStep string `json:"leverageStep"` } `json:"leverageFilter"` PriceFilter struct { MinPrice string `json:"minPrice"` MaxPrice string `json:"maxPrice"` TickSize string `json:"tickSize"` } `json:"priceFilter"` LotSizeFilter struct { MaxOrderQty string `json:"maxOrderQty"` MinOrderQty string `json:"minOrderQty"` MaxMktOrderQty string `json:"maxMktOrderQty"` QtyStep string `json:"qtyStep"` PostOnlyMaxOrderQty string `json:"postOnlyMaxOrderQty"` } `json:"lotSizeFilter"` UnifiedMarginTrade bool `json:"unifiedMarginTrade"` FundingInterval int `json:"fundingInterval"` SettleCoin string `json:"settleCoin"` }
type InstrumentsInfoResponse ¶
type InstrumentsInfoResponse struct { APIBaseResponse Result struct { Category string `json:"category"` List []InstrumentInfo `json:"list"` NextPageCursor string `json:"nextPageCursor"` } `json:"result"` }
type Insurance ¶
type Insurance struct { ApiResponse Result struct { UpdatedTime string `json:"updatedTime"` List []InsuranceItem `json:"list"` } `json:"result"` }
type InsuranceItem ¶
type KlineRequest ¶
type KlineRequest struct { Category string `json:"category,omitempty"` // Optional: 'spot', 'linear', 'inverse'. Defaults to 'linear' if not specified. Symbol string `json:"symbol"` // Required: Symbol name. Interval string `json:"interval"` // Required: Kline interval. Accepts '1', '3', '5', '15', '30', '60', '120', '240', '360', '720', 'D', 'M', 'W'. Start *int64 `json:"start,omitempty"` // Optional: The start timestamp in milliseconds. End *int64 `json:"end,omitempty"` // Optional: The end timestamp in milliseconds. Limit *int `json:"limit,omitempty"` // Optional: Limit the number of klines returned. }
KlineRequest represents a request for querying historical klines
type KlineResponse ¶
type KlineResponse struct { ApiResponse Result KlineResult `json:"result"` }
type KlineResult ¶
type Market ¶
type Market interface { ServerTime(params *client.Params) (*ServerTimeResponse, error) Kline(params *client.Params) (*KlineResponse, error) Announcement(params *client.Params) (*AnnouncementsResponse, error) MarkPriceKline(params *client.Params) (*KlineResponse, error) IndexPriceKline(params *client.Params) (*KlineResponse, error) PremiumIndexKline(params *client.Params) (*KlineResponse, error) OrderBook(params *client.Params) (*OrderBook, error) InstrumentsInfo(params *client.Params) (*InstrumentsInfoResponse, error) Tickers(params *client.Params) (*TickerResponse, error) FundingHistory(params *client.Params) (*FundingRateHistory, error) RiskLimit(params *client.Params) (*RiskLimit, error) OpenInterest(params *client.Params) (*OpenHistory, error) Insurance(params *client.Params) (*Insurance, error) RecentTrade(params *client.Params) (*ResendTrade, error) DeliveryPrice(params *client.Params) (*DeliveryPrice, error) HistoricalVolatility(params *client.Params) (*HistoricalVolatility, error) }
type OpenHistory ¶
type OpenHistory struct { ApiResponse Result struct { Symbol string `json:"symbol"` Category string `json:"category"` List []OpenHistoryItem `json:"list"` NextPageCursor string `json:"nextPageCursor"` } `json:"result"` }
type OpenHistoryItem ¶
type OrderBook ¶
type OrderBook struct { ApiResponse Result OrderBookResult `json:"result"` }
type OrderBookResult ¶
type ResendTrade ¶
type ResendTrade struct { ApiResponse Result struct { Category string `json:"category"` List []ResendTradeItem `json:"list"` } `json:"result"` }
type ResendTradeItem ¶
type RiskLimit ¶
type RiskLimit struct { ApiResponse Result RiskLimitResult `json:"result"` }
type RiskLimitResult ¶
type RiskLimitResult struct { Category string `json:"category"` List []interface{} `json:"list"` }
type ServerTimeResponse ¶
type ServerTimeResponse struct { ApiResponse Result ServerTimeResult `json:"result"` }
type ServerTimeResult ¶
type TickerInfo ¶
type TickerInfo struct { Symbol string `json:"symbol"` LastPrice string `json:"lastPrice"` IndexPrice string `json:"indexPrice"` MarkPrice string `json:"markPrice"` PrevPrice24H string `json:"prevPrice24h"` Price24HPcnt string `json:"price24hPcnt"` HighPrice24H string `json:"highPrice24h"` LowPrice24H string `json:"lowPrice24h"` PrevPrice1H string `json:"prevPrice1h"` OpenInterest string `json:"openInterest"` OpenInterestValue string `json:"openInterestValue"` Turnover24H string `json:"turnover24h"` Volume24H string `json:"volume24h"` FundingRate string `json:"fundingRate"` NextFundingTime string `json:"nextFundingTime"` PredictedDeliveryPrice string `json:"predictedDeliveryPrice"` BasisRate string `json:"basisRate"` DeliveryFeeRate string `json:"deliveryFeeRate"` DeliveryTime string `json:"deliveryTime"` Ask1Size string `json:"ask1Size"` Bid1Price string `json:"bid1Price"` Ask1Price string `json:"ask1Price"` Bid1Size string `json:"bid1Size"` Basis string `json:"basis"` }
type TickerResponse ¶
type TickerResponse struct { APIBaseResponse Result struct { Category string `json:"category"` List []TickerInfo `json:"list"` } `json:"result"` }
Click to show internal directories.
Click to hide internal directories.