aurbano/robinhood-node

Account Isn't Sent - Fails

開放

#118 建立於 2020年12月10日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (177 個分叉)batch import
help wanted

倉庫指標

星標
 (698 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南