Documentation
ΒΆ
Overview ΒΆ
Package polymarket provides a unified Go SDK surface for Polymarket services.
Index ΒΆ
- type BaseURLs
- type Client
- type Config
- type InitError
- type Option
- func WithBridge(client bridge.Client) Option
- func WithBuilderAttribution(apiKey, secret, passphrase string) Option
- func WithBuilderConfig(cfg *auth.BuilderConfig) Option
- func WithCLOB(client clob.Client) Option
- func WithCLOBWS(client ws.Client) Option
- func WithCLOBWSConfig(cfg ws.ClientConfig) Option
- func WithCTF(client ctf.Client) Option
- func WithConfig(cfg Config) Option
- func WithData(client data.Client) Option
- func WithGamma(client gamma.Client) Option
- func WithHTTPClient(doer transport.Doer) Option
- func WithOfficialGoSDKSupport() Option
- func WithRTDS(client rtds.Client) Option
- func WithRTDSConfig(cfg rtds.ClientConfig) Option
- func WithUseServerTime(use bool) Option
- func WithUserAgent(userAgent string) Option
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type BaseURLs ΒΆ
type BaseURLs struct {
CLOB string
CLOBWS string
Geoblock string
Gamma string
Data string
Bridge string
RTDS string
CTF string
}
BaseURLs defines per-service base endpoints.
type Client ΒΆ
type Client struct {
Config Config
CLOB clob.Client
CLOBWS ws.Client
Gamma gamma.Client
Data data.Client
Bridge bridge.Client
RTDS rtds.Client
CTF ctf.Client
InitErrors []error
// contains filtered or unexported fields
}
Client aggregates service clients behind a shared configuration.
func NewClientE ΒΆ
NewClientE creates a new root client and returns an aggregated error if any sub-client fails to initialize.
type Config ΒΆ
type Config struct {
BaseURLs BaseURLs
HTTPClient transport.Doer
UserAgent string
Timeout time.Duration
UseServerTime bool
CLOBWSConfig ws.ClientConfig
RTDSConfig rtds.ClientConfig
}
Config holds shared SDK configuration.
type Option ΒΆ
type Option func(*Client)
Option mutates the root client.
func WithBridge ΒΆ
func WithBuilderAttribution ΒΆ
WithBuilderAttribution configures the client to attribute volume to a specific Builder. Use this if you have your own Builder API Key from builders.polymarket.com.
func WithBuilderConfig ΒΆ
func WithBuilderConfig(cfg *auth.BuilderConfig) Option
WithBuilderConfig configures builder attribution using either local or remote signing.
func WithCLOBWS ΒΆ
func WithCLOBWSConfig ΒΆ
func WithCLOBWSConfig(cfg ws.ClientConfig) Option
WithCLOBWSConfig sets explicit WebSocket runtime behavior for the CLOB WS client.
func WithConfig ΒΆ
func WithHTTPClient ΒΆ
func WithOfficialGoSDKSupport ΒΆ
func WithOfficialGoSDKSupport() Option
WithOfficialGoSDKSupport configures the client to attribute volume to the SDK maintainer. This is enabled by default. Use this option to explicitly restore the official attribution if it was previously overwritten.
func WithRTDSConfig ΒΆ
func WithRTDSConfig(cfg rtds.ClientConfig) Option
WithRTDSConfig sets explicit runtime behavior for the RTDS WebSocket client.
func WithUseServerTime ΒΆ
func WithUserAgent ΒΆ
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
acceptance
command
|
|
|
polymarket-bot
command
|
|
|
signer-server
command
|
|
|
bot
command
|
|
|
builder_flow
command
|
|
|
client_defaults
command
|
|
|
complete
command
|
|
|
ctf_client
command
|
|
|
data_client
command
|
|
|
gamma_client
command
|
|
|
gtd_order
command
|
|
|
market_data
command
|
|
|
market_order
command
|
|
|
order_builder
command
|
|
|
pagination
command
|
|
|
position-tracker
command
|
|
|
rewards_allowance
command
|
|
|
rfq_flow
command
|
|
|
rfq_quotes
command
|
|
|
rtds_client
command
|
|
|
stream_data
command
|
|
|
trading
command
|
|
|
ws_client
command
|
|
|
ws_user_client
command
|
|
|
pkg
|
|
|
auth
Package auth provides cryptographic primitives for Polymarket authentication.
|
Package auth provides cryptographic primitives for Polymarket authentication. |
|
clob
Package clob provides the client for interacting with the Polymarket Central Limit Order Book.
|
Package clob provides the client for interacting with the Polymarket Central Limit Order Book. |
|
clob/cloberrors
Package cloberrors provides error mapping utilities for the Polymarket CLOB.
|
Package cloberrors provides error mapping utilities for the Polymarket CLOB. |
|
clob/ws
Package ws provides a high-level WebSocket client for Polymarket.
|
Package ws provides a high-level WebSocket client for Polymarket. |
|
errors
Package errors provides unified error definitions for the SDK.
|
Package errors provides unified error definitions for the SDK. |
|
gamma
Package gamma provides the client for interacting with the Polymarket Gamma API.
|
Package gamma provides the client for interacting with the Polymarket Gamma API. |
|
logger
Package logger provides a unified logging interface for the SDK.
|
Package logger provides a unified logging interface for the SDK. |
|
transport
Package transport provides a robust HTTP client wrapper optimized for Polymarket's API.
|
Package transport provides a robust HTTP client wrapper optimized for Polymarket's API. |