-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: support multiple concurrent arb pairs & SQS API key #3
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM.
Only major question I had was on the sqs API Key, please feel free to merge whenever you feel comfortable
@@ -0,0 +1 @@ | |||
package osmosis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming we will be using this in future PRs
@@ -59,7 +61,27 @@ type Pool struct { | |||
|
|||
func getOsmosisPriceAndRoute(tokenInDenom, tokenOutDenom string, tokenInAmount int64) (float64, []poolmanagertypes.SwapAmountInSplitRoute, error) { | |||
url := fmt.Sprintf("%s?tokenIn=%d%s&tokenOutDenom=%s&humanDenoms=false", osmosisQuoteAPI, tokenInAmount, tokenInDenom, tokenOutDenom) | |||
resp, err := http.Get(url) | |||
|
|||
// Define the headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it so that we try to get the SQS OSMOSIS API KEY from env, if doesnt exist just to a get without the sqs api key? (for those who does not have access to sqs api key but still wants to use the arb bot)
@p0mvn I'll take on this PR and get it merged 👍 |
Yes, please! Sorry, I haven't had the chance to come back to this yet |
main.go
)