Giter Site home page Giter Site logo

unofficial-robinhood-api's Introduction

Well hi there! ๐Ÿ‘‹

Hi! I'm Conrad, I like to spend countless hours setting up automation for jobs which would take me five minutes otherwise! If it's interesting, I love contributing.

unofficial-robinhood-api's People

Contributors

conradweiser avatar mainstringargs avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unofficial-robinhood-api's Issues

Error when implementing JAR and running

I am very interested in your work, but when trying to run it with just the simple -
RobinhoodApi api = new RobinhoodApi("username", "password");
AccountElement accountData = api.getAccountData();
String accountNumber = accountData.getAccountNumber();
Float buyingPower = accountData.getBuyingPower();
System.out.println(accountNumber + " : " + String.valueOf(buyingPower));

I continually get the error on my log -
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes2.dex)

Any idea?
I noticed other errors that matched that one when I googled and they mentioned that the HTTP call may be deprecated after version 23. I tried recreating this app with 22 to see and it still didnt work with the same error (v27 and v22)

Robinhood API has changed

When I try to log in using this simple code:

	public static void main(String[] args) {
		
		RobinhoodApi api = null;
		try {
			api = new RobinhoodApi(<USER>,<PASSWORD>);
		} catch (RobinhoodApiException e) {
			e.printStackTrace();
		}
		
		try {
			System.out.println(api.getAccountData());
		} catch (RobinhoodNotLoggedInException e) {
			e.printStackTrace();
		} catch (RobinhoodApiException e) {
			e.printStackTrace();
		}
	}

I get this error:

Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
	at com.google.gson.Gson.fromJson(Gson.java:887)
	at com.google.gson.Gson.fromJson(Gson.java:852)
	at com.google.gson.Gson.fromJson(Gson.java:801)
	at conrad.weiser.robinhood.api.request.RequestManager.makePostRequest(RequestManager.java:110)
	at conrad.weiser.robinhood.api.request.RequestManager.makeApiRequest(RequestManager.java:58)
	at conrad.weiser.robinhood.api.RobinhoodApi.logUserIn(RobinhoodApi.java:129)
	at conrad.weiser.robinhood.api.RobinhoodApi.<init>(RobinhoodApi.java:84)
	at Test.main(Test.java:11)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
	... 8 more

Printing out the POST response from Robinhood, gives this:

<h1>Not Found</h1><p>The requested URL /api-token-auth/ was not found on this server.</p>

can't create market or limit orders

  1. had to update the fundamentals endpoint to add auth token to meet newer requirements. Then had to move "verifytickerdata" before setOrderParameters.

  2. even afterwards, I get 400 bad request when doing either market or limit. Can anyone else successfully do an order right now?

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.