diff --git a/composer.json b/composer.json index 6b96248..52c1656 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,8 @@ "require": { "php": ">=5.5.0", "psr/log": "^1.0", - "stk2k/net-driver": "~0.2" + "stk2k/net-driver": "~0.2", + "wa72/simplelogger": "~v1.1.0" }, "require-dev": { "phpunit/phpunit": "3.7.*", diff --git a/samples/get_send_order.php b/samples/send_order.php similarity index 84% rename from samples/get_send_order.php rename to samples/send_order.php index b7f02a9..3932fc2 100644 --- a/samples/get_send_order.php +++ b/samples/send_order.php @@ -3,7 +3,10 @@ require dirname(__FILE__) . '/include/autoload.php'; require dirname(__FILE__) . '/include/sample.inc.php'; +use Wa72\SimpleLogger\EchoLogger; + use Phinance\PhinanceClient; +use Phinance\PhinanceLoggerClient; list($api_key, $api_secret) = binance_credentials(); @@ -18,6 +21,7 @@ list($symbol, $side, $type, $quantity, $fromid, $limit) = get_args($argdefs,__FILE__); $client = new PhinanceClient($api_key, $api_secret); +$client = new PhinanceLoggerClient($client, new EchoLogger); try{ $client->setServerTime(); diff --git a/src/PhinanceClient.php b/src/PhinanceClient.php index 8c3a139..38bd8b7 100644 --- a/src/PhinanceClient.php +++ b/src/PhinanceClient.php @@ -700,6 +700,7 @@ public function sendOrder($symbol, $side, $type, $quantity, $price = NULL, $opti 'side' => $side, 'type' => $type, 'quantity' => $quantity, + 'recvWindow' => 60000, ); if ($price){ $data['price'] = number_format( $price, 8, '.', '' );