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

Wrong order of the date in TOS #16

Closed
greko6 opened this issue Oct 9, 2023 · 4 comments
Closed

Wrong order of the date in TOS #16

greko6 opened this issue Oct 9, 2023 · 4 comments

Comments

@greko6
Copy link

greko6 commented Oct 9, 2023

Hello,

Great library!

You have the wrong order of the option. Instead {dd}{mm}{yy}, it should be: {yy}{mm}{dd} for ThinkOrSwim (and potentially TDA?).
Example that works in TOS: .PYPL231027P57, (not: .PYPL271023P57)

'tos': '.{symbol}{mm}{dd}{yy}{_type}{strike}.{strike_dec}',

Just letting you know!

@pssolanki111
Copy link
Owner

Thanks @greko6

Interesting. The above format was given to me by some folks who used TOS and TDA.
Would you mind joining the discord server to show a few examples from the TOS UI (or thinkScript)

(or share them here if you prefer)

@greko6
Copy link
Author

greko6 commented Nov 1, 2023

Sure! Here are a few screenshots from TOS:

SPX:
image

AAPL:
image

TSLA:
image

AMZN:
image

@pssolanki111
Copy link
Owner

Thanks @greko6
appreciate it. Haven't had much time recently so sorry for the delays :D

For TDA API, the current format is correct (that's mentioned in their developer documentation). I'll try to cross verify the TOS format and then make a change in lib if required.

Till then, you can simply use the OptionSymbol object to access relevant data (and format to any format that you prefer)

I might actually add ability to pass in a format string which will be used for a custom formatting.

@pssolanki111
Copy link
Owner

pssolanki111 commented Nov 14, 2023

I've decided to make this change in the next release, as I could not find any pressing resource in favor of the current structure. Will be released today. Thanks for bringing this up @greko6

I will add this structure as tos1 so that both the structures are allowed to be used because I'm sure there was a reason why the current structure was used

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

No branches or pull requests

2 participants