zhouaini528 / bybit-php

Bybit API Like the official document interface, Support for arbitrary extension.
MIT License
24 stars 12 forks source link

BybitSpot #8

Open webflyx opened 2 years ago

webflyx commented 2 years ago

Hi! I'll try post order on Spot, my code:

$key = 'xxxx';
$secret = 'xxxx';

$bybit = new \Lin\Bybit\BybitSpot($key, $secret);

$result=$bybit->privates()->postOrder([
            'side'=>'Buy',
            'symbol'=>'BTCUSDT',
            'type'=>'MARKET',
            'qty'=>0.1,
        ]);

print_r($result);

But i get error Array ( [ret_code] => -1001 [ret_msg] => Internal error. [ext_code] => [ext_info] => [result] => )

could you tell me please what the mistake is? Thanks :)

zhouaini528 commented 2 years ago

Hi! I'll try post order on Spot, my code:

$key = 'xxxx';
$secret = 'xxxx';

$bybit = new \Lin\Bybit\BybitSpot($key, $secret);

$result=$bybit->privates()->postOrder([
            'side'=>'Buy',
            'symbol'=>'BTCUSDT',
            'type'=>'MARKET',
            'qty'=>0.1,
        ]);

print_r($result);

But i get error Array ( [ret_code] => -1001 [ret_msg] => Internal error. [ext_code] => [ext_info] => [result] => )

could you tell me please what the mistake is? Thanks :)

I've fixed it. Try again. composer update

webflyx commented 2 years ago

@zhouaini528 great, thanks :)