zhouaini528 / bybit-php

Bybit API Like the official document interface, Support for arbitrary extension.
MIT License
24 stars 12 forks source link

error sign! with position_idx #16

Closed Skeid9 closed 1 year ago

Skeid9 commented 1 year ago

try { $result=$bybit->privates()->postOrderCreate([ //'order_link_id'=>'xxxxxxxxxxxxxx', 'side'=>'Buy', 'symbol'=>'DOGEUSDT', 'order_type'=>'Market', 'qty'=>'250', 'time_in_force'=>'GoodTillCancel',

    'reduce_only'=>false,
    'close_on_trigger'=>false,
    'position_idx'=>0
]);

}catch (\Exception $e){ print_r($e->getMessage()); }

Error I get [ret_code] => 10004 [ret_msg] => error sign!

without position idx it works but only in hedge-mode, one way needs position idx 0