Bitcoin Forum
November 11, 2024, 02:04:20 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help with BTER.com api [Java]  (Read 1057 times)
mberg2007 (OP)
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
August 22, 2013, 07: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
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
August 24, 2013, 08: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...

mberg2007 (OP)
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
August 26, 2013, 09: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


daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
August 26, 2013, 11: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...

mberg2007 (OP)
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
August 26, 2013, 12:15:08 PM
 #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
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
August 26, 2013, 12:24:01 PM
 #6

Cool! Sounds similar to my code! Maybe we could collaborate somehow?

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!