Documentation
¶
Index ¶
- type DoneOrder
- type MatchOrder
- type OpenOrder
- type Order
- type ReceivedOrder
- type Service
- func (s *Service) GetLargestMatchOrdersInLastNHours(ctx context.Context, hours, limit int) ([]MatchOrder, error)
- func (s *Service) GetLargestOpenOrdersInLastNHours(ctx context.Context, hours int, limit int) ([]OpenOrder, error)
- func (s *Service) GetLargestReceivedOrdersInLastNHours(ctx context.Context, hours int, limit int) ([]ReceivedOrder, error)
- func (s *Service) StoreMatchOrdersInSupabase(ctx context.Context, hours int, limit int) error
- func (s *Service) StoreOpenOrdersInSupabase(ctx context.Context, hours int, limit int) error
- func (s *Service) StoreReceivedOrdersInSupabase(ctx context.Context, hours int, limit int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchOrder ¶
type Order ¶
type Order struct { OrderID string `json:"order_id" db:"order_id"` // Use both 'json' and 'db' tags Price float64 `json:"price" db:"price"` ProductID string `json:"product_id,omitempty" db:"product_id,omitempty"` Type string `json:"type,omitempty" db:"type,omitempty"` Timestamp int64 `json:"timestamp,omitempty" db:"timestamp,omitempty"` }
type ReceivedOrder ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) GetLargestMatchOrdersInLastNHours ¶
func (s *Service) GetLargestMatchOrdersInLastNHours(ctx context.Context, hours, limit int) ([]MatchOrder, error)
Get the largest match orders in last N hours
func (*Service) GetLargestOpenOrdersInLastNHours ¶
func (s *Service) GetLargestOpenOrdersInLastNHours(ctx context.Context, hours int, limit int) ([]OpenOrder, error)
Get the largest open orders in last N hours
func (*Service) GetLargestReceivedOrdersInLastNHours ¶
func (*Service) StoreMatchOrdersInSupabase ¶
func (*Service) StoreOpenOrdersInSupabase ¶
Click to show internal directories.
Click to hide internal directories.