Versions in this module Expand all Collapse all v1 v1.1.0 Nov 10, 2026 Changes in this version + var ErrRetired = errors.New("buyproxy: retired endpoint") type Catalog + MinTopupCents int type Client + Wallet *WalletService + type DedicatedFamily string + const DedicatedIPv4 + const DedicatedIPv6 + const DedicatedISP + const DedicatedMobile + const ISPUnlimited + type MobileSelection struct + OperatorID string + RotationID string + ServiceType string + type PaymentMethod string + const PayByCard + const PayByCrypto + type PoolPurchaseParams struct + GB int + IdempotencyKey string + ProductKey ProductKey type PoolService + func (s *PoolService) Purchase(ctx context.Context, p PoolPurchaseParams) (*WalletPurchase, error) + type Wallet struct + BalanceCents int + Recent []WalletEntry + TotalSpentCents int + TotalToppedUpCents int + type WalletEntry struct + AmountCents int + BalanceAfterCents int + CreatedAt string + Description string + ID string + Type string + type WalletPurchase struct + AmountCents int + BalanceCents int + OK bool + OrderID string + Summary string + type WalletPurchaseParams struct + AmountCents int + Country string + Family DedicatedFamily + GB int + IdempotencyKey string + Kind string + Mobile *MobileSelection + PeriodDays int + ProductKey ProductKey + Quantity int + func BuyGB(product ProductKey, gb int) WalletPurchaseParams + func BuyScraperCredit(amountCents int) WalletPurchaseParams + func RentDedicated(family DedicatedFamily, country string, periodDays, quantity int) WalletPurchaseParams + func RentISPUnlimited(mbps int) WalletPurchaseParams + func (p WalletPurchaseParams) WithIdempotencyKey(key string) WalletPurchaseParams + type WalletService struct + func (s *WalletService) Get(ctx context.Context) (*Wallet, error) + func (s *WalletService) Purchase(ctx context.Context, p WalletPurchaseParams) (*WalletPurchase, error) + func (s *WalletService) Topup(ctx context.Context, method PaymentMethod, amountCents int) (*WalletTopup, error) + type WalletTopup struct + PayURL string + TransactionID string + URL string + func (t *WalletTopup) CheckoutURL() string v1.0.0 Oct 1, 2026 Changes in this version + const DefaultBaseURL + const Version + var ErrAuthentication = errors.New("buyproxy: authentication failed") + var ErrForbidden = errors.New("buyproxy: forbidden") + var ErrInsufficientBandwidth = errors.New("buyproxy: insufficient bandwidth") + var ErrNotFound = errors.New("buyproxy: not found") + var ErrRateLimited = errors.New("buyproxy: rate limited") + var ErrServer = errors.New("buyproxy: server error") + var ErrValidation = errors.New("buyproxy: invalid request") + type APIError struct + Body []byte + Message string + RetryAfter time.Duration + Status int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type Account struct + BalanceGB float64 + CreatedAt string + Email string + Name string + Plan string + PlanExpiresAt *string + type AccountService struct + func (s *AccountService) Get(ctx context.Context) (*Account, error) + type AllocateParams struct + GB int + IdempotencyKey string + ProductKey ProductKey + type Allocation struct + AlreadyApplied bool + GB int + PoolRemainingGB float64 + ProductID string + ProductKey ProductKey + type AuthService struct + func (s *AuthService) ResendOTP(ctx context.Context, email string) error + func (s *AuthService) Signup(ctx context.Context, p SignupParams) (*SignupResult, error) + func (s *AuthService) VerifyOTP(ctx context.Context, email, code string) (*VerifyResult, error) + type Balance struct + ActiveGB float64 + ExpiresAt *string + PendingGB float64 + PlanID *string + ProductID string + ProductKey *ProductKey + TotalGB float64 + type BalancesService struct + func (s *BalancesService) List(ctx context.Context) ([]Balance, error) + type BillingInterval string + const Monthly + const Yearly + type CardCheckout struct + PayURL string + TransactionID *string + type CardCheckoutParams struct + GB int + Interval BillingInterval + Kind string + Plan PaidPlan + ProductKey ProductKey + func PlanCardParams(plan PaidPlan, interval BillingInterval) CardCheckoutParams + func TopupCardParams(product ProductKey, gb int) CardCheckoutParams + type Catalog struct + Plans []struct{ ... } + Products []Product + VolumeBonus struct{ ... } + type Client struct + Account *AccountService + Auth *AuthService + Balances *BalancesService + Plans *PlansService + Products *ProductsService + Reseller *ResellerService + Topup *TopupService + Transactions *TransactionsService + func New(opts ...Option) *Client + func (c *Client) KeyKind() string + type ConnectionError struct + Err error + func (e *ConnectionError) Error() string + func (e *ConnectionError) Unwrap() error + type CryptoCheckout struct + TransactionID string + URL string + type Customer struct + CreatedAt string + Label string + Status CustomerStatus + Username string + type CustomerDetail struct + Pending []PendingAllocation + Plans []CustomerPlan + type CustomerGenerateParams struct + PlanID string + type CustomerPlan struct + RemainingGB float64 + type CustomerStatus string + const CustomerActive + const CustomerSuspended + type CustomerUpdate struct + Label string + Status CustomerStatus + type CustomerUsage struct + Pending []PendingAllocation + Plans []struct{ ... } + type CustomersService struct + func (s *CustomersService) Allocate(ctx context.Context, username string, p AllocateParams) (*Allocation, error) + func (s *CustomersService) Create(ctx context.Context, label string) (*Customer, error) + func (s *CustomersService) Generate(ctx context.Context, username string, p CustomerGenerateParams) (*GeneratedProxies, error) + func (s *CustomersService) Get(ctx context.Context, username string) (*CustomerDetail, error) + func (s *CustomersService) List(ctx context.Context, status CustomerStatus) ([]Customer, error) + func (s *CustomersService) Update(ctx context.Context, username string, u CustomerUpdate) (*Customer, error) + func (s *CustomersService) Usage(ctx context.Context, username string) (*CustomerUsage, error) + type GenerateCapabilities struct + MaxCount int + MaxStickyMinutes int + Protocols []Protocol + Targeting struct{ ... } + type GenerateParams struct + City string + Count int + Country string + ISP string + Protocol Protocol + State string + StickyMinutes int + type GeneratedProxies struct + Lines []string + Proxies []Proxy + type Option func(*Client) + func WithAPIKey(key string) Option + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + type PaidPlan string + const PlanAdvanced + const PlanBusiness + const PlanPro + type PendingAllocation struct + GB float64 + ProductID string + ProductKey *ProductKey + type Plan struct + CreatedAt string + DataGBRemaining float64 + DataGBTotal float64 + ExpiresAt *string + Generate *GenerateCapabilities + ID string + Label *string + Name string + ProductID string + ProductKey *ProductKey + type PlansService struct + func (s *PlansService) Generate(ctx context.Context, planID string, p *GenerateParams) (*GeneratedProxies, error) + func (s *PlansService) List(ctx context.Context) ([]Plan, error) + type PoolEntry struct + GB float64 + Label string + ProductID string + ProductKey ProductKey + type PoolService struct + func (s *PoolService) Get(ctx context.Context) ([]PoolEntry, error) + func (s *PoolService) TopupCard(ctx context.Context, p PoolTopupParams) (*CardCheckout, error) + func (s *PoolService) TopupCrypto(ctx context.Context, p PoolTopupParams) (*CryptoCheckout, error) + type PoolTopupParams struct + GB int + ProductKey ProductKey + type Product struct + Currency string + Description string + MinGB int + Name string + PricePerGBCents *int + ProductID string + ProductKey ProductKey + type ProductKey string + const ProductIPv4 + const ProductIPv6 + const ProductISP + const ProductMobile + const ProductPremium + const ProductResidential + type ProductsService struct + func (s *ProductsService) List(ctx context.Context) (*Catalog, error) + type Protocol string + const HTTP + const SOCKS5 + type Proxy struct + Host string + Password string + Port int + Protocol Protocol + Username string + func ParseProxy(line string, protocol Protocol) (Proxy, error) + func (p Proxy) Curl() string + func (p Proxy) Env() map[string]string + func (p Proxy) HTTPClient() *http.Client + func (p Proxy) String() string + func (p Proxy) Transport() *http.Transport + func (p Proxy) URL() *url.URL + type ResellerService struct + Customers *CustomersService + Pool *PoolService + func (s *ResellerService) Me(ctx context.Context) (*ResellerSummary, error) + type ResellerSummary struct + ActiveCustomerCount int + CustomerCount int + Email string + Pool []PoolEntry + type SignupParams struct + Email string + Name string + Password string + type SignupResult struct + CooldownSeconds int + OK bool + type TopupService struct + func (s *TopupService) Card(ctx context.Context, p CardCheckoutParams) (*CardCheckout, error) + func (s *TopupService) Crypto(ctx context.Context, product ProductKey, gb int) (*CryptoCheckout, error) + type Transaction struct + AmountCents int + CreatedAt string + Currency string + GB *float64 + ID string + Interval *BillingInterval + Kind string + PaymentMethod string + Plan *string + ProductKey *ProductKey + ResellerPool bool + Status string + type TransactionsService struct + func (s *TransactionsService) Get(ctx context.Context, id string) (*Transaction, error) + func (s *TransactionsService) List(ctx context.Context, limit int) ([]Transaction, error) + func (s *TransactionsService) Wait(ctx context.Context, id string, interval time.Duration) (*Transaction, error) + type VerifyResult struct + IsNew bool + OK bool + User struct{ ... }