jaggedsoft / php-binance-api

PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api
MIT License
605 stars 494 forks source link

futures order with this API #376

Open MortezaHallaji opened 3 years ago

MortezaHallaji commented 3 years ago

can place futures order with this API or can not?

sumonst21 commented 3 years ago

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 commented 3 years ago

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

MortezaHallaji commented 3 years ago

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?

munzevi commented 3 years ago

@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.