Pages:
Author

Topic: Do you use a bot for trading? - page 7. (Read 17845 times)

legendary
Activity: 2632
Merit: 1040
February 03, 2017, 02:11:56 PM
the REST services should necessarily be synchronous

Never say that. I'm talking about a BOT Context. Not about the world of the REST api Call.
If you read my previous reply i develop by myself in async context.
BUT if we talk about BOT, async response is not useful, i need to get data, i can't continue my work without getting the resul :

Just an example

- If i want to delete an order i must wait for the OK response, because if response is KO i need to find for the trade that fills the order
- I want to have best market prices, i need to call MarketOrders and then get the 2 TOP elements
- I want to create an orders, i need to wait for return code OK and read market ID

Any Calls my bot use need the response.

BUT if you wants to use the MARKET EXPLORER function (that ONLY loads order/trades/myOrder/Mytrader) after you press the LOAD Button, then a dedicated thread will start to popolate the table while you can change screen and continue your work.
This is async BUT, not at API level, because i will perform 4 Sync Call to collect data and then i will show results in 4 tables. So workflow is

UPDATE BUTTON PRESS -> ASYNC THREAD -> 4 SYNC API CALL -> POPULATE  TABLES with REsponses.
newbie
Activity: 14
Merit: 0
February 03, 2017, 02:10:35 PM
Quote from: Sampey
BUT, i'm pretty sure you can agree with me that if you write a Trading BOT, you will use REST API Sync CALL.  Grin

No, definitely not... I hate blocking threads and waiting 2 seconds for a response from the exchange ...
sure, I need the result of my request at some point, but not in a sync 
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 02:06:44 PM
@Sampey: Here is one explaining async REST Services implemented in Java:
https://dzone.com/articles/jax-rs-20-asynchronous-server-and-client


YEah i know about that, and i've also develop async call, but not in Bot environment.
I create async call with dedicated thread to wait result and send it back to the main sistem, or async call where next computation part is demanded to another thread on another system and client doesn't know nothing about result.

BUT, i'm pretty sure you can agree with me that if you write a Trading BOT, you will use REST API Sync CALL.  Grin
legendary
Activity: 3514
Merit: 1280
English ⬄ Russian Translation Services
February 03, 2017, 02:05:15 PM
Well i really start thinking that it's not possible to talk with you

~snipped~

Mate, let's forget about Bter (after it got hacked it is no longer relevant, anyway)

I'm not really interested in continuing this discussion about Bter (it was only a sort of reality check). As I said, this is not a pissing contest, so I basically don't give a fuck since what I wanted to find out I found out. What I'm really interested in at the moment is your claim that the REST services should necessarily be synchronous. In fact, I don't really see how the idea of either synchronous or asynchronous requests, or, in a more broad sense, such api's has anything to do with that, but I think it won't take much of your precious time to expand more on this. For example, you could reveal some RFC (or other binding standard) defining exactly that, namely, how REST compliant api's are required to be synchronous, since this is what you are essentially claiming
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 02:04:21 PM
Quote from: Sampey
the way you manage the API Call inside your Client it's up to you, but the HTTP CALL from your Client to API System in a REST environment is Sync.

A RESTful endpoint can be either synchronous or asynchronous.
As the C.A.T. bot is implemented in Java, you might have a look into JAX-RS 2 specification.


Yes of course, never Said that you can't perform an async call. BUT when you need the result to continue your computation you must perform a Sync call.
For example, my bot is 100% sync, but i'm pretty sure 99% of Bots are sync

About JAX-RS 2 i just use JAVA.NET i don't need nothing more to make POST/GET REST CALL.  Wink

newbie
Activity: 14
Merit: 0
February 03, 2017, 01:57:31 PM
Quote from: Sampey
the way you manage the API Call inside your Client it's up to you, but the HTTP CALL from your Client to API System in a REST environment is Sync.

A RESTful endpoint can be either synchronous or asynchronous.
As the C.A.T. bot is implemented in Java, you might have a look into JAX-RS 2 specification.

The limitation to send more than one request at a time, is at most exchanges the "nonce".

Edit:
@Sampey: Here is one explaining async REST Services implemented in Java:
https://dzone.com/articles/jax-rs-20-asynchronous-server-and-client

But the whole discussion is a little bit cherry-picking into details....
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:51:18 PM
Well i really start thinking that it's not possible to talk with you :

