Giter Club home page Giter Club logo

Comments (4)

codedot avatar codedot commented on August 29, 2024 1

Hello,

Thank you for your interest in this project. The documentation is indeed quite far from complete.

In configuration, the hedge command expects a hedge field which should be an array of strings of the following format:

chain : chain '/' side
      |           side 
      ;
side  : list
      | '*'
      ;
list  : list ',' ASSET
      |          ASSET
      ;

where * is equivalent to comma-separated list of all assets. Chains that consist of just one <side> are equivalent to <side>/<side>, e. g. * selects all possible combinations. The following example:

        "hedge": [
                "XRP,BTC/*"
        ],

makes hedge command to maintain offers for both XRP and BTC against all assets, including the XRP/BTC pair.

Another example is quite useful for selecting maximum number of pairs so that the bot would still tolerate delays and downtime before updating offers:

        "hedge": [
                "XRP/USD/BTC/EUR/XRP"
        ],

which is basically a shorthand for

        "hedge": [
                "XRP/USD",
                "USD/BTC",
                "BTC/EUR",
                "EUR/XRP"
        ],

but is easier to manipulate. If such a chain starts and ends with the same asset and all other assets are included exactly once, then whichever offers are consumed, change in geometric mean of balances is guaranteed to be positive (given that transaction fees are negligible).

Please note that hedge also removes offers whose estimated profit is below threshold calculated based on --delta if the corresponding pair is not specified in configuration.

Let me know if you have further questions.

Best regards,
Anton

from xmm.

inmyth avatar inmyth commented on August 29, 2024

Thank you for your reply. I see your explanation ties up with the hedge option mentioned in the documentation. However I'm unable to make it work. I'm using the example command for three assets like this :

xmm -c dummy.json hedge --hedge ["XRP/USD", "USD/BTC", "BTC/XRP"] fund1 -n 3 -y
or even
xmm -c dummy.json hedge --hedge {"hedge": ["XRP/USD/BTC/XRP"]} fund1 -n 3 -y

but it throws an error at Yarg module :

message: 'Unexpected token in JSON at position 1' }

Could you advise me on how to build such command ?

from xmm.

codedot avatar codedot commented on August 29, 2024

While raw JSON is allowed as command line option like --hedge '["XRP/USD/BTC/XRP"]', options --assets, --wallets, and --hedge are intended to be specified in JSON configuration file instead (that is why they do not have single letter option aliases). It is also easier to tune --delta, -d, --maxfee, -m, and --cushion, -f in JSON configuration file rather than in command line.

Another parameter to play with is --count, -n (equals 1 by default). It should be equal to --offset, -o (equals 3 by default) when running the hedge command in a loop, e. g. -n 2 -o 2. Setting these two options to equal values ensures transactions to either succeed or permanently fail.

Feel free to ask further, because answering your questions has a side effect of writing down missing parts of documentation which can be later included into the project's wiki.

from xmm.

inmyth avatar inmyth commented on August 29, 2024

Thank you. It works now although I haven't tried the file method. I can see the bot consumes random offers I created. I am not a trader but by reading the documentation I think the market-making algorithm this bot does results in slow but safe gain. I haven't studied the code but I would like to add a custom strategy. I think for algorithm and other questions I may have, I will open another thread. Thank you again.

from xmm.

Related Issues (3)

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.