Documentation
¶
Index ¶
- type TradingService
- func (s *TradingService) CancelAll(ctx context.Context) error
- func (s *TradingService) CancelOrder(ctx context.Context, orderID string) error
- func (s *TradingService) CreateOrder(ctx context.Context, params clob.UserOrderParams, tickSize string, ...) (*clob.OrderResponse, error)
- func (s *TradingService) GetOrder(ctx context.Context, orderID string) (*clob.OrderResponse, error)
- func (s *TradingService) Merge(ctx context.Context, conditionID string, amount float64) (string, error)
- func (s *TradingService) Redeem(ctx context.Context, conditionID string, outcome string) (string, error)
- func (s *TradingService) Split(ctx context.Context, conditionID string, amount float64) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TradingService ¶
type TradingService struct {
Clob *clob.ClobClient
Ctf *ctf.CTFClient
}
TradingService handles all trading execution (orders) and asset management (split/merge)
func NewTradingService ¶
func NewTradingService(clobClient *clob.ClobClient, ctfClient *ctf.CTFClient) *TradingService
func (*TradingService) CancelAll ¶
func (s *TradingService) CancelAll(ctx context.Context) error
CancelAll cancels all orders
func (*TradingService) CancelOrder ¶
func (s *TradingService) CancelOrder(ctx context.Context, orderID string) error
CancelOrder cancels an order
func (*TradingService) CreateOrder ¶
func (s *TradingService) CreateOrder(ctx context.Context, params clob.UserOrderParams, tickSize string, negRisk bool) (*clob.OrderResponse, error)
CreateOrder places a new order via CLOB
func (*TradingService) GetOrder ¶
func (s *TradingService) GetOrder(ctx context.Context, orderID string) (*clob.OrderResponse, error)
GetOrder fetches a single order status
func (*TradingService) Merge ¶
func (s *TradingService) Merge(ctx context.Context, conditionID string, amount float64) (string, error)
Merge redeems conditional tokens
Click to show internal directories.
Click to hide internal directories.