Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) CancelAllOrders(ctx context.Context, symbol string) error
- func (a *Adapter) CancelOrder(ctx context.Context, orderID, symbol string) error
- func (a *Adapter) Close() error
- func (a *Adapter) ExtractSymbol(symbol string) string
- func (a *Adapter) FetchAccount(ctx context.Context) (*exchanges.Account, error)
- func (a *Adapter) FetchAllFundingRates(ctx context.Context) ([]exchanges.FundingRate, error)
- func (a *Adapter) FetchBalance(ctx context.Context) (decimal.Decimal, error)
- func (a *Adapter) FetchFeeRate(ctx context.Context, symbol string) (*exchanges.FeeRate, error)
- func (a *Adapter) FetchFundingRate(ctx context.Context, symbol string) (*exchanges.FundingRate, error)
- func (a *Adapter) FetchKlines(ctx context.Context, symbol string, interval exchanges.Interval, ...) ([]exchanges.Kline, error)
- func (a *Adapter) FetchOpenOrders(ctx context.Context, symbol string) ([]exchanges.Order, error)
- func (a *Adapter) FetchOrder(ctx context.Context, orderID, symbol string) (*exchanges.Order, error)
- func (a *Adapter) FetchOrderBook(ctx context.Context, symbol string, limit int) (*exchanges.OrderBook, error)
- func (a *Adapter) FetchPositions(ctx context.Context) ([]exchanges.Position, error)
- func (a *Adapter) FetchSymbolDetails(ctx context.Context, symbol string) (*exchanges.SymbolDetails, error)
- func (a *Adapter) FetchTicker(ctx context.Context, symbol string) (*exchanges.Ticker, error)
- func (a *Adapter) FetchTrades(ctx context.Context, symbol string, limit int) ([]exchanges.Trade, error)
- func (a *Adapter) FormatSymbol(symbol string) string
- func (a *Adapter) GetLocalOrderBook(symbol string, depth int) *exchanges.OrderBook
- func (a *Adapter) IsConnected(ctx context.Context) (bool, error)
- func (a *Adapter) ModifyOrder(ctx context.Context, orderID, symbol string, ...) (*exchanges.Order, error)
- func (a *Adapter) PlaceOrder(ctx context.Context, params *exchanges.OrderParams) (*exchanges.Order, error)
- func (a *Adapter) RefreshSymbolDetails(ctx context.Context) error
- func (a *Adapter) SetLeverage(ctx context.Context, symbol string, leverage int) error
- func (a *Adapter) StopWatchKlines(ctx context.Context, symbol string, interval exchanges.Interval) error
- func (a *Adapter) StopWatchOrderBook(ctx context.Context, symbol string) error
- func (a *Adapter) StopWatchOrders(ctx context.Context) error
- func (a *Adapter) StopWatchPositions(ctx context.Context) error
- func (a *Adapter) StopWatchTicker(ctx context.Context, symbol string) error
- func (a *Adapter) StopWatchTrades(ctx context.Context, symbol string) error
- func (a *Adapter) WatchKlines(ctx context.Context, symbol string, interval exchanges.Interval, ...) error
- func (a *Adapter) WatchOrderBook(ctx context.Context, symbol string, callback exchanges.OrderBookCallback) error
- func (a *Adapter) WatchOrders(ctx context.Context, callback exchanges.OrderUpdateCallback) error
- func (a *Adapter) WatchPositions(ctx context.Context, callback exchanges.PositionUpdateCallback) error
- func (a *Adapter) WatchTicker(ctx context.Context, symbol string, callback exchanges.TickerCallback) error
- func (a *Adapter) WatchTrades(ctx context.Context, symbol string, callback exchanges.TradeCallback) error
- func (a *Adapter) WsAccountConnected(ctx context.Context) error
- func (a *Adapter) WsMarketConnected(ctx context.Context) error
- func (a *Adapter) WsOrderConnected(ctx context.Context) error
- type Options
- type OrderBook
- func (ob *OrderBook) GetBestAsk() (decimal.Decimal, decimal.Decimal)
- func (ob *OrderBook) GetBestBid() (decimal.Decimal, decimal.Decimal)
- func (ob *OrderBook) GetDepth(limit int) ([]exchanges.Level, []exchanges.Level)
- func (ob *OrderBook) IsInitialized() bool
- func (ob *OrderBook) ProcessPerpUpdate(e *perp.WsDepthEvent)
- func (ob *OrderBook) ProcessSpotUpdate(e *spot.WsDepthEvent)
- func (ob *OrderBook) Timestamp() int64
- func (ob *OrderBook) ToAdapterOrderBook(depth int) *exchanges.OrderBook
- func (ob *OrderBook) WaitReady(ctx context.Context, timeout time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
*exchanges.BaseAdapter
// contains filtered or unexported fields
}
func NewAdapter ¶
NewAdapter creates a new EdgeX adapter APIKey -> AccountID SecretKey -> StarkPrivateKey
func (*Adapter) CancelAllOrders ¶
func (*Adapter) CancelOrder ¶
func (*Adapter) ExtractSymbol ¶
func (*Adapter) FetchAccount ¶
func (*Adapter) FetchAllFundingRates ¶
GetAllFundingRates retrieves funding rates for all perpetual symbols
func (*Adapter) FetchBalance ¶
func (*Adapter) FetchFeeRate ¶
func (*Adapter) FetchFundingRate ¶
func (a *Adapter) FetchFundingRate(ctx context.Context, symbol string) (*exchanges.FundingRate, error)
GetFundingRate retrieves funding rate for a symbol
func (*Adapter) FetchKlines ¶
func (*Adapter) FetchOpenOrders ¶
func (*Adapter) FetchOrder ¶
func (*Adapter) FetchOrderBook ¶
func (*Adapter) FetchPositions ¶
func (*Adapter) FetchSymbolDetails ¶
func (*Adapter) FetchTicker ¶
func (*Adapter) FetchTrades ¶
func (*Adapter) FormatSymbol ¶
func (*Adapter) GetLocalOrderBook ¶
GetLocalOrderBook get local orderbook
func (*Adapter) ModifyOrder ¶
func (*Adapter) PlaceOrder ¶
func (*Adapter) RefreshSymbolDetails ¶
func (*Adapter) SetLeverage ¶
func (*Adapter) StopWatchKlines ¶
func (*Adapter) StopWatchOrderBook ¶
func (*Adapter) StopWatchPositions ¶
func (*Adapter) StopWatchTicker ¶
func (*Adapter) StopWatchTrades ¶
func (*Adapter) WatchKlines ¶
func (*Adapter) WatchOrderBook ¶
func (*Adapter) WatchOrders ¶
func (*Adapter) WatchPositions ¶
func (*Adapter) WatchTicker ¶
func (*Adapter) WatchTrades ¶
func (*Adapter) WsAccountConnected ¶
type Options ¶
type Options struct {
PrivateKey string
AccountID string
QuoteCurrency exchanges.QuoteCurrency // "USDC" (only supported, contracts use USD format internally)
Logger exchanges.Logger
}
Options configures an EdgeX adapter.
type OrderBook ¶
func NewOrderBook ¶
func (*OrderBook) IsInitialized ¶
func (*OrderBook) ProcessPerpUpdate ¶
func (ob *OrderBook) ProcessPerpUpdate(e *perp.WsDepthEvent)
ProcessPerpUpdate processes perp depth event
func (*OrderBook) ProcessSpotUpdate ¶
func (ob *OrderBook) ProcessSpotUpdate(e *spot.WsDepthEvent)
ProcessSpotUpdate processes spot depth event
func (*OrderBook) ToAdapterOrderBook ¶
Click to show internal directories.
Click to hide internal directories.