Feature Request: Add RPC Trader API. #544

Open
dan-da opened this Issue Jul 25, 2016 · 19 comments

Comments

Projects
None yet
8 participants
Contributor

dan-da commented Jul 25, 2016

I think it could help improve trade volume to implement an API so that traders can automate creation and modification/cancel of orders.

I guess there could even be "i_sent_funds() and "i_received_funds()" APIs. That could really speed up trades between blockchains, or even fiat sources if any of them also provide client APIs.

Sorry if this is already on the roadmap somewhere. I just saw someone suggesting it and did a quick search for "API" in issues and came up empty.

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Jul 26, 2016

Owner

I will reply with more info soon.
Just wanted to mention that trading API will be a complex topic.
But as said more details soon...

Maybe you are interested to have a look to that?
bitsquare#546

Owner

ManfredKarrer commented Jul 26, 2016

I will reply with more info soon.
Just wanted to mention that trading API will be a complex topic.
But as said more details soon...

Maybe you are interested to have a look to that?
bitsquare#546

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Aug 2, 2016

Owner

A full trading API for Fiat will be limited by the fact that Banks are not offering APIs, so users need to do the manual step of transferring and confirming the Fiat.
Though on the altcoin side we could get to a fully automated trade process. The lookup in the altfoin blockexplorer could be done automatically and then trigger the confirmations done atm by users.

To have APIs for that process would enable automated altcoin trading.
For the Fiat side an API could still have benefits if people prefer to trigger events via the API instead in the UI.

I would like to set up a new bounty for that task (get in touch to negotiate amount).

Owner

ManfredKarrer commented Aug 2, 2016

A full trading API for Fiat will be limited by the fact that Banks are not offering APIs, so users need to do the manual step of transferring and confirming the Fiat.
Though on the altcoin side we could get to a fully automated trade process. The lookup in the altfoin blockexplorer could be done automatically and then trigger the confirmations done atm by users.

To have APIs for that process would enable automated altcoin trading.
For the Fiat side an API could still have benefits if people prefer to trigger events via the API instead in the UI.

I would like to set up a new bounty for that task (get in touch to negotiate amount).

This comment has been minimized.

Show comment Hide comment
@dan-da

dan-da Aug 2, 2016

Contributor

I have ideas on that and can jump on it after the market site is done.

Contributor

dan-da commented Aug 2, 2016

I have ideas on that and can jump on it after the market site is done.

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Aug 2, 2016

Owner

Great! :-)

Owner

ManfredKarrer commented Aug 2, 2016

Great! :-)

This comment has been minimized.

Show comment Hide comment
@tobixen

tobixen Oct 31, 2016

