Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy between order that should be placed and the order that is actually places (maker.py) #31

Closed
mauritsvdvijgh opened this issue Apr 17, 2016 · 1 comment

Comments

@mauritsvdvijgh
Copy link
Contributor

There seems to be an issue in: https://github.com/xeroc/python-graphenelib/blob/master/grapheneexchange/exchange.py

When a bot that implements basestrategy calls self.sell() this get's called:

print(" - Selling %f %s for %s @%f %s/%s" % (amount, quote, base, price, base, quote))
self.dex.sell(market, price, amount)

output:

 - Selling 0.000150 SILVER for BTS @3677.763500 BTS/SILVER
2016-04-17 14:23:41.220941 | Order: 1.7.232305 is 51.499% away from feed

order info:


{
    'expiration': '2016-04-24T14:22:40',
    'deferred_fee': 14676,
    'id': '1.7.232305',
    'sell_price': {
        'quote': {
            'asset_id': '1.3.0',
            'amount': 55166
        },
        'base': {
            'asset_id': '1.3.105',
            'amount': 1
        }
    },
    'for_sale': 1,
    'seller': '1.2.107199'
}

 {
    'total': 0.55166,
    'rate': 5516.6,
    'amount': 0.0001,
    'type': 'sell',
    'amount_to_sell': 0.0001,
    'orderNumber': '1.7.232305'
 }
@mauritsvdvijgh
Copy link
Contributor Author

This issue can be closed, just realised that silver has a precision of 4, that's why 0.00015 becomes 0.0001.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant