Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
log prices from both feeds in priceFeed.go
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed Oct 11, 2018
1 parent fa7d7c4 commit b916c5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion api/priceFeed.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package api

import "log"

// PriceFeed allows you to fetch the price of a feed
type PriceFeed interface {
GetPrice() (float64, error)
Expand All @@ -24,5 +26,7 @@ func (p *FeedPair) GetCenterPrice() (float64, error) {
return 0, err
}

return pA / pB, nil
centerPrice := pA / pB
log.Printf("feedPair prices: feedA=%.7f, feedB=%.7f; centerPrice=%.7f\n", pA, pB, centerPrice)
return centerPrice, nil
}
1 change: 0 additions & 1 deletion plugins/staticSpreadLevelProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func (p *staticSpreadLevelProvider) GetLevels(maxAssetBase float64, maxAssetQuot
log.Printf("error: center price couldn't be loaded! | %s\n", e)
return nil, e
}
log.Printf("center price: %.7f\n", centerPrice)
if p.offset.percent != 0.0 || p.offset.absolute != 0 {
// if inverted, we want to invert before we compute the adjusted price, and then invert back
if p.offset.invert {
Expand Down

0 comments on commit b916c5f

Please sign in to comment.