Coder Social home page Coder Social logo

Create GET Orders about allyinvest.py HOT 8 CLOSED

anthonymorast avatar anthonymorast commented on July 20, 2024
Create GET Orders

from allyinvest.py.

Comments (8)

anthonymorast avatar anthonymorast commented on July 20, 2024

Excellent questions.

For your last question, I think the FIXML stuff should definitely be converted to a user-friendly format (this is done in the reverse in the order_common_stock method). I really would prefer ordinary developers to not have to care about FIX.

As for your first question, if I recall correctly, the API wrapper more or less just returns the raw JSON/XML that comes out of Ally. Since there will probably be some FIX parsing in this case, it wouldn't hurt to convert any of the formats to JSON (as I expect most people to ignore the XML formatting) and let the developer deal with the details.

One thing I was working on when I was more active with this project was the ally/request and ally/response classes. The idea here is that the API requests and responses are wrapped up in Python classes which are more user-friendly. For example

account holdings request:
https://github.com/anthonymorast/AllyInvest.py/blob/master/ally/requests/account_holdings.py

account holdings response:
https://github.com/anthonymorast/AllyInvest.py/blob/master/ally/responses/account_holdings.py

there is example usage in the examples/example.py file.

You might consider implementing an account orders response/request and wrapping your parsing into that (if you'd like to). Otherwise, I would just parse the FIX into JSON and return the JSON and if the API returns a False type for some reason, maybe just return empty JSON.

from allyinvest.py.

wmorgansoftware avatar wmorgansoftware commented on July 20, 2024

OK, sounds good. I can do both implementations, as the legacy continues to exist, and now that I've converted to using your package (gotta love how flask_dance forces you to have a HTTP request making debugging quite annoying), I've been using the legacy.

I'm going to have to update URLs after all, as the URL that's there forces XML instead of allowing for JSON.

from allyinvest.py.

anthonymorast avatar anthonymorast commented on July 20, 2024

Sounds good. Thanks for your feedback/contribution. I look forward to your PR.

from allyinvest.py.

wmorgansoftware avatar wmorgansoftware commented on July 20, 2024

Tried to push a new branch up to the project, and the terminal response is that I don't have permission to do so. I know I can push on my own projects. Would it be OK to put up a new branch with these proposed changes?

from allyinvest.py.

anthonymorast avatar anthonymorast commented on July 20, 2024

I think you have to submit a pull request. Do you have your own fork of the repository with your changes?

If so, from your fork you should be able to go to the Pull Request tab and click the New Pull Request button to submit one to the main branch of this project.

from allyinvest.py.

anthonymorast avatar anthonymorast commented on July 20, 2024

If not, you should fork the repository, add your changes, and then submit the request.

from allyinvest.py.

wmorgansoftware avatar wmorgansoftware commented on July 20, 2024

OK, should be up with #6 .

from allyinvest.py.

anthonymorast avatar anthonymorast commented on July 20, 2024

Looks good. Thanks again for the contribution!

from allyinvest.py.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.