zhouaini528 / okex-php

Okex API Like the official document interface, Support for arbitrary extension.
MIT License
43 stars 20 forks source link

no close position available in okx api sdk #8

Closed bobnino closed 1 year ago

bobnino commented 1 year ago

can you please include the close position method to the api.

bobnino commented 1 year ago

I just found the close position in the trade class below is an example

try {
$result=$okex->trade()->postClosePosition([
    'instId'=>'DOT-USDT',
    'mgnMode'=>'isolated',
]);
print_r($result);
}catch (\Exception $e){
print_r(json_decode($e->getMessage(),true));
}