Skip to content

Comments

Add get exchange codes endpoint#333

Open
Ale-Cas wants to merge 4 commits intoalpacahq:masterfrom
Ale-Cas:get-exchange-codes
Open

Add get exchange codes endpoint#333
Ale-Cas wants to merge 4 commits intoalpacahq:masterfrom
Ale-Cas:get-exchange-codes

Conversation

@Ale-Cas
Copy link

@Ale-Cas Ale-Cas commented Mar 17, 2025

resolves #286

@Ale-Cas Ale-Cas requested review from gnvk and said-saifi as code owners March 17, 2025 18:58
Copy link
Collaborator

@gnvk gnvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following code will fail against the real server:

codes, err := marketdata.GetExchangeCodes()
if err != nil {
  panic(err)
}
panic: failed to unmarshal news: invalid character '\x1f' looking for beginning of value


defer resp.Body.Close()

var exchangeCodes map[string]string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] I prefer declaring this just before usage (L1593).

Copy link
Collaborator

@gnvk gnvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for your contribution!

@Ale-Cas
Copy link
Author

Ale-Cas commented Mar 19, 2025

LGTM. Thank you for your contribution!

Thank you for the review!

@Ale-Cas
Copy link
Author

Ale-Cas commented Mar 19, 2025

On a side note, these linting errors are unrelated to the changes in this PR.

EDIT: I remembered about #331 which should fix them already, so I'll wait for that and rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetExchangeCodes is missing from the library

2 participants