Skip to content

Commit

Permalink
feat(price-feeder): add mexc provider (#1339)
Browse files Browse the repository at this point in the history
Adds the mexc provider 馃殌 

---

### Author Checklist

_All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues._

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] added appropriate labels to the PR
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

_All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items._

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
adamewozniak committed Sep 15, 2022
1 parent 42586dd commit d5f1a67
Show file tree
Hide file tree
Showing 10 changed files with 581 additions and 2 deletions.
1 change: 1 addition & 0 deletions price-feeder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features

- [1328](https://github.com/umee-network/umee/pull/1328) Add bitget provider.
- [1339](https://github.com/umee-network/umee/pull/1339) Add mexc provider.

### Bugs

Expand Down
3 changes: 2 additions & 1 deletion price-feeder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `price-feeder` tool is responsible for performing the following:
Binance and Osmosis, based on operator configuration. These exchange rates
are exposed via an API and are used to feed into the main oracle process.
2. Taking aggregated exchange rate price data and submitting those exchange rates
on-chain to Umee's `x/oracle` module following Umee's [Oracle](https://github.com/umee-network/umee/tree/main/x/oracle/spec)
on-chain to Umee's `x/oracle` module following Umee's [Oracle](https://github.com/umee-network/umee/tree/main/x/oracle#readme)
specification.

<!-- markdown-link-check-disable -->
Expand All @@ -33,6 +33,7 @@ The list of current supported providers:
- [Gate](https://www.gate.io/)
- [Huobi](https://www.huobi.com/en-us/)
- [Kraken](https://www.kraken.com/en-us/)
- [Mexc](https://www.mexc.com/)
- [Okx](https://www.okx.com/)
- [Osmosis](https://app.osmosis.zone/)
<!-- markdown-link-check-enable -->
Expand Down
1 change: 1 addition & 0 deletions price-feeder/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var (
provider.ProviderCoinbase: {},
provider.ProviderFTX: {},
provider.ProviderBitget: {},
provider.ProviderMexc: {},
provider.ProviderMock: {},
}

Expand Down
2 changes: 1 addition & 1 deletion price-feeder/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/umee-network/umee/price-feeder
go 1.19

require (
github.com/armon/go-metrics v0.4.0
github.com/cosmos/cosmos-sdk v0.46.1
github.com/go-playground/validator/v10 v10.11.0
github.com/golangci/golangci-lint v1.49.0
Expand Down Expand Up @@ -45,7 +46,6 @@ require (
github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/armon/go-metrics v0.4.0 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/aws/aws-sdk-go v1.40.45 // indirect
Expand Down
3 changes: 3 additions & 0 deletions price-feeder/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ func NewProvider(
case provider.ProviderBitget:
return provider.NewBitgetProvider(ctx, logger, endpoint, providerPairs...)

case provider.ProviderMexc:
return provider.NewMexcProvider(ctx, logger, endpoint, providerPairs...)

case provider.ProviderMock:
return provider.NewMockProvider(), nil
}
Expand Down

0 comments on commit d5f1a67

Please sign in to comment.