HTTP LIBRARY is a CLIENT environment library to perform HTTP CALL. OK? A Library on CLIENT SIDE that will makes you perform HTTP CALLS using REST API

I use java, so for example :
this is a HTTP Library : http://hc.apache.org/httpclient-3.x/
this is another java http library https://docs.oracle.com/javase/7/docs/api/java/net/package-summary.html

Ok?
This is a code example :

And here you can find some java code example if you wants to learn something useful

https://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/

Quote
As I already told you, if you send two authenticated requests to this exchange, your last request (by timestamp) can be be processed first. This doesn't work with other exchange but it works with Bter. Instead of arguing, you'd better really try it out

This has nothing to do with async or sync call.
I Can create 10 sync call that starts at the same exact moment.

There's only 1 problem : you must set a NONCE.
Do you know what is a NONCE, i'm sure yes, you're an expert  Wink

NONCE is created to discard eventually http call with a nonce lower than the last use.

So in your example if i send First CALL 1 And Then CALL 2 BUT for any reason CALL 2 arrives to API System before CALL 1, then CALL 1 will be discarded.
If bter doesn't do that (Standing at what you said) there are 2 reason :
1 - It's bad written
2 - You're not using the BTER REST Api system
May exchanges offers different API System

OkCoin for example offers 3 API System
https://www.okcoin.com/about/rest_api.do

Well the next will be my last post.
Choose the last things to say, i will make only 1 last reply, i'm not here to loose time, and i'm not here to make me troll without any specific reason.

hero member
Activity: 1330
Merit: 569
February 03, 2017, 01:50:24 PM
Even the manual trading I am yet to master it not to talk of taking it professional by now using a bot. I don't even understand how the not will even work and another discouraging factor is the issue that it does not guarantee that profit will be made or losses will not be made so I just stick to taking a decision I can completely take responsibility for its outcome.
hero member
Activity: 1456
Merit: 624
Maintain Social Distance, Stay safe.
February 03, 2017, 01:47:15 PM
carap: what language do you use for bot coding?

We primarily use Delphi, MatLab, PHP (since we have a great experience with these technologies).

However, IMO language itself is not important, the same could be created on Java, C or Python. 

Do you done in this project or this bot.. can you share it with us or pm me the bot to download also the resources or github.
For basic understanding i want to find a bot the works and more features.. setup.
Everything in trading is in your strategy but we can easily earn more if we use bot..
legendary
Activity: 3514
Merit: 1280
English ⬄ Russian Translation Services
February 03, 2017, 01:40:51 PM
~snipped~

I need to continue?

I don't care about anything you just said

You may tell it someone else but please don't tell me, this has absolutely no effect on me. After all, this is not a pissing contest. I've been in the business for more than 25 years (really), but I'm not going to talk about that since if you tell bullshit, this will remain bullshit, no matter what. I think you were just using some standard routine and did actually try to work with this exchange in an asynchronous mode. Asynchronous mode means that you don't need to wait for a result after sending an authenticated request, i.e. you can send requests and process the results asynchronously, in different threads without synchronizing the threads

This is asynch on YOUR CLIENT SIDE because you launch the API Call inside a Thread.
But it's not asynch at HTTP CALL Library level

You don't get it mate, absolutely

