instrument usecases & repository methods
This commit is contained in:
parent
39b89fc404
commit
16d38bb3cf
7 changed files with 100 additions and 13 deletions
|
|
@ -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.
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue