Skip to content

PortfolioService

Describes github.com/stxapp/stx-go v0.3.1, the current release.

type PortfolioService struct {
// contains filtered or unexported fields
}

PortfolioService reads fills, settlements, per-market stats and money movements. Use it through Client.Portfolio.

func (s *PortfolioService) Adjustments(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error)

Adjustments returns one page of manual balance adjustments (GET /api/v1/portfolio/adjustments).

func (s *PortfolioService) AllAdjustments(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error]

AllAdjustments returns every adjustment, following the cursor.

func (s *PortfolioService) AllDeposits(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error]

AllDeposits returns every deposit, following the cursor.

func (s *PortfolioService) AllFees(ctx context.Context, q *PageQuery) iter.Seq2[FeeTransaction, error]

AllFees returns every fee entry, following the cursor.

func (s *PortfolioService) AllFills(ctx context.Context, q *FillsQuery) iter.Seq2[Fill, error]

AllFills returns every fill matching q, following the cursor.

func (s *PortfolioService) AllLoyalty(ctx context.Context, q *PageQuery) iter.Seq2[Transaction, error]

AllLoyalty returns every loyalty entry, following the cursor.

func (s *PortfolioService) AllMarketStats(ctx context.Context, q *MarketStatsQuery) iter.Seq2[MarketStat, error]

AllMarketStats returns every per-market stat row matching q, following the cursor.

func (s *PortfolioService) AllSettlements(ctx context.Context, q *SettlementsQuery) iter.Seq2[Settlement, error]

AllSettlements returns every settlement matching q, following the cursor.

func (s *PortfolioService) AllWithdrawals(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error]

AllWithdrawals returns every withdrawal, following the cursor.

func (s *PortfolioService) Deposits(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error)

Deposits returns one page of deposits (GET /api/v1/portfolio/deposits).

func (s *PortfolioService) Fees(ctx context.Context, q *PageQuery) (*Page[FeeTransaction], error)

Fees returns one page of fee and fee-refund entries (GET /api/v1/portfolio/fees).

func (s *PortfolioService) Fills(ctx context.Context, q *FillsQuery) (*Page[Fill], error)

Fills returns one page of your executions (GET /api/v1/fills).

func (s *PortfolioService) Loyalty(ctx context.Context, q *PageQuery) (*Page[Transaction], error)

Loyalty returns one page of loyalty entries (GET /api/v1/portfolio/loyalty). Where the exchange has no loyalty program it returns an error matching ErrNotAvailable.

func (s *PortfolioService) MarketStats(ctx context.Context, q *MarketStatsQuery) (*Page[MarketStat], error)

MarketStats returns one page of your exposure and P&L per market (GET /api/v1/account/market_stats). This is not the market_stats channel, which carries price history.

func (s *PortfolioService) Settlements(ctx context.Context, q *SettlementsQuery) (*Page[Settlement], error)

Settlements returns one page of settlements on your account (GET /api/v1/portfolio/settlements).

func (s *PortfolioService) Withdrawals(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error)

Withdrawals returns one page of withdrawals (GET /api/v1/portfolio/withdrawals).

STX is operated by XV Exchange, LLC, a Designated Contract Market regulated by the U.S. Commodity Futures Trading Commission (CFTC). Contracts traded on STX are cleared by XV Clearing, LLC, a CFTC-registered Derivatives Clearing Organization. Trading involves substantial risk of loss and may not be appropriate for everyone. Members risk losing the cost to enter any transaction, including fees. Consider whether trading is appropriate for you in light of your experience and financial resources. Nothing on this site is investment advice or a recommendation to trade. Past performance is not indicative of future results.

© 2026 STX. All rights reserved.llms.txtllms-full.txtView as Markdown
Docs version v1.10.5