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

Facing problem while using price trigger API #144

Open
akashc-25 opened this issue Jan 31, 2023 · 6 comments
Open

Facing problem while using price trigger API #144

akashc-25 opened this issue Jan 31, 2023 · 6 comments

Comments

@akashc-25
Copy link

I'm using the POST /spot/price_orders API to create the price trigger order. When I hit the API, it creates an open order in gate.io, but when the last price of the crypto crosses the trigger order price, the status of that order fails (Status in gate.io's Order history tab). I don't know why it's going to fail.

I've attached the snippet of my code below.

spot_price_trigger_order = SpotPriceTriggeredOrder(
        trigger={
            "price": "0.041290", # Trigger amount
            "rule": '<=',
            "expiration": 2592000
        },
        put={
            "type": 'limit',
            "side": "sell",
            "price": "0.041290", # Trigger amount
            "amount": "5", # Amount that I want to sell
            "account": "normal",
            "time_in_force": "gtc"
        },
        market="DOT5S_USDT"
    )
api_response = api_instance.create_spot_price_triggered_order(spot_price_trigger_order)

Here, I've set the price to "0.041290."  When the last price became "0.041260,"  it was failing, but here our condition is true.

Any help will be appreciated.

@akashc-25
Copy link
Author

Can anyone please help?

@revilwang
Copy link
Collaborator

Can you please provide your user ID and price trigger order ID and send the details to dev@gate.io so we can have a deeper check.

@akashc-25
Copy link
Author

I've share details on provided mail.

@revilwang
Copy link
Collaborator

Message received. We'll have a check

@revilwang
Copy link
Collaborator

The trigger order's value is less than 1 USDT, which didn't satisfy the minimum order amount in DOT5S_USDT. The server right now is adding more input check to reject such request to inform the client beforehand instead of delaying to the trigger time(deployment time is not certain at the moment).

@akashc-25
Copy link
Author

Okay, Thanks for your update. I'll try this

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

2 participants