Giter Club home page Giter Club logo

Comments (5)

carlosmiei avatar carlosmiei commented on May 25, 2024 1

@incafox Ok I think I managed to reproduce the issue, can you please try to provide stop:entry in params?

result = exchange.create_stop_limit_order(
        "DPET/USDT", 
        side='buy', 
        amount=100,
        price=short_price,
        stopPrice=long_price,
        {"stop": "entry"}
)

Iif we don't provide it, it will default to loss and execute if the price <= 0.06 instead of >= 0.06.

from ccxt.

carlosmiei avatar carlosmiei commented on May 25, 2024 1

@incafox I think the problem is resolved, so I will close this issue but feel free to reopen it if anything!

from ccxt.

carlosmiei avatar carlosmiei commented on May 25, 2024

Hello @incafox,
I don't see that option in the WEB UI, so I think it follows the same logic as the API

If the stopPrice is smaller than the current price then the condition will be trigger <=stopPrice, otherwise >=stopPrice

image

from ccxt.

incafox avatar incafox commented on May 25, 2024

hello @carlosmiei here in this example using the WEB UI you can see the current price is 0.05396 and I created an Buy Stop-Limit order with stop price->0.06 , price->0.1. So the trigger condition to buy 100 DPET is if the current price >= 0.06 and sell condition is 0.1, you can see that in advanced orders section (screenshot).

Place Order x Pasted Graphic 1

Im trying to do the same with CCXT-Kucoin :

long_price = (1.3) * current_price 
short_price = (3) * current_price

result = exchange.create_stop_limit_order(
        "DPET/USDT", 
        side='buy', 
        amount=100,
        price=short_price,
        stopPrice=long_price
)

So using my example above the enter price(long_price) should be 1.3 * 0.05396 = 0.0701 and short_price = 3 * 0.05396 = 0.161, but unfortunately create_stop_limit_order is buying instantly at the current price instead of setting a trigger condition correctly.

from ccxt.

incafox avatar incafox commented on May 25, 2024

thank you @carlosmiei !

from ccxt.

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.