Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelOrderResponse ¶
type CancelOrderResponse struct {
Triggered *bool `json:"triggered"`
Trigger *string `json:"trigger"`
TimeInForce string `json:"time_in_force"`
TriggerPrice *float64 `json:"trigger_price"`
ReduceOnly bool `json:"reduce_only"`
Price float64 `json:"price"`
PostOnly bool `json:"post_only"`
OrderType string `json:"order_type"`
OrderState string `json:"order_state"`
OrderID string `json:"order_id"`
MaxShow float64 `json:"max_show"`
LastUpdateTimestamp int64 `json:"last_update_timestamp"`
Label string `json:"label"`
IsRebalance *bool `json:"is_rebalance"`
IsLiquidation bool `json:"is_liquidation"`
InstrumentName string `json:"instrument_name"`
Direction string `json:"direction"`
CreationTimestamp int64 `json:"creation_timestamp"`
API bool `json:"api"`
Amount float64 `json:"amount"`
}
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
Decimal package in Go to match rust_decimal usage
func NewDecimalFromFloat ¶
type DeribitResponse ¶
type Order ¶
type Order struct {
Web bool `json:"web"`
TimeInForce string `json:"time_in_force"`
Replaced bool `json:"replaced"`
ReduceOnly bool `json:"reduce_only"`
Price float64 `json:"price" decimal_format:"deserialize"`
PostOnly bool `json:"post_only"`
OrderType OrderType `json:"order_type"`
Status OrderStatus `json:"order_state"`
OrderID string `json:"order_id"`
MaxShow float64 `json:"max_show" decimal_format:"deserialize"`
LastUpdate int64 `json:"last_update_timestamp"`
Label string `json:"label"`
IsRebalance *bool `json:"is_rebalance"`
IsLiquidation bool `json:"is_liquidation"`
InstrumentName string `json:"instrument_name"`
FilledAmount float64 `json:"filled_amount" decimal_format:"deserialize"`
Direction Direction `json:"direction"`
Timestamp int64 `json:"creation_timestamp"`
AveragePrice float64 `json:"average_price" decimal_format:"deserialize"`
API bool `json:"api"`
Amount float64 `json:"amount" decimal_format:"deserialize"`
}
type OrderBook ¶
type OrderBook struct {
Asks PriceLevels
Bids PriceLevels
Timestamp time.Time
}
func (*OrderBook) UnmarshalJSON ¶
type OrderResult ¶
type OrderStatus ¶
type OrderStatus string
const ( Open OrderStatus = "open" Filled OrderStatus = "filled" Cancelled OrderStatus = "cancelled" Rejected OrderStatus = "rejected" )
type PriceLevels ¶
type PriceLevels []PriceLevel
func (PriceLevels) Len ¶
func (p PriceLevels) Len() int
func (PriceLevels) Less ¶
func (p PriceLevels) Less(i, j int) bool
func (PriceLevels) Swap ¶
func (p PriceLevels) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.