There is no HTTP CALL Library (like libc, for example). There is only a standard (and I'm not sure if it is a real standard like RFC, or ANSI C standard, or something like that). It just vaguely describes how data should be represented but it doesn't tell anything how requests should be processed either on the server or client side. It can be processed in any way possible (read either synchronously or asynchronously). There is no requirement for it being processed necessarily synchronously (which is what you seem to erroneously assume). As I already told you, if you send two authenticated requests to this exchange, your last request (by timestamp) can get actually processed first. This doesn't work with other exchanges but it works with Bter. Instead of arguing, you'd better really try it out yourself. If YOU send them synchronously (i.e. waiting for reply before sending next request) that doesn't mean that you can't send them asynchronously
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:38:20 PM
I've been in the business for more than 25 years (really)

I Can imagine  Roll Eyes
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:37:21 PM
Now tell me more mate. You said something about REST being synchronous if I remember correctly, right?

I confirm (and any programmer that had interfaced any API exchange could confirm) that Any Api Call is Synch.
The way you manage the API Call inside your Client it's up to you, but the HTTP CALL from your Client to API System in a REST environment is Sync.
I need to repeate once more or you have understand?  Wink
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:35:01 PM
~snipped~

I need to continue?

I don't care about anything you just said

You may tell it someone else but please don't tell me, this has absolutely no effect on me. After all, this is not a pissing contest. I've been in the business for more than 25 years (really), but I'm not going to talk about that since if you tell bullshit, this will remain bullshit, no matter what. I think you were just using some standard routine and did actually try to work with this exchange in an asynchronous mode. Asynchronous mode means that you don't need to wait for a result after sending an authenticated request, i.e. you can send requests and process the results asynchronously, in different threads without synchronizing the threads

This is asynch on YOUR CLIENT SIDE because you launch the API Call inside a Thread.
But it's not asynch at HTTP CALL Library level.

Of course i can do this
CLIENT Main Program <-> CLIENT Thread with Api Call -> REST SYNC POST (Wait For Response)
Main program will have control again after the thread launch.
But this workflow Thread with Api Call -> REST SYNC POST still remain Synch.

Please stop trolling man, that doesn't works with me.  Grin
legendary
Activity: 3514
Merit: 1280
English ⬄ Russian Translation Services
February 03, 2017, 01:29:53 PM
~snipped~

I need to continue?

I don't care about anything you just said

You may tell it to someone else but please don't tell me, this has absolutely no effect on me. After all, this is not a pissing contest. I've been in the business for more than 25 years (really), but I'm not going to talk about that since if I (or you) tell bullshit, this will remain bullshit, no matter what. I think you were just using some standard routine and didn't actually try to work with this exchange in an asynchronous mode. Asynchronous mode means that you don't need to wait for a result after sending an authenticated request, i.e. you can send requests and process the results asynchronously as they come in, in different threads without synchronizing the threads

I've never used an async call, because i need to wait for any response, obviously, if i'm asking for something i need the result to continue, so i need to wait, so we are talking about sync call

Now tell me more mate. You said something about REST being synchronous if I remember correctly, right?
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:22:15 PM
Quote
Why do you show me quotes from Bter api guide? I've been trading there myself using their api and know how it works. In fact, now you only confirm that either didn't really try their api or just thinking things up. You can send authenticated requests to this exchange without waiting for a reply and you get all requests processed. The same will result in an error condition on other exchanges. Just REALLY try that and see for yourself

And now tell me how REST is necessarily synchronous

Man.....i'm Selling BTER API ok?
I've customers that trade on BTER. I really don't understand how you're not able to verify i'm a long time legit developer with big experience in api interfaces.
What do you need to check?
Official topic is not enough? https://bitcointalksearch.org/topic/bot-cat-cryptocurrency-automatic-trader-new-price-list-042021-507103
My Feedbacks Are not Enough?
My 200+ Positive Feedbacks are not Enough? https://bitcointalk.org/index.php?action=trust;u=130152
Or official exchange annocements :
https://blog.cex.io/news/cex-io-bitcoin-integrates-bot-15179
https://medium.com/the-rock-trading/c-a-t-now-available-for-trts-customers-f54139744f48#.o03cq2kxj
https://www.facebook.com/ccexcom/posts/1713206285561221

Or i need to tell you the exchanges admin who directly works with me? Starting from Tristan From Poloniex when Poloniex was a 50BTC/volume day exchange.....

I need to continue?

Now the question is for you :

If you make a asynch call to CREATE ORDER how did you get back the ORDER ID? That is the result of a successful CREATE ORDER Call?
Tell me the way you make a Bot using async call  Cheesy
If you find a method it's good for you, but you probably add complexity to your software.

I've never used an async call, because i need to wait for any response, obviously, if i'm asking for something i need the result to continue, so i need to wait, so we are talking about sync call.
legendary
Activity: 3514
Merit: 1280
English ⬄ Russian Translation Services
February 03, 2017, 01:13:41 PM
You must be kidding mate

You don't need to teach me anything since I know what I say from first-hand experience (a big wink here). And I'm very very doubtful now about your true knowledge and understanding since Bter authenticated calls are truly asynchronous unlike any other exchange api that I've seen. You don't need to prove me anything since I've been there myself and seen that with my own eyes. Other than that, I can't possibly see how REST should necessarily be synchronous (unless you mean something very different from what I said earlier about synchronous/asynchronous api's)

Man, all REST Api Are synchronous , on ANY EXchange, and of course this Bter Private CALL is Sync

Code:
Place order API

API URL: https://bter.com/api/1/private/placeorder

Parameter submission method: POST


Do you know the difference between sync and asynch?
A Bot must ASK and Manage Request <-> Response. From The Http Call (Request) and The API Result (Result) there's a waiting time. It's synch.
Don't troll me please  Cheesy

Why do you show me quotes from Bter api guide? I've been trading there myself using their api and know how it works. Just accept it as a fact of life. Wtf, now you only confirm that you either didn't really try their api or just thinking things up. You can send authenticated requests to this exchange without waiting for a reply and you get all requests processed with no errors (and likely not in the order you sent them). The same will result in an error condition on other exchanges. Just REALLY try that and see for yourself

And now tell me how REST is necessarily synchronous
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:06:50 PM
Well i've written 18 and 2 will be added to the next release, for a total of 20.
And yes, i've interfaced Bter.
https://bter.com/api
And they are REST synchronous, obviously. It was one of the first exchanges in interface

Tell me everything you need. I can teach you a lot about bot worlds and API interfaces  Wink

You must be kidding mate

You don't need to teach me anything since I know what I say from first-hand experience (a big wink here). And I'm very very doubtful now about your true knowledge and understanding since Bter authenticated calls are truly asynchronous unlike any other exchange api that I've seen. You don't need to prove me anything since I've been there myself and seen that with my own eyes. Other than that, I can't possibly see how REST should necessarily be synchronous (unless you mean something very different from what I said earlier about synchronous/asynchronous api's)

Man, all REST Api Are synchronous , on ANY EXchange, and of course this Bter Private CALL is Sync

Code:
Place order API

API URL: https://bter.com/api/1/private/placeorder

Parameter submission method: POST


Do you know the difference between sync and asynch?
A Bot must ASK and Manage Request <-> Response. From The Http Call (Request) and The API Result (Result) there's a waiting time. It's synch.
Don't troll me please  Cheesy
legendary
Activity: 3514
Merit: 1280
English ⬄ Russian Translation Services
February 03, 2017, 01:01:06 PM
Well i've written 18 and 2 will be added to the next release, for a total of 20.
And yes, i've interfaced Bter.
https://bter.com/api
And they are REST synchronous, obviously. It was one of the first exchanges in interface

Tell me everything you need. I can teach you a lot about bot worlds and API interfaces  Wink

You must be kidding mate

You don't need to teach me anything since I know what I say from first-hand experience (a big wink here). And I'm very very doubtful now about your true knowledge and understanding since Bter authenticated calls are truly asynchronous unlike any other exchange api that I've seen. You don't need to prove me anything since I've been there myself and seen that with my own eyes, from inside, so to speak. Other than that, I can't possibly see how REST should necessarily be synchronous (unless you mean something very different from what I said earlier about synchronous/asynchronous api's)
legendary
Activity: 2632
Merit: 1040
February 03, 2017, 01:00:25 PM


You guess wrong, very wrong  Cheesy Cheesy Cheesy
This is my Bot : https://bitcointalksearch.org/topic/bot-cat-cryptocurrency-automatic-trader-new-price-list-042021-507103
A well known bot of course.


nice. i saw this past months but never really got into it. if i just want to buy an api for polo, that means all i'm just going to pay is 0.15 btc?
can you tell us the success rate of the API?  

has someone already request an api for liqui? there are coins that are only listed there such as GNT which i'm particularly interested.

Yeah, how do you know that  Cheesy
https://twitter.com/Liqui_Exchange/status/823307073916116993
legendary
Activity: 3178
Merit: 1054
February 03, 2017, 12:55:06 PM


You guess wrong, very wrong  Cheesy Cheesy Cheesy
This is my Bot : https://bitcointalksearch.org/topic/bot-cat-cryptocurrency-automatic-trader-new-price-list-042021-507103
A well known bot of course.


nice. i saw this past months but never really got into it. if i just want to buy an api for polo, that means all i'm just going to pay is 0.15 btc?
can you tell us the success rate of the API?  

has someone already request an api for liqui? there are coins that are only listed there such as GNT which i'm particularly interested.
Pages:
Jump to: