Documentation ¶
Index ¶
- func PrepareQueryParams(params interface{}) (map[string]string, error)
- type Account
- type Client
- type Converts
- type Fills
- type Futures
- func (f *Futures) GetExpiredFutures() ([]*models.FutureExpired, error)
- func (f *Futures) GetFundingRates(params *models.GetFundingRatesParams) ([]*models.FundingRate, error)
- func (f *Futures) GetFuture(name string) (*models.Future, error)
- func (f *Futures) GetFutureStats(name string) (*models.FutureStats, error)
- func (f *Futures) GetFutures() ([]*models.Future, error)
- func (f *Futures) GetHistoricalIndex(market string, params *models.GetHistoricalIndexParams) ([]*models.HistoricalIndex, error)
- func (f *Futures) GetIndexWeights(indexName string) (map[string]decimal.Decimal, error)
- type Markets
- func (m *Markets) GetHistoricalPrices(marketName string, params *models.GetHistoricalPricesParams) ([]*models.HistoricalPrice, error)
- func (m *Markets) GetMarketByName(name string) (*models.Market, error)
- func (m *Markets) GetMarkets() ([]*models.Market, error)
- func (m *Markets) GetOrderBook(marketName string, depth *int) (*models.OrderBook, error)
- func (m *Markets) GetTrades(marketName string, params *models.GetTradesParams) ([]*models.Trade, error)
- type Option
- type Orders
- func (o *Orders) CancelAllOrders(payload *models.CancelAllOrdersPayload) error
- func (o *Orders) CancelOpenTriggerOrder(triggerOrderID int64) error
- func (o *Orders) CancelOrder(orderID int64) error
- func (o *Orders) CancelOrderByClientID(clientOrderID int64) error
- func (o *Orders) GetOpenOrders(market string) ([]*models.Order, error)
- func (o *Orders) GetOpenTriggerOrders(params *models.GetOpenTriggerOrdersParams) ([]*models.TriggerOrder, error)
- func (o *Orders) GetOrder(orderID int64) (*models.Order, error)
- func (o *Orders) GetOrderByClientID(clientOrderID int64) (*models.Order, error)
- func (o *Orders) GetOrderTriggers(orderID int64) ([]*models.Trigger, error)
- func (o *Orders) GetOrdersHistory(params *models.GetOrdersHistoryParams) ([]*models.Order, error)
- func (o *Orders) GetTriggerOrdersHistory(params *models.GetTriggerOrdersHistoryParams) ([]*models.TriggerOrder, error)
- func (o *Orders) ModifyOrder(payload *models.ModifyOrderPayload, orderID int64) (*models.Order, error)
- func (o *Orders) ModifyOrderByClientID(payload *models.ModifyOrderPayload, clientOrderID int64) (*models.Order, error)
- func (o *Orders) ModifyTriggerOrder(payload *models.ModifyTriggerOrderPayload, orderID int64) (*models.TriggerOrder, error)
- func (o *Orders) PlaceOrder(payload *models.PlaceOrderPayload) (*models.Order, error)
- func (o *Orders) PlaceTriggerOrder(payload *models.PlaceTriggerOrderPayload) (*models.TriggerOrder, error)
- type Request
- type Response
- type SpotMargin
- func (s *SpotMargin) GetBorrowHistory() ([]*models.BorrowHistory, error)
- func (s *SpotMargin) GetBorrowRates() ([]*models.BorrowRate, error)
- func (s *SpotMargin) GetDailyBorrowedAmounts() ([]*models.BorrowSummary, error)
- func (s *SpotMargin) GetLendingHistory() ([]*models.LendingHistory, error)
- func (s *SpotMargin) GetLendingInfo() ([]*models.LendingInfo, error)
- func (s *SpotMargin) GetLendingOffers() ([]*models.LendingOffer, error)
- func (s *SpotMargin) GetLendingRates() ([]*models.LendingRate, error)
- func (s *SpotMargin) GetMarketInfo(market string) ([]*models.GetSpotMarginMarketInfoResponse, error)
- func (s *SpotMargin) SubmitLendingOffer(payload *models.LendingOfferPayload) error
- type Stream
- func (s *Stream) SetDebugMode(isDebugMode bool)
- func (s *Stream) SetReconnectionCount(count int)
- func (s *Stream) SetReconnectionInterval(interval time.Duration)
- func (s *Stream) SetStreamTimeout(timeout time.Duration)
- func (s *Stream) SubscribeToFills(ctx context.Context) (chan *models.FillResponse, error)
- func (s *Stream) SubscribeToMarkets(ctx context.Context) (chan *models.Market, error)
- func (s *Stream) SubscribeToOrderBooks(ctx context.Context, symbols ...string) (chan *models.OrderBookResponse, error)
- func (s *Stream) SubscribeToOrders(ctx context.Context) (chan *models.OrderResponse, error)
- func (s *Stream) SubscribeToTickers(ctx context.Context, symbols ...string) (chan *models.TickerResponse, error)
- func (s *Stream) SubscribeToTrades(ctx context.Context, symbols ...string) (chan *models.TradeResponse, error)
- type SubAccounts
- func (s *SubAccounts) ChangeSubaccount(nickname, newNickname string) error
- func (s *SubAccounts) CreateSubaccount(nickname string) (*models.SubAccount, error)
- func (s *SubAccounts) DeleteSubaccount(nickname string) error
- func (s *SubAccounts) GetSubaccountBalances(nickname string) ([]*models.Balance, error)
- func (s *SubAccounts) GetSubaccounts() ([]*models.SubAccount, error)
- func (s *SubAccounts) Transfer(payload *models.TransferPayload) (*models.TransferResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareQueryParams ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) ChangeAccountLeverage ¶
func (*Account) GetAccountInformation ¶
func (a *Account) GetAccountInformation() (*models.AccountInformation, error)
type Client ¶
type Client struct { SubAccounts Markets Account Stream Orders Fills Converts Futures SpotMargin // contains filtered or unexported fields }
func (*Client) SetServerTimeDiff ¶
type Converts ¶
type Converts struct {
// contains filtered or unexported fields
}
func (*Converts) AcceptQuote ¶
func (*Converts) CreateQuote ¶
func (c *Converts) CreateQuote(payload *models.CreateQuotePayload) (int64, error)
type Futures ¶
type Futures struct {
// contains filtered or unexported fields
}
func (*Futures) GetExpiredFutures ¶
func (f *Futures) GetExpiredFutures() ([]*models.FutureExpired, error)
func (*Futures) GetFundingRates ¶
func (f *Futures) GetFundingRates(params *models.GetFundingRatesParams) ([]*models.FundingRate, error)
func (*Futures) GetFutureStats ¶
func (f *Futures) GetFutureStats(name string) (*models.FutureStats, error)
func (*Futures) GetHistoricalIndex ¶
func (f *Futures) GetHistoricalIndex(market string, params *models.GetHistoricalIndexParams) ([]*models.HistoricalIndex, error)
type Markets ¶
type Markets struct {
// contains filtered or unexported fields
}
func (*Markets) GetHistoricalPrices ¶
func (m *Markets) GetHistoricalPrices(marketName string, params *models.GetHistoricalPricesParams) ([]*models.HistoricalPrice, error)
func (*Markets) GetMarketByName ¶
func (*Markets) GetOrderBook ¶
type Orders ¶
type Orders struct {
// contains filtered or unexported fields
}
func (*Orders) CancelAllOrders ¶
func (o *Orders) CancelAllOrders(payload *models.CancelAllOrdersPayload) error
func (*Orders) CancelOpenTriggerOrder ¶
func (*Orders) CancelOrder ¶
func (*Orders) CancelOrderByClientID ¶
func (*Orders) GetOpenOrders ¶
func (*Orders) GetOpenTriggerOrders ¶
func (o *Orders) GetOpenTriggerOrders(params *models.GetOpenTriggerOrdersParams) ([]*models.TriggerOrder, error)
func (*Orders) GetOrderByClientID ¶
func (*Orders) GetOrderTriggers ¶
func (*Orders) GetOrdersHistory ¶
func (*Orders) GetTriggerOrdersHistory ¶
func (o *Orders) GetTriggerOrdersHistory(params *models.GetTriggerOrdersHistoryParams) ([]*models.TriggerOrder, error)
func (*Orders) ModifyOrder ¶
func (*Orders) ModifyOrderByClientID ¶
func (*Orders) ModifyTriggerOrder ¶
func (o *Orders) ModifyTriggerOrder(payload *models.ModifyTriggerOrderPayload, orderID int64) (*models.TriggerOrder, error)
func (*Orders) PlaceOrder ¶
func (*Orders) PlaceTriggerOrder ¶
func (o *Orders) PlaceTriggerOrder(payload *models.PlaceTriggerOrderPayload) (*models.TriggerOrder, error)
type Response ¶
type Response struct { Success bool `json:"success"` Result json.RawMessage `json:"result"` Error string `json:"error,omitempty"` }
type SpotMargin ¶
type SpotMargin struct {
// contains filtered or unexported fields
}
func (*SpotMargin) GetBorrowHistory ¶
func (s *SpotMargin) GetBorrowHistory() ([]*models.BorrowHistory, error)
func (*SpotMargin) GetBorrowRates ¶
func (s *SpotMargin) GetBorrowRates() ([]*models.BorrowRate, error)
func (*SpotMargin) GetDailyBorrowedAmounts ¶
func (s *SpotMargin) GetDailyBorrowedAmounts() ([]*models.BorrowSummary, error)
func (*SpotMargin) GetLendingHistory ¶
func (s *SpotMargin) GetLendingHistory() ([]*models.LendingHistory, error)
func (*SpotMargin) GetLendingInfo ¶
func (s *SpotMargin) GetLendingInfo() ([]*models.LendingInfo, error)
func (*SpotMargin) GetLendingOffers ¶
func (s *SpotMargin) GetLendingOffers() ([]*models.LendingOffer, error)
func (*SpotMargin) GetLendingRates ¶
func (s *SpotMargin) GetLendingRates() ([]*models.LendingRate, error)
func (*SpotMargin) GetMarketInfo ¶
func (s *SpotMargin) GetMarketInfo(market string) ([]*models.GetSpotMarginMarketInfoResponse, error)
func (*SpotMargin) SubmitLendingOffer ¶
func (s *SpotMargin) SubmitLendingOffer(payload *models.LendingOfferPayload) error
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) SetDebugMode ¶
func (*Stream) SetReconnectionCount ¶
func (*Stream) SetReconnectionInterval ¶
func (*Stream) SetStreamTimeout ¶
func (*Stream) SubscribeToFills ¶
func (*Stream) SubscribeToMarkets ¶
func (*Stream) SubscribeToOrderBooks ¶
func (s *Stream) SubscribeToOrderBooks(ctx context.Context, symbols ...string) (chan *models.OrderBookResponse, error)
nolint: dupl
func (*Stream) SubscribeToOrders ¶
func (*Stream) SubscribeToTickers ¶
func (s *Stream) SubscribeToTickers(ctx context.Context, symbols ...string) (chan *models.TickerResponse, error)
nolint: dupl
func (*Stream) SubscribeToTrades ¶
type SubAccounts ¶
type SubAccounts struct {
// contains filtered or unexported fields
}
func (*SubAccounts) ChangeSubaccount ¶
func (s *SubAccounts) ChangeSubaccount(nickname, newNickname string) error
func (*SubAccounts) CreateSubaccount ¶
func (s *SubAccounts) CreateSubaccount(nickname string) (*models.SubAccount, error)
func (*SubAccounts) DeleteSubaccount ¶
func (s *SubAccounts) DeleteSubaccount(nickname string) error
func (*SubAccounts) GetSubaccountBalances ¶
func (s *SubAccounts) GetSubaccountBalances(nickname string) ([]*models.Balance, error)
func (*SubAccounts) GetSubaccounts ¶
func (s *SubAccounts) GetSubaccounts() ([]*models.SubAccount, error)
func (*SubAccounts) Transfer ¶
func (s *SubAccounts) Transfer(payload *models.TransferPayload) (*models.TransferResponse, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.