Skip to content

Commit

Permalink
FEATURE: [exchange] new interface and field for otc
Browse files Browse the repository at this point in the history
  • Loading branch information
kbearXD committed Feb 11, 2025
1 parent 22e3582 commit 29fe2d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/types/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ type ExchangeMarketDataService interface {
QueryKLines(ctx context.Context, symbol string, interval Interval, options KLineQueryOptions) ([]KLine, error)
}

type OTCExchange interface {
RequestForQuote(ctx context.Context, symbol string, side SideType, quantity fixedpoint.Value) (submitOrder SubmitOrder, err error)
}

type CustomIntervalProvider interface {
SupportedInterval() map[Interval]int
IsSupportedInterval(interval Interval) bool
Expand Down
3 changes: 3 additions & 0 deletions pkg/types/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (o OrderStatus) Closed() bool {
type SubmitOrder struct {
ClientOrderID string `json:"clientOrderID,omitempty" db:"client_order_id"`

// QuoteID is for OTC exchange
QuoteID string `json:"quoteID,omitempty" db:"quote_id"`

Symbol string `json:"symbol" db:"symbol"`
Side SideType `json:"side" db:"side"`
Type OrderType `json:"orderType" db:"order_type"`
Expand Down

0 comments on commit 29fe2d8

Please sign in to comment.