Giter VIP home page Giter VIP logo

Comments (11)

chimp1984 avatar chimp1984 commented on July 21, 2024 2

Is this for the full, public rollout? Will there be some kind of intermediate pre-release phase before a big rollout? Asking mainly for messaging/communication purposes.

I think its more safe to make a soft roll out for at least one releaze cycle to not risk too much. So PR should be help back until we are sure that all works smoothly.

from projects.

ghubstan avatar ghubstan commented on July 21, 2024 1

Where is the best place to get a background of what has been developed to date?

@pazza83 Sorry, no api documentation yet, but the code explains a lot.
See :cli supbroject's Method class for a list of currently available CLI commands:

public enum Method {
    canceloffer,
    confirmpaymentreceived,
    confirmpaymentstarted,
    createoffer,
    createpaymentacct,
    getaddressbalance,
    getbalance,
    getfundingaddresses,
    getmyoffer,
    getmyoffers,
    getoffer,
    getoffers,
    getpaymentacctform,
    getpaymentaccts,
    getpaymentmethods,
    gettrade,
    gettransaction,
    gettxfeerate,
    getunusedbsqaddress,
    getversion,
    keepfunds,
    lockwallet,
    registerdisputeagent,
    removewalletpassword,
    sendbsq,
    sendbtc,
    settxfeerate,
    setwalletpassword,
    takeoffer,
    unlockwallet,
    unsettxfeerate,
    withdrawfunds
}

This won't work on Windows (not meant to). It's meant for *nix only. Seemed to work OK when I tried it on OSX some months ago.

To see (linux) CLI help, get latest master, and build with options needed for running api tests later:

./gradlew clean build :apitest:installDaoSetup

CLI help: ./bisq-cli --help

To see server side implementation, you can drill down starting from the :daemon subproject's bisq.daemon.grpc.GrpcServer.

If you want (and you have bitcoin-core v19 or v20 in your $PATH) you can run the :apitest suite (almost 5 minutes to complete):

./gradlew :apitest:test -DrunApiTests=true

The test cases are in the :apitest src/test folder, the src/main (ignore it) folder is where the test harness lives. If you want to run individual method tests you'll need to comment out the @Disabled annotation. And you'll need to add the JVM argument
-DrunApiTests=true to your IDE's Gradle launcher template.

Again, this test harness only works on *nix, and depends on bash. Windows support is not in the scope of the api project at this stage.

I am working on a simple trading script that simulates Bob & Alice using the CLI to buy and sell BTC with EUR. But I haven't checked it in yet -- it needs more testing, load limits are being found as I test, and some api protections have been implemented, but not clearly defined and applied to specific api methods yet.

from projects.

m52go avatar m52go commented on July 21, 2024

For documentation, I estimate 250-1000 USD depending on quantity and quality of the starting point.

Is this for the full, public rollout? Will there be some kind of intermediate pre-release phase before a big rollout? Asking mainly for messaging/communication purposes.

from projects.

chimp1984 avatar chimp1984 commented on July 21, 2024

Started implementation at: bisq-network/bisq#5053

from projects.

pazza83 avatar pazza83 commented on July 21, 2024

This sounds great. Happy to help with testing if I can. Where is the best place to get a background of what has been developed to date?

from projects.

ghubstan avatar ghubstan commented on July 21, 2024

Can you add the protection mechanism which are in place from the API side and which are planned but not implemented yet? E.g. protect against endless loops,...

@chimp1984 The feature is implemented, using a configured CallRateMeteringInterceptor on a GrpcOffersService, for example, but has not been applied. We discussed on 3-Jan in keybase, and you mentioned you will take a look at the related :daemon classes.

We just need to decide how many X calls per Y should be defined, where X = api method, and Y = time-window (second, 10 seconds, 10 minutes, 1 day, 10 days, etc.).

from projects.

ghubstan avatar ghubstan commented on July 21, 2024

@ghubstan
Can you add the protection mechanism which are in place from the API side and which are planned but not implemented yet? E.g. protect against endless loops,...

@chimp1984, PR bisq-network/bisq#5103 defines the rate meter constraints on all api methods.

from projects.

ghubstan avatar ghubstan commented on July 21, 2024

Add wiki/docs page for overview (maybe @ghubstan can provide basic content and @m52go finalizes it?)

I intend to create an api overview doc this week, for @m52go.

Since this issue was posted, method level help has been merged into the main branch.

Method Help Usage: bisq-cli [options] <method> --help

Examples:

./bisq-cli --password=xyz --port=9998 getbtcprice --help

./bisq-cli --password=xyz --port=9998 createoffer --help

from projects.

ghubstan avatar ghubstan commented on July 21, 2024

Add a few simple example scripts for usage. Some use cases for added value what cannot be done in the UI would be good like "create offer if price > x"

There are two example scripts in the main branch (apitest/scripts):

  • trade-simulation.sh -- emulates Bob & Alice trading regtest BTC, using a country based F2F account

  • limit-order-simulation.sh -- emulates creating regtest buy or sell offer when a limit price has been reached

from projects.

ghubstan avatar ghubstan commented on July 21, 2024

My estimate for docs + trading scripts is 4500-5500 USD.

from projects.

Conza88 avatar Conza88 commented on July 21, 2024

Q - the Android app, after this API release - it makes it possible for it to take offers, make offers etc. on that?

from projects.

Related Issues (20)

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.