zhouaini528 / binance-php

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

Revert of "Default version" #31

Closed llomgui closed 2 years ago

llomgui commented 2 years ago

Hello,

Some endpoints are using v2, and others are using v1.

Is it possible to revert commit: https://github.com/zhouaini528/binance-php/commit/266b6468730d833f2348b1d224f616ffb4d74d65 ?

Or can we specify v2 for specific endpoints?

zhouaini528 commented 2 years ago

Or can we specify v2 for specific endpoints? You can set up version control like this


$binance=new BinanceFuture($key,$secret);
$binance->setOptions([
'version'=>'v2',
]);
$result=$binance->trade()->getOrder();

$binance->setOptions([ 'version'=>'v1', ]); $result=$binance->trade()->getOrder();


You can switch the version arbitrarily during execution, you may need to make a little code change for compatibility