Coder Social home page Coder Social logo

allyinvest.py's Introduction

Anthony Morast

About Me

  • ๐Ÿ’ผ I am C++ Software Engineer at Sterling Trading Tech
  • ๐Ÿ“– I have a blog on my personal website and Medium
  • ๐Ÿ“— I'm reading An Introduction to Mathematical Finance with Applications by Arlie O. Petters and Xiaying Dong.
  • ๐Ÿ’ฌ Ich lerne Deutsch.
  • ๐Ÿ‘ท I'm currently working on:
    • A fluid dynamics simulation playground in Rust using the Lattice Boltzmann method
    • Improving my website by working through the submitted bugs
    • Option pricing via binomial models in Rust

Education

  • ๐Ÿ“ƒ Applied and Compuational Mathematics, B.S.
  • ๐Ÿ“ƒ Computer Science, B.S.
  • ๐Ÿ“ƒ Computational Sciences and Robotics, M.S.

Things I Really Like to Use

Some More Things I Can Use

Connect With Me

๐Ÿ“ง Email ๐Ÿ’ป Consulting


Top Languages

Anthony's GitHub stats

allyinvest.py's People

Contributors

anthonymorast avatar wmorgansoftware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

allyinvest.py's Issues

Ally Invest returning HTML with response.ok

I have been noticing an issue with the return of JSON data with Ally. Be aware I've been running a home-brew API, but noticed your code would return the same issue, so I'm adding it to help out.

Lately, I have been receiving intermittent responses from Ally where the status_code is 200, but the content is HTML webpage code stating an error on their end, instead of JSON stating something similar. As a result, when attempting to run response.json(), I get the following traceback in a 500 error:

  ... Traceback to my own code ...
    return resp.json()
  File "[PATH]/venv/lib/python3.9/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

See if something similar is happening to you; I'd love to collaborate with you on this.

return response.json()

Also as an aside (but unrelated), let me know if you're OK with pull requests on this code, as my work has done some things with orders and order previews; I'm in the process of making something for orders POST to automate trades, but this issue has been slowing my progress.

Teach Royce how to use

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request

Current behavior

I am unable to play with Anthony's Investment toy. I haven't tried yet but it looks hard.

Expected behavior

I'm not sure yet. I haven't played with Anthony's toy

Minimal reproduction of the problem with instructions

Do nothing, that's literally all I've done

What is the motivation / use case for changing the behavior?

I want to play with Anthony's toy

Please tell us about your environment:

It isn't set up

Create GET Orders

I'm looking to introduce a method to GET all the orders for a particular account. URLs doesn't need a change as get_post_order will work. However, there's some implementation questions about consistency in returned values before going forward with a PR for this:

When the raw_data (using this terminology since that's what my personal version uses for what comes back at an equivalent of your __to_format though I only use JSON) comes back from Ally, raw_data['response']['orderstatus']['order'] can be either a list of dicts, a dict, or a False type (can't remember the specific format; I have active orders right now that I'd rather not dump for the sake of writing this issue; can certainly do for the PR). Is this something that this package should make consistent, or something that the developer who is importing this package needs to account for?

Each order, whether in a dict or list of dicts, has one key of "fixmlmessage", with a value in FIXML format. I'm converting this message to a dict using xmltodict for my own use, but don't know if this package wants to do a similar conversion, or if that should be left up to the developer that uses this package. An answer to this question would go a long way towards also implementing the POST order, as that needs to be made FIXML as well, and whether that's the responsibility of this package or the developer.

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.