Versions in this module Expand all Collapse all v0 v0.1.1 Jul 16, 2026 v0.1.0 Jul 16, 2026 Changes in this version + type Candle struct + Close float64 + Complete bool + High float64 + Low float64 + Open float64 + Time time.Time + Volume float64 + type Client struct + func New(token string, opts ...Option) *Client + func (c *Client) AccountID(ctx context.Context) (string, error) + func (c *Client) AvgSpread(ctx context.Context, instrument string, n int) (float64, error) + func (c *Client) GetCandles(ctx context.Context, instrument, granularity string, start, end time.Time) ([]Candle, error) + func (c *Client) InstrumentFacts(ctx context.Context, instrument string) (*InstrumentFacts, error) + func (c *Client) MarketBuy(ctx context.Context, instrument string, units float64) (*Fill, error) + func (c *Client) OpenTrades(ctx context.Context, instrument string) ([]Trade, error) + func (c *Client) SetTakeProfit(ctx context.Context, tradeID, price string) error + type Fill struct + Price float64 + TradeID string + Units float64 + type InstrumentFacts struct + DisplayPrecision int + LongRate float64 + MarginRate float64 + Name string + ShortRate float64 + type Option func(*Client) + func Practice() Option + func WithAccount(id string) Option + func WithHTTPClient(h *http.Client) Option + type Trade struct + ID string + Instrument string + OpenTime time.Time + Price float64 + TP float64 + Units float64