I want to be a market maker, but I do have some problems with that currently;

  • I'm quite often on the move, even though I've rarely really been there, I always wanted to be a "digital nomad". I need to be able to continue running bitsquare from a server while I'm on the move, I can't keep it running it from my laptop. (I guess I could look into some VNC-solutions, but I don't like the concept)
  • I don't trust the bitcoinaverage rates, I have my own rates ... hence I would very much like an API for placing and changing my bids/offers as the price moves.
  • I'd also like to go further with automating my trades, I do have some kind of poor-mans API towards my bank.

I can probably contribute to the bounty eventually. (hm, I think I still have some funds locked up in a defunct lighthouse wallet ... huh).

tobixen commented Oct 31, 2016

I want to be a market maker, but I do have some problems with that currently;

  • I'm quite often on the move, even though I've rarely really been there, I always wanted to be a "digital nomad". I need to be able to continue running bitsquare from a server while I'm on the move, I can't keep it running it from my laptop. (I guess I could look into some VNC-solutions, but I don't like the concept)
  • I don't trust the bitcoinaverage rates, I have my own rates ... hence I would very much like an API for placing and changing my bids/offers as the price moves.
  • I'd also like to go further with automating my trades, I do have some kind of poor-mans API towards my bank.

I can probably contribute to the bounty eventually. (hm, I think I still have some funds locked up in a defunct lighthouse wallet ... huh).

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Oct 31, 2016

Owner

That would be great, we are in need for market makers!

@meapistol has reported here about his vps setup:
bitsquare#511
I think that works quite well as far I heard.

We will probably support user defined market rates as there are regional differences which are not well reflected by an average price provider.
To edit offers is also on the todo list but might take a bit as I am focused on the DAO model atm.

Trading APIs for the Fiat side will be difficult because most banks dont offer APIs and there is no standard so the effort would explode...
But on the altcoin side we definitely want to get it automated.

Owner

ManfredKarrer commented Oct 31, 2016

That would be great, we are in need for market makers!

@meapistol has reported here about his vps setup:
bitsquare#511
I think that works quite well as far I heard.

We will probably support user defined market rates as there are regional differences which are not well reflected by an average price provider.
To edit offers is also on the todo list but might take a bit as I am focused on the DAO model atm.

Trading APIs for the Fiat side will be difficult because most banks dont offer APIs and there is no standard so the effort would explode...
But on the altcoin side we definitely want to get it automated.

This comment has been minimized.

Show comment Hide comment
@tobixen

tobixen Nov 1, 2016

Regarding banking APIs, I suppose there will be some European standards after PSD2? Anyway, I totally agree that it's very much out of the scope of bitsquare to communicate with the various banks. If I made a different impression, then I'm very much misunderstood. To be a successful market maker with low margins I need to spend as little time as possible handling the trades, as much as possible should be automated. I can automate payin detection from my bank account as well as minor payouts - but I cannot automate the process of creating and maintaining ads on bitsquare. I need the latter fixed.

Ideally I'd like to run bitsquare headless on a server and control my ads through API calls or a cli-tool. On the short term a more realistic solution seems to be to use some VLC solution or perhaps look into xpra, ref https://aweirdimagination.net/2015/03/30/detachable-x-sessions/ - but still I'd like to automate as much as possible.

tobixen commented Nov 1, 2016

Regarding banking APIs, I suppose there will be some European standards after PSD2? Anyway, I totally agree that it's very much out of the scope of bitsquare to communicate with the various banks. If I made a different impression, then I'm very much misunderstood. To be a successful market maker with low margins I need to spend as little time as possible handling the trades, as much as possible should be automated. I can automate payin detection from my bank account as well as minor payouts - but I cannot automate the process of creating and maintaining ads on bitsquare. I need the latter fixed.

Ideally I'd like to run bitsquare headless on a server and control my ads through API calls or a cli-tool. On the short term a more realistic solution seems to be to use some VLC solution or perhaps look into xpra, ref https://aweirdimagination.net/2015/03/30/detachable-x-sessions/ - but still I'd like to automate as much as possible.

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Nov 1, 2016

Owner

Yes the creation of offer will be supported as soon we have dev resources on that.
After we have our DAO model in place we have better funding options to get that boosted. Hope you find some way to provide liquidity even without those features. And not competing with trading bots is an opportunity as well.

Owner

ManfredKarrer commented Nov 1, 2016

Yes the creation of offer will be supported as soon we have dev resources on that.
After we have our DAO model in place we have better funding options to get that boosted. Hope you find some way to provide liquidity even without those features. And not competing with trading bots is an opportunity as well.

This comment has been minimized.

Show comment Hide comment
@dan-da

dan-da Nov 2, 2016

Contributor

It occurs to me that basic APIs for creation and cancel of offer are already spec'd and should not be too difficult to implement. They might be useful to release even without the more complicated trade process APIs that are still TBD. Maybe I can take a look at that next week.

Contributor

dan-da commented Nov 2, 2016

It occurs to me that basic APIs for creation and cancel of offer are already spec'd and should not be too difficult to implement. They might be useful to release even without the more complicated trade process APIs that are still TBD. Maybe I can take a look at that next week.

This comment has been minimized.

Show comment Hide comment
@ManfredKarrer

ManfredKarrer Nov 2, 2016

Owner

@dan-da Ah cool! I had a review with @mrosseel a while ago and there was already plenty of functionality implemented. Would be great if we can get the create offer use case finished.

Owner

ManfredKarrer commented Nov 2, 2016

@dan-da Ah cool! I had a review with @mrosseel a while ago and there was already plenty of functionality implemented. Would be great if we can get the create offer use case finished.

This comment has been minimized.

Show comment Hide comment
@mrosseel

mrosseel Nov 3, 2016

Member

@dan-da yeah a lot of that is already finished, didn't have a lot of time lately but if you want we can have a look next week, maybe define the subset of api's and look what's already done.

Member

mrosseel commented Nov 3, 2016

@dan-da yeah a lot of that is already finished, didn't have a lot of time lately but if you want we can have a look next week, maybe define the subset of api's and look what's already done.

This comment has been minimized.

Show comment Hide comment
@cryptid11

cryptid11 Nov 28, 2016

But on the altcoin side we definitely want to get it automated.

Same, I'd like to have the possibility to let some centralized exchange like holytransaction jaxx shapeshift etc with the bitsquare client rpc... IMHO you should do some fast python script to deploy on server to assure there is always some liquidity provider, anyway if you give me way to use rpc I will do some and share them.

But on the altcoin side we definitely want to get it automated.

Same, I'd like to have the possibility to let some centralized exchange like holytransaction jaxx shapeshift etc with the bitsquare client rpc... IMHO you should do some fast python script to deploy on server to assure there is always some liquidity provider, anyway if you give me way to use rpc I will do some and share them.

This comment has been minimized.

Show comment Hide comment
@streetbits

streetbits Jul 25, 2017

I couldn't locate those APIs and market.bisq.io page source code, where should I look?

streetbits commented Jul 25, 2017

I couldn't locate those APIs and market.bisq.io page source code, where should I look?

This comment has been minimized.

Show comment Hide comment
@dan-da

dan-da Jul 25, 2017

Contributor

The spec we've been going off of is viewable here:
https://rawgit.com/dan-da/bisq-api/master/apis/index.html

however, be warned that doc is old and may not exactly match current code.

To actually run the api requires building bisq app from source, using the branch issue544-api. After building, run the app and it will provide a built-in webserver that accepts REST requests.

Contributor

dan-da commented Jul 25, 2017

The spec we've been going off of is viewable here:
https://rawgit.com/dan-da/bisq-api/master/apis/index.html

however, be warned that doc is old and may not exactly match current code.

To actually run the api requires building bisq app from source, using the branch issue544-api. After building, run the app and it will provide a built-in webserver that accepts REST requests.

This comment has been minimized.

Show comment Hide comment
@streetbits

streetbits Jul 25, 2017

Thanks a million @dan-da

Thanks a million @dan-da

This comment has been minimized.

Show comment Hide comment
@mrosseel

mrosseel Jul 26, 2017

Member

hi @streetbits, you can indeed check out the branch @dan-da mentioned. If you start the app with the flag '--enableApi true' then - in addition to the bisq app - a webserver is started on port 8080. You can see the API startup banner and all endpoints in the startup log. There's also documentation when going to http://localhost:8080/swagger.
As testing setup I recommend starting (in regtest) a bitcoin regtest node, a seednode, an arbitrator, alice (with enableAPI true) and bob.
Be aware that the functionality is rough and not all checks are implemented.

Member

mrosseel commented Jul 26, 2017

hi @streetbits, you can indeed check out the branch @dan-da mentioned. If you start the app with the flag '--enableApi true' then - in addition to the bisq app - a webserver is started on port 8080. You can see the API startup banner and all endpoints in the startup log. There's also documentation when going to http://localhost:8080/swagger.
As testing setup I recommend starting (in regtest) a bitcoin regtest node, a seednode, an arbitrator, alice (with enableAPI true) and bob.
Be aware that the functionality is rough and not all checks are implemented.

This comment has been minimized.

Show comment Hide comment
@mrosseel

mrosseel Sep 20, 2017

Member
Member

mrosseel commented Sep 20, 2017

This comment has been minimized.

Show comment Hide comment
@blabno

blabno Feb 21, 2018

Contributor

Hey, guys, I'm currently working on this API. Let me know what functionality should we focus on in the first place.

Contributor

blabno commented Feb 21, 2018

Hey, guys, I'm currently working on this API. Let me know what functionality should we focus on in the first place.

This comment has been minimized.

Show comment Hide comment
@cbeams

cbeams Feb 21, 2018

Owner

@blabno, as you've written it in your comment above, this occurs a little like a solution in search of a problem. I haven't caught up on the long thread above, but it's all quite old now, and it's not obvious to me that it's worth my time to catch up on it.

I have no doubt that an RPC API could be useful; indeed I think about having one fairly often myself. But my recommendation here would be to write up something a bit more detailed and solicit feedback about it. Share the problem you're trying to solve, why you think it's a good time to introduce an RPC API, how this relates to the existing HTTP API work, etc. Thanks.

Owner

cbeams commented Feb 21, 2018

@blabno, as you've written it in your comment above, this occurs a little like a solution in search of a problem. I haven't caught up on the long thread above, but it's all quite old now, and it's not obvious to me that it's worth my time to catch up on it.

I have no doubt that an RPC API could be useful; indeed I think about having one fairly often myself. But my recommendation here would be to write up something a bit more detailed and solicit feedback about it. Share the problem you're trying to solve, why you think it's a good time to introduce an RPC API, how this relates to the existing HTTP API work, etc. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment