Documentation
¶
Index ¶
- Constants
- func AskCmp(a, b Level) int
- func BalDescCmp(a, b Asset) int
- func BidCmp(a, b Level) int
- func Epoch(duration time.Duration) time.Time
- func IsSnapshot(channel, target, typ string) bool
- func IsUpdate(channel, target, typ string) bool
- func IsValid(channel, target string) bool
- func MustNewWebSocketTokenFromCfg() string
- func NewErrorOrNil(message string) error
- func NewTicker(ctx context.Context, epoch time.Time, duration time.Duration, ...)
- func NewWebSocketToken(public, private string) (string, time.Time, error)
- func NewWebSocketTokenFromCfg() (string, time.Time, error)
- func WithDepth(depth int) func(*ChannelParams)
- func WithSymbols(symbols []string) func(*ChannelParams)
- type Account
- type AddOrderResult
- type Asset
- type BalanceSubscriptionHandler
- type BaseAuthOutgoingSubscriptionMessage
- type BaseIncomingChannelMessage
- type BaseOutgoingSubscriptionMessage
- func (this *BaseOutgoingSubscriptionMessage) GetToken() string
- func (this *BaseOutgoingSubscriptionMessage) Origin() string
- func (this *BaseOutgoingSubscriptionMessage) Protocol() string
- func (this *BaseOutgoingSubscriptionMessage) SetToken(token string)
- func (this *BaseOutgoingSubscriptionMessage) UnsubscribeMessage() *OutgoingUnsubscribeMessage
- func (this *BaseOutgoingSubscriptionMessage) Url() string
- type Binder
- type BookSubscriptionHandler
- type Candle
- type CandleBuilder
- type Channel
- func NewSubBalance(ctx context.Context, wg *sync.WaitGroup) (*Channel[*Account], error)
- func NewSubBook(ctx context.Context, wg *sync.WaitGroup, symbol string, depth int) (*Channel[*Binder], error)
- func NewSubChannel[M IncomingMessage, T any](ctx context.Context, wg *sync.WaitGroup, message OutgoingSubscriptionMessage, ...) (*Channel[T], error)
- func NewSubExecution(ctx context.Context, wg *sync.WaitGroup) (*Channel[[]string], error)
- func NewSubTrade(ctx context.Context, wg *sync.WaitGroup, symbol string, ...) (*Channel[*Candle], error)
- type ChannelParams
- type Conditional
- type Config
- type Decimal
- func (this *Decimal) Add(that Decimal)
- func (this *Decimal) Cmp(that Decimal) int
- func (this *Decimal) Float64() float64
- func (this *Decimal) GreaterThan(that Decimal) bool
- func (this *Decimal) IsZero() bool
- func (this *Decimal) LessThan(that Decimal) bool
- func (this *Decimal) MarshalJSON() ([]byte, error)
- func (this *Decimal) Set(that Decimal)
- func (this *Decimal) String() string
- func (this *Decimal) UnmarshalJSON(data []byte) error
- type Entry
- type ExecutionSubscriptionHandler
- type In
- type IncomingAddOrderMessage
- type IncomingBalanceChannelMessage
- type IncomingBalanceChannelSnapshotMessage
- type IncomingBalanceChannelUpdateMessage
- type IncomingBookChannelMessage
- type IncomingMessage
- type IncomingMessageHandler
- type IncomingTradeChannelMessage
- type Level
- type OrderParams
- type Out
- type OutgoingBalanceSubscriptionMessage
- type OutgoingBookSubscriptionMessage
- type OutgoingExecutionSubscriptionMessage
- type OutgoingMarketBuyOrder
- type OutgoingMarketSellOrder
- type OutgoingMessage
- type OutgoingSubscriptionMessage
- type OutgoingTradeSubscriptionMessage
- type OutgoingUnsubscribeMessage
- type Page
- type Subscription
- type Trade
- type TradeSubscriptionHandler
- type Triggers
- type Wallet
Constants ¶
const ( Spot = "spot" Earn = "earn" Main = "main" Flex = "flex" Bonded = "bonded" Flexible = "flexible" Liquid = "liquid" Locked = "locked" Closed = "closed" )
Variables ¶
This section is empty.
Functions ¶
func BalDescCmp ¶
func IsSnapshot ¶
func MustNewWebSocketTokenFromCfg ¶
func MustNewWebSocketTokenFromCfg() string
MustNewWebSocketTokenFromCfg fetches a new WebSocket token using the global config. Panics on error.
func NewErrorOrNil ¶
func NewWebSocketToken ¶
NewWebSocketToken fetches a new WebSocket token using the provided public and private keys. Returns the token and its approximate expiration time.
func NewWebSocketTokenFromCfg ¶
NewWebSocketTokenFromCfg fetches a new WebSocket token using the global config. Returns the token and its approximate expiration time.
func WithDepth ¶
func WithDepth(depth int) func(*ChannelParams)
func WithSymbols ¶
func WithSymbols(symbols []string) func(*ChannelParams)
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
type AddOrderResult ¶
type AddOrderResult struct { OrderID string `json:"order_id"` ClOrdID string `json:"cl_ord_id"` OrderUserRef int `json:"order_userref"` Warnings []string `json:"warnings"` }
AddOrderResult contains the details for a successfully placed order.
func (AddOrderResult) IsZero ¶
func (this AddOrderResult) IsZero() bool
type Asset ¶
type Asset struct { Asset string `json:"asset"` AssetClass string `json:"asset_class"` Balance Decimal `json:"balance"` Wallets []Wallet `json:"wallets"` }
Asset represents a financial asset stored within an account with its balance and associated wallets.
func NewAssetFrom ¶
type BalanceSubscriptionHandler ¶
type BalanceSubscriptionHandler struct {
// contains filtered or unexported fields
}
func NewBalanceSubscriptionHandler ¶
func NewBalanceSubscriptionHandler(ctx context.Context) *BalanceSubscriptionHandler
func (*BalanceSubscriptionHandler) Close ¶
func (this *BalanceSubscriptionHandler) Close()
func (*BalanceSubscriptionHandler) Handle ¶
func (this *BalanceSubscriptionHandler) Handle(message *IncomingBalanceChannelMessage) error
func (*BalanceSubscriptionHandler) OutCh ¶
func (this *BalanceSubscriptionHandler) OutCh() <-chan *Account
type BaseAuthOutgoingSubscriptionMessage ¶
type BaseAuthOutgoingSubscriptionMessage struct {
BaseOutgoingSubscriptionMessage
}
BaseAuthOutgoingSubscriptionMessage wraps BaseOutgoingSubscriptionMessage for authenticated channel subscription messages.
func NewBaseAuthSubOut ¶
func NewBaseAuthSubOut(params ChannelParams) BaseAuthOutgoingSubscriptionMessage
func (*BaseAuthOutgoingSubscriptionMessage) GetToken ¶
func (this *BaseAuthOutgoingSubscriptionMessage) GetToken() string
func (*BaseAuthOutgoingSubscriptionMessage) Origin ¶
func (this *BaseAuthOutgoingSubscriptionMessage) Origin() string
func (*BaseAuthOutgoingSubscriptionMessage) SetToken ¶
func (this *BaseAuthOutgoingSubscriptionMessage) SetToken(token string)
func (*BaseAuthOutgoingSubscriptionMessage) Url ¶
func (this *BaseAuthOutgoingSubscriptionMessage) Url() string
type BaseIncomingChannelMessage ¶
BaseIncomingChannelMessage wraps In with Scope for channel messages.
func NewBaseIncomingChannelMessage ¶
func NewBaseIncomingChannelMessage[D any](scope string) BaseIncomingChannelMessage[D]
func (*BaseIncomingChannelMessage[D]) Error ¶
func (this *BaseIncomingChannelMessage[D]) Error() error
func (*BaseIncomingChannelMessage[D]) IsSnapshot ¶
func (this *BaseIncomingChannelMessage[D]) IsSnapshot() bool
func (*BaseIncomingChannelMessage[D]) IsUpdate ¶
func (this *BaseIncomingChannelMessage[D]) IsUpdate() bool
func (*BaseIncomingChannelMessage[D]) IsValid ¶
func (this *BaseIncomingChannelMessage[D]) IsValid() bool
type BaseOutgoingSubscriptionMessage ¶
type BaseOutgoingSubscriptionMessage struct { Out[ChannelParams] }
BaseOutgoingSubscriptionMessage wraps Out for channel subscription messages.
func NewBaseSubOut ¶
func NewBaseSubOut(params ChannelParams) BaseOutgoingSubscriptionMessage
func (*BaseOutgoingSubscriptionMessage) GetToken ¶
func (this *BaseOutgoingSubscriptionMessage) GetToken() string
func (*BaseOutgoingSubscriptionMessage) Origin ¶
func (this *BaseOutgoingSubscriptionMessage) Origin() string
func (*BaseOutgoingSubscriptionMessage) Protocol ¶
func (this *BaseOutgoingSubscriptionMessage) Protocol() string
func (*BaseOutgoingSubscriptionMessage) SetToken ¶
func (this *BaseOutgoingSubscriptionMessage) SetToken(token string)
func (*BaseOutgoingSubscriptionMessage) UnsubscribeMessage ¶
func (this *BaseOutgoingSubscriptionMessage) UnsubscribeMessage() *OutgoingUnsubscribeMessage
func (*BaseOutgoingSubscriptionMessage) Url ¶
func (this *BaseOutgoingSubscriptionMessage) Url() string
type Binder ¶
type BookSubscriptionHandler ¶
type BookSubscriptionHandler struct {
// contains filtered or unexported fields
}
func NewBookSubscriptionHandler ¶
func NewBookSubscriptionHandler(ctx context.Context, symbol string, depth int) *BookSubscriptionHandler
func (*BookSubscriptionHandler) Close ¶
func (this *BookSubscriptionHandler) Close()
func (*BookSubscriptionHandler) Handle ¶
func (this *BookSubscriptionHandler) Handle(message *IncomingBookChannelMessage) error
func (*BookSubscriptionHandler) OutCh ¶
func (this *BookSubscriptionHandler) OutCh() <-chan *Binder
type Candle ¶
type Candle struct { StartTime time.Time EndTime time.Time Open Decimal High Decimal Low Decimal Close Decimal Volume Decimal TradeCount int }
Candle represents a OHLCV candle.
type CandleBuilder ¶
CandleBuilder builds candles.
func NewCandleBuilder ¶
func NewCandleBuilder(duration time.Duration) *CandleBuilder
NewCandleBuilder creates a new CandleBuilder for the given duration. The initial epoch is set to the next boundary after the current time. Trades with timestamps before this epoch will be discarded by Sink.
func (*CandleBuilder) Cooked ¶
func (this *CandleBuilder) Cooked() (completed *Candle)
Cooked checks if the current candle's EndTime has passed and, if so, finalizes and returns the candle if it contains trades. It then initializes a new candle for the next period. This method is intended to be called periodically (e.g., by a ticker).
func (*CandleBuilder) Sink ¶
func (this *CandleBuilder) Sink(trade Trade) (completed *Candle)
Sink returns the completed candle if a candle was finalized, otherwise nil.
type Channel ¶
type Channel[T any] struct { OutCh <-chan T ErrCh <-chan error Send func(message OutgoingMessage) error Close func() }
func NewSubBalance ¶
func NewSubBook ¶
func NewSubChannel ¶
func NewSubChannel[M IncomingMessage, T any](ctx context.Context, wg *sync.WaitGroup, message OutgoingSubscriptionMessage, handler IncomingMessageHandler[M], outCh <-chan T) (*Channel[T], error)
func NewSubExecution ¶
type ChannelParams ¶
type ChannelParams struct { Channel string `json:"channel,omitempty"` Symbol []string `json:"symbol,omitempty"` Depth int `json:"depth,omitempty"` Snapshot bool `json:"snapshot,omitempty"` SnapTrades bool `json:"snap_trades,omitempty"` SnapOrders bool `json:"snap_orders,omitempty"` OrderStatus bool `json:"order_status,omitempty"` RateCounter bool `json:"ratecounter,omitempty"` Users string `json:"users,omitempty"` // If all, events for master and subaccounts are streamed, otherwise only master account events are published. No snapshot is provided. Token string `json:"token,omitempty"` }
type Conditional ¶
type Conditional struct { OrderType string `json:"order_type,omitempty"` LimitPrice float64 `json:"limit_price,omitempty"` LimitPriceType string `json:"limit_price_type,omitempty"` TriggerPrice float64 `json:"trigger_price,omitempty"` TriggerPriceType string `json:"trigger_price_type,omitempty"` }
Conditional type for secondary close orders.
func (Conditional) IsZero ¶
func (this Conditional) IsZero() bool
type Config ¶
type Config struct { GetWebSocketsTokenOrigin string `json:"getWebSocketsTokenOrigin"` GetWebSocketsTokenRoute string `json:"getWebSocketsTokenRoute"` WebSocketProtocol string `json:"webSocketProtocol"` WebSocketOrigin string `json:"webSocketOrigin"` WebSocketURLv2 string `json:"webSocketURLv2"` AuthWebSocketOrigin string `json:"authWebSocketOrigin"` AuthWebSocketURLv2 string `json:"authWebSocketURLv2"` PublicKey string `json:"publicKey"` PrivateKey string `json:"privateKey"` }
func (Config) MarshalJSON ¶
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
func (*Decimal) GreaterThan ¶
func (*Decimal) MarshalJSON ¶
func (*Decimal) UnmarshalJSON ¶
type Entry ¶
type Entry struct { Asset string `json:"asset"` AssetClass string `json:"asset_class"` Amount Decimal `json:"amount"` Balance Decimal `json:"balance"` Fee Decimal `json:"fee"` LedgerID string `json:"ledger_id"` RefID string `json:"ref_id"` Timestamp time.Time `json:"timestamp"` Type string `json:"type"` Subtype string `json:"subtype"` Category string `json:"category"` WalletType string `json:"wallet_type"` WalletID string `json:"wallet_id"` }
Entry represents a single wallet ledger entry.
type ExecutionSubscriptionHandler ¶
type ExecutionSubscriptionHandler struct {
// contains filtered or unexported fields
}
func NewExecutionSubscriptionHandler ¶
func NewExecutionSubscriptionHandler(ctx context.Context) *ExecutionSubscriptionHandler
func (*ExecutionSubscriptionHandler) Close ¶
func (this *ExecutionSubscriptionHandler) Close()
func (*ExecutionSubscriptionHandler) Handle ¶
func (this *ExecutionSubscriptionHandler) Handle(message *IncomingAddOrderMessage) error
func (*ExecutionSubscriptionHandler) OutCh ¶
func (this *ExecutionSubscriptionHandler) OutCh() <-chan []string
type In ¶
type In[D, R any] struct { Channel string `json:"channel,omitempty"` Type string `json:"type,omitempty"` Data D `json:"data,omitempty,omitzero"` User string `json:"user,omitempty"` Method string `json:"method,omitempty"` Result R `json:"result,omitempty,omitzero"` Success bool `json:"success,omitempty"` ReqID uint32 `json:"req_id,omitempty"` TimeIn time.Time `json:"time_in,omitzero"` TimeOut time.Time `json:"time_out,omitzero"` Err string `json:"error,omitempty"` }
In is a generic websocket receive message for any connection.
type IncomingAddOrderMessage ¶
type IncomingAddOrderMessage struct { In[any, AddOrderResult] }
IncomingAddOrderMessage wraps In with AddOrderResult.
func (*IncomingAddOrderMessage) Error ¶
func (this *IncomingAddOrderMessage) Error() error
func (*IncomingAddOrderMessage) IsSnapshot ¶
func (this *IncomingAddOrderMessage) IsSnapshot() bool
func (*IncomingAddOrderMessage) IsUpdate ¶
func (this *IncomingAddOrderMessage) IsUpdate() bool
func (*IncomingAddOrderMessage) IsValid ¶
func (this *IncomingAddOrderMessage) IsValid() bool
type IncomingBalanceChannelMessage ¶
type IncomingBalanceChannelMessage struct { BaseIncomingChannelMessage[json.RawMessage] }
IncomingBalanceChannelMessage wraps BaseIncomingChannelMessage for balances channel with RawMessage for flexible decoding.
func NewIncomingBalanceChannelMessage ¶
func NewIncomingBalanceChannelMessage() *IncomingBalanceChannelMessage
type IncomingBalanceChannelSnapshotMessage ¶
type IncomingBalanceChannelSnapshotMessage struct { BaseIncomingChannelMessage[[]Asset] }
IncomingBalanceChannelSnapshotMessage wraps BaseIncomingChannelMessage for balances channel with []Asset.
func NewIncomingBalanceChannelSnapshotMessage ¶
func NewIncomingBalanceChannelSnapshotMessage() *IncomingBalanceChannelSnapshotMessage
type IncomingBalanceChannelUpdateMessage ¶
type IncomingBalanceChannelUpdateMessage struct { BaseIncomingChannelMessage[[]Entry] }
IncomingBalanceChannelUpdateMessage wraps BaseIncomingChannelMessage for balances channel with []Entry.
func NewIncomingBalanceChannelUpdateMessage ¶
func NewIncomingBalanceChannelUpdateMessage() *IncomingBalanceChannelUpdateMessage
type IncomingBookChannelMessage ¶
type IncomingBookChannelMessage struct { BaseIncomingChannelMessage[[]Page] }
IncomingBookChannelMessage wraps BaseIncomingChannelMessage for the book channel.
func NewIncomingBookChannelMessage ¶
func NewIncomingBookChannelMessage() *IncomingBookChannelMessage
type IncomingMessage ¶
type IncomingMessageHandler ¶
type IncomingMessageHandler[T IncomingMessage] interface { Handle(message T) error Close() }
type IncomingTradeChannelMessage ¶
type IncomingTradeChannelMessage struct { BaseIncomingChannelMessage[[]Trade] }
IncomingTradeChannelMessage wraps BaseIncomingChannelMessage for the trade channel.
func NewIncomingTradeChannelMessage ¶
func NewIncomingTradeChannelMessage() *IncomingTradeChannelMessage
type OrderParams ¶
type OrderParams struct { OrderType string `json:"order_type,omitempty"` Side string `json:"side,omitempty"` OrderQty float64 `json:"order_qty,omitempty"` Symbol string `json:"symbol,omitempty"` LimitPrice float64 `json:"limit_price,omitempty"` LimitPriceType string `json:"limit_price_type,omitempty"` Triggers Triggers `json:"triggers,omitzero"` TimeInForce string `json:"time_in_force,omitempty"` Margin bool `json:"margin,omitempty"` PostOnly bool `json:"post_only,omitempty"` ReduceOnly bool `json:"reduce_only,omitempty"` EffectiveTime time.Time `json:"effective_time,omitzero"` ExpireTime time.Time `json:"expire_time,omitzero"` Deadline time.Time `json:"deadline,omitzero"` ClOrdID string `json:"cl_ord_id,omitempty"` OrderUserRef int `json:"order_userref,omitempty"` Conditional Conditional `json:"conditional,omitzero"` DisplayQty float64 `json:"display_qty,omitempty"` FeePreference string `json:"fee_preference,omitempty"` NoMPP bool `json:"no_mpp,omitempty"` STPType string `json:"stp_type,omitempty"` CashOrderQty float64 `json:"cash_order_qty,omitempty"` Validate bool `json:"validate,omitempty"` SenderSubID string `json:"sender_sub_id,omitempty"` Token string `json:"token,omitempty"` }
type Out ¶
type Out[P any] struct { Method string `json:"method,omitempty"` Params P `json:"params,omitempty,omitzero"` ReqID uint32 `json:"req_id,omitempty"` Users string `json:"users,omitempty"` // If all, events for master and subaccounts are streamed, otherwise only master account events are published. No snapshot is provided. }
Out is a generic websocket send message for any channel.
type OutgoingBalanceSubscriptionMessage ¶
type OutgoingBalanceSubscriptionMessage struct {
BaseAuthOutgoingSubscriptionMessage
}
OutgoingBalanceSubscriptionMessage wraps BaseAuthOutgoingSubscriptionMessage for balances channel.
func NewOutBalanceSubscriptionMessage ¶
func NewOutBalanceSubscriptionMessage(snapshot bool) *OutgoingBalanceSubscriptionMessage
type OutgoingBookSubscriptionMessage ¶
type OutgoingBookSubscriptionMessage struct {
BaseOutgoingSubscriptionMessage
}
OutgoingBookSubscriptionMessage wraps BaseOutgoingSubscriptionMessage for book channel.
func NewOutBookSubscriptionMessage ¶
func NewOutBookSubscriptionMessage(symbol string, depth int, snapshot bool) *OutgoingBookSubscriptionMessage
type OutgoingExecutionSubscriptionMessage ¶
type OutgoingExecutionSubscriptionMessage struct {
BaseAuthOutgoingSubscriptionMessage
}
OutgoingExecutionSubscriptionMessage wraps BaseAuthOutgoingSubscriptionMessage for executions channel.
func NewOutExecutionSubscriptionMessage ¶
func NewOutExecutionSubscriptionMessage() *OutgoingExecutionSubscriptionMessage
type OutgoingMarketBuyOrder ¶
type OutgoingMarketBuyOrder struct { Out[OrderParams] }
OutgoingMarketBuyOrder wraps Out for market buy orders.
func NewOutMarketBuyOrder ¶
func NewOutMarketBuyOrder(symbol string, quote float64) *OutgoingMarketBuyOrder
func (*OutgoingMarketBuyOrder) SetToken ¶
func (this *OutgoingMarketBuyOrder) SetToken(token string)
type OutgoingMarketSellOrder ¶
type OutgoingMarketSellOrder struct { Out[OrderParams] }
OutgoingMarketSellOrder wraps Out for market sell orders.
func NewOutMarketSellOrder ¶
func NewOutMarketSellOrder(symbol string, base float64) *OutgoingMarketSellOrder
func (*OutgoingMarketSellOrder) SetToken ¶
func (this *OutgoingMarketSellOrder) SetToken(token string)
type OutgoingMessage ¶
type OutgoingMessage interface {
SetToken(token string)
}
type OutgoingSubscriptionMessage ¶
type OutgoingSubscriptionMessage interface { OutgoingMessage GetToken() string UnsubscribeMessage() *OutgoingUnsubscribeMessage Protocol() string Origin() string Url() string }
type OutgoingTradeSubscriptionMessage ¶
type OutgoingTradeSubscriptionMessage struct {
BaseOutgoingSubscriptionMessage
}
OutgoingTradeSubscriptionMessage wraps BaseOutgoingSubscriptionMessage for trade channel.
func NewOutTradeSubscriptionMessage ¶
func NewOutTradeSubscriptionMessage(symbol string, snapshot bool) *OutgoingTradeSubscriptionMessage
type OutgoingUnsubscribeMessage ¶
type OutgoingUnsubscribeMessage struct { Out[ChannelParams] }
OutgoingUnsubscribeMessage wraps Out for unsubscribing from any channel.
func NewOutUnsubscribeMessage ¶
func NewOutUnsubscribeMessage(channel string, opts ...func(*ChannelParams)) *OutgoingUnsubscribeMessage
func (*OutgoingUnsubscribeMessage) SetToken ¶
func (this *OutgoingUnsubscribeMessage) SetToken(token string)
type Page ¶
type Subscription ¶
type Subscription[T IncomingMessage] struct { // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription[T IncomingMessage](ctx context.Context, wg *sync.WaitGroup, message OutgoingSubscriptionMessage, handler IncomingMessageHandler[T]) (*Subscription[T], error)
func (*Subscription[T]) ErrCh ¶
func (this *Subscription[T]) ErrCh() <-chan error
func (*Subscription[T]) Send ¶
func (this *Subscription[T]) Send(message OutgoingMessage) error
type Trade ¶
type Trade struct { Symbol string `json:"symbol"` Side string `json:"side"` Qty Decimal `json:"qty"` Price Decimal `json:"price"` OrdType string `json:"ord_type"` TradeID int `json:"trade_id"` Timestamp time.Time `json:"timestamp"` }
Trade represents a single trade event.
type TradeSubscriptionHandler ¶
type TradeSubscriptionHandler struct {
// contains filtered or unexported fields
}
func NewTradeSubscriptionHandler ¶
func NewTradeSubscriptionHandler(ctx context.Context, candleDuration time.Duration) *TradeSubscriptionHandler
func (*TradeSubscriptionHandler) Close ¶
func (this *TradeSubscriptionHandler) Close()
func (*TradeSubscriptionHandler) Handle ¶
func (this *TradeSubscriptionHandler) Handle(message *IncomingTradeChannelMessage) error
func (*TradeSubscriptionHandler) OutCh ¶
func (this *TradeSubscriptionHandler) OutCh() <-chan *Candle
type Triggers ¶
type Triggers struct { Reference string `json:"reference,omitempty"` Price float64 `json:"price,omitempty"` PriceType string `json:"price_type,omitempty"` }
Triggers type for triggered orders.