Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Account Isn't Sent - Fails #118

Description

@ZacharyHandshoe

I am utilizing the JS framework to send a sell request. I initially authenticate with a token, which is tossed in correctly. When I run a request not needing an account, the request is fine and works. If the account is needed it fails as the framework does not fill in an account url for the request.
The authorization token is filled in and used with the authentication.

Code being executed:

var Robinhood=require('robinhood')(credentials, function (){});
Robinhood.place_sell_order({
        account:accountString,
        type:'market',
        quantity:quantity,
        bid_price:212.02,
        instrument:{
            url:await get_stock_url(ticker),
            symbol:ticker
        }
    },
function (error, response, body){
            if(error){
                console.log(error);
            }else{
                console.log(body);
            }
        }
    );

Expected result

A sell request for 1 share of MSFT at $212.02 is executed.

Actual behaviour

image
The above is a photo of the fields being presented in the POST request. As shown, the account field is missing and is the root cause of the problem.

Activity

  1. aurbano commented on Dec 10, 2020

    @aurbano
    Owner

    Good catch! Feel free to send a PR for this :)

  2. ZacharyHandshoe commented on Dec 11, 2020

    @ZacharyHandshoe
    Author

    I have edited the source to manually take in a string and then use that for the account. This sends what would look like a correct request, but now I get the following error

    {"account":["Invalid hyperlink - No URL match."]}
    

    I know the account field which I give is correct as it has been copy-pasted from a successful order put through on the Robinhood website.
    Could this have something to do with the serialization?

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions