future-private: add change margin mode request
This commit is contained in:
1 parent
ccebbf8f70
commit
d561f69ece
7 files changed
+424
-46
No files matched your search
@@ -4,11 +4,12 @@ namespace Msr\LaravelBitunixApi;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Msr\LaravelBitunixApi\Requests\ChangeLeverageRequestContract;
|
||||
use Msr\LaravelBitunixApi\Requests\ChangeMarginModeRequestContract;
|
||||
use Msr\LaravelBitunixApi\Requests\FutureKLineRequestContract;
|
||||
use Msr\LaravelBitunixApi\Requests\Header;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class LaravelBitunixApi implements ChangeLeverageRequestContract, FutureKLineRequestContract
|
||||
class LaravelBitunixApi implements ChangeLeverageRequestContract, ChangeMarginModeRequestContract, FutureKLineRequestContract
|
||||
{
|
||||
private Client $publicFutureClient;
|
||||
|
||||
@@ -60,4 +61,19 @@ class LaravelBitunixApi implements ChangeLeverageRequestContract, FutureKLineReq
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function changeMarginMode(string $symbol, string $marginCoin, string $marginMode): ResponseInterface
|
||||
{
|
||||
$body = [
|
||||
'symbol' => $symbol,
|
||||
'marginCoin' => $marginCoin,
|
||||
'marginMode' => $marginMode,
|
||||
];
|
||||
|
||||
$response = $this->getPrivateFutureClient([], $body)->post('account/change_margin_mode', [
|
||||
'json' => $body,
|
||||
]);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user