Versions in this module Expand all Collapse all v1 v1.0.1 Jul 21, 2026 Changes in this version + type APIError struct + Code string + Message string + RequestID string + Status int + func IsAPIError(err error) (*APIError, bool) + func (e *APIError) Error() string + type APIResponse struct + Data T + Error *string + Meta *Meta + type AppendMessageRequest struct + Content string + Metadata map[string]any + type Artifact struct + StrategyID *string + StrategyVersionID *string + Type string + type ArtifactCounts struct + Reports int + StrategyVersions int + type Backtest struct + BacktestID string + CompletedAt *time.Time + CreatedAt time.Time + LatestBacktestSummary *BacktestSummary + SourceBacktestID *string + Status string + StrategyID string + StrategyVersionID string + type BacktestListOptions struct + Cursor string + Limit int + Sort string + Status string + StrategyID string + StrategyVersionID string + type BacktestPollResult struct + Detail *Backtest + Results *BacktestResults + SummaryCSV string + TradesCSV string + type BacktestResults struct + BacktestID string + Drawdown []map[string]any + EquityCurve []map[string]any + Metrics map[string]float64 + Status string + Trades []map[string]any + type BacktestSummary struct + MaxDrawdown float64 + SharpeRatio float64 + TotalReturn float64 + TotalTrades int + type BacktestsList struct + Backtests []Backtest + type Chat struct + Archived bool + ArtifactCounts *ArtifactCounts + CreatedAt time.Time + ID string + LatestMessagePreview *LatestMessagePreview + MessageCount int + Metadata map[string]any + Starred bool + StrategyID *string + StrategyVersionID *string + Tags []string + Title string + UpdatedAt time.Time + type ChatDeleteResponse struct + Deleted bool + ID string + type ChatsList struct + Chats []Chat + type ChatsListOptions struct + Archived *bool + Cursor string + HasReport *bool + HasStrategy *bool + Limit int + Sort string + Tags string + type Client struct + BaseURL string + HTTPClient *http.Client + Token string + func NewClient(token string, opts ...ClientOption) *Client + func (c *Client) AppendMessage(ctx context.Context, chatID string, req AppendMessageRequest) (*Message, error) + func (c *Client) CompareBacktests(ctx context.Context, req CompareBacktestsRequest) (*CompareBacktestsResponse, error) + func (c *Client) CreateBacktest(ctx context.Context, strategyVersionID string) (*Backtest, error) + func (c *Client) CreateBacktestAndWait(ctx context.Context, strategyVersionID string, ...) (*BacktestPollResult, error) + func (c *Client) CreateChat(ctx context.Context, req CreateChatRequest) (*Chat, error) + func (c *Client) CreateStrategy(ctx context.Context, req CreateStrategyRequest) (*Strategy, error) + func (c *Client) DeleteChat(ctx context.Context, chatID string) (*ChatDeleteResponse, error) + func (c *Client) DuplicateBacktest(ctx context.Context, backtestID string) (*DuplicateBacktestResponse, error) + func (c *Client) EstimateTickCredits(ctx context.Context, dataDays, timeframeMinutes int) (*TickEstimate, error) + func (c *Client) FinalizeChat(ctx context.Context, chatID, name, description string) (*Strategy, error) + func (c *Client) GetBacktest(ctx context.Context, backtestID string) (*Backtest, error) + func (c *Client) GetBacktestResults(ctx context.Context, backtestID string) (*BacktestResults, error) + func (c *Client) GetBacktestSummaryCSV(ctx context.Context, backtestID string) (string, error) + func (c *Client) GetBacktestTradesCSV(ctx context.Context, backtestID string) (string, error) + func (c *Client) GetChat(ctx context.Context, chatID string) (*Chat, error) + func (c *Client) GetCommunityBacktest(ctx context.Context, backtestID string, include string) (*CommunityBacktest, error) + func (c *Client) GetCommunityMe(ctx context.Context, include string) (*CommunityProfile, error) + func (c *Client) GetCreditUsage(ctx context.Context, opts CreditUsageOptions) (*CreditUsage, error) + func (c *Client) GetCredits(ctx context.Context) (*CreditBalance, error) + func (c *Client) GetReport(ctx context.Context, reportID string) (*Report, error) + func (c *Client) GetStrategy(ctx context.Context, strategyID string) (*Strategy, error) + func (c *Client) GetStrategyVersion(ctx context.Context, strategyID, versionID string) (*StrategyVersion, error) + func (c *Client) GetTemplate(ctx context.Context, templateID string) (*TemplateDetail, error) + func (c *Client) Health(ctx context.Context) (*HealthResponse, error) + func (c *Client) ListBacktests(ctx context.Context, opts BacktestListOptions) (*BacktestsList, error) + func (c *Client) ListChats(ctx context.Context, opts ChatsListOptions) (*ChatsList, error) + func (c *Client) ListCommunityActivities(ctx context.Context, opts CommunityActivityOptions) (*CommunityActivitiesData, error) + func (c *Client) ListCommunityBacktests(ctx context.Context, opts CommunityBacktestListOptions) (*CommunityBacktestsList, error) + func (c *Client) ListCreditTransactions(ctx context.Context, opts CreditTransactionOptions) (*CreditTransactionsList, error) + func (c *Client) ListLeaderboards(ctx context.Context, opts LeaderboardOptions) (*LeaderboardsData, error) + func (c *Client) ListMessages(ctx context.Context, chatID string, opts PaginatedOptions) (*MessagesList, error) + func (c *Client) ListReports(ctx context.Context, opts ReportListOptions) (*ReportsList, error) + func (c *Client) ListStrategies(ctx context.Context, opts StrategyListOptions) (*StrategiesList, error) + func (c *Client) ListStrategyVersions(ctx context.Context, strategyID string, opts PaginatedOptions) (*StrategyVersionsList, error) + func (c *Client) ListTemplates(ctx context.Context, opts TemplateListOptions) (*TemplatesList, error) + func (c *Client) StreamChatMessage(ctx context.Context, chatID string, req StreamingChatRequest, ...) (*StreamResult, error) + func (c *Client) StreamPrompt(ctx context.Context, req StreamingPromptRequest, callback StreamCallback) (*StreamResult, error) + func (c *Client) UpdateChat(ctx context.Context, chatID string, req UpdateChatRequest) (*Chat, error) + func (c *Client) UpdateStrategy(ctx context.Context, strategyID string, req UpdateStrategyRequest) (*Strategy, error) + func (c *Client) UpdateStrategyVersion(ctx context.Context, strategyID, versionID string, ...) (*StrategyVersion, error) + type ClientOption func(*Client) + func WithBaseURL(u string) ClientOption + func WithHTTPClient(hc *http.Client) ClientOption + func WithTimeout(d time.Duration) ClientOption + type CommunityActivitiesData struct + Activities []CommunityActivity + Totals map[string]any + type CommunityActivity struct + CreatedAt time.Time + ID string + Status string + Task string + Title string + type CommunityActivityOptions struct + Cursor string + Include string + Limit int + Status string + Task string + type CommunityBacktest struct + AssetClass string + BacktestID string + CreatedByUsername string + EndDate *time.Time + FavouritesCount int + IsFavouritedByMe bool + Metrics map[string]any + Orders []map[string]any + PublishedAt time.Time + SqsScore int + StartDate *time.Time + StrategyName string + Timeframe string + type CommunityBacktestDetailOptions struct + Include string + type CommunityBacktestListOptions struct + Cursor string + Include string + Limit int + Q string + Season int + Sort string + StrategyID string + type CommunityBacktestsList struct + Backtests []CommunityBacktest + type CommunityMeOptions struct + Include string + type CommunityProfile struct + Followers int + PublishedBacktests int + Rank int + TotalPoints int + UserID string + Username string + type CompareBacktestsRequest struct + BacktestIDs []string + type CompareBacktestsResponse struct + Backtests []map[string]any + WinnerByTotalReturn string + type CreateBacktestRequest struct + StrategyVersionID string + type CreateChatRequest struct + InitialMessage string + Metadata map[string]any + Tags []string + Title string + type CreateStrategyRequest struct + ChatID string + Description string + Name string + type CreditBalance struct + AvailableCreditsSubscription int + AvailableCreditsTopup int + AvailableCreditsTotal int + Lots []CreditLot + PendingCreditsSubscription int + ServerTime time.Time + TickMaxDays int + type CreditLot struct + Bucket string + ExpiresAt time.Time + LotID string + RemainingCredits int + TotalCredits int + type CreditTransaction struct + Amount int + BalanceAfter int + CreatedAt time.Time + Direction string + EventType string + ID string + ReferenceID *string + type CreditTransactionOptions struct + Cursor string + Direction string + EventType string + From string + Limit int + ReferenceID string + To string + type CreditTransactionsList struct + Transactions []CreditTransaction + type CreditUsage struct + FromDate string + Series []map[string]any + ToDate string + Totals CreditUsageTotals + type CreditUsageOptions struct + From string + GroupBy string + To string + type CreditUsageTotals struct + CandleCount int + CandleCredits int + PromptsCount int + PromptsCredits int + TickCredits int + TickMinutes int + type DuplicateBacktestResponse struct + BacktestID string + CreatedAt time.Time + SourceBacktestID string + Status string + type HTTPResponse struct + RequestID string + type HealthResponse struct + Service string + Status string + type LatestMessagePreview struct + Content string + CreatedAt time.Time + ID string + Role string + type LeaderboardEntry struct + Rank int + TotalPoints int + Username string + type LeaderboardOptions struct + Cursor string + Include string + Limit int + Season int + type LeaderboardsData struct + CurrentUser *LeaderboardEntry + Entries []LeaderboardEntry + Season int + type Message struct + Artifacts []Artifact + ChatID string + Content string + CreatedAt time.Time + ID string + Metadata map[string]any + Role string + StrategyID *string + StrategyVersionID *string + type MessagesList struct + Messages []Message + type Meta struct + Cursor *string + HasMore bool + RequestID string + type PaginatedOptions struct + Cursor string + Limit int + Sort string + type Report struct + ChatID *string + Content string + CreatedAt time.Time + ID string + MessageID *string + Metadata map[string]any + Title string + type ReportListOptions struct + ChatID string + Cursor string + Limit int + Sort string + type ReportsList struct + Reports []Report + type StrategiesList struct + Strategies []Strategy + type Strategy struct + ChatID *string + CreatedAt time.Time + Description string + ID string + LatestVersion *StrategyVersionSummary + Name string + State string + UpdatedAt time.Time + VersionCount int + type StrategyCondition struct + Action string + ID string + Operator string + Series1 string + Series1Params map[string]any + Series1Timeframe string + Series2 string + Series2Params map[string]any + Series2Timeframe string + Type string + type StrategyLatestBacktest struct + BacktestID string + CreatedAt time.Time + SharpeRatio float64 + Status string + TotalReturn float64 + type StrategyListOptions struct + Cursor string + IsPublished *bool + Limit int + Q string + Sort string + State string + type StrategySchema struct + Conditions []StrategyCondition + InitialCapital float64 + Instrument string + PositionSizeType string + PositionSizeValue float64 + StrategyName string + Timeframe string + type StrategyVersion struct + CreatedAt time.Time + Description string + ID string + IsPublished bool + LatestBacktest *StrategyLatestBacktest + PublishedAt *time.Time + Schema *StrategySchema + State string + StrategyID string + Title string + VersionNumber int + type StrategyVersionSummary struct + ID string + IsPublished bool + LatestBacktest *StrategyLatestBacktest + PublishedAt *time.Time + Schema *StrategySchema + State string + VersionNumber int + type StrategyVersionsList struct + Versions []StrategyVersion + type StreamCallback func(event StreamEvent) error + type StreamEvent struct + ChatID *string + Data json.RawMessage + ErrorCode string + ErrorMessage string + Event string + ReportID *string + RequestID string + Schema json.RawMessage + StrategyID *string + StrategyVersionID *string + Text string + Type StreamEventType + type StreamEventType string + const StreamTypeChat + const StreamTypeError + const StreamTypeReport + const StreamTypeStrategy + const StreamTypeUnknown + type StreamResult struct + ChatID *string + Err error + Events []StreamEvent + ReportID *string + RequestID string + Schema json.RawMessage + StrategyID *string + StrategyVersionID *string + Text string + Type StreamEventType + type StreamingChatRequest struct + Content string + Options map[string]any + type StreamingPromptRequest struct + ChatID *string + Message string + Options map[string]any + type Template struct + Category *TemplateCategory + CreatedAt time.Time + Description string + ID string + Name string + type TemplateCategory struct + Name string + Slug string + type TemplateDetail struct + Category *TemplateCategory + Description string + ID string + IsFeatured bool + IsPopular bool + IsPro bool + LongDescription string + Prompt string + Slug string + StrategyType string + Title string + type TemplateListOptions struct + Category string + Cursor string + GroupBy string + Limit int + Q string + type TemplatesList struct + Templates []Template + type TickEstimate struct + DataDays int + EstimatedCredits int + TickMaxDays int + TimeframeMinutes int + type TickEstimateOptions struct + DataDays int + TimeframeMinutes int + type UpdateChatRequest struct + Archived *bool + Starred *bool + Tags []string + Title string + type UpdateStrategyRequest struct + Description string + Name string + type UpdateStrategyVersionRequest struct + Description string + IsPublished *bool + Title string v1.0.0 Jul 21, 2026