zhouaini528 / binance-php

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

Binance no longer support Futures v1 #52

Closed hk743kfjw closed 1 year ago

hk743kfjw commented 1 year ago

On Binance Change Log said:

2023-06-28

Notice: REST The following endpoints will no longer be supported from 2023-07-15:

  • GET /fapi/v1/account
  • GET /fapi/v1/balance
  • GET /fapi/v1/positionRisk

Please switch to corresponding v2 endpoints:

  • GET /fapi/v2/account
  • GET /fapi/v2/balance
  • GET /fapi/v2/positionRisk

Adding 'v2' to options not working. The orders do not placing with this option:

$binance->setOptions([
    'version' => 'v2'
]);
zhouaini528 commented 1 year ago

I'll check it out

zhouaini528 commented 1 year ago

On Binance Change Log said:

2023-06-28

Notice: REST The following endpoints will no longer be supported from 2023-07-15:

  • GET /fapi/v1/account
  • GET /fapi/v1/balance
  • GET /fapi/v1/positionRisk

Please switch to corresponding v2 endpoints:

  • GET /fapi/v2/account
  • GET /fapi/v2/balance
  • GET /fapi/v2/positionRisk

Adding 'v2' to options not working. The orders do not placing with this option:

$binance->setOptions([
    'version' => 'v2'
]);

2023-07-19 14-29-28屏幕截图

2023-07-19 14-26-37屏幕截图 )

the test works

hk743kfjw commented 1 year ago

So now, in order to check the account and balance, we have to switch the options to version 2. And after that, before placing an order, we need to switch the version to 1. Right?

zhouaini528 commented 1 year ago

Yes. In fact, I also think this is very troublesome, because some people have used v1 before, and some people still use v3, and spot and future are mixed versions, so this method is adopted.