Documentation ¶
Overview ¶
Package broker allows to get static data of a list of brokers defined in the brokers.json file. This data can be used e.g. to calculate order prices with github.com/MaximilianMeister/asset/order
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct { Name string `json:"name"` BasicPrice decimal.Decimal `json:"basic_price"` CommissionRate decimal.Decimal `json:"commission_rate"` MinRate decimal.Decimal `json:"min_rate"` MaxRate decimal.Decimal `json:"max_rate"` }
Broker contains static broker data
func FindBroker ¶
FindBroker returns a Broker type with all static data about a single broker
type Brokers ¶
Brokers represents a map of all brokers and their static data
func NewBrokers ¶
NewBrokers returns a map of type Brokers which contains all static broker data defined in brokers.json
type InvalidBrokerError ¶
type InvalidBrokerError struct {
// contains filtered or unexported fields
}
InvalidBrokerError represents an error for a non existing Broker
func (*InvalidBrokerError) Error ¶
func (e *InvalidBrokerError) Error() string
Click to show internal directories.
Click to hide internal directories.