Documentation
¶
Index ¶
- func Exchanges() map[string]string
- func MakeExchange(exchangeType string) api.Exchange
- func MakeFeedPair(dataTypeA, dataFeedAUrl, dataTypeB, dataFeedBUrl string) *api.FeedPair
- func MakePriceFeed(feedType string, url string) api.PriceFeed
- func MakeStrategy(sdex *SDEX, assetBase *horizon.Asset, assetQuote *horizon.Asset, ...) api.Strategy
- func Strategies() map[string]StrategyContainer
- type SDEX
- func (sdex *SDEX) CreateBuyOffer(base horizon.Asset, counter horizon.Asset, price float64, amount float64) *build.ManageOfferBuilder
- func (sdex *SDEX) CreateSellOffer(base horizon.Asset, counter horizon.Asset, price float64, amount float64) *build.ManageOfferBuilder
- func (sdex *SDEX) DeleteAllOffers(offers []horizon.Offer) []build.TransactionMutator
- func (sdex *SDEX) DeleteOffer(offer horizon.Offer) build.ManageOfferBuilder
- func (sdex *SDEX) ModifyBuyOffer(offer horizon.Offer, price float64, amount float64) *build.ManageOfferBuilder
- func (sdex *SDEX) ModifySellOffer(offer horizon.Offer, price float64, amount float64) *build.ManageOfferBuilder
- func (sdex *SDEX) ParseOfferAmount(amt string) (float64, error)
- func (sdex *SDEX) ResetCachedXlmExposure()
- func (sdex *SDEX) SubmitOps(ops []build.TransactionMutator) error
- type StrategyContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeExchange ¶
MakeExchange is a factory method to make an exchange based on a given type
func MakeFeedPair ¶
MakeFeedPair is the factory method that we expose
func MakePriceFeed ¶
MakePriceFeed makes a PriceFeed
func MakeStrategy ¶
func MakeStrategy( sdex *SDEX, assetBase *horizon.Asset, assetQuote *horizon.Asset, strategy string, stratConfigPath string, ) api.Strategy
MakeStrategy makes a strategy
func Strategies ¶
func Strategies() map[string]StrategyContainer
Strategies returns the list of strategies along with metadata
Types ¶
type SDEX ¶
type SDEX struct { API *horizon.Client SourceAccount string TradingAccount string SourceSeed string TradingSeed string Network build.Network FractionalReserveMultiplier int8 // contains filtered or unexported fields }
SDEX helps with building and submitting transactions to the Stellar network
func MakeSDEX ¶
func MakeSDEX( api *horizon.Client, sourceSeed string, tradingSeed string, sourceAccount string, tradingAccount string, network build.Network, fractionalReserveMultiplier int8, operationalBuffer float64, simMode bool, ) *SDEX
MakeSDEX is a factory method for SDEX
func (*SDEX) CreateBuyOffer ¶
func (sdex *SDEX) CreateBuyOffer(base horizon.Asset, counter horizon.Asset, price float64, amount float64) *build.ManageOfferBuilder
CreateBuyOffer creates a buy offer
func (*SDEX) CreateSellOffer ¶
func (sdex *SDEX) CreateSellOffer(base horizon.Asset, counter horizon.Asset, price float64, amount float64) *build.ManageOfferBuilder
CreateSellOffer creates a sell offer
func (*SDEX) DeleteAllOffers ¶
func (sdex *SDEX) DeleteAllOffers(offers []horizon.Offer) []build.TransactionMutator
DeleteAllOffers is a helper that accumulates delete operations for the passed in offers
func (*SDEX) DeleteOffer ¶
func (sdex *SDEX) DeleteOffer(offer horizon.Offer) build.ManageOfferBuilder
DeleteOffer returns the op that needs to be submitted to the network in order to delete the passed in offer
func (*SDEX) ModifyBuyOffer ¶
func (sdex *SDEX) ModifyBuyOffer(offer horizon.Offer, price float64, amount float64) *build.ManageOfferBuilder
ModifyBuyOffer modifies a buy offer
func (*SDEX) ModifySellOffer ¶
func (sdex *SDEX) ModifySellOffer(offer horizon.Offer, price float64, amount float64) *build.ManageOfferBuilder
ModifySellOffer modifies a sell offer
func (*SDEX) ParseOfferAmount ¶
ParseOfferAmount is a convenience method to parse an offer amount
func (*SDEX) ResetCachedXlmExposure ¶
func (sdex *SDEX) ResetCachedXlmExposure()
ResetCachedXlmExposure resets the cache
Source Files
¶
- balancedLevelProvider.go
- balancedStrategy.go
- buysellStrategy.go
- cmcFeed.go
- composeStrategy.go
- deleteSideStrategy.go
- deleteStrategy.go
- exchangeFeed.go
- factory.go
- fiatFeed.go
- fixedFeed.go
- krakenExchange.go
- mirrorStrategy.go
- priceFeed.go
- sdex.go
- sellSideStrategy.go
- sellStrategy.go
- staticSpreadLevelProvider.go