instrument usecases & repository methods

This commit is contained in:
yash 2026-02-25 22:33:52 +03:00
parent 39b89fc404
commit 16d38bb3cf
7 changed files with 100 additions and 13 deletions

View file

@ -1,6 +1,9 @@
package entities
type Pair struct {
type InstrumentID string
type Instrument struct {
ID InstrumentID
BaseCurrency string // base currency of the pair. e.g. BTC.
QuoteCurrency string // quote currency of the pair. e.g. USDT.
}

View file

@ -3,8 +3,8 @@ package entities
import "github.com/shopspring/decimal"
type Price struct {
Ask decimal.Decimal // limit seller / market buyer. ask > bid.
Bid decimal.Decimal // limit buyer / market seller. bid < ask.
Spread decimal.Decimal // delta between ask and bid.
Pair Pair // trading pair
Ask decimal.Decimal // limit seller / market buyer. ask > bid.
Bid decimal.Decimal // limit buyer / market seller. bid < ask.
Spread decimal.Decimal // delta between ask and bid.
Instrument Instrument // trading pair
}