Skip to content
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

Add crypto, forex, and indices examples #415

Merged
merged 5 commits into from
Apr 3, 2023
Merged

Add crypto, forex, and indices examples #415

merged 5 commits into from
Apr 3, 2023

Conversation

justinpolygon
Copy link
Contributor

Added example code snippets for crypto, forex, and indices.

@justinpolygon justinpolygon marked this pull request as ready for review March 29, 2023 12:53
@justinpolygon
Copy link
Contributor Author

@jbonzo FYI - it looks like it's actually the linter that made the changes and added the spacing across the lines. So, I changed the code like we chatted about to be:

>                 percent_change = ((item.prev_day.close - item.prev_day.open)/item.prev_day.open*100)
>                 print("{:<15}{:<15}{:<15}{:.2f} %".format(item.ticker,item.prev_day.open,item.prev_day.close,percent_change))

Then, the link check failed here https://github.com/polygon-io/client-python/actions/runs/4601386532/jobs/8129177080?pr=415 so I run poetry run black polygon test_* examples to make the suggested changes and it give me this:

<                 percent_change = (
<                     (item.prev_day.close - item.prev_day.open)
<                     / item.prev_day.open
<                     * 100
<                 )
<                 print(
<                     "{:<15}{:<15}{:<15}{:.2f} %".format(
<                         item.ticker,
<                         item.prev_day.open,
<                         item.prev_day.close,
<                         percent_change,
<                     )
<                 )

Updated code style to pass lint check.
@jbonzo
Copy link
Collaborator

jbonzo commented Apr 3, 2023

@jbonzo FYI - it looks like it's actually the linter that made the changes and added the spacing across the lines. So, I changed the code like we chatted about to be:


>                 percent_change = ((item.prev_day.close - item.prev_day.open)/item.prev_day.open*100)

>                 print("{:<15}{:<15}{:<15}{:.2f} %".format(item.ticker,item.prev_day.open,item.prev_day.close,percent_change))

Then, the link check failed here https://github.com/polygon-io/client-python/actions/runs/4601386532/jobs/8129177080?pr=415 so I run poetry run black polygon test_* examples to make the suggested changes and it give me this:


<                 percent_change = (

<                     (item.prev_day.close - item.prev_day.open)

<                     / item.prev_day.open

<                     * 100

<                 )

<                 print(

<                     "{:<15}{:<15}{:<15}{:.2f} %".format(

<                         item.ticker,

<                         item.prev_day.open,

<                         item.prev_day.close,

<                         percent_change,

<                     )

<                 )

Ah. Thats unfortunate. Ok then.

@justinpolygon justinpolygon merged commit 5d8560c into master Apr 3, 2023
@justinpolygon justinpolygon deleted the jw-add-cfi branch April 3, 2023 21:49
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.

2 participants