Author

Topic: Need help with BTER.com api [Java] (Read 1059 times)

legendary
Activity: 965
Merit: 1000
August 26, 2013, 07:24:01 AM
#6
Cool! Sounds similar to my code! Maybe we could collaborate somehow?
member
Activity: 117
Merit: 10
August 26, 2013, 07:15:08 AM
#5
I meant _your_ trade classes, not theirs. All the exchanges, that I know, only use those json calls. But since the results are not very convenient to manipulate, I implemented classes for trades, depth, ticker, orders etc.

Most exchanges have such cryptic error messages, though. It's mainly trial and error...

Oh sure, I have a layered model that abstracts away all the specifics of any particular exchange. This allows me to work on a collated order book, which is basically made up of orders from all the exchanges I add support for.

-Michael
legendary
Activity: 965
Merit: 1000
August 26, 2013, 06:48:38 AM
#4
I meant _your_ trade classes, not theirs. All the exchanges, that I know, only use those json calls. But since the results are not very convenient to manipulate, I implemented classes for trades, depth, ticker, orders etc.

Most exchanges have such cryptic error messages, though. It's mainly trial and error...
member
Activity: 117
Merit: 10
August 26, 2013, 04:16:14 AM
#3
You use any trade classes or implement the API with 100% own sources?

I wrote a trade lib. Maybe I could include the API there. But you would have to use the rest of the lib then, too...

There are no "trade classes" available. The official API is simply a collection of JSON calls and return values with very simple php based examples. You pretty much have no other choice but to write your own java classes to implement the API.

This in itself is not that frightening though, the java boilerplate code is pretty trivial. There is a SHA512 signature of the post data which is just about the only unusual thing going on. It might be that I have a bug there, but with these unspecific error messages I can't know for sure. It might also be that I am specifying the currency pair incorrectly, using the wrong decimal point in the amount and price fields, or incorrect nonce parameter (which, incidently, is completely undocumented!).

-Michael


legendary
Activity: 965
Merit: 1000
August 24, 2013, 03:05:22 PM
#2
You use any trade classes or implement the API with 100% own sources?

I wrote a trade lib. Maybe I could include the API there. But you would have to use the rest of the lib then, too...
member
Activity: 117
Merit: 10
August 22, 2013, 02:27:11 PM
#1
Hi,

Has anyone managed to successfully place an order on BTER using Java to access their api?

I can't seem to get it to work. I believe I am doing the SHA512 signing correctly but the server just returns "Invalid data", which is somewhat of a dead end as far as problem solving goes :-)

Please don't post a response with a link to the guy who did a Python wrapper for the api. I'm doing precisely what he is doing, only mine isn't working :-/

-Michael
Jump to: