ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
33.05k stars 7.55k forks source link

binance positionRisk does not have a value in mapping #10402

Closed boskiv closed 3 years ago

boskiv commented 3 years ago

ccxt/php version: 1.59.75

$exchange_id = strtolower($account->exchange);
        $exchange_class = "\\ccxt\\$exchange_id";
        $exchange = new $exchange_class(array(
            'apiKey' => $account->api_key,
            'secret' => $account->secret_key,
            'enableRateLimit' => true,
            'options' => array(
                'defaultType' => 'future'
            ),
        ));
        $exchange_positions = $exchange->fetch_positions();
[2021-10-31 23:10:38] production.ERROR: binance positionRisk does not have a value in mapping {"userId":1,"exception":"[object] (ccxt\\NotSupported(code: 0): binance positionRisk does not have a value in mapping at /home/forge/team-6.prop.capital/vendor/ccxt/ccxt/php/Exchange.php:3343)
[stacktrace]
#0 /home/forge/team-6.prop.capital/vendor/ccxt/ccxt/php/binance.php(4434): ccxt\\Exchange->get_supported_mapping()
#1 /home/forge/team-6.prop.capital/app/Http/Controllers/Trader/DashboardController.php(68): ccxt\\binance->fetch_positions()
#2 /home/forge/team-6.prop.capital/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\Trader\\DashboardController->terminal()
boskiv commented 3 years ago

1.59.71 worked. It was broken in 1.59.72

frosty00 commented 3 years ago

yep uploaded a fix