Skip to content

Commit

Permalink
Signed-off-by: Katsuki Shuto <stk2k@sazysoft.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
stk2k committed Aug 16, 2018
1 parent ce338ee commit 1a3f284
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -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.*",
Expand Down
4 changes: 4 additions & 0 deletions samples/get_send_order.php → samples/send_order.php
Expand Up @@ -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();

Expand All @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/PhinanceClient.php
Expand Up @@ -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, '.', '' );
Expand Down

0 comments on commit 1a3f284

Please sign in to comment.