GithubHelp home page GithubHelp logo

bisq-api's Introduction

Release

WARNING: the current version of the API is configured to use Dev Privilege keys. If you want to use this on mainnet, you need to change the dependency to a release version of Bisq.

Bisq API

Based on proposal: Bisq-IP 1

This repository is an add-on to the bisq-exchange.

The goal is to add Trading API functionality to Bisq, see this video to see it in action.

Prerequisites

  • Java 8
  • Maven 3.5+

Bisq configuration

Starting this api is like starting a normal Bisq client: configurations are read and written to the same location on your disk.

This implies that:

  • if you already have a fully configured Bisq application, the api will use those pre-existing configurations.
  • If this is the first time you use Bisq on your machine, you need to first start with UI, so you can make all necessary configurations.

Note: running 2 Bisq instances on one computer (e.g one with API, one without) is not advisable. By default they both write to the same configuration location. Changing the appname can fix this issue.

Compiling the API

This step needs to be done before you can start the API with UI or headless:

mvn clean install

Getting started: with UI

The following command will start a GUI Bisq instance on Bitcoin mainnet (meaning you can lose real BTC):

mvn exec:java -Dexec.mainClass="io.bisq.api.app.BisqApiWithUIMain"

Getting started: headless

The following command will start a headless Bisq instance on Bitcoin mainnet (meaning you can lose real BTC):

mvn exec:java -Dexec.mainClass="io.bisq.api.app.ApiMain"

Developing

When testing it's advisable to run Bisq in REGTEST mode. See below on how to pass Bisq arguments to enable REGTEST mode. All regular Bisq arguments can be used.

mvn exec:java
-Dexec.mainClass="io.bisq.api.app.BisqApiWithUIMain"
-Dexec.args="--baseCurrencyNetwork=BTC_REGTEST --bitcoinRegtestHost localhost --nodePort 2003 --seedNodes=localhost:2225 --useLocalhost true --appName Bisq-Regtest-Bob"

Exploring the HTTP API

locally generated swagger docs are at: http://localhost:8080/swagger

publically generated swagger docs are at: https://mrosseel.github.io/bisq-api-examples/

Locally generated swagger.json can be found at: http://localhost:8080/swagger.json

the admin interface can be found at: http://localhost:8080/admin[

Overriding http port

Set the environment variable BISQ_API_PORT to your desired port.

TODO

  • produce jar with all dependencies for easier deployment
  • Dockerfile to get up-and-running without having java/maven/git/...
  • fix the Bisq dependency to the latest release, once it's released (post 0.5.3)

bisq-api's People

Contributors

amuelli avatar btcll avatar cbeams avatar gubatron avatar hannesstockner avatar ivilata avatar joshlambda avatar manfredkarrer avatar mrosseel avatar msgilligan avatar notmandatory avatar remyers avatar ysangkok avatar

Watchers

 avatar

Forkers

blabno

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.