gateio / gateapi-php

25 stars 30 forks source link

Create an order with SpotAPI(market buy BTC with 100 USDT),the status of response order is always cancelled #20

Open aispel opened 1 year ago

aispel commented 1 year ago

$order = new Order([ 'currency_pair' => 'BTC_USDT', 'type' => 'market', 'side' => 'buy', 'amount' => 100, 'time_in_force' => 'ioc' ]);

$result = $apiInstance->createOrder($order);

the data in result is as below. It looks like be filled, but status is canncelled.

[status] => cancelled [fill_price] => 99.99999832095 [filled_total] => 99.99999832095 [fee] => 0.000006922331325

revilwang commented 1 year ago

Any order that is not filled totally is cancelled. In this case, it's not filled even if it is almost so.