php-binance-api icon indicating copy to clipboard operation
php-binance-api copied to clipboard

futures order with this API

Open MortezaHallaji opened this issue 4 years ago • 4 comments

can place futures order with this API or can not?

MortezaHallaji avatar Apr 25 '21 13:04 MortezaHallaji

Same question here, I'm seeing error when trying to use futures with this API: error: {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."}

My Code:

<?php
require 'vendor/autoload.php';
$api_key = "298ad79d8a47f8e8ef8af9ecf51525d64787e88c58d28bbbcc2416669a291886";
$api_secret = "d95d7598fc68e353aba35fa342b7370b89bb77594abec00c607c2244ed10f41a";
$useTestnet = true;
$api = new Binance\API($api_key, $api_secret, $useTestnet);
$balances = $api->balances();
print_r($balances);

please do let us know if we can use futures with this API if not then provide us resources for Binance Futures PHP API

Thanks

sumonst21 avatar Apr 28 '21 23:04 sumonst21

can place futures order with this API or can not?

@morteza4422 Hey, It seems worked for me by changing the endpoints and search replace v3 to v1 in the file php-binance-api.php

sumonst21 avatar Apr 28 '21 23:04 sumonst21

can place futures order with this API or can not?

@morteza4422 Hey, It seems worked for me by changing the endpoints and search replace v3 to v1 in the file php-binance-api.php

thanks for reply are you sure it will work future api when the change v3 to v1 inside of php-binance-api.php? beside futures needs extra input for working like isolate or cross type how can we handle that?

MortezaHallaji avatar Apr 30 '21 18:04 MortezaHallaji

@morteza4422 @sumonst21 i came here for same questions and found another alternative for futures orders at https://github.com/zhouaini528/binance-php for your informations guys.

munzevi avatar May 20 '21 21:05 munzevi