gateio / gateapi-php

29 stars 34 forks source link

ERROR with createPriceTriggeredOrder #22

Open dinhbang opened 6 months ago

dinhbang commented 6 months ago

Hello,

I am using https://github.com/gateio/gateapi-php/blob/master/docs/Api/FuturesApi.md#createPriceTriggeredOrder I want to create a short future order. Also, I want to it is auto take profit when the order is created. My example FuturesPriceTriggeredOrder model below:

GateApi\Model\FuturesPriceTriggeredOrder {#904

container: array:12 [

"initial" => array:5 [
  "text" => "api"
  "contract" => "ETH_USDT"
  "size" => -10.0
  "price" => "4251.25"
  "tif" => "gtc"
]
"trigger" => array:4 [
  "strategy_type" => 0
  "price_type" => 1
  "price" => "4187.5"
  "rule" => 2
]
"id" => null
"user" => null
"create_time" => null
"finish_time" => null
"trade_id" => null
"status" => null
"finish_as" => null
"reason" => null
"order_type" => "plan-close-short-position"
"me_order_id" => null

] }

It means I want to make short order when price is 4251.25. If order is created. I want to plan auto take profit when price is 4187.5

It is show error below:

{"code":"1015","label":"AUTO_INVALID_PARAM_PRICE","message":"invalid argument: initial.price price is not an integer multiple of a price unit"}

Could you help me?

revilwang commented 6 months ago

We were unable to produce the issue. Can you please send a more detailed request with UID and request timestamp attached to mailto:dev@gate.io

dinhbang commented 6 months ago

Yes, thank you so much! Let's me email to Gate IO dev.